forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.8 MiB
1 lines
4.8 MiB
{"version":3,"sources":["fineui.ie.js","webpack:///webpack/bootstrap","webpack:///typescript/bundle.ts","webpack:///typescript/index.ts","webpack:///typescript/core/decorator/decorator.ts"],"names":["_classCallCheck","instance","Constructor","TypeError","e","o","t","r","exports","n","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","prototype","hasOwnProperty","p","s","Math","globalThis","window","self","Function","this","u","f","v","h","y","target","global","stat","a","noTargetGet","forced","undefined","sham","String","enforce","split","unsafe","source","join","toString","slice","g","x","WeakMap","has","set","getterFor","type","arguments","length","configurable","writable","push","version","mode","copyright","style","display","appendChild","src","contentWindow","document","open","write","close","F","promise","resolve","reject","getOwnPropertyDescriptor","min","ceil","floor","isNaN","apply","getPrototypeOf","constructor","stopped","result","next","done","stop","error","propertyIsEnumerable","1","valueOf","createElement","random","concat","getOwnPropertyNames","getOwnPropertySymbols","keys","indexOf","includes","normalize","replace","toLowerCase","data","NATIVE","POLYFILL","Array","isArray","b","S","O","j","w","P","forEach","map","filter","some","every","find","findIndex","callee","charCodeAt","charAt","codeAt","E","IteratorPrototype","A","BUGGY_SAFARI_ITERATORS","T","L","M","k","entries","name","values","proto","setPrototypeOf","__proto__","Promise","location","setImmediate","clearImmediate","process","MessageChannel","Dispatch","postMessage","protocol","host","nextTick","now","test","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","clear","allSettled","then","status","reason","RegExp","exec","lastIndex","index","iterator","max","defineProperties","assign","I","_","C","R","N","D","G","V","$","z","H","W","q","JSON","B","stringify","U","Y","J","K","Q","X","Z","tt","nt","et","QObject","rt","findChild","ot","it","tag","description","ut","ct","ft","pt","at","st","lt","wrap","for","keyFor","useSetter","useSimple","string","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","kind","Arguments","fetch","versions","v8","createEvent","dispatchEvent","PromiseRejectionEvent","all","notified","reactions","state","ok","fail","domain","rejection","enter","exit","initEvent","emit","parent","catch","race","return","from","MutationObserver","WebKitMutationObserver","fn","createTextNode","observe","characterData","console","real","finally","Error","errors","message","AggregateError","try","any","unicode","groups","ignoreCase","multiline","dotAll","sticky","_global","BI","prepares","searchElement","fromIndex","len","abs","lastIndexOf","Number","log","warn","debug","info","time","dir","profile","exception","trace","assert","localStorage","items","setItem","Cache","addCookie","getItem","getCookie","removeItem","deleteCookie","key","falsy","skipArray","__ob__","$accessors","$vbthis","$vbsetter","arg","Date","Set","match","add","ua","navigator","userAgent","reg","_sort","sort","tmp","func","thisArg","args","arrayAggregator","array","setter","iteratee","accumulator","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","arrayPush","offset","arrayReduce","initAccum","arraySome","asciiToArray","baseFindKey","collection","eachFunc","baseFindIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseUnary","baseValues","props","cacheHas","cache","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","iteratorToArray","mapToArray","size","overArg","transform","replaceHolders","PLACEHOLDER","safeGet","setToArray","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","pop","splice","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","hash","Map","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","paths","skip","baseClamp","number","lower","upper","baseClone","bitmask","customizer","stack","isDeep","CLONE_DEEP_FLAG","isFlat","CLONE_FLAT_FLAG","isFull","CLONE_SYMBOLS_FLAG","isObject","initCloneArray","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","FUNC_ERROR_TEXT","baseDifference","isCommon","valuesLength","valuesIndex","baseEvery","baseExtremum","current","isSymbol","baseFilter","baseFlatten","depth","isStrict","isFlattenable","baseForOwn","baseFor","baseForOwnRight","baseForRight","baseFunctions","isFunction","baseGet","path","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","undefinedTag","nullTag","symToStringTag","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","last","baseIsArguments","baseIsDate","dateTag","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","arrayTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","COMPARE_PARTIAL_FLAG","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","mapTag","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_UNORDERED_FLAG","baseIsNative","isMasked","pattern","reIsNative","reIsHostCtor","toSource","baseIsRegExp","regexpTag","baseIsSet","setTag","baseIsTypedArray","isLength","typedArrayTags","baseIteratee","identity","baseMatchesProperty","baseMatches","property","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","newValue","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","isPlainObject","toPlainObject","baseOrderBy","orders","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","baseRandom","nativeFloor","nativeRandom","baseRange","step","nativeMax","nativeCeil","baseRest","setToString","overRest","nested","baseSlice","baseSome","baseToString","symbolToString","INFINITY","baseUniq","createSet","seenIndex","baseUnset","actions","action","baseZipObject","assignFunc","valsLength","castArrayLikeObject","stringToPath","castSlice","buffer","allocUnsafe","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","cloneSymbol","symbol","symbolValueOf","typedArray","compareAscending","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","objCriteria","othCriteria","ordersLength","order","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBaseEach","iterable","createBaseFor","createBind","wrapper","root","Ctor","isBind","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","partialsRight","holdersRight","argPos","ary","holdersCount","newHolders","isBindKey","reorder","isFlip","reverse","isAry","WRAP_ARY_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_FLIP_FLAG","createInverter","toIteratee","createPartial","createRange","toFinite","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_CURRY_BOUND_FLAG","newData","isLaziable","setData","setWrapToString","createWrap","toInteger","getData","mergeData","baseSetData","customDefaultsMerge","customOmitClone","isPartial","arrValue","othValue","compared","dataViewTag","arrayBufferTag","boolTag","numberTag","errorTag","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","objectProto","memoizeCapped","memoize","MAX_MEMOIZE_SIZE","srcBitmask","newBitmask","isCombo","WRAP_REARG_FLAG","otherArgs","indexes","oldArray","reference","updateWrapDetails","shortOut","count","lastCalled","stamp","nativeNow","remaining","HOT_SPAN","HOT_COUNT","funcToString","wrapFlags","pair","compact","drop","findLastIndex","flattenDeep","head","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","previous","wrapperReverse","wrapped","wrapperValue","reduce","negate","isString","before","debounce","options","invokeFunc","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","rePropName","reRegExpChar","reEscapeChar","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","htmlEscapes","&","<",">","\"","'","parseFloat","parseInt","freeGlobal","freeSelf","freeExports","nodeType","freeModule","module","moduleExports","freeProcess","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","objectCreate","isConcatSpreadable","nativeGetSymbols","nativeIsBuffer","DataView","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","ctorString","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","groupBy","sortBy","defer","delay","assignIn","defaults","propsIndex","propsLength","defaultsDeep","mergeWith","invert","invertBy","merge","omit","pick","range","extend","each","first","isFilter","getIteratee","takeName","dropName","findLast","invokeMap","dropRight","takeRightWhile","takeWhile","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","names","define","amd","traverse","context","obj","_apply","_applyFunc","is","deepContains","UUID","str","isWidget","widget","Widget","View","createWidgets","item","createWidget","deepClone","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","formatEL","stripEL","trans2Element","widgets","wi","element","to","inverse","firstKey","res","lastKey","firstObject","lastObject","obj1","obj2","idx","backEach","backAny","backEvery","backFindKey","backFind","remove","contains","removeAt","string2Array","array2String","abc2Int","toUpperCase","int2Abc","num","DIGITS","makeObject","makeArrayByArray","isSorted","inherit","sb","sp","overrides","spp","superclass","init","initialized","freeze","isCapitalEqual","isWidthOrHeight","isNotNull","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTickHandler","pending","copies","callbacks","timerFunc","counter","observer","textNode","queueNextTick","cb","_resolve","getTime","performance","webkitNow","getDate","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","text","CRYPT_TYPE","AES","aesEncrypt","decrypt","aesDecrypt","leftPad","val","ch","format","isLeapYear","year","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","_MD","parseDateTime","fmt","today","yearlength","otherlength","substring","hr","sec","_MN","substr","getFullYear","getMonth","getHours","getMinutes","getSeconds","search","dt","timeZone","localTime","localOffset","getTimezoneOffset","utc","OB","config","_constructor","destroyed","_initProps","_init","_initRef","_defaultConfig","_initListeners","listeners","lis","eventName","ref","_purgeRef","_getEvents","events","on","fns","proxy","un","newFns","ifn","purgeListeners","fireEvent","destroy","tagName","attributes","disabled","invisible","invalid","baseCls","extraCls","cls","css","beforeInit","beforeCreate","created","render","beforeMount","mounted","shouldUpdate","update","beforeDestroy","_initRoot","_initElementWidth","_initElementHeight","_initVisual","_initState","_initRender","__asking","_render","__async","_initElement","_initEffects","widgetName","_isRoot","_parent","addWidget","_renderEngine","_isWidget","_baseCls","addClass","attr","_children","width","height","setEnable","setValid","_isMounted","els","_mount","_setParent","force","deep","lifeHook","isVisible","_mountChildren","isEnabled","_setEnable","isValid","_setValid","Events","MOUNT","isMounted","setWidth","setHeight","enable","child","_manualSetEnable","valid","_manualSetValid","_setVisible","visible","removeClass","setVisible","VIEW","doBehavior","getWidth","getHeight","getName","DESTROY","getWidgetByName","removeWidget","nameOrWidget","hasWidget","getText","setText","setValue","disable","__d","_unMount","UNMOUNT","isolate","DOM","hang","empty","_destroy","registerRenderEngine","engine","createFragment","createDocumentFragment","mount","container","hydrate","ws","patchProps","children","triggerLifeHook","append","kv","shortcut","component","xtype","getWidget","getObject","CryptoJS","C_lib","lib","Base","subtype","mixIn","$super","propertyName","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","C_enc","enc","hexChars","bite","parse","hexStr","hexStrLength","Latin1","latin1Chars","fromCharCode","latin1Str","latin1StrLength","Utf8","decodeURIComponent","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","Hasher","cfg","_doReset","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","C_algo","HMAC","algo","Base64","_map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","FF","GG","HH","II","sin","MD5","_hash","offset_i","M_offset_i","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","HmacMD5","EvpKDF","keySize","iterations","compute","password","salt","derivedKey","derivedKeyWords","block","Cipher","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","_key","dataUpdate","finalProcessedData","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","ciphertext","StreamCipher","finalProcessedBlocks","C_mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","processBlock","encryptBlock","thisBlock","decryptBlock","C_pad","pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","BlockCipher","modeCreator","_mode","CipherParams","cipherParams","formatter","C_format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","derivedParams","ECB","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x2","x4","x8","RCON","keyWords","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","_doCryptBlock","s0","s1","s2","s3","round","t0","t1","t2","t3","base64Cipher","decipher","aspect","advice","exist","dispatcher","beforeArr","rs","method","afterArr","after","ii","aspectArr","_index","_keyStr","_utf8_encode","utftext","_utf8_decode","c3","c2","encode","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","decode","_prefix","setUsername","username","getUsername","_getKeyPrefix","_generateKey","expiresHours","cookieString","date","setTime","toUTCString","cookie","CellSizeAndPositionManager","cellCount","cellSizeGetter","estimatedCellSize","_cellSizeGetter","_cellCount","_estimatedCellSize","_cellSizeAndPositionData","_lastMeasuredIndex","configure","getCellCount","getEstimatedCellSize","getLastMeasuredIndex","getSizeAndPositionOfCell","lastMeasuredCellSizeAndPosition","getSizeAndPositionOfLastMeasuredCell","getTotalSize","getUpdatedOffsetForIndex","align","containerSize","currentOffset","targetIndex","datum","maxOffset","minOffset","idealOffset","totalSize","getVisibleCellRange","_findNearestCell","resetCell","_binarySearch","high","low","middle","_exponentialSearch","interval","lastMeasuredIndex","ScalingCellSizeAndPositionManager","maxScrollSize","_cellSizeAndPositionManager","_maxScrollSize","getOffsetAdjustment","safeTotalSize","offsetPercentage","_getOffsetPercentage","_safeOffsetToOffset","_offsetToSafeOffset","_ChineseFirstPY","oMultiDiff","19969","19975","19988","20048","20056","20060","20094","20127","20167","20193","20250","20256","20282","20285","20291","20314","20315","20340","20375","20389","20391","20415","20446","20447","20504","20608","20854","20857","20911","20985","21032","21048","21049","21089","21119","21242","21273","21305","21306","21330","21333","21345","21378","21397","21414","21442","21477","21480","21484","21494","21505","21512","21523","21537","21542","21549","21571","21574","21588","21589","21618","21621","21632","21654","21679","21683","21710","21719","21734","21769","21780","21804","21834","21899","21903","21908","21939","21956","21964","21970","22003","22031","22040","22060","22066","22079","22129","22179","22237","22244","22280","22300","22313","22331","22343","22351","22395","22412","22484","22500","22534","22549","22561","22612","22771","22831","22841","22855","22865","23013","23081","23487","23558","23561","23586","23614","23615","23631","23646","23663","23673","23762","23769","23780","23884","24055","24113","24162","24191","24273","24324","24377","24378","24439","24554","24683","24694","24733","24925","25094","25100","25103","25153","25170","25179","25203","25240","25282","25303","25324","25341","25373","25375","25384","25457","25528","25530","25552","25774","25874","26044","26080","26292","26333","26355","26366","26397","26399","26415","26451","26526","26552","26561","26588","26597","26629","26638","26646","26653","26657","26727","26894","26937","26946","26999","27099","27449","27481","27542","27663","27748","27784","27788","27795","27812","27850","27852","27895","27898","27973","27981","27986","27994","28044","28065","28177","28267","28291","28337","28463","28548","28601","28689","28805","28820","28846","28952","28975","29100","29325","29575","29602","30010","30044","30058","30091","30111","30229","30427","30465","30631","30655","30684","30707","30729","30796","30917","31074","31085","31109","31181","31192","31293","31400","31584","31896","31909","31995","32321","32327","32418","32420","32421","32438","32473","32488","32521","32527","32562","32564","32735","32793","33071","33098","33100","33152","33261","33324","33333","33406","33426","33432","33445","33486","33493","33507","33540","33544","33564","33617","33632","33636","33637","33694","33705","33728","33882","34067","34074","34121","34255","34259","34425","34430","34485","34503","34532","34552","34558","34593","34660","34892","34928","34999","35048","35059","35098","35203","35265","35299","35782","35828","35830","35843","35895","35977","36158","36228","36426","36466","36710","36711","36767","36866","36951","37034","37063","37218","37325","38063","38079","38085","38107","38116","38123","38224","38241","38271","38415","38426","38461","38463","38466","38477","38518","38551","38585","38704","38739","38761","38808","39048","39049","39052","39076","39271","39534","39552","39584","39647","39730","39748","40109","40479","40516","40536","40583","40765","40784","40840","40863","_checkPYCh","uni","_mkPYRslt","ignoreMulti","splitChar","arrRslt","multiLen","strlen","tmpStr","tmpArr","makeFirstPY","arrResult","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","MouseMoveTracker","onMove","onMoveEnd","domNode","_isDragging","_animationFrameID","_domNode","_onMove","_onMoveEnd","_onMouseMove","_onMouseUp","_didMouseMove","captureMouseMoves","event","_eventMoveToken","_eventUpToken","EventListener","listen","_deltaX","_deltaY","_x","clientX","_y","clientY","preventDefault","returnValue","releaseMouseMoves","isDragging","normalizeWheel","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","PIXEL_STEP","deltaY","deltaX","deltaMode","LINE_HEIGHT","PAGE_HEIGHT","spinX","spinY","pixelX","pixelY","WheelHandler","onWheel","handleScrollX","handleScrollY","stopPropagation","_didWheel","_handleScrollX","_handleScrollY","_stopPropagation","_onWheelCallback","normalizedEvent","changed","cancelBubble","defaultComparator","Heap","_items","_size","_comparator","_heapify","elt","lastElt","_sinkDown","_bubbleUp","peek","parentIndex","parentElt","leftChildIndex","rightChildIndex","swapIndex","leftChild","rightChild","LinkHashMap","scope","re","LRU","limit","tail","_keymap","put","removed","newer","older","returnEntry","node","Int32Array","xs","ceilLog2","PrefixIntervalTree","_half","_heap","getSize","sumUntil","sumTo","inclusiveEnd","begin","greatestLowerBound","leftSum","greatestStrictLowerBound","leastUpperBound","leastStrictUpperBound","uniform","initialValue","Queue","capacity","getElementByIndex","unshift","fromArray","Section","_indexMap","_indices","addCellIndex","getCellIndices","SECTION_SIZE","SectionManager","sectionSize","_sectionSize","_cellMetadata","_sections","indices","getSections","section","getCellMetadata","sectionXStart","sectionXStop","sectionYStart","sectionYStop","sections","sectionX","sectionY","getTotalSectionCount","registerCell","cellMetadatum","Tree","Node","addNode","newNode","addChild","isRoot","getRoot","initTree","nodes","queue","_toJSON","getChildren","toJSON","_toJSONWithNode","toJSONWithNode","param","_traverse","callback","_recursion","route","recursion","inOrderTraverse","_inOrderTraverse","getLeft","getRight","nrInOrderTraverse","preOrderTraverse","_preOrderTraverse","nrPreOrderTraverse","postOrderTraverse","_postOrderTraverse","nrPostOrderTraverse","preNode","isLeaf","getChildrenLength","getFirstChild","getLastChild","setLeft","left","setRight","right","setParent","getParent","getChild","getChildIndex","removeChildByIndex","behind","removeAllChilds","cur","equals","transformToArrayFormat","pId","newNodes","arrayFormat","transformToTreeFormat","sNodes","tmpMap","treeFormat","traversal","Vector","cross","sqrt","Region","isIntersects","isPointInside","vector1","vector2","vector3","getPosition","pos","BehaviorFactory","createBehavior","behavior","HighlightBehavior","RedMarkBehavior","Behavior","rule","Layout","scrollable","scrollx","scrolly","_init4Margin","_init4Scroll","top","bottom","overflow-x","overflow-y","appendFragment","frag","hasChild","_getChildName","_addElement","removeItemAt","_getOptions","_compare","item1","item2","aStack","bStack","className","areArrays","_getWrapper","_addItemAt","_removeItemAt","addItem","addItemAt","prependItem","prependTo","deleted","newItems","newChildren","shouldUpdateItem","updateItemAt","updated","del","addItems","fragment","added","prependItems","prepend","patchItem","oldVnode","vnode","updateChildren","oldCh","newCh","sameVnode","vnode1","vnode2","oldIndex","newIndex","opt","addVnodes","vnodes","startIdx","endIdx","insertBefore","removeVnodes","insert","isNext","insertKey","beforeKey","findOldVnode","vNode","beginIdx","found","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","sameOldVnode","stroke","removeIndex","populate","resize","_WidgetsPlugin","_ObjectPlugin","_ConfigPlugin","_GlobalWidgetConfigFn","_GlobalObjectConfigFn","widgetConfigFn","objectConfigFn","configWidget","registerWidget","relieveWidget","registerObject","relieveObject","Action","tar","actionPerformed","actionBack","ActionFactory","createAction","ShowAction","isInvalidDate","_eFormat","eFormat","neg","magnitudeNeg","magnitude","pow","integerLen","getInteger","precision","getPrecision","isValueCarry","isValueCarried","toFixed","formatExponential","isAllZero","formatLeft","valueLeftLen","roundNum","_dealNumberPrecision","fright","_numberFormat","numMod","fp","fleft","tp","tleft","tright","paddingZero","_dealWithRight","leftPlus","_dealWithLeft","rll","numReg","orilen","newnum","combo","com","tll","newstr","lres","cjkEncode","newText","code","cjkDecode","rightIdx","subText","eval","SPECIAL_TAGS","htmlEncode","replaceAll","htmlDecode","cjkEncodeDO","jsonEncode","useHasOwn","\b","\t","\n","\f","\r","\\","encodeString","encodeArray","__time__","jsonDecode","_hasDateInJson","json","jo","parseJSON","getEncodeURL","urlTemplate","ori","url","specialCharsMap","reserveSpecialCharsMap","initialChar","encodeChar","contentFormat","cv","needTrim","date2Str","parseFmt","str2Date","compileJFmt","jfmt","_DN","getDay","hour","getTimezone","flagch","char","object2Number","object2Date","object2Time","doBe","run","doHighLight","unHighLight","Single","doRedMark","unRedMark","Controller","EVENT_CHANGE","BroadcastController","_broadcasts","send","BubblesController","_const","bubbleHeight","bubblesManager","storeBubbles","Resizers","_createBubble","direct","level","direction","_getOffsetLeft","offsetStyle","bounds","_getOffsetTop","_getLeftPosition","position","getLeftPosition","_getBottomPosition","getBottomPosition","_getTopPosition","getTopPosition","_getRightPosition","getRightPosition","show","adjustYOffset","adjustXOffset","isTopSpaceEnough","isLeftSpaceEnough","isRightSpaceEnough","hide","bubble","LayerController","layerManager","zindex","zIndex_layer","_resize","layer","trigger","make","op","layout","outerWidth","outerHeight","_getLayout","removeAll","MaskersController","zIndex_masker","PopoverController","modal","floatManager","floatLayer","floatContainer","floatOpened","zIndex_popover","zindexMap","_check","popover","Popover","EVENT_CLOSE","__hasZIndexMask__","__releaseZIndexMask__","__buildZIndexMask__","setZindex","ResizeController","resizerManger","ev","resizer","TooltipsController","tooltipsManager","showingTips","_createTooltip","stopEvent","tooltip","tip","belowMouse","scrollHeight","pageX","pageY","bodyHeight","hover","KEYDOWN","BACKSPACE","SPACE","ENTER","CONFIRM","ERROR","PAUSE","CLEAR","ADD","EDITING","EMPTY","RESIZE","BEFOREEDIT","AFTEREDIT","STARTEDIT","STOPEDIT","CHANGE","EXPAND","COLLAPSE","CALLBACK","CLICK","STATECHANGE","BEFORESTATECHANGE","INIT","AFTERINIT","SCROLL","STARTLOAD","AFTERLOAD","BS","AS","SC","SF","SS","BVW","AVW","AV","BW","AW","WS","WF","BA","AA","BD","AD","UC","BTOPDF","ATOPDF","BTOEXCEL","ATOEXCEL","BTOWORD","ATOWORD","BTOIMAGE","ATOIMAGE","BTOHTML","ATOHTML","BIMEXCEL","AIMEXCEL","BPDFPRINT","APDFPRINT","BFLASHPRINT","AFLASHPRINT","BAPPLETPRINT","AAPPLETPRINT","BSEVERPRINT","ASERVERPRINT","BEMAIL","AEMAIL","pushArray","sArray","pushDistinct","pushDistinctArray","i18nText","_SDN","_FD","_SMN","_QN","_OFFSET","SECOND","MINUTE","HOUR","DAY","WEEK","getMonthDays","month","getLastDateOfMonth","getDayOfYear","getWeekNumber","week","startOfWeek","StartOfWeek","middleDay","offsetWeekStartCount","offsetWeekMiddleCount","setDate","ms","setMonth","getQuarter","getOffsetDate","getOffsetQuarter","day","monthDay","getQuarterStartMonth","quarterStartMonth","nowMonth","getQuarterStartDate","getQuarterEndDate","quarterEndMonth","getOffsetMonth","getWeekStartDate","getWeekEndDate","print","yWith4number","wn","qr","pm","ir","dy","isKhtml","par","Func","createDistinctName","getGBWidth","getSearchResult","keyword","py","matched","pidx","beforeFunc","sFunc","__self","afterFunc","ret","accAdd","arg1","arg2","r1","r2","cm","sub","accSub","mul","accMul","div","digitLength","eSplit","float2Fixed","dLen","times","num1","num2","others","_i","num1Changed","num2Changed","baseNum","leftValue","accDivide","startWith","startTag","endWith","endTag","getQuery","appendQuery","paras","perfectStart","allIndexOf","loc","i18nStore","addI18n","i18n","localeText","moduleInjection","constantInjection","modelInjection","model","storeInjection","store","serviceInjection","service","providerInjection","provider","configFunctions","configFn","providers","globalAction","actionFn","points","point","pointFn","Modules","getModule","getAllModules","Constants","getConstant","callPoint","inst","types","bfns","afns","Models","getModel","mixins","stores","Stores","getStore","services","Services","getService","providerInstance","Providers","getProvider","$get","Actions","runAction","act","runGlobalAction","getContext","ShowListener","eventObj","cardLayout","cardNameCreator","cardCreator","emptyFn","afterCardCreated","afterCardShow","ob","cardName","isCardExisted","card","addCardByName","showCardByName","StyleLoaderManager","stylesManager","loadStyle","styleString","styles","getElementsByTagName","setAttribute","styleSheet","cssText","removeStyle","parentNode","Logic","createLogic","LogicFactory","Type","Vertical","Horizontal","Table","HorizontalFill","logic","VerticalLayoutLogic","HorizontalLayoutLogic","TableLayoutLogic","HorizontalFillLayoutLogic","createLogicTypeByDirection","Direction","Top","Bottom","Custom","Left","Right","createLogicItemsByDirection","dynamic","hgap","vgap","lgap","rgap","tgap","bgap","columns","rows","columnSize","rowSize","_isSupportFlex","isSupportFlex","isSupportCss3","isIE","supportFlex","isLessIE8","getIEVersion","verticalAlign","VerticalAlign","Middle","horizontalAlign","HorizontalAlign","Center","justOneItem","attachEvent","stylesCreated","requestFrame","raf","cancelFrame","resetTriggers","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","offsetWidth","offsetHeight","checkTriggers","__resizeLast__","scrollListener","__resizeRAF__","__resizeListeners__","animation","animationstring","keyframeprefix","animationstartevent","domPrefixes","startEvents","pfx","elm","animationName","animationKeyframes","animationStyle","createStyles","addResizeListener","getComputedStyle","innerHTML","removeResizeListener","detachEvent","removeEventListener","ResizeDetector","ready","fromElement","toElement","elemData","jQuery","eventKey","handler","namespace","fromChildren","toChildren","doms","dom","isExist","preloadImages","srcArray","onload","complete","images","Image","onerror","getTextSizeWidth","fontSize","span","appendTo","getTextSizeHeight","getScrollWidth","_scrollWidth","ul","overflow","clientWidth","getImage","fillStyle","backgroundColor","canvas","ratio","ctx","font","measureText","textBaseline","fillText","backColor","toDataURL","isColor","color","isRGBColor","isHexColor","isDarkColor","hex","rgb","rgb2json","hex2rgb","grayLevel","getContrastColor","rgb2hex","rgbColour","rgbValues","red","green","blue","hexColour","int2hex","rgba2json","json2rgb","json2rgba","rgba","strNum","hexdig","tempValue","colorArray","rgba2rgb","rgbColor","bgColor","popup","extraWidth","getInnerLeftPosition","getInnerRightPosition","viewBounds","extraHeight","isInnerLeftSpaceEnough","windowBounds","isInnerRightSpaceEnough","isBottomSpaceEnough","isRightSpaceLarger","isBottomSpaceLarger","getLeftAlignPosition","getLeftAdaptPosition","getRightAlignPosition","comboBounds","getRightAdaptPosition","getTopAlignPosition","needAdaptHeight","comboOffset","popupBounds","adaptHeight","getTopAdaptPosition","getBottomAlignPosition","getBottomAdaptPosition","getCenterAdaptPosition","getMiddleAdaptPosition","getComboPositionByDirections","directions","leftRight","topBottom","innerLeftRight","isNeedAdaptHeight","tbFirst","lrFirst","firstDir","tW","tH","change","getComboPosition","maxHeight","resetHeight","eventType","capture","registerDefault","__isIE","__IEVersion","agent","v1","v2","isIE9Below","isEdge","isChrome","isFireFox","isOpera","isSafari","isMac","isWindows","humpString","htmlStyle","documentElement","_toHumb","$0","$1","isArraylike","createOptions","optionsCache","core_rnotwhite","flag","internalData","elem","pvt","acceptData","thisCache","internalKey","expando","getByName","isNode","core_deletedIds","guid","camelCase","internalRemoveData","isEmptyDataObject","cleanData","support","deleteExpando","dataAttr","rmultiDash","getAttribute","rbrace","returnTrue","returnFalse","sibling","winnow","elements","qualifier","keep","grep","retVal","filtered","isSimple","inArray","createSafeFragment","list","nodeNames","safeFrag","findOrAppend","ownerDocument","disableScript","getAttributeNode","specified","restoreScript","rscriptTypeMasked","removeAttribute","setGlobalEval","elems","refElements","cloneCopyEvent","dest","hasData","oldData","curData","handle","fixCloneNodeIssues","nodeName","noCloneEvent","removeEvent","outerHTML","html5Clone","manipulation_rcheckableType","defaultChecked","checked","defaultSelected","selected","getAll","core_strundefined","querySelectorAll","childNodes","fixDefaultChecked","vendorPropName","capName","origName","cssPrefixes","isHidden","showHide","hidden","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","augmentWidthOrHeight","extra","isBorderBox","cssExpand","getWidthOrHeight","valueIsBorderBox","getStyles","boxSizing","curCSS","rnumnonpx","boxSizingReliable","doc","elemdisplay","actualDisplay","iframe","contentDocument","detach","body","buildParams","traditional","rbracket","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspect","inspected","prefilterOrFactory","dataTypeOrTransport","seekingTransport","transports","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","responses","firstDataType","finalDataType","contents","responseFields","mimeType","getResponseHeader","converters","ajaxConvert","response","conv2","conv","prev","dataFilter","createStandardXHR","XMLHttpRequest","createActiveXHR","ActiveXObject","createFxNow","fxNow","createTweens","tweeners","Animation","animationPrefilters","deferred","Deferred","always","tick","currentTime","startTime","duration","percent","tweens","notifyWith","resolveWith","opts","specialEasing","originalProperties","createTween","tween","Tween","easing","gotoEnd","rejectWith","propFilter","fx","timer","anim","progress","hooks","cssHooks","defaultPrefilter","dataShow","toggle","oldfire","orig","handled","_queueHooks","unqueued","fire","overflowX","overflowY","inlineBlockNeedsLayout","zoom","shrinkWrapBlocks","rfxtypes","_removeData","genFx","includeWidth","which","opacity","getWindow","defaultView","parentWindow","readyList","rootjQuery","_jQuery","_$","class2type","core_version","core_concat","core_push","core_slice","core_indexOf","core_toString","core_hasOwn","core_trim","selector","core_pnum","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","letter","completed","readyState","jquery","parseHTML","getElementById","pushStack","prevObject","copyIsArray","isReady","readyWait","holdReady","hold","off","msg","keepScripts","parsed","scripts","buildFragment","parseXML","xml","DOMParser","parseFromString","async","loadXML","globalEval","execScript","results","second","inv","access","chainable","emptyGet","raw","bulk","frameElement","doScroll","doScrollCheck","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","stopOnFalse","unique","lock","locked","fireWith","tuples","newDefer","tuple","returned","notify","pipe","stateString","when","subordinate","resolveValues","updateFunc","contexts","progressValues","progressContexts","resolveContexts","select","isSupported","getSetAttribute","leadingWhitespace","firstChild","tbody","htmlSerialize","hrefNormalized","cssFloat","checkOn","optSelected","enctype","cloneNode","boxModel","compatMode","reliableMarginRight","pixelPosition","noCloneChecked","optDisabled","radioValue","appendChecked","checkClone","lastChild","click","submit","focusin","backgroundClip","clearCloneStyle","marginDiv","tds","divReset","reliableHiddenOffsets","doesNotIncludeMarginInBodyOffset","offsetTop","marginRight","noData","embed","applet","removeData","dequeue","startLength","speeds","timeout","clearQueue","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","rboolean","ruseDefault","getSetInput","removeAttr","removeProp","propFix","classes","clazz","proceed","toggleClass","stateVal","isBool","classNames","hasClass","valHooks","option","selectedIndex","one","notxml","nType","isXMLDoc","attrHooks","propName","attrNames","tabindex","readonly","class","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable","propHooks","tabIndex","attributeNode","href","button","setAttributeNode","createAttribute","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","triggered","dispatch","delegateType","bindType","needsContext","expr","delegateCount","setup","mappedTypes","origCount","teardown","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","isPropagationStopped","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","srcElement","metaKey","original","charCode","keyCode","eventDoc","clientLeft","clientTop","relatedTarget","load","focus","activeElement","blur","beforeunload","simulate","isSimulated","defaultPrevented","getPreventDefault","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","related","submitBubbles","form","_submit_bubble","changeBubbles","_just_changed","focusinBubbles","attaches","origFn","unbind","delegate","undelegate","triggerHandler","isNative","rnative","createCache","Expr","cacheLength","markFunction","Sizzle","seed","old","nid","newContext","newSelector","preferredDoc","setDocument","documentIsXML","getByClassName","getElementsByClassName","qsa","rbuggyQSA","tokenize","rescape","toSelector","rsibling","qsaError","siblingCheck","diff","sourceIndex","MAX_NEGATIVE","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","parseOnly","tokens","soFar","preFilters","cached","tokenCache","preFilter","rcomma","rcombinators","matchExpr","addCombinator","matcher","combinator","base","checkNonElements","doneName","outerCache","dirkey","dirruns","cachedruns","elementMatcher","matchers","condense","unmatched","newUnmatched","setMatcher","postFilter","postFinder","postSelector","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","relative","implicitRelative","matchContext","matchAnyContext","outermostContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","uniqueSort","token","runescape","funescape","compile","setFilters","isXML","hasDuplicate","docElem","rbuggyMatches","sortOrder","classCache","compilerCache","strundefined","whitespace","characterEncoding","identifier","operators","pseudos","rpseudo","ridentifier","ID","CLASS","NAME","TAG","ATTR","PSEUDO","CHILD","rinputs","rheader","rattributeQuotes","escaped","tagNameNoComments","createComment","pass","getElementsByName","getIdNotName","attrHandle","attrId","matchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","aup","ap","bp","detectDuplicates","duplicates","textContent","nodeValue","selectors","createPseudo"," ","+","~","excess","unquoted","operator","check","what","simple","forward","ofType","nodeIndex","useCache","pseudo","not","innerText","lang","elemLang","hasFocus","enabled","header","even","odd","gt","radio","checkbox","file","image","filters","runtil","rparentsprev","rneedsContext","guaranteedUnique","targets","closest","prevAll","addBack","andSelf","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","rchecked","rscriptType","rcleanScript","wrapMap","legend","area","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","wrapAll","html","wrapInner","unwrap","replaceWith","domManip","keepData","dataAndEvents","deepDataAndEvents","table","hasScripts","iNoClone","ajax","throws","insertAfter","destElements","srcElements","inPage","selection","safe","ralpha","ropacity","rposition","rdisplayswap","rmargin","rrelNum","BODY","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","bool","cssNumber","columnCount","fillOpacity","lineHeight","orphans","widows","zIndex","cssProps","float","swap","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","rsLeft","runtimeStyle","pixelLeft","margin","border","suffix","expanded","parts","r20","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","fnOver","fnOut","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","allTypes","params","responseText","success","active","lastModified","etag","isLocal","processData","contentType","accepts","*","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","nativeStatusText","headers","isSuccess","modified","statusText","timeoutTimer","transport","responseHeadersString","ifModified","cacheURL","callbackContext","statusCode","fireGlobals","globalEventContext","completeDeferred","responseHeaders","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","abort","finalText","crossDomain","hasContent","beforeSend","getScript","getJSON","script","text script","scriptCharset","charset","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","xhr","cors","xhrFields","err","firefoxAccessException","unload","rfxnum","rrun","unit","scale","maxIterations","tweener","prefilter","eased","cssFn","speed","animate","fadeTo","optall","doAnimation","finish","stopQueue","timers","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","swing","cos","PI","setInterval","clearInterval","slow","fast","animated","setOffset","win","box","getBoundingClientRect","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentOffset","scrollTo","Height","Width","content","","defaultExtra","insets","hasIgnoredBounds","__textKeywordMarked__","textLeft","tidx","ps","getDomHeight","hasVerticalScroll","hasHorizonScroll","clientHeight","getStyle","computedStyle","styleFloat","__isMouseInBounds__","offset2Body","zIndexMask","domArray","indexMask","mask","z-index","$import","loadReady","must","$scripts","_LOADED","$links","ext","link","rel","multiply","divide","acc","fractionDigits","RangeError","MAX","MIN","EVENT_RESPONSE_TIME","zIndex_popup","zIndex_tip","emptyStr","Key","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","KeyCode","COMMA","DELETE","DOWN","END","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","TAB","UP","Status","SUCCESS","WRONG","START","WAITING","READY","RUNNING","OUTOFBOUNDS","NULL","Axis","Selection","Default","None","Multi","All","Stretch","AbsoluteCenterLayout","AbsoluteHorizontalLayout","AbsoluteVerticalLayout","CenterAdaptLayout","_ref","HorizontalAdaptLayout","LeftRightVerticalAdaptLayout","llgap","lrgap","lhgap","rlgap","rrgap","rhgap","layoutArray","textAlign","LeftVerticalAdaptLayout","RightVerticalAdaptLayout","TableAdaptLayout","$table","white-space","max-width","vertical-align","margin-top","margin-left","margin-right","margin-bottom","VerticalAdaptLayout","HorizontalAutoLayout","FloatHorizontalLayout","InlineCenterAdaptLayout","InlineLayout","whiteSpace","InlineVerticalAdaptLayout","FlexCenterLayout","flex-shrink","FlexHorizontalCenter","FlexHorizontalLayout","FlexVerticalCenter","FlexVerticalLayout","FlexWrapperCenterLayout","$wrapper","FlexWrapperHorizontalCenter","FlexWrapperHorizontalLayout","FlexWrapperVerticalCenter","FlexWrapperVerticalLayout","AbsoluteLayout","AdaptiveLayout","BorderLayout","regions","CardLayout","showIndex","tItem","defaultShowName","getCardByName","_deleteCardByName","deleteCardByName","cardItem","lastShowIndex","showLastCard","setDefaultShowName","getDefaultShowName","getAllCardNames","getShowingCard","deleteAllCard","hideAllCard","isAllCardHide","removeName","DefaultLayout","DivisionLayout","opitons","firstElement","row","widths","heights","column","totalW","lastW","totalH","FloatLeftLayout","FloatRightLayout","GridLayout","HorizontalLayout","border-spacing","border-collapse","$tr","HorizontalCellLayout","*display","*zoom","LatticeLayout","TableLayout","HTapeLayout","VTapeLayout","TdLayout","VerticalLayout","WindowLayout","CenterLayout","FloatCenterLayout","HorizontalCenterLayout","VerticalCenterLayout","MODE","BufferPool","_Shared","SharingPool","shared","cat","Req","factory","require","Fix","_$1","makeHashCode","rhashcode","_toString","parsePath","bailRE","segments","$$skips","cloneShadow","__ref__","isShadowEqual","getMixins","mixinInjection","runBinaryFunction","binarys","watch","vm","expOrFn","$watch","$vm","user","exps","watchers","running","oldValue","sync","isGlobal","getter","$$skipArray","_getter","currentModels","_loop","models","initState","_stateWatchers","_loop2","_key2","userDef","Watcher","_modelHashId","listener","defaultCallback","initComputed","_computedWatchers","_computedOrder","initWatch","watchObj","_watchers","createWatcher","injectMethod","$digest","initMethods","methods","initMixins","mixinType","mixin$$1","defineContext","getSingleContext","childContext","_contextWatchers","digestState","dirty","watcher","digestComputed","dirtyQueue","cleanQueue","digestContext","contextListeners","digest","stateDirty","contextDirty","computedDirty","ttl","TTL","_ttl","_ttl2","executeWatchListeners","syncListeners","asyncListeners","listner","refreshAllDefineModel","allDefineModelInstances","insta","getAllModelInstances","allModelInstances","refreshAll","Model","getModelID","originalMethods","_len","channel","port","SymbolProto","ObjProto","deepEq","_wrapped","aCtor","bCtor","falsy$1","||","&&","(",")","getInstance","nextListener","callbackMap","queueNextListener","alive","watch$$1","orgEvent","delta","absDelta","offsetX","offsetY","pageHeight","lowestDelta","shouldAdjustOldDeltas","normalizeOffset","boundingRect","deltaFactor","nullLowestDeltaTimeout","nullLowestDelta","adjustOldDeltas","toFix","toBind","documentMode","mousewheel","onmousewheel","unmousewheel","Pane","tipText","overlap","onLoaded","_assertTip","_tipText","loading","loadingAnimation","setTipVisible","Layers","_loading","loaded","EVENT_LOADED","conf","title","warningTitle","tipType","_showToolTip","getTipType","getTitle","getWarningTitle","Tooltips","_hideTooltip","enableHover","_clearTimeOut","showTimeout","hideTimeout","_hoverBinded","_e","disabledHover","setTitle","setWarningTitle","isReadOnly","Text","highLight","padding-left","padding-right","padding-top","padding-bottom","_getTextWrap","textOverflow","_getShowText","setStyle","BasicButton","forceSelected","forceNotSelected","disableSelected","shadow","isShadowShowingOnSelected","setSelected","bindEvent","_createShadow","assertMask","$mask","mouseup","_hover","isSelected","clk","isOnce","destroyWhenHide","getBubble","BubblePopupBarView","EVENT_CLICK_TOOLBAR_BUTTON","hideView","onClick","BubbleCombo","EVENT_BEFORE_POPUPVIEW","isViewVisible","showView","hand","triggerArr","mouseDown","mousedown","_trigger","dblclick","doClick","_doClick","isDisableSelected","isForceSelected","isForceNotSelected","beforeClick","dishover","NodeButton","setOpened","isOpened","triggerCollapse","triggerExpand","Tip","ButtonGroup","behaviors","chooseType","_createBtns","_btnsCreator","buttons","btn","CHOOSE_TYPE_SINGLE","CHOOSE_TYPE_NONE","_packageBtns","btns","_packageSimpleItems","_packageItems","packBtns","_packageLayout","lay","_isSimpleLayout","removeItems","setNotSelectedValue","setEnabledValue","getNotSelectedValue","getAllButtons","getAllLeaves","getSelectedButtons","getNotSelectedButtons","getIndexByValue","getNodeById","getNodeByValue","CHOOSE_TYPE_MULTI","CHOOSE_TYPE_ALL","CHOOSE_TYPE_DEFAULT","ButtonTree","leaves","vs","TreeView","selectedValues","itemsCreator","_stop","_createTree","_loadMore","setSelectedValue","tree","_selectTreeNode","treeId","treeNode","_configSetting","getCheckStatus","half","checkNode","getUrl","_getParentValues","beforeExpand","isAjaxing","Msg","toast","ajaxGetNodes","onAsyncSuccess","halfCheck","zTree","totalCount","perTime","updateNode","selectNode","onAsyncError","textStatus","errorThrown","reloadType","reAsyncChildNodes","beforeCheck","track","treeObj","getSelectedNodes","onCheck","onExpand","onCollapse","setting","autoParam","otherParam","simpleData","showIcon","expandSpeed","nameIsHTML","dblClickExpand","getParentNode","_getNodeValue","_getHalfSelectedValues","checkState","parentValues","_buildTree","storeValues","_getTree","_addTreeNode","_getSelectedValues","hashMap","rootNoots","getNodes","_dealWidthNodes","ns","isParent","setLoading","hasNext","setLoaded","setEnd","addNodes","_initTree","hasChecked","getCheckedNodes","checkAll","setNode","checkAllNodes","expandAll","updateValue","refresh","getNodesByParam","REQ_TYPE_INIT_DATA","REQ_TYPE_ADJUST_DATA","REQ_TYPE_SELECT_DATA","REQ_TYPE_GET_SELECTED_DATA","EVENT_INIT","EVENT_AFTERINIT","AsyncTree","TreeRenderPageService","subNodeListGetter","tId","getZTreeObj","_beforeExpandNode","tNode","pNode","_getJoinValue","pushNodeList","removeNodeList","_join","valueA","valueB","checkedValues","PartTree","lastSearchValue","_getUnionValue","curSelectedValue","notSelectedValue","new_values","_union","ListTreeView","_constants","SPLIT","_checkValue","chkboxType","_transArrayToMap","treeArrays","_transMapToArray","treeMap","storeValue","ListAsyncTree","ListPartTree","Maskers","Bubbles","Popovers","Broadcasts","StyleLoaders","CollectionView","cellSizeAndPositionGetter","horizontalOverscanSize","verticalOverscanSize","renderedCells","renderedKeys","renderRange","_scrollLock","_debounceRelease","scroll","_calculateChildrenToRender","EVENT_SCROLL","_calculateSizeAndPositionData","_populate","cellMetadata","sectionManager","_sectionManager","_height","_width","_cellRenderers","_lastRenderedCellIndices","_cellGroupRenderer","rendered","_getMaxScrollLeft","_getMaxScrollTop","minY","maxY","minX","maxX","childrenToDisplay","renderedWidgets","lefts","tops","leftMap","topMap","leftBorder","rightBorder","topBorder","bottomBorder","assertMinBorder","MAX_VALUE","assertMaxBorder","_left","_top","startTopIndex","endTopIndex","startLeftIndex","endLeftIndex","existSet","addSet","deleteArray","addedItems","_reRange","setScrollLeft","setScrollTop","setOverflowX","setOverflowY","getScrollLeft","getScrollTop","getMaxScrollLeft","getMaxScrollTop","_clearChildren","restore","cell","Combo","isDefaultInit","isNeedAdjustHeight","isNeedAdjustWidth","adjustLength","hideChecker","comboClass","hoverClass","_initCombo","_initPullDownAction","_popupView","_hideView","EVENT_EXPAND","EVENT_COLLAPSE","EVENT_TRIGGER_CHANGE","_assertPopupView","_toggle","_assertPopupViewRender","popupView","enterPopup","evs","EVENT_AFTER_INIT","_rendered","_hideIf","adjustWidth","adjustHeight","isHide","EVENT_BEFORE_HIDEVIEW","EVENT_AFTER_HIDEVIEW","EVENT_AFTER_POPUPVIEW","resetListWidth","maxW","resetListHeight","resetWidth","getPopupPosition","Expander","expanderClass","_expanded","_initExpander","expander","isExpanded","ComboGroup","son","VirtualGroup","buttonMap","Loader","hasPrev","_prevLoad","_nextLoad","button_group","Navigation","single","tab","cardMap","setSelect","_deleteOtherCards","currCardName","_assertCard","getSelect","getSelectedCard","Searcher","isAutoSearch","isAutoSync","allowSearchBlank","onSearch","adapter","masker","editor","_search","_startSearch","_stopSearch","_pauseSearch","_isSearching","EVENT_START","startSearch","pauseSearch","EVENT_PAUSE","stopSearch","EVENT_STOP","_getLastSearchKeyword","getItems","finding","EVENT_SEARCHING","searchResult","matchResult","setAdapter","doSearch","isSearching","hasMatched","adjustView","getKeyword","getKeywords","Switcher","switcherClass","_initSwitcher","switcher","_created","Tab","curr","removeTab","cardname","getSelectedTab","getTab","EL","ele","$pop","messageShows","toastStack","alert","_show","confirm","prompt","min_width","autoClose","Toast","EVENT_DESTORY","hasCancel","controlItems","north","center","east","south","GridView","overscanColumnCount","overscanRowCount","rowHeightGetter","columnWidthGetter","_getOverscanIndices","overscanCellsCount","startIndex","stopIndex","overscanStartIndex","overscanStopIndex","visibleColumnIndices","_columnSizeAndPositionManager","visibleRowIndices","_rowSizeAndPositionManager","horizontalOffsetAdjustment","verticalOffsetAdjustment","_renderedColumnStartIndex","_renderedColumnStopIndex","_renderedRowStartIndex","_renderedRowStopIndex","overscanColumnIndices","overscanRowIndices","rowCount","columnStartIndex","columnStopIndex","rowStartIndex","rowStopIndex","minRowDatum","minColumnDatum","maxRowDatum","maxColumnDatum","rowIndex","rowDatum","columnIndex","columnDatum","_rowIndex","_columnIndex","_getRealMaxScrollLeft","totalWidth","estimatedColumnSize","estimatedRowSize","setColumnCount","setRowCount","setEstimatedColumnSize","setEstimatedRowSize","_constant","SIZE","SMALL","NORMAL","BIG","HEADER_HEIGHT","footer","closable","startX","startY","tracker","_calculateSize","dragger","compareHeight","EVENT_OPEN","BarPopover","EVENT_CANCEL","EVENT_CONFIRM","PopupView","minHeight","innerVGap","tool","tabs","min-width","mouseover","_createTool","_createTab","_createView","toolbar","_createToolBar","min-height","tbHeight","tabHeight","toolHeight","max-height","SearcherView","redmark","searcher","spliter","ListView","overscanHeight","renderedIndex","_calculateBlocksToRender","lastWidth","lastHeight","_renderMoreIf","minContentHeight","cnt","getElementHeight","addedHeight","VirtualList","topBlank","bottomBlank","minContentHeightFrom","minContentHeightTo","needDestroyed","firstFragment","lastFragment","currentFragment","lastCache","Pager","dynamicShow","dynamicShowFirstLast","dynamicShowPrevNext","pages","jump","firstPage","lastPage","currPage","dict","poor","flow","EVENT_AFTER_POPULATE","getCurrentPage","setAllPages","LoadingBar","_reset","IconButton","iconWidth","iconHeight","icon","ImageButton","setImageWidth","setImageHeight","getImageWidth","getImageHeight","setSrc","getSrc","Button","iconCls","ghost","textWidth","textHeight","TextButton","BlankIconIconTextItem","iconCls1","iconCls2","blankWidth","textHgap","textVgap","textLgap","textRgap","blank","icon1","icon2","BlankIconTextIconItem","BlankIconTextItem","IconTextIconItem","leftIconWrapperWidth","rightIconWrapperWidth","IconTextItem","iconWrapperWidth","TextIconItem","TextItem","IconTextIconNode","IconTextNode","TextIconNode","TextNode","Editor","inputType","validationChecker","quitChecker","allowBlank","watermark","errorText","outline","_assertWaterMark","contentWrapper","Input","EVENT_FOCUS","_checkError","EVENT_BLUR","_setErrorVisible","EVENT_CLICK","EVENT_KEY_DOWN","EVENT_QUICK_DOWN","EVENT_VALID","_checkWaterMark","EVENT_ERROR","isEditing","EVENT_RESTRICT","EVENT_EMPTY","EVENT_ENTER","EVENT_SPACE","EVENT_BACKSPACE","EVENT_REMOVE","EVENT_CHANGE_CONFIRM","_checkToolTip","disabledWaterMark","setErrorText","getErrorText","setWaterMark","disabledError","disableError","enableError","disableWaterMark","enableWaterMark","selectAll","onKeyDown","getLastValidValue","getLastChangedValue","MultifileEditor","multiple","maxSize","accept","File","EVENT_UPLOADSTART","EVENT_PROGRESS","EVENT_UPLOADED","upload","TextAreaEditor","_focus","_blur","Html","Icon","Iframe","setName","Img","ImageCheckbox","Checkbox","files","sendFile","multipart","boundary","CRLF","fileName","getAsBinary","sendAsBinary","fileSize","rpe","attachO","attach_type","filename","attach_array","onloadstart","total","simulation","onprogress","onabort","FormData","onloadprogress","interactive","sendFiles","sent","_wrap","self_","clean","attach","errorCode","errorMsg","fileType","attach_names","attachNum","_events","tempFile","errorType","replaceChild","totalProp","currentProp","ctrlKey","inputEventValid","_keydown","_keydown_","_clk","_click","_focusDebounce","_blurDebounce","keydown","keyup","focusout","_checkValidationOnValueChange","_isEditing","_lastValidValue","_defaultState","_start","lastValidValue","_lastChangedValue","_lastValue","_pause","lastValue","_valueChange","_lastSubmitValue","textValue","ImageRadio","Radio","AbstractLabel","_createJson","_createCenterEl","_createNotCenterEl","line-height","adaptLayout","HtmlLabel","IconLabel","Label","Link","Bubble","mousemove","_createBubbleText","_bottom","_right","Tooltip","texts","setLevel","Trigger","setKey","getKey","CustomTree","_formatItems","roots","_consts","BUTTON","LEVEL","ICO_LOADING","SWITCH","NODECREATED","ASYNC_SUCCESS","ASYNC_ERROR","REMOVE","SELECTED","UNSELECTED","ICON","SPAN","UL","line","ROOT","ROOTS","CENTER","BOTTOM","NOLINE","LINE","folder","OPEN","CLOSE","DOCU","CURSELECTED","_setting","addDiyDom","autoCancelSelected","fontCss","selectedMulti","showLine","showTitle","txtSelectedEnable","idKey","pIdKey","rootPId","leaf","beforeAsync","beforeDblClick","beforeRightClick","beforeMouseDown","beforeMouseUp","beforeCollapse","beforeRemove","onNodeCreated","onDblClick","onRightClick","onMouseDown","onMouseUp","onRemove","setRoot","expandTriggerFlag","curSelectedList","noSelection","createdNodes","zId","_ver","_initCache","getCache","setCache","_bindEvent","consts","tools","srcEvent","clickFlag","onSelected","onUnSelected","_unbindEvent","_eventProxy","getSetting","nodeEventType","treeEventType","nodeEventCallback","treeEventCallback","eqs","getNodeMainDom","getMDom","attrName","getNodeCache","onSwitchNode","onClickNode","onZTreeMousedown","onZTreeMouseup","onZTreeDblclick","onZTreeContextmenu","proxyResult","_initNode","isFirstNode","isLastNode","openFlag","childKey","parentTId","zAsync","getPreNode","getNextNode","fixPIdKeyValue","proxys","beforeA","afterA","innerBeforeA","innerAfterA","zTreeTools","addNodeCache","getNodeCacheId","addAfterA","addBeforeA","addInnerAfterA","addInnerBeforeA","addInitBind","addInitUnBind","unbindEvent","addInitCache","initCache","addInitNode","initNode","addInitProxy","initProxy","isFirst","addInitRoot","initRoot","addNodesData","setNodeLineIcos","addSelectedNode","isSelectedNode","addCreatedNode","addZTreeTools","exSetting","getAfterA","getBeforeA","getInnerAfterA","getInnerBeforeA","getNodeByParam","getNodeName","nameKey","getNodeTitle","getNodesByParamFuzzy","getNodesByFilter","isSingle","invokeParam","tmpResult","getRoots","getSettings","getZTreeTools","treeTools","nextNode","removeNodeCache","removeSelectedNode","setZTreeTools","transformTozTreeFormat","parentKey","bindTree","eventParam","-moz-user-select","unbindTree","doProxy","uCanDo","switchNode","cancelPreSelectedNode","fun","zt","canAsync","str1","str2","curDom","targetExpr","isChildOrSelf","parentId","isSilent","target_switchObj","$$","target_icoObj","target_ulObj","replaceSwitchClass","replaceIcoClass","createNodes","expandCollapseParentNode","appendNodes","initFlag","tmpPNode","tmpPChild","childHtml","makeDOMNodeMainBefore","makeDOMNodeLine","makeDOMNodeNameBefore","makeDOMNodeIcon","makeDOMNodeNameAfter","makeUlHtml","makeDOMNodeMainAfter","appendParentULDom","nObj","ulObj","asyncNode","icoObj","tmpParam","pKey","spKey","_tmpV","excludeNode","createNodeCallback","zTreeHtml","expandCollapseNode","expandFlag","animateFlag","_callback","switchObj","iconOpen","iconClose","makeNodeIcoStyle","expandCollapseSonNode","treeNodes","selfAnimateSign","nameStr","makeNodeIcoClass","makeNodeLineClass","makeNodeUrl","fontcss","makeNodeFontCss","fontStyle","makeNodeTarget","icoCss","iconSkin","icoStyle","lineClass","makeNodeLineClassEx","urlKey","makeUlLineClass","removeChildNodes","tmp_switchObj","tmp_icoObj","setFirstNode","childLength","setLastNode","removeNode","tmp_ulObj","newLast","tmp_first_switchObj","newName","tmpName","tmpList","addFlag","setNodeFontCss","aObj","ulLine","setNodeName","setNodeTarget","setNodeUrl","_z","zSetting","zNodes","addCallback","xNewNodes","cancelSelectedNode","expandNode","sonSign","callbackFlag","getNodeByTId","getNodeIndex","transformTozTreeNodes","simpleNodes","transformToArray","checkTypeFlag","CHECK","STYLE","DEFAULT","DISABLED","FALSE","TRUE","FULL","PART","FOCUS","TYPE_ALL","TYPE_LEVEL","autoCheckTrigger","chkStyle","nocheckInherit","chkDisabledInherit","radioType","radioCheckedList","_handler","onCheckNode","onMouseoverCheck","onMouseoutCheck","checkedKey","checkedOld","nocheck","chkDisabled","check_Child_State","check_Focus","_beforeA","makeChkFlag","makeChkClass","_zTreeTools","checkObj","checkNodeRelation","setChkClass","repairParentChkClassWithSelf","repairAllChk","getTreeCheckedNodes","getChangeCheckedNodes","getTreeChangeCheckedNodes","setChkDisabled","inheritParent","inheritChildren","repairSonChkDisabled","repairParentChkDisabled","_updateNode","getRadioCheckedList","checkedList","onlyOne","chkFlag","cNode","_event","_tools","_view","setSonNodeCheckBox","setParentNodeCheckBox","checkboxType","notEffectByOtherNode","fullStyle","chkName","repairChkClass","repairParentChkClass","sNode","srcNode","pSign","pNodes","hasDisable","_createNodes","_removeNode","_appendNodes","TreeRenderScrollService","nodeLists","hasBinded","_getNodeListBounds","nodeList","offsetLeft","_getTreeContainerBounds","_canNodePopulate","containerBounds","_isNodeInVisible","refreshAllNodes","refreshNodes","_getLoadingBar","loadWidget","IconChangeButton","setIcon","TriggerIconButton","HalfIconButton","HalfButton","MultiSelectItem","SingleSelectIconTextItem","SingleSelectItem","SingleSelectRadioItem","ArrowNode","FirstPlusGroupNode","IconArrowNode","LastPlusGroupNode","MidPlusGroupNode","MultiLayerIconArrowNode","PlusGroupNode","Switch","FirstTreeLeafItem","getId","getPId","IconTreeLeafItem","LastTreeLeafItem","MidTreeLeafItem","MultiLayerIconTreeLeafItem","isFront","TreeTextLeafItem","CalendarDateItem","Calendar","_dateCreator","De","mins","maxs","setFullYear","ymd","FDay","offSetFDay","PDay","NDay","lastMonth","currentDay","nextMonth","_getWeekLabel","days","_getItems","isFrontDate","newDate","isFinalDate","setMinDate","setMaxDate","getPageByDateJSON","page","getDateJSONByPage","months","YearCalendar","_yearCreator","getStartYear","startDate","endDate","INTERVAL","currentYear","years","isFrontYear","isFinalYear","getEndYear","tyears","getPageByYear","ArrowTreeGroupNodeCheckbox","CheckingMarkNode","FirstTreeNodeCheckbox","LastTreeNodeCheckbox","MidTreeNodeCheckbox","TreeNodeCheckbox","CustomColorChooser","ColorPickerEditor","farbtastic","Farbtastic","ColorChooser","colorPicker","ColorChooserPopup","EVENT_VALUE_CHANGE","_isRGBColor","colorEditor","_dealStoreColors","storeColors","_digestStoreColors","_getStoreColors","ColorPicker","customColorChooser","panel","more","PopupPanel","colors","que","setStoreColors","colorsArray","SimpleColorChooserPopup","SimpleColorChooser","ColorChooserTrigger","colorContainer","down","background-color","LongColorChooserTrigger","changeIcon","label","ColorPickerButton","_createMask","constants","REB_WIDTH","colorShow","RGB","checker","Ws","TextEditor","_checkEditors","none","lastColor","_isEmptyRGB","transparent","_showPreColor","SimpleColorPickerEditor","RADIUS","SQUARE","WIDTH","colorWrapper","wheel","overlay","hMarker","slMarker","_unpack","_pack","_setColor","unpack","hsl","_RGBToHSL","_updateDisplay","_setHSL","_HSLToRGB","m1","m2","_hueToRGB","angle","_absolutePosition","_widgetCoords","mouseX","mouseY","_doMouseMove","circleDrag","hue","atan2","sat","lum","TRIANGLE_LENGTH","_getAdjustLength","_showTriangle","_hideTriangle","_createTriangle","triangle","_createLeftTriangle","_createRightTriangle","_createTopTriangle","_createBottomTriangle","BubblePopupView","buttonOpt","TextBubblePopupBarView","EditorIconCheckCombo","baseClass","EditorTrigger","TextValueCheckComboPopup","editorIconCheckCombo","IconCombo","IconComboPopup","iconCombo","IconComboTrigger","isShowDown","_digest","IconTextValueCombo","IconTextValueComboPopup","textIconCombo","SearchTextValueCombo","SearchTextValueTrigger","getSearcher","TextValueComboPopup","stopEditing","triggerBtn","SearchTextValueComboPopup","defaultText","_setState","setState","vals","formatItems","TextValueCheckCombo","textIconCheckCombo","TextValueCombo","setTipType","SmallTextValueCombo","ClearEditor","EVENT_CLEAR","_checkClear","ShelterEditor","EVENT_CLICK_LABEL","_showHint","_checkText","_showInput","setTextStyle","getState","SignEditor","StateEditor","stateValue","_setText","SimpleStateEditor","mouseOut","MultiPopupView","buttongroup","ListPane","calback","Panel","titleButtons","_createTitle","LinearSegmentButton","LinearSegment","buttonGroup","SelectList","allSelected","setAllSelected","_checkAllSelected","selectLength","notSelectLength","isAlreadyAllSelected","isHalf","setHalfSelected","setToolBarVisible","isAllSelected","assist","LazyLoader","PAGE","loader","_getNextItems","lastNum","lastItems","nextItems","ListLoader","SortList","sortable","containment","connectWith","cursor","tolerance","$currentItem","holder","ui","over","sorted","getSortedValues","attribute","LoadingPane","__loaded","AllCountPager","pagerDirection","pagerIconCls","_getPagerIconCls","pager","preCls","nextCls","allPages","alwaysShowPager","setPagerVisible","setVPage","setCount","DirectionPager","horizontal","vertical","_createVPager","_createHPager","vpager","vlabel","hpager","hlabel","getVPage","getHPage","setHPage","hasVNext","hasHNext","hasVPrev","hasHPrev","setHPagerVisible","setVPagerVisible","vShow","hShow","DetailPager","_lock","_debouce","SegmentButton","Segment","MultiSelectBar","isAllCheckedBySelectedValue","isHalfCheckedBySelectedValue","halfSelected","isSelect","isHalfSelect","_setSelected","isHalfSelected","isAllChecked","LevelTree","_assertId","DisplayTree","ListDisplayTree","getFont","SimpleTreeView","_getValue","triggerWidth","IconTrigger","iconButton","IconTextTrigger","textCls","trigerButton","iconItem","textItem","setTextCls","oldCls","SelectIconTextTrigger","_digist","TextTrigger","SelectTextTrigger","formatValue","SmallSelectTextTrigger","SmallTextTrigger","MonthDateCombo","YearPopup","YearDateCombo","DatePicker","_year","_month","_checkLeftValid","_checkRightValid","YearPicker","DateCalendarPopup","selectedTime","_createNav","calendar","_day","datePicker","_checkMin","_checkMax","timeOb","MonthPopup","_createYearCalendar","selectedYear","backBtn","preBtn","navigation","DateTriangleTrigger","StaticDatePaneCard","_getNewCurrentDate","_setCalenderValue","_setDatePicker","_setCalendar","DynamicDatePane","Static","Dynamic","dateTab","DynamicDateHelper","getCalculation","dynamicPane","_checkValueValid","DynamicDateCombo","DateTimeCombo","popupHeight","popupWidth","comboAdjustHeight","minute","DateTimePopup","BUTTON_CANCEL_EVENT_CHANGE","hidePopupView","BUTTON_OK_EVENT_CHANGE","cancelButton","okButton","dateCombo","CALENDAR_EVENT_CHANGE","dateButton","timeSelect","DateTimeTrigger","_printTime","dateStr","StaticDateTimePaneCard","DynamicDateTimeSelect","DynamicDateTimePane","DownListCombo","popupview","DownListPopup","downlistcombo","EVENT_SON_VALUE_CHANGE","fatherValue","DownListGroup","downlistgroup","DownListItem","DownListGroupItem","childValues","nextIcon","singleValues","childValueMap","fatherValueMap","_createChildren","changedValue","valueObject","item_done","childValue","father","_createChildValue","el_done","_isGroup","_needSpliter","spliter_container","itemLength","valueItem","valueArray","_checkValues","joinValue","itemGroup","popupItem","fartherValue","getCalculationByDate","quarter","workDay","holidays","DynamicDateCard","OFFSET","CURRENT","getBeginDate","BEGIN","checkgroup","TYPE","YEAR","QUARTER","MONTH","workDayBox","plainValue","resultPane","dateType","_getParamJson","WORK_DAY","positionValue","comboItems","_getText","_createValue","valuesItems","valueMap","selectValues","allowEdit","storeTriggerValue","DynamicDateTrigger","dateStore","dateObj","_checkDynamicValue","DynamicDatePopup","BUTTON_CLEAR_EVENT_CHANGE","BUTTON_lABEL_EVENT_CHANGE","comboWrapper","DynamicDateParamItem","offsetCombo","buttonHeight","_getTabJson","textButton","_setInnerValue","yearLength","yearMonthLength","yearFullMonthLength","compareFormat","formatStr","_getStandardDateStr","_autoAppend","_dateCheck","_checkVoid","_getTitle","_getFormatString","formatArray","dateArray","newArray","_yearCheck","splitMonth","_monthCheck","getPositionText","baseText","endText","EVENT_TRIGGER_CLICK","DynamicDateTimeCombo","DynamicDateTimeTrigger","DynamicDateTimePopup","_checkHour","_formatValueToDoubleDigit","_autoSwitch","_checkMinute","_checkSecond","_checkBorder","setDownEnable","setUpEnable","_assertValue","hasSecond","suffixArray","suffixString","dateString","SearchEditor","keywords","SmallSearchEditor","SmallTextEditor","IntervalSlider","EDITOR_WIDTH","EDITOR_R_GAP","EDITOR_HEIGHT","SLIDER_WIDTH_HALF","SLIDER_WIDTH","SLIDER_HEIGHT","TRACK_HEIGHT","digit","valueOne","valueTwo","calculation","AccurateCalculationModel","grayTrack","blueTrack","_createTrackWrapper","labelOne","_checkValidation","oldValueOne","_getPercentByValue","significantPercent","_setSliderOnePosition","_setBlueTrack","_checkLabelPosition","labelTwo","oldValueTwo","_setSliderTwoPosition","sliderOne","sliderTwo","_draggable","_createLabelWrapper","_createSliderWrapper","_rePosBySizeAfterMove","isLeft","_getGrayTrackLength","_getValueByPercent","_rePosBySizeAfterStop","optimizeSize","startDrag","defaultSize","mouseMoveTracker","dotText","_checkOverlap","labelOneLeft","labelTwoLeft","isSliderOneLeft","_resetLabelPosition","needReverse","_setBlueTrackLeft","_setBlueTrackWidth","percentOne","percentTwo","_setAllPosition","two","_setErrorText","accurateSubtraction","accurateMultiplication","accurateDivisionTenExponent","accurateAddition","reduceValue","_setDraggableEnable","_getPrecision","pre","toPrecision","eIndex","decimalPartLength","sciencePartLength","setMinAndMax","minNumber","maxNumber","NaN","_getMagnitude","_formatDecimal","stringNumber1","stringNumber2","numDecimalLength","magnitudeDiff","needAddZero","numDecimal","_stringNumberFactory","numStrArray","numInteger","_accurateSubtraction","getDecimalMaxLength","addZero","resultTemp","integerResult","decimalMaxLength","decimalResultTemp","decimalResult","borrow","_accurateAddition","_accurateMultiplication","dec1Int2","_accurateDivisionTenExponent","int1dec2","dec1dec2","stringNumber","partDecimalResult","MultiLayerDownListPopup","_createPopupItems","fatherArrayValue","fValue","getChildrenValue","MultiLayerSelectTreeCombo","allowSearchValue","allowInsertValue","_getSyncConfig","_getAsyncConfig","_getBaseConfig","MultiLayerSelectTreePopup","_getSearchConfig","valueFormatter","MultiLayerSelectTreeTrigger","EVENT_ADD_ITEM","baseConfig","MultiLayerSelectTreeInsertSearchPane","setKeyword","keywordGetter","MultiLayerSelectLevelTree","addNotMatchTip","showTip","_initData","_getSearchItems","_fillTreeStructure4Search","_getChildren","MultiLayerSelectTreeFirstPlusGroupNode","needBlankLayers","MultiLayerSelectTreeLastPlusGroupNode","MultiLayerSelectTreeMidPlusGroupNode","MultiLayerSelectTreePlusGroupNode","MultiLayerSingleTreeCombo","MultiLayerSingleTreePopup","MultiLayerSingleTreeTrigger","MultiLayerSingleTreeInsertSearchPane","MultiLayerSingleLevelTree","MultiLayerSingleTreeFirstPlusGroupNode","_createNode","MultiLayerSingleTreeLastPlusGroupNode","MultiLayerSingleTreeMidPlusGroupNode","MultiLayerSingleTreePlusGroupNode","MultiLayerSingleTreeFirstTreeLeafItem","MultiLayerSingleTreeLastTreeLeafItem","MultiLayerSingleTreeMidTreeLeafItem","MultiSelectCheckPane","onClickContinueSelect","txt","continueSelect","DisplaySelectedList","_createItems","MultiSelectCombo","assertShowValue","_startValue","numberCounter","setButtonChecked","requesting","_itemsCreator4Trigger","MultiSelectTrigger","_setStartValue","_joinKeywords","_joinAll","EVENT_CLICK_ITEM","EVENT_BEFORE_COUNTER_POPUPVIEW","updateSelectedValue","EVENT_COUNTER_CLICK","MultiSelectPopupView","_adjust","EVENT_CLICK_CONFIRM","EVENT_CLICK_CLEAR","wants2Quit","_stopEditing","MultiSelectCheckSelectedSwitcher","refreshPlaceHolderWidth","_makeMap","selectedMap","REQ_GET_ALL_DATA","notSelectedMap","adjust","setStartValue","populateSwitcher","REQ_GET_DATA_LENGTH","MultiSelectNoBarCombo","MultiSelectInsertCombo","MultiSelectInsertTrigger","_addItem","addedValue","MultiSelectInsertNoBarCombo","MultiSelectInsertSearcher","wrapNumberCounter","MultiSelectLoader","startValue","firstItems","_scrollToTop","MultiSelectNoBarLoader","MultiSelectNoBarPopupView","MultiSelectSearcher","MultiSelectSearchInsertPane","tooltipClick","hasSameValue","isMatchTipVisible","MultiSelectSearchLoader","_filterValues","newValues","MultiSelectSearchPane","MultiSelectCheckSelectedButton","MultiSelectEditor","checkPane","me","MultiSelectInsertList","searcherPane","_showAdapter","_showSearcherPane","MultiSelectInsertNoBarList","MultiSelectList","_count","MultiSelectTree","MultiSelectTreePopup","MultiTreeCheckPane","backToPopup","configs","EVENT_CONTINUE_CLICK","MultiTreeCombo","showCounter","isPopupView","isInit","want2showCounter","MultiTreePopup","MultiTreeInsertCombo","MultiTreeSearchInsertPane","_assertShowValue","MultiTreeListCombo","MultiTreeCheckSelectedButton","indicator","checkSelected","addTip","partTree","isAddTipVisible","MultiTreeSearchPane","MultiListTreeSearcher","MultiTreeSearcher","getChildrenNode","NumberEditor","topBtn","_finetuning","bottomBtn","NumberInterval","typeError","numberError","signalError","editorWidth","numberErrorCls","less","less_equal","numTip","validation","closeMin","smallEditor","smallEditorBubbleType","smallTip","bigEditor","bigEditorBubbleType","bigTip","smallCombo","bigCombo","closeMax","_setValidEvent","_setErrorEvent","_setBlurEvent","_setFocusEvent","_setComboValueChangedEvent","_setEditorValueChangedEvent","_setTitle","smallValue","bigValue","bigComboValue","smallComboValue","NumberIntervalSingleEidtor","isStateValid","setMinEnable","setCloseMinEnable","setMaxEnable","setCloseMaxEnable","showNumTip","hideNumTip","setNumTip","getNumTip","combo_value","minComboValue","maxComboValue","SearchMultiTextValueCombo","_updateAllValue","getCounter","allValueGetter","allValue","_itemsCreator","_getItemsByTimes","_hasNextByTimes","kw","SearchMultiSelectTrigger","SearchMultiSelectLoader","SearchMultiSelectPopupView","SearchMultiSelectSearcher","SelectTreeFirstPlusGroupNode","SelectTreeLastPlusGroupNode","SelectTreeMidPlusGroupNode","SelectTreePlusGroupNode","SelectTreeCombo","SingleTreePopup","SelectTreeExpander","SelectTreePopup","SingleSelectSearchLoader","allowNoSelect","SingleSelectList","SingleSelectSearchInsertPane","SingleSelectSearchPane","SingleSelectCombo","SingleSelectTrigger","SingleSelectPopupView","SingleSelectInsertCombo","SingleSelectComboItem","SingleSelectLoader","SingleSelectSearcher","SingleSelectInsertList","_allData","SingleSelectEditor","SignTextEditor","SliderIconButton","LARGE_SIZE","NORMAL_SIZE","LARGE_OFFSET","NORMAL_OFFSET","slider","SingleSlider","TRACK_GAP_HALF","TRACK_GAP","sliderVertical","trackLength","_setLabelPosition","_setSliderPosition","thousandth","SingleSliderLabel","HEIGHT","SingleSliderNormal","minMax","_createTrack","EVENT_DRAG","SingleTreeCombo","SingleTreeTrigger","_checkTitle","TextValueDownListCombo","_createValueMap","currentVal","DownListSelectTextTrigger","_formatItemArray","sourceArray","targetArray","TimePopup","BUTTON_NOW_EVENT_CHANGE","TimeCombo","_setNowTime","nowTome","TimeTrigger","COMPARE_FORMAT","COMPLETE_COMPARE_FORMAT","FORMAT_ARRAY","DEFAULT_DATE_STRING","DEFAULT_HOUR","_formatValue","_getCompleteHMS","DateInterval","timeErrorCls","_createCombo","_clearTitle","smallDate","bigDate","smallObj","bigObj","TimeInterval","TimePeriods","DynamicYearCard","StaticYearCard","DynamicYearCombo","DynamicYearTrigger","DynamicYearPopup","_titleCreator","DynamicYearMonthCard","StaticYearMonthCard","_createMonths","monthMap","yearPicker","_checkMonthStatus","selectedMonth","minYear","maxYear","minMonth","maxMonth","yearInvalid","monthInvalid","newObj","DynamicYearMonthCombo","DynamicYearMonthTrigger","DynamicYearMonthPopup","yearEditor","_createEditor","monthEditor","isYear","_doEditorConfirm","_getStaticTitle","monthValue","hasYear","hasMonth","YearMonthInterval","_checkValid","smallDate4Check","bigDate4Check","DynamicYearQuarterCard","StaticYearQuarterCard","_createQuarter","selectedQuarter","DynamicYearQuarterCombo","DynamicYearQuarterTrigger","DynamicYearQuarterPopup","quarterEditor","quarterValue","AbstractAllValueChooser","perPage","_valueFormatter","resultItems","AllValueChooserCombo","AllValueChooserPane","AllValueMultiTextValueCombo","_digestValue","numOfPage","AbstractTreeValueChooser","_reqInitTreeNode","_reqAdjustTreeNode","_reqSelectedTreeNode","_reqDisplayTreeNode","_reqTreeNode","doCheck","newParents","llen","_getChildCount","createOneJson","_getTreeNode","getCount","dealWithSelectedValues","canFindKey","isSearchValueInParent","_deleteNode","searched","_getNode","expandSelectedValue","isChild","strs","childrenCount","_isMatch","notSearch","can","nk","nv","nodeSearch","_getAddedValueNode","isAllSelect","isCurAllSelected","isOpen","findSelectedObj","judgeState","selected_value","dealWithSelectedValue","nextNames","getCheckState","tempCheck","childCount","allNodes","_getAllChildren","parentCheckState","valueFind","findParentNode","pValues","AbstractListTreeValueChooser","ListTreeValueChooserInsertCombo","TreeValueChooserInsertCombo","TreeValueChooserCombo","TreeValueChooserPane","pane","AbstractValueChooser","ValueChooserInsertCombo","ValueChooserCombo","ValueChooserPane","eventsApi","allEvents","triggerEvents","listenTo","listeningTo","_listeningTo","_listenId","listenToOnce","eventSplitter","stopListening","a1","a2","a3","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","_routeToRegExp","router","history","_extractParameters","navigate","optional","History","checkUrl","routeStripper","rootStripper","pathStripper","started","atRoot","pathname","getSearch","getHash","getPath","decodeURI","getFragment","_hasPushState","_wantsHashChange","hashChange","_hasHashChange","_wantsPushState","pushState","_checkUrlInterval","silent","loadUrl","_updateHash","keyOrFn","pushTarget","_target","targetStack","popTarget","pushContext","_context","contextStack","popContext","findStore","__cacheStore","createStore","needPop","_store","_widget","oldWatch","_create","pushed","unMount","unwatches","unwatch","additionFunc","ajaxComplete","nKeys","installedModules","__webpack_require__","moduleId","modules","fineui","Decorators","Target"],"mappings":";;AA+3oCA,QAASA,iBAAgBC,SAAUC,aAAe,KAAMD,mBAAoBC,cAAgB,KAAM,IAAIC,WAAU,sCA/3oC/G,SAASC,GAAY,QAASC,GAAEC,GAAG,GAAGC,EAAED,GAAG,MAAOC,GAAED,GAAGE,OAAQ,IAAIC,GAAEF,EAAED,IAAII,EAAEJ,EAAEK,GAAE,EAAGH,WAAY,OAAOJ,GAAEE,GAAGM,KAAKH,EAAED,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,IAGzGgwL,EAAoBh3M,EAAI,GAIjBg3M,EAAoBA,EAAoB/2M,EAAI,K,yEClFrD,M,qDAAA,SAEAqR,GAAGgzB,OAAOhzB,GAAI6lM,e,0bCmFC,CACXC,W,4aA1DJ,U,8nBCvBO,SAASx+J,IACZ,OAAO,SAAsBy+J,GACzB/lM,GAAGsnC,SAASy+J,EAAOv+J,MAAOu+J,K,QAO3B,SAAShoH,IACZ,OAAO,SAAyGgoH,GAC5G/lM,GAAG+9E,MAAMgoH,EAAOv+J,MAAOu+J,K,QASxB,SAAS9nH,EAAS69C,GAA2G,IAAlE3hC,EAAkE,0DAAJ,GAC5H,OACI,wFACI2qG,OAAA,WACI,IAAMx/L,EAAQ60F,EAAK70F,MAAQ60F,EAAK70F,MAAM9S,MAAMvD,MAAQY,UAEpD,OAAOmQ,GAAGw/E,OAAOC,SAASq8C,EAAMt0F,MAAOliC,IAJ/C,I,mBAaKw2H,E,2VAMTl+H,MAAA,WACI,MAAO,I,GAPqG24H,IAAIuF,O","file":"fineui.ie.min.js","sourcesContent":["!function(e){var r={};function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&\"object\"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,\"default\",{enumerable:!0,value:n}),2&t&&\"string\"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t[\"default\"]}:function(){return t};return o.d(n,\"a\",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p=\"\",o(o.s=70)}([function(e,t,n){(function(t){var n=function(t){return t&&t.Math==Math&&t};e.exports=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||Function(\"return this\")()}).call(this,n(74))},function(t,n,e){var r=e(0),o=e(20),i=e(41),u=e(53),c=r.Symbol,f=o(\"wks\");t.exports=function(t){return f[t]||(f[t]=u&&c[t]||(u?c:i)(\"Symbol.\"+t))}},function(t,n,e){var s=e(0),l=e(24).f,p=e(6),v=e(11),d=e(40),h=e(77),y=e(51);t.exports=function(t,n){var e,r,o,i,u=t.target,c=t.global,f=t.stat,a=c?s:f?s[u]||d(u,{}):(s[u]||{}).prototype;if(a)for(e in n){if(o=n[e],r=t.noTargetGet?(i=l(a,e))&&i.value:a[e],!y(c?e:u+(f?\".\":\"#\")+e,t.forced)&&r!==undefined){if(typeof o==typeof r)continue;h(o,r)}(t.sham||r&&r.sham)&&p(o,\"sham\",!0),v(a,e,o,t)}}},function(t,n,e){var r=e(7);t.exports=function(t){if(!r(t))throw TypeError(String(t)+\" is not an object\");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,e){var r=e(4);t.exports=!r(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n,e){var r=e(5),o=e(9),i=e(19);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(5),o=e(47),i=e(3),u=e(38),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(r){}if(\"get\"in e||\"set\"in e)throw TypeError(\"Accessors not supported\");return\"value\"in e&&(t[n]=e.value),t}},function(t,n,e){t.exports=e(0)},function(t,n,e){var c=e(0),r=e(20),f=e(6),a=e(8),s=e(40),o=e(48),i=e(16),u=i.get,l=i.enforce,p=String(o).split(\"toString\");r(\"inspectSource\",function(t){return o.call(t)}),(t.exports=function(t,n,e,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;\"function\"==typeof e&&(\"string\"!=typeof n||a(e,\"name\")||f(e,\"name\",n),l(e).source=p.join(\"string\"==typeof n?n:\"\")),t!==c?(o?!u&&t[n]&&(i=!0):delete t[n],i?t[n]=e:f(t,n,e)):i?t[n]=e:s(n,e)})(Function.prototype,\"toString\",function(){return\"function\"==typeof this&&u(this).source||o.call(this)})},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t}},function(t,n,e){var r=e(37),o=e(25);t.exports=function(t){return r(o(t))}},function(t,n){t.exports=!1},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(76),p=e(0),v=e(7),d=e(6),h=e(8),y=e(26),g=e(27),x=p.WeakMap;a=l?(r=new x,o=r.get,i=r.has,u=r.set,c=function(t,n){return u.call(r,t,n),n},f=function(t){return o.call(r,t)||{}},function(t){return i.call(r,t)}):(g[s=y(\"state\")]=!0,c=function(t,n){return d(t,s,n),n},f=function(t){return h(t,s)?t[s]:{}},function(t){return h(t,s)}),t.exports={set:c,get:f,has:a,enforce:function(t){return a(t)?f(t):c(t,{})},getterFor:function(e){return function(t){var n;if(!v(t)||(n=f(t)).type!==e)throw TypeError(\"Incompatible receiver, \"+e+\" required\");return n}}}},function(t,n,e){var r=e(10),o=e(0),i=function(t){return\"function\"==typeof t?t:undefined};t.exports=function(t,n){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},function(t,n,e){var r=e(25);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(15),o=e(75);(t.exports=function(t,n){return o[t]||(o[t]=n!==undefined?n:{})})(\"versions\",[]).push({version:\"3.3.2\",mode:r?\"pure\":\"global\",copyright:\"© 2019 Denis Pushkarev (zloirock.ru)\"})},function(t,n,e){var r=e(3),o=e(83),i=e(43),u=e(27),c=e(52),f=e(39),a=e(26)(\"IE_PROTO\"),s=\"prototype\",l=function(){},p=function(){var t,n=f(\"iframe\"),e=i.length,r=\"script\";for(n.style.display=\"none\",c.appendChild(n),n.src=String(\"javascript:\"),(t=n.contentWindow.document).open(),t.write(\"<script>document.F=Object</\"+r+\">\"),t.close(),p=t.F;e--;)delete p[s][i[e]];return p()};t.exports=Object.create||function(t,n){var e;return null!==t?(l[s]=r(t),e=new l,l[s]=null,e[a]=t):e=p(),n===undefined?e:o(e,n)},u[a]=!0},function(t,n){t.exports={}},function(t,n,e){\"use strict\";var o=e(13),r=function(t){var e,r;this.promise=new t(function(t,n){if(e!==undefined||r!==undefined)throw TypeError(\"Bad Promise constructor\");e=t,r=n}),this.resolve=o(e),this.reject=o(r)};t.exports.f=function(t){return new r(t)}},function(t,n,e){var r=e(5),o=e(36),i=e(19),u=e(14),c=e(38),f=e(8),a=e(47),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=u(t),n=c(n,!0),a)try{return s(t,n)}catch(e){}if(f(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n){t.exports=function(t){if(t==undefined)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,e){var r=e(20),o=e(41),i=r(\"keys\");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){t.exports={}},function(t,n,e){var r=e(29),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?r:e)(t)}},function(t,n,e){var r=e(9).f,o=e(8),i=e(1)(\"toStringTag\");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var i=e(13);t.exports=function(r,o,t){if(i(r),o===undefined)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,n){return r.call(o,t,n)};case 3:return function(t,n,e){return r.call(o,t,n,e)}}return function(){return r.apply(o,arguments)}}},function(t,n,e){var r=e(8),o=e(18),i=e(26),u=e(57),c=i(\"IE_PROTO\"),f=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:\"function\"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?f:null}},function(t,n,e){var r=e(0),o=e(31),i=Function.call;t.exports=function(t,n,e){return o(i,r[t].prototype[n],e)}},function(t,n,e){var v=e(3),d=e(123),h=e(28),y=e(31),g=e(124),x=e(125),m=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,r,o){var i,u,c,f,a,s,l,p=y(n,e,r?2:1);if(o)i=t;else{if(\"function\"!=typeof(u=g(t)))throw TypeError(\"Target is not iterable\");if(d(u)){for(c=0,f=h(t.length);c<f;c++)if((a=r?p(v(l=t[c])[0],l[1]):p(t[c]))&&a instanceof m)return a;return new m(!1)}i=u.call(t)}for(s=i.next;!(l=s.call(i)).done;)if(\"object\"==typeof(a=x(i,p,l.value,r))&&a&&a instanceof m)return a;return new m(!1)}).stop=function(t){return new m(!0,t)}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(n){return{error:!0,value:n}}}},function(t,n,e){\"use strict\";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(4),o=e(12),i=\"\".split;t.exports=r(function(){return!Object(\"z\").propertyIsEnumerable(0)})?function(t){return\"String\"==o(t)?i.call(t,\"\"):Object(t)}:Object},function(t,n,e){var o=e(7);t.exports=function(t,n){if(!o(t))return t;var e,r;if(n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;if(\"function\"==typeof(e=t.valueOf)&&!o(r=e.call(t)))return r;if(!n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,n,e){var r=e(0),o=e(7),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(0),o=e(6);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return\"Symbol(\"+String(t===undefined?\"\":t)+\")_\"+(++e+r).toString(36)}},function(t,n,e){var r=e(49),o=e(43).concat(\"length\",\"prototype\");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n){t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(49),o=e(43);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(17);t.exports=r(\"navigator\",\"userAgent\")||\"\"},function(t,n,e){var r=e(5),o=e(4),i=e(39);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,n,e){var r=e(20);t.exports=r(\"native-function-to-string\",Function.toString)},function(t,n,e){var u=e(8),c=e(14),f=e(50).indexOf,a=e(27);t.exports=function(t,n){var e,r=c(t),o=0,i=[];for(e in r)!u(a,e)&&u(r,e)&&i.push(e);for(;n.length>o;)u(r,e=n[o++])&&(~f(i,e)||i.push(e));return i}},function(t,n,e){var f=e(14),a=e(28),s=e(79),r=function(c){return function(t,n,e){var r,o=f(t),i=a(o.length),u=s(e,i);if(c&&n!=n){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((c||u in o)&&o[u]===n)return c||u||0;return!c&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},function(t,n,e){var r=e(4),o=/#|\\.prototype\\./,i=function(t,n){var e=c[u(t)];return e==a||e!=f&&(\"function\"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,\".\").toLowerCase()},c=i.data={},f=i.NATIVE=\"N\",a=i.POLYFILL=\"P\";t.exports=i},function(t,n,e){var r=e(17);t.exports=r(\"document\",\"documentElement\")},function(t,n,e){var r=e(4);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,n,e){var r=e(12);t.exports=Array.isArray||function(t){return\"Array\"==r(t)}},function(t,n,e){n.f=e(1)},function(t,n,e){var b=e(31),S=e(37),O=e(18),j=e(28),w=e(93),P=[].push,r=function(v){var d=1==v,h=2==v,y=3==v,g=4==v,x=6==v,m=5==v||x;return function(t,n,e,r){for(var o,i,u=O(t),c=S(u),f=b(n,e,3),a=j(c.length),s=0,l=r||w,p=d?l(t,a):h?l(t,0):undefined;s<a;s++)if((m||s in c)&&(i=f(o=c[s],s,u),v))if(d)p[s]=i;else if(i)switch(v){case 3:return!0;case 5:return o;case 6:return s;case 2:P.call(p,o)}else if(g)return!1;return x?-1:y||g?g:p}};t.exports={forEach:r(0),map:r(1),filter:r(2),some:r(3),every:r(4),find:r(5),findIndex:r(6)}},function(t,n,e){var r=e(4);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},function(t,n,e){\"use strict\";var r=e(4);t.exports=function(t,n){var e=[][t];return!e||!r(function(){e.call(null,n||function(){throw 1},1)})}},function(t,n,e){var o=e(12),i=e(1)(\"toStringTag\"),u=\"Arguments\"==o(function(){return arguments}());t.exports=function(t){var n,e,r;return t===undefined?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=function(t,n){try{return t[n]}catch(e){}}(n=Object(t),i))?e:u?o(n):\"Object\"==(r=o(n))&&\"function\"==typeof n.callee?\"Arguments\":r}},function(t,n,e){var f=e(29),a=e(25),r=function(c){return function(t,n){var e,r,o=String(a(t)),i=f(n),u=o.length;return i<0||u<=i?c?\"\":undefined:(e=o.charCodeAt(i))<55296||56319<e||i+1===u||(r=o.charCodeAt(i+1))<56320||57343<r?c?o.charAt(i):e:c?o.slice(i,i+2):r-56320+(e-55296<<10)+65536}};t.exports={codeAt:r(!1),charAt:r(!0)}},function(t,n,e){\"use strict\";var g=e(2),x=e(113),m=e(32),b=e(63),S=e(30),O=e(6),j=e(11),r=e(1),w=e(15),P=e(22),o=e(62),E=o.IteratorPrototype,A=o.BUGGY_SAFARI_ITERATORS,T=r(\"iterator\"),L=\"values\",M=\"entries\",k=function(){return this};t.exports=function(t,n,e,r,o,i,u){x(e,n,r);var c,f,a,s=function(t){if(t===o&&h)return h;if(!A&&t in v)return v[t];switch(t){case\"keys\":case L:case M:return function(){return new e(this,t)}}return function(){return new e(this)}},l=n+\" Iterator\",p=!1,v=t.prototype,d=v[T]||v[\"@@iterator\"]||o&&v[o],h=!A&&d||s(o),y=\"Array\"==n&&v.entries||d;if(y&&(c=m(y.call(new t)),E!==Object.prototype&&c.next&&(w||m(c)===E||(b?b(c,E):\"function\"!=typeof c[T]&&O(c,T,k)),S(c,l,!0,!0),w&&(P[l]=k))),o==L&&d&&d.name!==L&&(p=!0,h=function(){return d.call(this)}),w&&!u||v[T]===h||O(v,T,h),P[n]=h,o)if(f={values:s(L),keys:i?h:s(\"keys\"),entries:s(M)},u)for(a in f)!A&&!p&&a in v||j(v,a,f[a]);else g({target:n,proto:!0,forced:A||p},f);return f}},function(t,n,e){\"use strict\";var r,o,i,u=e(32),c=e(6),f=e(8),a=e(1),s=e(15),l=a(\"iterator\"),p=!1;[].keys&&(\"next\"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),r==undefined&&(r={}),s||f(r,l)||c(r,l,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){var o=e(3),i=e(114);t.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,r=!1,t={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set).call(t,[]),r=t instanceof Array}catch(n){}return function(t,n){return o(t),i(n),r?e.call(t,n):t.__proto__=n,t}}():undefined)},function(t,n,e){var r=e(0);t.exports=r.Promise},function(t,n,e){var o=e(3),i=e(13),u=e(1)(\"species\");t.exports=function(t,n){var e,r=o(t).constructor;return r===undefined||(e=o(r)[u])==undefined?n:i(e)}},function(t,n,e){var r,o,i,u=e(0),c=e(4),f=e(12),a=e(31),s=e(52),l=e(39),p=e(46),v=u.location,d=u.setImmediate,h=u.clearImmediate,y=u.process,g=u.MessageChannel,x=u.Dispatch,m=0,b={},S=\"onreadystatechange\",O=function(t){var n;b.hasOwnProperty(t)&&(n=b[t],delete b[t],n())},j=function(t){return function(){O(t)}},w=function(t){O(t.data)},P=function(t){u.postMessage(t+\"\",v.protocol+\"//\"+v.host)};d&&h||(d=function(t){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);return b[++m]=function(){(\"function\"==typeof t?t:Function(t)).apply(undefined,n)},r(m),m},h=function(t){delete b[t]},\"process\"==f(y)?r=function(t){y.nextTick(j(t))}:x&&x.now?r=function(t){x.now(j(t))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(i=(o=new g).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):!u.addEventListener||\"function\"!=typeof postMessage||u.importScripts||c(P)?r=S in l(\"script\")?function(t){s.appendChild(l(\"script\"))[S]=function(){s.removeChild(this),O(t)}}:function(t){setTimeout(j(t),0)}:(r=P,u.addEventListener(\"message\",w,!1))),t.exports={set:d,clear:h}},function(t,n,e){var r=e(3),o=e(7),i=e(23);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){\"use strict\";var r=e(2),a=e(13),o=e(23),i=e(35),s=e(34);r({target:\"Promise\",stat:!0},{allSettled:function(t){var c=this,n=o.f(c),f=n.resolve,e=n.reject,r=i(function(){var r=a(c.resolve),o=[],i=0,u=1;s(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]={status:\"fulfilled\",value:t},--u||f(o))},function(t){e||(e=!0,o[n]={status:\"rejected\",reason:t},--u||f(o))})}),--u||f(o)});return r.error&&e(r.value),n.promise}})},function(t,n,e){\"use strict\";var r,o,u=e(138),c=RegExp.prototype.exec,f=String.prototype.replace,i=c,a=(r=/a/,o=/b*/g,c.call(r,\"a\"),c.call(o,\"a\"),0!==r.lastIndex||0!==o.lastIndex),s=/()??/.exec(\"\")[1]!==undefined;(a||s)&&(i=function(t){var n,e,r,o,i=this;return s&&(e=new RegExp(\"^\"+i.source+\"$(?!\\\\s)\",u.call(i))),a&&(n=i.lastIndex),r=c.call(i,t),a&&r&&(i.lastIndex=i.global?r.index+r[0].length:n),s&&r&&1<r.length&&f.call(r[0],e,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===undefined&&(r[o]=undefined)}),r}),t.exports=i},function(t,n,e){e(71),e(80),e(84),e(88),e(94),e(97),e(101),e(104),e(108),t.exports=e(134)},function(t,n,e){t.exports=e(72)},function(t,n,e){e(73);var r=e(10).Object,o=t.exports=function o(t,n,e){return r.defineProperty(t,n,e)};r.defineProperty.sham&&(o.sham=!0)},function(t,n,e){var r=e(2),o=e(5);r({target:\"Object\",stat:!0,forced:!o,sham:!o},{defineProperty:e(9).f})},function(t,n,e){\"use strict\";function r(t){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var o=function(){return this}();try{o=o||new Function(\"return this\")()}catch(i){\"object\"===(\"undefined\"==typeof window?\"undefined\":r(window))&&(o=window)}t.exports=o},function(t,n,e){var r=e(0),o=e(40),i=\"__core-js_shared__\",u=r[i]||o(i,{});t.exports=u},function(t,n,e){var r=e(0),o=e(48),i=r.WeakMap;t.exports=\"function\"==typeof i&&/native code/.test(o.call(i))},function(t,n,e){var c=e(8),f=e(78),a=e(24),s=e(9);t.exports=function(t,n){for(var e=f(n),r=s.f,o=a.f,i=0;i<e.length;i++){var u=e[i];c(t,u)||r(t,u,o(n,u))}}},function(t,n,e){var r=e(17),o=e(42),i=e(44),u=e(3);t.exports=r(\"Reflect\",\"ownKeys\")||function(t){var n=o.f(u(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(29),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n,e){t.exports=e(81)},function(t,n,e){e(82);var r=e(10).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){e(2)({target:\"Object\",stat:!0,sham:!e(5)},{create:e(21)})},function(t,n,e){var r=e(5),u=e(9),c=e(3),f=e(45);t.exports=r?Object.defineProperties:function(t,n){c(t);for(var e,r=f(n),o=r.length,i=0;i<o;)u.f(t,e=r[i++],n[e]);return t}},function(t,n,e){t.exports=e(85)},function(t,n,e){e(86);var r=e(10);t.exports=r.Object.assign},function(t,n,e){var r=e(2),o=e(87);r({target:\"Object\",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,n,e){\"use strict\";var p=e(5),r=e(4),v=e(45),d=e(44),h=e(36),y=e(18),g=e(37),o=Object.assign;t.exports=!o||r(function(){var t={},n={},e=Symbol(),r=\"abcdefghijklmnopqrst\";return t[e]=7,r.split(\"\").forEach(function(t){n[t]=t}),7!=o({},t)[e]||v(o({},n)).join(\"\")!=r})?function(t,n){for(var e=y(t),r=arguments.length,o=1,i=d.f,u=h.f;o<r;)for(var c,f=g(arguments[o++]),a=i?v(f).concat(i(f)):v(f),s=a.length,l=0;l<s;)c=a[l++],p&&!u.call(f,c)||(e[c]=f[c]);return e}:o},function(t,n,e){t.exports=e(89)},function(t,n,e){e(90);var r=e(10);t.exports=r.Object.getOwnPropertySymbols},function(t,n,e){\"use strict\";var r=e(2),o=e(0),i=e(15),u=e(5),c=e(53),f=e(4),a=e(8),s=e(54),l=e(7),p=e(3),v=e(18),d=e(14),h=e(38),y=e(19),g=e(21),x=e(45),m=e(42),b=e(91),S=e(44),O=e(24),j=e(9),w=e(36),P=e(6),E=e(11),A=e(20),T=e(26),L=e(27),M=e(41),k=e(1),I=e(55),_=e(92),F=e(30),C=e(16),R=e(56).forEach,N=T(\"hidden\"),D=\"Symbol\",G=\"prototype\",V=k(\"toPrimitive\"),$=C.set,z=C.getterFor(D),H=Object[G],W=o.Symbol,q=o.JSON,B=q&&q.stringify,U=O.f,Y=j.f,J=b.f,K=w.f,Q=A(\"symbols\"),X=A(\"op-symbols\"),Z=A(\"string-to-symbol-registry\"),tt=A(\"symbol-to-string-registry\"),nt=A(\"wks\"),et=o.QObject,rt=!et||!et[G]||!et[G].findChild,ot=u&&f(function(){return 7!=g(Y({},\"a\",{get:function(){return Y(this,\"a\",{value:7}).a}})).a})?function(t,n,e){var r=U(H,n);r&&delete H[n],Y(t,n,e),r&&t!==H&&Y(H,n,r)}:Y,it=function(t,n){var e=Q[t]=g(W[G]);return $(e,{type:D,tag:t,description:n}),u||(e.description=n),e},ut=c&&\"symbol\"==typeof W.iterator?function(t){return\"symbol\"==typeof t}:function(t){return Object(t)instanceof W},ct=function(t,n,e){t===H&&ct(X,n,e),p(t);var r=h(n,!0);return p(e),a(Q,r)?(e.enumerable?(a(t,N)&&t[N][r]&&(t[N][r]=!1),e=g(e,{enumerable:y(0,!1)})):(a(t,N)||Y(t,N,y(1,{})),t[N][r]=!0),ot(t,r,e)):Y(t,r,e)},ft=function(n,t){p(n);var e=d(t),r=x(e).concat(pt(e));return R(r,function(t){u&&!at.call(e,t)||ct(n,t,e[t])}),n},at=function(t){var n=h(t,!0),e=K.call(this,n);return!(this===H&&a(Q,n)&&!a(X,n))&&(!(e||!a(this,n)||!a(Q,n)||a(this,N)&&this[N][n])||e)},st=function(t,n){var e=d(t),r=h(n,!0);if(e!==H||!a(Q,r)||a(X,r)){var o=U(e,r);return!o||!a(Q,r)||a(e,N)&&e[N][r]||(o.enumerable=!0),o}},lt=function(t){var n=J(d(t)),e=[];return R(n,function(t){a(Q,t)||a(L,t)||e.push(t)}),e},pt=function(t){var n=t===H,e=J(n?X:d(t)),r=[];return R(e,function(t){!a(Q,t)||n&&!a(H,t)||r.push(Q[t])}),r};c||(E((W=function(){if(this instanceof W)throw TypeError(\"Symbol is not a constructor\");var t=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,n=M(t),e=function(t){this===H&&e.call(X,t),a(this,N)&&a(this[N],n)&&(this[N][n]=!1),ot(this,n,y(1,t))};return u&&rt&&ot(H,n,{configurable:!0,set:e}),it(n,t)})[G],\"toString\",function(){return z(this).tag}),w.f=at,j.f=ct,O.f=st,m.f=b.f=lt,S.f=pt,u&&(Y(W[G],\"description\",{configurable:!0,get:function(){return z(this).description}}),i||E(H,\"propertyIsEnumerable\",at,{unsafe:!0})),I.f=function(t){return it(k(t),t)}),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),R(x(nt),function(t){_(t)}),r({target:D,stat:!0,forced:!c},{\"for\":function(t){var n=String(t);if(a(Z,n))return Z[n];var e=W(n);return Z[n]=e,tt[e]=n,e},keyFor:function(t){if(!ut(t))throw TypeError(t+\" is not a symbol\");if(a(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:\"Object\",stat:!0,forced:!c,sham:!u},{create:function(t,n){return n===undefined?g(t):ft(g(t),n)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:st}),r({target:\"Object\",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:pt}),r({target:\"Object\",stat:!0,forced:f(function(){S.f(1)})},{getOwnPropertySymbols:function(t){return S.f(v(t))}}),q&&r({target:\"JSON\",stat:!0,forced:!c||f(function(){var t=W();return\"[null]\"!=B([t])||\"{}\"!=B({a:t})||\"{}\"!=B(Object(t))})},{stringify:function(t){for(var n,e,r=[t],o=1;o<arguments.length;)r.push(arguments[o++]);if(e=n=r[1],(l(n)||t!==undefined)&&!ut(t))return s(n)||(n=function(t,n){if(\"function\"==typeof e&&(n=e.call(this,t,n)),!ut(n))return n}),r[1]=n,B.apply(q,r)}}),W[G][V]||P(W[G],V,W[G].valueOf),F(W,D),L[N]=!0},function(t,n,e){var r=e(14),o=e(42).f,i={}.toString,u=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&\"[object Window]\"==i.call(t)?function(t){try{return o(t)}catch(n){return u.slice()}}(t):o(r(t))}},function(t,n,e){var r=e(10),o=e(8),i=e(55),u=e(9).f;t.exports=function(t){var n=r.Symbol||(r.Symbol={});o(n,t)||u(n,t,{value:i.f(t)})}},function(t,n,e){var r=e(7),o=e(54),i=e(1)(\"species\");t.exports=function(t,n){var e;return o(t)&&(\"function\"==typeof(e=t.constructor)&&(e===Array||o(e.prototype))||r(e)&&null===(e=e[i]))&&(e=undefined),new(e===undefined?Array:e)(0===n?0:n)}},function(t,n,e){t.exports=e(95)},function(t,n,e){e(96);var r=e(10);t.exports=r.Object.getPrototypeOf},function(t,n,e){var r=e(2),o=e(4),i=e(18),u=e(32),c=e(57);r({target:\"Object\",stat:!0,forced:o(function(){u(1)}),sham:!c},{getPrototypeOf:function(t){return u(i(t))}})},function(t,n,e){t.exports=e(98)},function(t,n,e){e(99);var r=e(33);t.exports=r(\"Array\",\"forEach\")},function(t,n,e){\"use strict\";var r=e(2),o=e(100);r({target:\"Array\",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,n,e){\"use strict\";var r=e(56).forEach,o=e(58);t.exports=o(\"forEach\")?function(t){return r(this,t,1<arguments.length?arguments[1]:undefined)}:[].forEach},function(t,n,e){t.exports=e(102)},function(t,n,e){e(103);var r=e(33);t.exports=r(\"Array\",\"indexOf\")},function(t,n,e){\"use strict\";var r=e(2),o=e(50).indexOf,i=e(58),u=[].indexOf,c=!!u&&1/[1].indexOf(1,-0)<0,f=i(\"indexOf\");r({target:\"Array\",proto:!0,forced:c||f},{indexOf:function(t){return c?u.apply(this,arguments)||0:o(this,t,1<arguments.length?arguments[1]:undefined)}})},function(t,n,e){t.exports=e(105)},function(t,n,e){e(106);var r=e(33);t.exports=r(\"Function\",\"bind\")},function(t,n,e){e(2)({target:\"Function\",proto:!0},{bind:e(107)})},function(t,n,e){\"use strict\";var i=e(13),u=e(7),c=[].slice,f={};t.exports=Function.bind||function(n){var e=i(this),r=c.call(arguments,1),o=function(){var t=r.concat(c.call(arguments));return this instanceof o?function(t,n,e){if(!(n in f)){for(var r=[],o=0;o<n;o++)r[o]=\"a[\"+o+\"]\";f[n]=Function(\"C,a\",\"return new C(\"+r.join(\",\")+\")\")}return f[n](t,e)}(e,t.length,t):e.apply(n,t)};return u(e.prototype)&&(o.prototype=e.prototype),o}},function(t,n,e){t.exports=e(109),e(130),e(131),e(132),e(133)},function(t,n,e){e(110),e(112),e(115),e(119),e(68),e(129);var r=e(10);t.exports=r.Promise},function(t,n,e){var r=e(11),o=e(111),i=Object.prototype;o!==i.toString&&r(i,\"toString\",o,{unsafe:!0})},function(t,n,e){\"use strict\";var r=e(59),o={};o[e(1)(\"toStringTag\")]=\"z\",t.exports=\"[object z]\"!==String(o)?function(){return\"[object \"+r(this)+\"]\"}:o.toString},function(t,n,e){\"use strict\";var o=e(60).charAt,r=e(16),i=e(61),u=\"String Iterator\",c=r.set,f=r.getterFor(u);i(String,\"String\",function(t){c(this,{type:u,string:String(t),index:0})},function(){var t,n=f(this),e=n.string,r=n.index;return r>=e.length?{value:undefined,done:!0}:(t=o(e,r),n.index+=t.length,{value:t,done:!1})})},function(t,n,e){\"use strict\";var o=e(62).IteratorPrototype,i=e(21),u=e(19),c=e(30),f=e(22),a=function(){return this};t.exports=function(t,n,e){var r=n+\" Iterator\";return t.prototype=i(o,{next:u(1,e)}),c(t,r,!1,!0),f[r]=a,t}},function(t,n,e){var r=e(7);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError(\"Can't set \"+String(t)+\" as a prototype\");return t}},function(t,n,e){var r=e(0),o=e(116),i=e(117),u=e(6),c=e(1),f=c(\"iterator\"),a=c(\"toStringTag\"),s=i.values;for(var l in o){var p=r[l],v=p&&p.prototype;if(v){if(v[f]!==s)try{u(v,f,s)}catch(h){v[f]=s}if(v[a]||u(v,a,l),o[l])for(var d in i)if(v[d]!==i[d])try{u(v,d,i[d])}catch(h){v[d]=i[d]}}}},function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,n,e){\"use strict\";var r=e(14),o=e(118),i=e(22),u=e(16),c=e(61),f=\"Array Iterator\",a=u.set,s=u.getterFor(f);t.exports=c(Array,\"Array\",function(t,n){a(this,{type:f,target:r(t),index:0,kind:n})},function(){var t=s(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=undefined,{value:undefined,done:!0}):\"keys\"==e?{value:r,done:!1}:\"values\"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}},\"values\"),i.Arguments=i.Array,o(\"keys\"),o(\"values\"),o(\"entries\")},function(t,n,e){var r=e(1),o=e(21),i=e(6),u=r(\"unscopables\"),c=Array.prototype;c[u]==undefined&&i(c,u,o(null)),t.exports=function(t){c[u][t]=!0}},function(t,n,e){\"use strict\";var r,o,i,u,c=e(2),f=e(15),a=e(0),s=e(10),l=e(64),p=e(11),v=e(120),d=e(30),h=e(121),y=e(7),g=e(13),x=e(122),m=e(12),b=e(34),S=e(126),O=e(65),j=e(66).set,w=e(127),P=e(67),E=e(128),A=e(23),T=e(35),L=e(46),M=e(16),k=e(51),I=e(1)(\"species\"),_=\"Promise\",F=M.get,C=M.set,R=M.getterFor(_),N=l,D=a.TypeError,G=a.document,V=a.process,$=a.fetch,z=V&&V.versions,H=z&&z.v8||\"\",W=A.f,q=W,B=\"process\"==m(V),U=!!(G&&G.createEvent&&a.dispatchEvent),Y=\"unhandledrejection\",J=k(_,function(){var t=N.resolve(1),n=function(){},e=(t.constructor={})[I]=function(t){t(n,n)};return!((B||\"function\"==typeof PromiseRejectionEvent)&&(!f||t[\"finally\"])&&t.then(n)instanceof e&&0!==H.indexOf(\"6.6\")&&-1===L.indexOf(\"Chrome/66\"))}),K=J||!S(function(t){N.all(t)[\"catch\"](function(){})}),Q=function(t){var n;return!(!y(t)||\"function\"!=typeof(n=t.then))&&n},X=function(p,v,d){var h;v.notified||(v.notified=!0,h=v.reactions,w(function(){for(var t=v.value,n=1==v.state,e=0;h.length>e;){var r,o,i,u=h[e++],c=n?u.ok:u.fail,f=u.resolve,a=u.reject,s=u.domain;try{c?(n||(2===v.rejection&&et(p,v),v.rejection=1),!0===c?r=t:(s&&s.enter(),r=c(t),s&&(s.exit(),i=!0)),r===u.promise?a(D(\"Promise-chain cycle\")):(o=Q(r))?o.call(r,f,a):f(r)):a(t)}catch(l){s&&!i&&s.exit(),a(l)}}v.reactions=[],v.notified=!1,d&&!v.rejection&&tt(p,v)}))},Z=function(t,n,e){var r,o;U?((r=G.createEvent(\"Event\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:n,reason:e},(o=a[\"on\"+t])?o(r):t===Y&&E(\"Unhandled promise rejection\",e)},tt=function(e,r){j.call(a,function(){var t,n=r.value;if(nt(r)&&(t=T(function(){B?V.emit(\"unhandledRejection\",n,e):Z(Y,e,n)}),r.rejection=B||nt(r)?2:1,t.error))throw t.value})},nt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,n){j.call(a,function(){B?V.emit(\"rejectionHandled\",t):Z(\"rejectionhandled\",t,n.value)})},rt=function(n,e,r,o){return function(t){n(e,r,t,o)}},ot=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,X(t,n,!0))},it=function(e,r,o,t){if(!r.done){r.done=!0,t&&(r=t);try{if(e===o)throw D(\"Promise can't be resolved itself\");var i=Q(o);i?w(function(){var t={done:!1};try{i.call(o,rt(it,e,t,r),rt(ot,e,t,r))}catch(n){ot(e,t,n,r)}}):(r.value=o,r.state=1,X(e,r,!1))}catch(n){ot(e,{done:!1},n,r)}}};J&&(N=function(t){x(this,N,_),g(t),r.call(this);var n=F(this);try{t(rt(it,this,n),rt(ot,this,n))}catch(e){ot(this,n,e)}},(r=function(t){C(this,{type:_,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=v(N.prototype,{then:function(t,n){var e=R(this),r=W(O(this,N));return r.ok=\"function\"!=typeof t||t,r.fail=\"function\"==typeof n&&n,r.domain=B?V.domain:undefined,e.parent=!0,e.reactions.push(r),0!=e.state&&X(this,e,!1),r.promise},\"catch\":function(t){return this.then(undefined,t)}}),o=function(){var t=new r,n=F(t);this.promise=t,this.resolve=rt(it,t,n),this.reject=rt(ot,t,n)},A.f=W=function(t){return t===N||t===i?new o:q(t)},f||\"function\"!=typeof l||(u=l.prototype.then,p(l.prototype,\"then\",function(t,n){var e=this;return new N(function(t,n){u.call(e,t,n)}).then(t,n)},{unsafe:!0}),\"function\"==typeof $&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return P(N,$.apply(a,arguments))}}))),c({global:!0,wrap:!0,forced:J},{Promise:N}),d(N,_,!1,!0),h(_),i=s[_],c({target:_,stat:!0,forced:J},{reject:function(t){var n=W(this);return n.reject.call(undefined,t),n.promise}}),c({target:_,stat:!0,forced:f||J},{resolve:function(t){return P(f&&this===i?N:this,t)}}),c({target:_,stat:!0,forced:K},{all:function(t){var c=this,n=W(c),f=n.resolve,a=n.reject,e=T(function(){var r=g(c.resolve),o=[],i=0,u=1;b(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]=t,--u||f(o))},a)}),--u||f(o)});return e.error&&a(e.value),n.promise},race:function(t){var e=this,r=W(e),o=r.reject,n=T(function(){var n=g(e.resolve);b(t,function(t){n.call(e,t).then(r.resolve,o)})});return n.error&&o(n.value),r.promise}})},function(t,n,e){var o=e(11);t.exports=function(t,n,e){for(var r in n)o(t,r,n[r],e);return t}},function(t,n,e){\"use strict\";var r=e(17),o=e(9),i=e(1),u=e(5),c=i(\"species\");t.exports=function(t){var n=r(t),e=o.f;u&&n&&!n[c]&&e(n,c,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError(\"Incorrect \"+(e?e+\" \":\"\")+\"invocation\");return t}},function(t,n,e){var r=e(1),o=e(22),i=r(\"iterator\"),u=Array.prototype;t.exports=function(t){return t!==undefined&&(o.Array===t||u[i]===t)}},function(t,n,e){var r=e(59),o=e(22),i=e(1)(\"iterator\");t.exports=function(t){if(t!=undefined)return t[i]||t[\"@@iterator\"]||o[r(t)]}},function(t,n,e){var u=e(3);t.exports=function(t,n,e,r){try{return r?n(u(e)[0],e[1]):n(e)}catch(i){var o=t[\"return\"];throw o!==undefined&&u(o.call(t)),i}}},function(t,n,e){var o=e(1)(\"iterator\"),i=!1;try{var r=0,u={next:function(){return{done:!!r++}},\"return\":function(){i=!0}};u[o]=function(){return this},Array.from(u,function(){throw 2})}catch(c){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var r={};r[o]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(c){}return e}},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(0),p=e(24).f,v=e(12),d=e(66).set,h=e(46),y=l.MutationObserver||l.WebKitMutationObserver,g=l.process,x=l.Promise,m=\"process\"==v(g),b=p(l,\"queueMicrotask\"),S=b&&b.value;S||(r=function(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(e){throw o?u():i=undefined,e}}i=undefined,t&&t.enter()},u=m?function(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(c=!0,f=document.createTextNode(\"\"),new y(r).observe(f,{characterData:!0}),function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(undefined),s=a.then,function(){s.call(a,r)}):function(){d.call(l,r)}),t.exports=S||function(t){var n={fn:t,next:undefined};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){\"use strict\";var r=e(2),o=e(15),i=e(64),u=e(17),c=e(65),f=e(67),a=e(11);r({target:\"Promise\",proto:!0,real:!0},{\"finally\":function(n){var e=c(this,u(\"Promise\")),t=\"function\"==typeof n;return this.then(t?function(t){return f(e,n()).then(function(){return t})}:n,t?function(t){return f(e,n()).then(function(){throw t})}:n)}}),o||\"function\"!=typeof i||i.prototype[\"finally\"]||a(i.prototype,\"finally\",u(\"Promise\").prototype[\"finally\"])},function(t,n,e){\"use strict\";var r=e(2),o=e(5),i=e(32),u=e(63),c=e(21),f=e(9),a=e(19),s=e(34),l=e(6),p=e(3),v=e(16),d=v.set,h=v.getterFor(\"AggregateError\"),y=function(t,n){var e=this;if(!(e instanceof y))return new y(t,n);u&&(e=u(new Error(n),i(e)));var r=[];return s(t,r.push,r),o?d(e,{errors:r,type:\"AggregateError\"}):e.errors=r,n!==undefined&&l(e,\"message\",String(n)),e};y.prototype=c(Error.prototype,{constructor:a(5,y),message:a(5,\"\"),name:a(5,\"AggregateError\"),toString:a(5,function(){var t=(t=p(this).name)===undefined?\"AggregateError\":String(t),n=this.message;return t+\": \"+(n=n===undefined?\"\":String(n))})}),o&&f.f(y.prototype,\"errors\",{get:function(){return h(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(t,n,e){e(68)},function(t,n,e){\"use strict\";var r=e(2),o=e(23),i=e(35);r({target:\"Promise\",stat:!0},{\"try\":function(t){var n=o.f(this),e=i(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}})},function(t,n,e){\"use strict\";var r=e(2),l=e(13),p=e(17),o=e(23),i=e(35),v=e(34),d=\"No one promise resolved\";r({target:\"Promise\",stat:!0},{any:function(t){var f=this,n=o.f(f),a=n.resolve,s=n.reject,e=i(function(){var r=l(f.resolve),o=[],i=0,u=1,c=!1;v(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(f,t).then(function(t){e||c||(c=!0,a(t))},function(t){e||c||(e=!0,o[n]=t,--u||s(new(p(\"AggregateError\"))(o,d)))})}),--u||s(new(p(\"AggregateError\"))(o,d))});return e.error&&s(e.value),n.promise}})},function(t,n,e){t.exports=e(135)},function(t,n,e){e(136);var r=e(33);t.exports=r(\"String\",\"replace\")},function(t,n,e){\"use strict\";var r=e(137),w=e(3),p=e(18),P=e(28),E=e(29),i=e(25),A=e(139),T=e(140),L=Math.max,M=Math.min,v=Math.floor,d=/\\$([$&'`]|\\d\\d?|<[^>]*>)/g,h=/\\$([$&'`]|\\d\\d?)/g;r(\"replace\",2,function(o,S,O){return[function(t,n){var e=i(this),r=t==undefined?undefined:t[o];return r!==undefined?r.call(t,e,n):S.call(String(e),t,n)},function(t,n){var e=O(S,t,this,n);if(e.done)return e.value;var r=w(t),o=String(this),i=\"function\"==typeof n;i||(n=String(n));var u,c=r.global;c&&(u=r.unicode,r.lastIndex=0);for(var f=[];;){var a=T(r,o);if(null===a)break;if(f.push(a),!c)break;\"\"===String(a[0])&&(r.lastIndex=A(o,P(r.lastIndex),u))}for(var s,l=\"\",p=0,v=0;v<f.length;v++){a=f[v];for(var d=String(a[0]),h=L(M(E(a.index),o.length),0),y=[],g=1;g<a.length;g++)y.push((s=a[g])===undefined?s:String(s));var x,m=a.groups,b=i?(x=[d].concat(y,h,o),m!==undefined&&x.push(m),String(n.apply(undefined,x))):j(d,o,h,y,m,n);p<=h&&(l+=o.slice(p,h)+b,p=h+d.length)}return l+o.slice(p)}];function j(i,u,c,f,a,t){var s=c+i.length,l=f.length,n=h;return a!==undefined&&(a=p(a),n=d),S.call(t,n,function(t,n){var e;switch(n.charAt(0)){case\"$\":return\"$\";case\"&\":return i;case\"`\":return u.slice(0,c);case\"'\":return u.slice(s);case\"<\":e=a[n.slice(1,-1)];break;default:var r=+n;if(0==r)return t;if(l<r){var o=v(r/10);return 0===o?t:o<=l?f[o-1]===undefined?n.charAt(1):f[o-1]+n.charAt(1):t}e=f[r-1]}return e===undefined?\"\":e})}})},function(t,n,e){\"use strict\";var l=e(6),p=e(11),v=e(4),d=e(1),h=e(69),y=d(\"species\"),g=!v(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:\"7\"},t},\"7\"!==\"\".replace(t,\"$<a>\")}),x=!v(function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e=\"ab\".split(t);return 2!==e.length||\"a\"!==e[0]||\"b\"!==e[1]});t.exports=function(e,t,n,r){var i,o,u,c,f=d(e),a=!v(function(){var t={};return t[f]=function(){return 7},7!=\"\"[e](t)}),s=a&&!v(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},\"split\"===e&&(n.constructor={},n.constructor[y]=function(){return n}),n[f](\"\"),!t});a&&s&&(\"replace\"!==e||g)&&(\"split\"!==e||x)||(i=/./[f],u=(o=n(f,\"\"[e],function(t,n,e,r,o){return n.exec===h?a&&!o?{done:!0,value:i.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}}))[0],c=o[1],p(String.prototype,e,u),p(RegExp.prototype,f,2==t?function(t,n){return c.call(t,this,n)}:function(t){return c.call(t,this)}),r&&l(RegExp.prototype[f],\"sham\",!0))}},function(t,n,e){\"use strict\";var r=e(3);t.exports=function(){var t=r(this),n=\"\";return t.global&&(n+=\"g\"),t.ignoreCase&&(n+=\"i\"),t.multiline&&(n+=\"m\"),t.dotAll&&(n+=\"s\"),t.unicode&&(n+=\"u\"),t.sticky&&(n+=\"y\"),n}},function(t,n,e){\"use strict\";var r=e(60).charAt;t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){var o=e(12),i=e(69);t.exports=function(t,n){var e=t.exec;if(\"function\"==typeof e){var r=e.call(t,n);if(\"object\"!=typeof r)throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==o(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return i.call(t,n)}}]);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}// Production steps of ECMA-262, Edition 5, 15.4.4.14\r\n// Reference: http://es5.github.io/#x15.4.4.14\r\nif (!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function (searchElement, fromIndex) {\r\n\r\n var k;\r\n\r\n // 1. Let o be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if (this == null) {\r\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of o with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = o.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = fromIndex | 0;\r\n\r\n // 6. If n >= len, return -1.\r\n if (n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of o with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of o with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if (k in o && o[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\nif (!Array.prototype.lastIndexOf) {\r\n Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {\r\n \"use strict\";\r\n\r\n if (this === void 0 || this === null) {\r\n throw new TypeError();\r\n }\r\n\r\n var n, k,\r\n t = Object(this),\r\n len = t.length >>> 0;\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n n = len - 1;\r\n if (arguments.length > 1) {\r\n n = Number(arguments[1]);\r\n if (n != n) {\r\n n = 0;\r\n } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {\r\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\r\n }\r\n }\r\n\r\n for (k = n >= 0\r\n ? Math.min(n, len - 1)\r\n : len - Math.abs(n); k >= 0; k--) {\r\n if (k in t && t[k] === searchElement) {\r\n return k;\r\n }\r\n }\r\n return -1;\r\n };\r\n}\r\n/**\r\n * 特殊情况\r\n * Created by wang on 15/6/23.\r\n */\r\n// 解决console未定义问题 guy\r\n_global.console = _global.console || (function () {\r\n var c = {};\r\n c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile\r\n = c.clear = c.exception = c.trace = c.assert = function () {\r\n };\r\n return c;\r\n})();\r\n/*\r\n * 前端缓存\r\n */\r\n_global.localStorage || (_global.localStorage = {\r\n items: {},\r\n setItem: function (k, v) {\r\n BI.Cache.addCookie(k, v);\r\n },\r\n getItem: function (k) {\r\n return BI.Cache.getCookie(k);\r\n },\r\n removeItem: function (k) {\r\n BI.Cache.deleteCookie(k);\r\n },\r\n key: function () {\r\n\r\n },\r\n clear: function () {\r\n this.items = {};\r\n }\r\n});\r\nif (!Object.keys) {\r\n Object.keys = function(o) {\r\n if (o !== Object(o)) {\r\n throw new TypeError('Object.keys called on a non-object');\r\n }\r\n // fix的问题\r\n var falsy;\r\n var skipArray = {\r\n __ob__: falsy,\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy\r\n };\r\n var k = [], p;\r\n for (p in o) {\r\n if (!(p in skipArray)) {\r\n if (Object.prototype.hasOwnProperty.call(o, p)) {\r\n k.push(p);\r\n }\r\n }\r\n }\r\n return k;\r\n };\r\n}\r\n\r\nif (!Array.isArray) {\r\n Array.isArray = function(arg) {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\r\n/* 统一采用core-js的polyfill,此块暂去\r\n// https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method\r\nif (typeof Object.getPrototypeOf !== \"function\") {\r\n Object.getPrototypeOf = \"\".__proto__ === String.prototype\r\n ? function (object) {\r\n return object.__proto__;\r\n }\r\n : function (object) {\r\n // May break if the constructor has been tampered with\r\n return object.constructor.prototype;\r\n };\r\n}\r\n */\r\n\r\nif(!Date.now) {\r\n Date.now = function () {\r\n return new Date().valueOf();\r\n };\r\n}if (typeof Set !== \"undefined\" && Set.toString().match(/native code/)) {\r\n\r\n} else {\r\n Set = function () {\r\n this.set = {};\r\n };\r\n Set.prototype.has = function (key) {\r\n return this.set[key] !== undefined;\r\n };\r\n Set.prototype.add = function (key) {\r\n this.set[key] = 1;\r\n };\r\n Set.prototype.clear = function () {\r\n this.set = {};\r\n };\r\n}// 修复ie9下sort方法的bug\r\n// IE的sort 需要显示声明返回-1, 0, 1三种比较结果才可正常工作,而Chrome, Firefox中可以直接返回true, false等\r\n// BI-36544 sort提供的参数就可以自定义返回值,不需要特别控制。这边使用冒泡相较于快排可能慢了点。\r\n// 这边先将webkit的限制去掉\r\n!function (window) {\r\n var ua = window.navigator.userAgent.toLowerCase(),\r\n reg = /msie/;\r\n if (reg.test(ua)) {\r\n var _sort = Array.prototype.sort;\r\n Array.prototype.sort = function (fn) {\r\n if (!!fn && typeof fn === \"function\") {\r\n if (this.length < 2) {\r\n return this;\r\n }\r\n var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;\r\n for (; i < l; i++) {\r\n for (j = i + 1; j < l; j++) {\r\n t = fn.call(this, this[i], this[j]);\r\n r = (typeof t === \"number\" ? t :\r\n t ? 1 : 0) > 0;\r\n if (r === true) {\r\n tmp = this[i];\r\n this[i] = this[j];\r\n this[j] = tmp;\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n return _sort.call(this);\r\n\r\n };\r\n }\r\n}(window);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}/**\r\n * @license\r\n * Lodash (Custom Build) <https://lodash.com/>\r\n * Build: `lodash core plus=\"debounce,throttle,get,set,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge,groupBy,uniqBy\"`\r\n * Copyright JS Foundation and other contributors <https://js.foundation/>\r\n * Released under MIT license <https://lodash.com/license>\r\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\r\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\r\n */\r\n;(function() {\r\n\r\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\r\n var undefined;\r\n\r\n /** Used as the semantic version number. */\r\n var VERSION = '4.17.5';\r\n\r\n /** Used as the size to enable large array optimizations. */\r\n var LARGE_ARRAY_SIZE = 200;\r\n\r\n /** Error message constants. */\r\n var FUNC_ERROR_TEXT = 'Expected a function';\r\n\r\n /** Used to stand-in for `undefined` hash values. */\r\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\r\n\r\n /** Used as the maximum memoize cache size. */\r\n var MAX_MEMOIZE_SIZE = 500;\r\n\r\n /** Used as the internal argument placeholder. */\r\n var PLACEHOLDER = '__lodash_placeholder__';\r\n\r\n /** Used to compose bitmasks for cloning. */\r\n var CLONE_DEEP_FLAG = 1,\r\n CLONE_FLAT_FLAG = 2,\r\n CLONE_SYMBOLS_FLAG = 4;\r\n\r\n /** Used to compose bitmasks for value comparisons. */\r\n var COMPARE_PARTIAL_FLAG = 1,\r\n COMPARE_UNORDERED_FLAG = 2;\r\n\r\n /** Used to compose bitmasks for function metadata. */\r\n var WRAP_BIND_FLAG = 1,\r\n WRAP_BIND_KEY_FLAG = 2,\r\n WRAP_CURRY_BOUND_FLAG = 4,\r\n WRAP_CURRY_FLAG = 8,\r\n WRAP_CURRY_RIGHT_FLAG = 16,\r\n WRAP_PARTIAL_FLAG = 32,\r\n WRAP_PARTIAL_RIGHT_FLAG = 64,\r\n WRAP_ARY_FLAG = 128,\r\n WRAP_REARG_FLAG = 256,\r\n WRAP_FLIP_FLAG = 512;\r\n\r\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\r\n var HOT_COUNT = 800,\r\n HOT_SPAN = 16;\r\n\r\n /** Used to indicate the type of lazy iteratees. */\r\n var LAZY_FILTER_FLAG = 1,\r\n LAZY_MAP_FLAG = 2,\r\n LAZY_WHILE_FLAG = 3;\r\n\r\n /** Used as references for various `Number` constants. */\r\n var INFINITY = 1 / 0,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_INTEGER = 1.7976931348623157e+308,\r\n NAN = 0 / 0;\r\n\r\n /** Used as references for the maximum length and index of an array. */\r\n var MAX_ARRAY_LENGTH = 4294967295;\r\n\r\n /** Used to associate wrap methods with their bit flags. */\r\n var wrapFlags = [\r\n ['ary', WRAP_ARY_FLAG],\r\n ['bind', WRAP_BIND_FLAG],\r\n ['bindKey', WRAP_BIND_KEY_FLAG],\r\n ['curry', WRAP_CURRY_FLAG],\r\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\r\n ['flip', WRAP_FLIP_FLAG],\r\n ['partial', WRAP_PARTIAL_FLAG],\r\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\r\n ['rearg', WRAP_REARG_FLAG]\r\n ];\r\n\r\n /** `Object#toString` result references. */\r\n var argsTag = '[object Arguments]',\r\n arrayTag = '[object Array]',\r\n asyncTag = '[object AsyncFunction]',\r\n boolTag = '[object Boolean]',\r\n dateTag = '[object Date]',\r\n errorTag = '[object Error]',\r\n funcTag = '[object Function]',\r\n genTag = '[object GeneratorFunction]',\r\n mapTag = '[object Map]',\r\n numberTag = '[object Number]',\r\n nullTag = '[object Null]',\r\n objectTag = '[object Object]',\r\n promiseTag = '[object Promise]',\r\n proxyTag = '[object Proxy]',\r\n regexpTag = '[object RegExp]',\r\n setTag = '[object Set]',\r\n stringTag = '[object String]',\r\n symbolTag = '[object Symbol]',\r\n undefinedTag = '[object Undefined]',\r\n weakMapTag = '[object WeakMap]';\r\n\r\n var arrayBufferTag = '[object ArrayBuffer]',\r\n dataViewTag = '[object DataView]',\r\n float32Tag = '[object Float32Array]',\r\n float64Tag = '[object Float64Array]',\r\n int8Tag = '[object Int8Array]',\r\n int16Tag = '[object Int16Array]',\r\n int32Tag = '[object Int32Array]',\r\n uint8Tag = '[object Uint8Array]',\r\n uint8ClampedTag = '[object Uint8ClampedArray]',\r\n uint16Tag = '[object Uint16Array]',\r\n uint32Tag = '[object Uint32Array]';\r\n\r\n /** Used to match HTML entities and HTML characters. */\r\n var reUnescapedHtml = /[&<>\"']/g,\r\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\r\n\r\n /** Used to match property names within property paths. */\r\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\r\n reIsPlainProp = /^\\w*$/,\r\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\r\n\r\n /**\r\n * Used to match `RegExp`\r\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\r\n */\r\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\r\n\r\n /** Used to match leading and trailing whitespace. */\r\n var reTrim = /^\\s+|\\s+$/g;\r\n\r\n /** Used to match wrap detail comments. */\r\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\r\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\r\n reSplitDetails = /,? & /;\r\n\r\n /** Used to match backslashes in property paths. */\r\n var reEscapeChar = /\\\\(\\\\)?/g;\r\n\r\n /** Used to match `RegExp` flags from their coerced string values. */\r\n var reFlags = /\\w*$/;\r\n\r\n /** Used to detect bad signed hexadecimal string values. */\r\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\r\n\r\n /** Used to detect binary string values. */\r\n var reIsBinary = /^0b[01]+$/i;\r\n\r\n /** Used to detect host constructors (Safari). */\r\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\r\n\r\n /** Used to detect octal string values. */\r\n var reIsOctal = /^0o[0-7]+$/i;\r\n\r\n /** Used to detect unsigned integer values. */\r\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\r\n\r\n /** Used to compose unicode character classes. */\r\n var rsAstralRange = '\\\\ud800-\\\\udfff',\r\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\r\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\r\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\r\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\r\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\r\n\r\n /** Used to compose unicode capture groups. */\r\n var rsAstral = '[' + rsAstralRange + ']',\r\n rsCombo = '[' + rsComboRange + ']',\r\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\r\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\r\n rsNonAstral = '[^' + rsAstralRange + ']',\r\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\r\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\r\n rsZWJ = '\\\\u200d';\r\n\r\n /** Used to compose unicode regexes. */\r\n var reOptMod = rsModifier + '?',\r\n rsOptVar = '[' + rsVarRange + ']?',\r\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\r\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\r\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\r\n\r\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\r\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\r\n\r\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\r\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\r\n\r\n /** Used to identify `toStringTag` values of typed arrays. */\r\n var typedArrayTags = {};\r\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r\n typedArrayTags[uint32Tag] = true;\r\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\r\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\r\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\r\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\r\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\r\n typedArrayTags[weakMapTag] = false;\r\n\r\n /** Used to identify `toStringTag` values supported by `_.clone`. */\r\n var cloneableTags = {};\r\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\r\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\r\n cloneableTags[boolTag] = cloneableTags[dateTag] =\r\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\r\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\r\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\r\n cloneableTags[numberTag] = cloneableTags[objectTag] =\r\n cloneableTags[regexpTag] = cloneableTags[setTag] =\r\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\r\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r\n cloneableTags[errorTag] = cloneableTags[funcTag] =\r\n cloneableTags[weakMapTag] = false;\r\n\r\n /** Used to map characters to HTML entities. */\r\n var htmlEscapes = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": '''\r\n };\r\n\r\n /** Built-in method references without a dependency on `root`. */\r\n var freeParseFloat = parseFloat,\r\n freeParseInt = parseInt;\r\n\r\n /** Detect free variable `global` from Node.js. */\r\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\r\n\r\n /** Detect free variable `self`. */\r\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\r\n\r\n /** Used as a reference to the global object. */\r\n var root = freeGlobal || freeSelf || Function('return this')();\r\n\r\n /** Detect free variable `exports`. */\r\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\r\n\r\n /** Detect free variable `module`. */\r\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\r\n\r\n /** Detect the popular CommonJS extension `module.exports`. */\r\n var moduleExports = freeModule && freeModule.exports === freeExports;\r\n\r\n /** Detect free variable `process` from Node.js. */\r\n var freeProcess = moduleExports && freeGlobal.process;\r\n\r\n /** Used to access faster Node.js helpers. */\r\n var nodeUtil = (function() {\r\n try {\r\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\r\n } catch (e) {}\r\n }());\r\n\r\n /* Node.js helper references. */\r\n var nodeIsDate = nodeUtil && nodeUtil.isDate,\r\n nodeIsMap = nodeUtil && nodeUtil.isMap,\r\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\r\n nodeIsSet = nodeUtil && nodeUtil.isSet,\r\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * A faster alternative to `Function#apply`, this function invokes `func`\r\n * with the `this` binding of `thisArg` and the arguments of `args`.\r\n *\r\n * @private\r\n * @param {Function} func The function to invoke.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} args The arguments to invoke `func` with.\r\n * @returns {*} Returns the result of `func`.\r\n */\r\n function apply(func, thisArg, args) {\r\n switch (args.length) {\r\n case 0: return func.call(thisArg);\r\n case 1: return func.call(thisArg, args[0]);\r\n case 2: return func.call(thisArg, args[0], args[1]);\r\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\r\n }\r\n return func.apply(thisArg, args);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseAggregator` for arrays.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function arrayAggregator(array, setter, iteratee, accumulator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n setter(accumulator, value, iteratee(value), array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEach` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEach(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (iteratee(array[index], index, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.every` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n */\r\n function arrayEvery(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (!predicate(array[index], index, array)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.filter` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function arrayFilter(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.includes` for arrays without support for\r\n * specifying an index to search from.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludes(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n return !!length && baseIndexOf(array, value, 0) > -1;\r\n }\r\n\r\n /**\r\n * This function is like `arrayIncludes` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludesWith(array, value, comparator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(value, array[index])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.map` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function arrayMap(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n result[index] = iteratee(array[index], index, array);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Appends the elements of `values` to `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to append.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayPush(array, values) {\r\n var index = -1,\r\n length = values.length,\r\n offset = array.length;\r\n\r\n while (++index < length) {\r\n array[offset + index] = values[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduce` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the first element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduce(array, iteratee, accumulator, initAccum) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n if (initAccum && length) {\r\n accumulator = array[++index];\r\n }\r\n while (++index < length) {\r\n accumulator = iteratee(accumulator, array[index], index, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.some` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function arraySome(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (predicate(array[index], index, array)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the size of an ASCII `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n var asciiSize = baseProperty('length');\r\n\r\n /**\r\n * Converts an ASCII `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function asciiToArray(string) {\r\n return string.split('');\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\r\n * without support for iteratee shorthands, which iterates over `collection`\r\n * using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the found element or its key, else `undefined`.\r\n */\r\n function baseFindKey(collection, predicate, eachFunc) {\r\n var result;\r\n eachFunc(collection, function(value, key, collection) {\r\n if (predicate(value, key, collection)) {\r\n result = key;\r\n return false;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\r\n var length = array.length,\r\n index = fromIndex + (fromRight ? 1 : -1);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (predicate(array[index], index, array)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOf(array, value, fromIndex) {\r\n return value === value\r\n ? strictIndexOf(array, value, fromIndex)\r\n : baseFindIndex(array, baseIsNaN, fromIndex);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNaN` without support for number objects.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n */\r\n function baseIsNaN(value) {\r\n return value !== value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.property` without support for deep paths.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function baseProperty(key) {\r\n return function(object) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.propertyOf` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyOf(object) {\r\n return function(key) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\r\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} accumulator The initial value.\r\n * @param {boolean} initAccum Specify using the first or last element of\r\n * `collection` as the initial value.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\r\n eachFunc(collection, function(value, index, collection) {\r\n accumulator = initAccum\r\n ? (initAccum = false, value)\r\n : iteratee(accumulator, value, index, collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortBy` which uses `comparer` to define the\r\n * sort order of `array` and replaces criteria objects with their corresponding\r\n * values.\r\n *\r\n * @private\r\n * @param {Array} array The array to sort.\r\n * @param {Function} comparer The function to define sort order.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseSortBy(array, comparer) {\r\n var length = array.length;\r\n\r\n array.sort(comparer);\r\n while (length--) {\r\n array[length] = array[length].value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.times` without support for iteratee shorthands\r\n * or max array length checks.\r\n *\r\n * @private\r\n * @param {number} n The number of times to invoke `iteratee`.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the array of results.\r\n */\r\n function baseTimes(n, iteratee) {\r\n var index = -1,\r\n result = Array(n);\r\n\r\n while (++index < n) {\r\n result[index] = iteratee(index);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unary` without support for storing metadata.\r\n *\r\n * @private\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n */\r\n function baseUnary(func) {\r\n return function(value) {\r\n return func(value);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.values` and `_.valuesIn` which creates an\r\n * array of `object` property values corresponding to the property names\r\n * of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the array of property values.\r\n */\r\n function baseValues(object, props) {\r\n return arrayMap(props, function(key) {\r\n return object[key];\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a `cache` value for `key` exists.\r\n *\r\n * @private\r\n * @param {Object} cache The cache to query.\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function cacheHas(cache, key) {\r\n return cache.has(key);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the first unmatched string symbol.\r\n */\r\n function charsStartIndex(strSymbols, chrSymbols) {\r\n var index = -1,\r\n length = strSymbols.length;\r\n\r\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the last unmatched string symbol.\r\n */\r\n function charsEndIndex(strSymbols, chrSymbols) {\r\n var index = strSymbols.length;\r\n\r\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of `placeholder` occurrences in `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} placeholder The placeholder to search for.\r\n * @returns {number} Returns the placeholder count.\r\n */\r\n function countHolders(array, placeholder) {\r\n var length = array.length,\r\n result = 0;\r\n\r\n while (length--) {\r\n if (array[length] === placeholder) {\r\n ++result;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Used by `_.escape` to convert characters to HTML entities.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\r\n\r\n /**\r\n * Gets the value at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function getValue(object, key) {\r\n return object == null ? undefined : object[key];\r\n }\r\n\r\n /**\r\n * Checks if `string` contains Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\r\n */\r\n function hasUnicode(string) {\r\n return reHasUnicode.test(string);\r\n }\r\n\r\n /**\r\n * Converts `iterator` to an array.\r\n *\r\n * @private\r\n * @param {Object} iterator The iterator to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function iteratorToArray(iterator) {\r\n var data,\r\n result = [];\r\n\r\n while (!(data = iterator.next()).done) {\r\n result.push(data.value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `map` to its key-value pairs.\r\n *\r\n * @private\r\n * @param {Object} map The map to convert.\r\n * @returns {Array} Returns the key-value pairs.\r\n */\r\n function mapToArray(map) {\r\n var index = -1,\r\n result = Array(map.size);\r\n\r\n map.forEach(function(value, key) {\r\n result[++index] = [key, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a unary function that invokes `func` with its argument transformed.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {Function} transform The argument transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overArg(func, transform) {\r\n return function(arg) {\r\n return func(transform(arg));\r\n };\r\n }\r\n\r\n /**\r\n * Replaces all `placeholder` elements in `array` with an internal placeholder\r\n * and returns an array of their indexes.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {*} placeholder The placeholder to replace.\r\n * @returns {Array} Returns the new array of placeholder indexes.\r\n */\r\n function replaceHolders(array, placeholder) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value === placeholder || value === PLACEHOLDER) {\r\n array[index] = PLACEHOLDER;\r\n result[resIndex++] = index;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the value at `key`, unless `key` is \"__proto__\".\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function safeGet(object, key) {\r\n return key == '__proto__'\r\n ? undefined\r\n : object[key];\r\n }\r\n\r\n /**\r\n * Converts `set` to an array of its values.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the values.\r\n */\r\n function setToArray(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = value;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.indexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictIndexOf(array, value, fromIndex) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Gets the number of symbols in `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function stringSize(string) {\r\n return hasUnicode(string)\r\n ? unicodeSize(string)\r\n : asciiSize(string);\r\n }\r\n\r\n /**\r\n * Converts `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function stringToArray(string) {\r\n return hasUnicode(string)\r\n ? unicodeToArray(string)\r\n : asciiToArray(string);\r\n }\r\n\r\n /**\r\n * Gets the size of a Unicode `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function unicodeSize(string) {\r\n var result = reUnicode.lastIndex = 0;\r\n while (reUnicode.test(string)) {\r\n ++result;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts a Unicode `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function unicodeToArray(string) {\r\n return string.match(reUnicode) || [];\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /** Used for built-in method references. */\r\n var arrayProto = Array.prototype,\r\n funcProto = Function.prototype,\r\n objectProto = Object.prototype;\r\n\r\n /** Used to detect overreaching core-js shims. */\r\n var coreJsData = root['__core-js_shared__'];\r\n\r\n /** Used to resolve the decompiled source of functions. */\r\n var funcToString = funcProto.toString;\r\n\r\n /** Used to check objects for own properties. */\r\n var hasOwnProperty = objectProto.hasOwnProperty;\r\n\r\n /** Used to generate unique IDs. */\r\n var idCounter = 0;\r\n\r\n /** Used to detect methods masquerading as native. */\r\n var maskSrcKey = (function() {\r\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\r\n return uid ? ('Symbol(src)_1.' + uid) : '';\r\n }());\r\n\r\n /**\r\n * Used to resolve the\r\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\r\n * of values.\r\n */\r\n var nativeObjectToString = objectProto.toString;\r\n\r\n /** Used to infer the `Object` constructor. */\r\n var objectCtorString = funcToString.call(Object);\r\n\r\n /** Used to restore the original `_` reference in `_.noConflict`. */\r\n var oldDash = root._;\r\n\r\n /** Used to detect if a method is native. */\r\n var reIsNative = RegExp('^' +\r\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\r\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\r\n );\r\n\r\n /** Built-in value references. */\r\n var Buffer = moduleExports ? root.Buffer : undefined,\r\n Symbol = root.Symbol,\r\n Uint8Array = root.Uint8Array,\r\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\r\n getPrototype = overArg(Object.getPrototypeOf, Object),\r\n objectCreate = Object.create,\r\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\r\n splice = arrayProto.splice,\r\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\r\n symIterator = Symbol ? Symbol.iterator : undefined,\r\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\r\n\r\n var defineProperty = (function() {\r\n try {\r\n var func = getNative(Object, 'defineProperty');\r\n func({}, '', {});\r\n return func;\r\n } catch (e) {}\r\n }());\r\n\r\n /* Built-in method references for those with the same name as other `lodash` methods. */\r\n var nativeCeil = Math.ceil,\r\n nativeFloor = Math.floor,\r\n nativeGetSymbols = Object.getOwnPropertySymbols,\r\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\r\n nativeIsFinite = root.isFinite,\r\n nativeKeys = overArg(Object.keys, Object),\r\n nativeMax = Math.max,\r\n nativeMin = Math.min,\r\n nativeNow = Date.now,\r\n nativeRandom = Math.random,\r\n nativeReverse = arrayProto.reverse;\r\n\r\n /* Built-in method references that are verified to be native. */\r\n var DataView = getNative(root, 'DataView'),\r\n Map = getNative(root, 'Map'),\r\n Promise = getNative(root, 'Promise'),\r\n Set = getNative(root, 'Set'),\r\n WeakMap = getNative(root, 'WeakMap'),\r\n nativeCreate = getNative(Object, 'create');\r\n\r\n /** Used to store function metadata. */\r\n var metaMap = WeakMap && new WeakMap;\r\n\r\n /** Used to lookup unminified function names. */\r\n var realNames = {};\r\n\r\n /** Used to detect maps, sets, and weakmaps. */\r\n var dataViewCtorString = toSource(DataView),\r\n mapCtorString = toSource(Map),\r\n promiseCtorString = toSource(Promise),\r\n setCtorString = toSource(Set),\r\n weakMapCtorString = toSource(WeakMap);\r\n\r\n /** Used to convert symbols to primitives and strings. */\r\n var symbolProto = Symbol ? Symbol.prototype : undefined,\r\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\r\n symbolToString = symbolProto ? symbolProto.toString : undefined;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` object which wraps `value` to enable implicit method\r\n * chain sequences. Methods that operate on and return arrays, collections,\r\n * and functions can be chained together. Methods that retrieve a single value\r\n * or may return a primitive value will automatically end the chain sequence\r\n * and return the unwrapped value. Otherwise, the value must be unwrapped\r\n * with `_#value`.\r\n *\r\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\r\n * enabled using `_.chain`.\r\n *\r\n * The execution of chained methods is lazy, that is, it's deferred until\r\n * `_#value` is implicitly or explicitly called.\r\n *\r\n * Lazy evaluation allows several methods to support shortcut fusion.\r\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\r\n * the creation of intermediate arrays and can greatly reduce the number of\r\n * iteratee executions. Sections of a chain sequence qualify for shortcut\r\n * fusion if the section is applied to an array and iteratees accept only\r\n * one argument. The heuristic for whether a section qualifies for shortcut\r\n * fusion is subject to change.\r\n *\r\n * Chaining is supported in custom builds as long as the `_#value` method is\r\n * directly or indirectly included in the build.\r\n *\r\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\r\n *\r\n * The wrapper `Array` methods are:\r\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\r\n *\r\n * The wrapper `String` methods are:\r\n * `replace` and `split`\r\n *\r\n * The wrapper methods that support shortcut fusion are:\r\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\r\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\r\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\r\n *\r\n * The chainable wrapper methods are:\r\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\r\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\r\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\r\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\r\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\r\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\r\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\r\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\r\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\r\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\r\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\r\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\r\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\r\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\r\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\r\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\r\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\r\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\r\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\r\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\r\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\r\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\r\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\r\n * `zipObject`, `zipObjectDeep`, and `zipWith`\r\n *\r\n * The wrapper methods that are **not** chainable by default are:\r\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\r\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\r\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\r\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\r\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\r\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\r\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\r\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\r\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\r\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\r\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\r\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\r\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\r\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\r\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\r\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\r\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\r\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\r\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\r\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\r\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\r\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\r\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\r\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\r\n * `upperFirst`, `value`, and `words`\r\n *\r\n * @name _\r\n * @constructor\r\n * @category Seq\r\n * @param {*} value The value to wrap in a `lodash` instance.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2, 3]);\r\n *\r\n * // Returns an unwrapped value.\r\n * wrapped.reduce(_.add);\r\n * // => 6\r\n *\r\n * // Returns a wrapped value.\r\n * var squares = wrapped.map(square);\r\n *\r\n * _.isArray(squares);\r\n * // => false\r\n *\r\n * _.isArray(squares.value());\r\n * // => true\r\n */\r\n function lodash(value) {\r\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r\n if (value instanceof LodashWrapper) {\r\n return value;\r\n }\r\n if (hasOwnProperty.call(value, '__wrapped__')) {\r\n return wrapperClone(value);\r\n }\r\n }\r\n return new LodashWrapper(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.create` without support for assigning\r\n * properties to the created object.\r\n *\r\n * @private\r\n * @param {Object} proto The object to inherit from.\r\n * @returns {Object} Returns the new object.\r\n */\r\n var baseCreate = (function() {\r\n function object() {}\r\n return function(proto) {\r\n if (!isObject(proto)) {\r\n return {};\r\n }\r\n if (objectCreate) {\r\n return objectCreate(proto);\r\n }\r\n object.prototype = proto;\r\n var result = new object;\r\n object.prototype = undefined;\r\n return result;\r\n };\r\n }());\r\n\r\n /**\r\n * The function whose prototype chain sequence wrappers inherit from.\r\n *\r\n * @private\r\n */\r\n function baseLodash() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * The base constructor for creating `lodash` wrapper objects.\r\n *\r\n * @private\r\n * @param {*} value The value to wrap.\r\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\r\n */\r\n function LodashWrapper(value, chainAll) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__chain__ = !!chainAll;\r\n this.__index__ = 0;\r\n this.__values__ = undefined;\r\n }\r\n\r\n // Ensure wrappers are instances of `baseLodash`.\r\n lodash.prototype = baseLodash.prototype;\r\n lodash.prototype.constructor = lodash;\r\n\r\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LodashWrapper.prototype.constructor = LodashWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {*} value The value to wrap.\r\n */\r\n function LazyWrapper(value) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__dir__ = 1;\r\n this.__filtered__ = false;\r\n this.__iteratees__ = [];\r\n this.__takeCount__ = MAX_ARRAY_LENGTH;\r\n this.__views__ = [];\r\n }\r\n\r\n /**\r\n * Creates a clone of the lazy wrapper object.\r\n *\r\n * @private\r\n * @name clone\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the cloned `LazyWrapper` object.\r\n */\r\n function lazyClone() {\r\n var result = new LazyWrapper(this.__wrapped__);\r\n result.__actions__ = copyArray(this.__actions__);\r\n result.__dir__ = this.__dir__;\r\n result.__filtered__ = this.__filtered__;\r\n result.__iteratees__ = copyArray(this.__iteratees__);\r\n result.__takeCount__ = this.__takeCount__;\r\n result.__views__ = copyArray(this.__views__);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses the direction of lazy iteration.\r\n *\r\n * @private\r\n * @name reverse\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\r\n */\r\n function lazyReverse() {\r\n if (this.__filtered__) {\r\n var result = new LazyWrapper(this);\r\n result.__dir__ = -1;\r\n result.__filtered__ = true;\r\n } else {\r\n result = this.clone();\r\n result.__dir__ *= -1;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the unwrapped value from its lazy wrapper.\r\n *\r\n * @private\r\n * @name value\r\n * @memberOf LazyWrapper\r\n * @returns {*} Returns the unwrapped value.\r\n */\r\n function lazyValue() {\r\n var array = this.__wrapped__.value(),\r\n dir = this.__dir__,\r\n isArr = isArray(array),\r\n isRight = dir < 0,\r\n arrLength = isArr ? array.length : 0,\r\n view = getView(0, arrLength, this.__views__),\r\n start = view.start,\r\n end = view.end,\r\n length = end - start,\r\n index = isRight ? end : (start - 1),\r\n iteratees = this.__iteratees__,\r\n iterLength = iteratees.length,\r\n resIndex = 0,\r\n takeCount = nativeMin(length, this.__takeCount__);\r\n\r\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\r\n return baseWrapperValue(array, this.__actions__);\r\n }\r\n var result = [];\r\n\r\n outer:\r\n while (length-- && resIndex < takeCount) {\r\n index += dir;\r\n\r\n var iterIndex = -1,\r\n value = array[index];\r\n\r\n while (++iterIndex < iterLength) {\r\n var data = iteratees[iterIndex],\r\n iteratee = data.iteratee,\r\n type = data.type,\r\n computed = iteratee(value);\r\n\r\n if (type == LAZY_MAP_FLAG) {\r\n value = computed;\r\n } else if (!computed) {\r\n if (type == LAZY_FILTER_FLAG) {\r\n continue outer;\r\n } else {\r\n break outer;\r\n }\r\n }\r\n }\r\n result[resIndex++] = value;\r\n }\r\n return result;\r\n }\r\n\r\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\r\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LazyWrapper.prototype.constructor = LazyWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a hash object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Hash(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the hash.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Hash\r\n */\r\n function hashClear() {\r\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the hash.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Hash\r\n * @param {Object} hash The hash to modify.\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function hashDelete(key) {\r\n var result = this.has(key) && delete this.__data__[key];\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the hash value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function hashGet(key) {\r\n var data = this.__data__;\r\n if (nativeCreate) {\r\n var result = data[key];\r\n return result === HASH_UNDEFINED ? undefined : result;\r\n }\r\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\r\n }\r\n\r\n /**\r\n * Checks if a hash value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Hash\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function hashHas(key) {\r\n var data = this.__data__;\r\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\r\n }\r\n\r\n /**\r\n * Sets the hash `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the hash instance.\r\n */\r\n function hashSet(key, value) {\r\n var data = this.__data__;\r\n this.size += this.has(key) ? 0 : 1;\r\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\r\n return this;\r\n }\r\n\r\n // Add methods to `Hash`.\r\n Hash.prototype.clear = hashClear;\r\n Hash.prototype['delete'] = hashDelete;\r\n Hash.prototype.get = hashGet;\r\n Hash.prototype.has = hashHas;\r\n Hash.prototype.set = hashSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an list cache object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function ListCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the list cache.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf ListCache\r\n */\r\n function listCacheClear() {\r\n this.__data__ = [];\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the list cache.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function listCacheDelete(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n var lastIndex = data.length - 1;\r\n if (index == lastIndex) {\r\n data.pop();\r\n } else {\r\n splice.call(data, index, 1);\r\n }\r\n --this.size;\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the list cache value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function listCacheGet(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n return index < 0 ? undefined : data[index][1];\r\n }\r\n\r\n /**\r\n * Checks if a list cache value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf ListCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function listCacheHas(key) {\r\n return assocIndexOf(this.__data__, key) > -1;\r\n }\r\n\r\n /**\r\n * Sets the list cache `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the list cache instance.\r\n */\r\n function listCacheSet(key, value) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n ++this.size;\r\n data.push([key, value]);\r\n } else {\r\n data[index][1] = value;\r\n }\r\n return this;\r\n }\r\n\r\n // Add methods to `ListCache`.\r\n ListCache.prototype.clear = listCacheClear;\r\n ListCache.prototype['delete'] = listCacheDelete;\r\n ListCache.prototype.get = listCacheGet;\r\n ListCache.prototype.has = listCacheHas;\r\n ListCache.prototype.set = listCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a map cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function MapCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the map.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf MapCache\r\n */\r\n function mapCacheClear() {\r\n this.size = 0;\r\n this.__data__ = {\r\n 'hash': new Hash,\r\n 'map': new (Map || ListCache),\r\n 'string': new Hash\r\n };\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the map.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function mapCacheDelete(key) {\r\n var result = getMapData(this, key)['delete'](key);\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the map value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function mapCacheGet(key) {\r\n return getMapData(this, key).get(key);\r\n }\r\n\r\n /**\r\n * Checks if a map value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf MapCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function mapCacheHas(key) {\r\n return getMapData(this, key).has(key);\r\n }\r\n\r\n /**\r\n * Sets the map `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the map cache instance.\r\n */\r\n function mapCacheSet(key, value) {\r\n var data = getMapData(this, key),\r\n size = data.size;\r\n\r\n data.set(key, value);\r\n this.size += data.size == size ? 0 : 1;\r\n return this;\r\n }\r\n\r\n // Add methods to `MapCache`.\r\n MapCache.prototype.clear = mapCacheClear;\r\n MapCache.prototype['delete'] = mapCacheDelete;\r\n MapCache.prototype.get = mapCacheGet;\r\n MapCache.prototype.has = mapCacheHas;\r\n MapCache.prototype.set = mapCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n *\r\n * Creates an array cache object to store unique values.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [values] The values to cache.\r\n */\r\n function SetCache(values) {\r\n var index = -1,\r\n length = values == null ? 0 : values.length;\r\n\r\n this.__data__ = new MapCache;\r\n while (++index < length) {\r\n this.add(values[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Adds `value` to the array cache.\r\n *\r\n * @private\r\n * @name add\r\n * @memberOf SetCache\r\n * @alias push\r\n * @param {*} value The value to cache.\r\n * @returns {Object} Returns the cache instance.\r\n */\r\n function setCacheAdd(value) {\r\n this.__data__.set(value, HASH_UNDEFINED);\r\n return this;\r\n }\r\n\r\n /**\r\n * Checks if `value` is in the array cache.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf SetCache\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns `true` if `value` is found, else `false`.\r\n */\r\n function setCacheHas(value) {\r\n return this.__data__.has(value);\r\n }\r\n\r\n // Add methods to `SetCache`.\r\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\r\n SetCache.prototype.has = setCacheHas;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a stack cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Stack(entries) {\r\n var data = this.__data__ = new ListCache(entries);\r\n this.size = data.size;\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the stack.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Stack\r\n */\r\n function stackClear() {\r\n this.__data__ = new ListCache;\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the stack.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function stackDelete(key) {\r\n var data = this.__data__,\r\n result = data['delete'](key);\r\n\r\n this.size = data.size;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the stack value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function stackGet(key) {\r\n return this.__data__.get(key);\r\n }\r\n\r\n /**\r\n * Checks if a stack value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Stack\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function stackHas(key) {\r\n return this.__data__.has(key);\r\n }\r\n\r\n /**\r\n * Sets the stack `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the stack cache instance.\r\n */\r\n function stackSet(key, value) {\r\n var data = this.__data__;\r\n if (data instanceof ListCache) {\r\n var pairs = data.__data__;\r\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\r\n pairs.push([key, value]);\r\n this.size = ++data.size;\r\n return this;\r\n }\r\n data = this.__data__ = new MapCache(pairs);\r\n }\r\n data.set(key, value);\r\n this.size = data.size;\r\n return this;\r\n }\r\n\r\n // Add methods to `Stack`.\r\n Stack.prototype.clear = stackClear;\r\n Stack.prototype['delete'] = stackDelete;\r\n Stack.prototype.get = stackGet;\r\n Stack.prototype.has = stackHas;\r\n Stack.prototype.set = stackSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of the enumerable property names of the array-like `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @param {boolean} inherited Specify returning inherited property names.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function arrayLikeKeys(value, inherited) {\r\n var isArr = isArray(value),\r\n isArg = !isArr && isArguments(value),\r\n isBuff = !isArr && !isArg && isBuffer(value),\r\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\r\n skipIndexes = isArr || isArg || isBuff || isType,\r\n result = skipIndexes ? baseTimes(value.length, String) : [],\r\n length = result.length;\r\n\r\n for (var key in value) {\r\n if ((inherited || hasOwnProperty.call(value, key)) &&\r\n !(skipIndexes && (\r\n // Safari 9 has enumerable `arguments.length` in strict mode.\r\n key == 'length' ||\r\n // Node.js 0.10 has enumerable non-index properties on buffers.\r\n (isBuff && (key == 'offset' || key == 'parent')) ||\r\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\r\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\r\n // Skip index properties.\r\n isIndex(key, length)\r\n ))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `assignValue` except that it doesn't assign\r\n * `undefined` values.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignMergeValue(object, key, value) {\r\n if ((value !== undefined && !eq(object[key], value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignValue(object, key, value) {\r\n var objValue = object[key];\r\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the index at which the `key` is found in `array` of key-value pairs.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} key The key to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function assocIndexOf(array, key) {\r\n var length = array.length;\r\n while (length--) {\r\n if (eq(array[length][0], key)) {\r\n return length;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Aggregates elements of `collection` on `accumulator` with keys transformed\r\n * by `iteratee` and values set by `setter`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseAggregator(collection, setter, iteratee, accumulator) {\r\n baseEach(collection, function(value, key, collection) {\r\n setter(accumulator, value, iteratee(value), collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assign` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssign(object, source) {\r\n return object && copyObject(source, keys(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assignIn` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssignIn(object, source) {\r\n return object && copyObject(source, keysIn(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `assignValue` and `assignMergeValue` without\r\n * value checks.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function baseAssignValue(object, key, value) {\r\n if (key == '__proto__' && defineProperty) {\r\n defineProperty(object, key, {\r\n 'configurable': true,\r\n 'enumerable': true,\r\n 'value': value,\r\n 'writable': true\r\n });\r\n } else {\r\n object[key] = value;\r\n }\r\n }\r\n\r\n /**\r\n * The base implementation of `_.at` without support for individual paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Array} Returns the picked elements.\r\n */\r\n function baseAt(object, paths) {\r\n var index = -1,\r\n length = paths.length,\r\n result = Array(length),\r\n skip = object == null;\r\n\r\n while (++index < length) {\r\n result[index] = skip ? undefined : get(object, paths[index]);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clamp` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n */\r\n function baseClamp(number, lower, upper) {\r\n if (number === number) {\r\n if (upper !== undefined) {\r\n number = number <= upper ? number : upper;\r\n }\r\n if (lower !== undefined) {\r\n number = number >= lower ? number : lower;\r\n }\r\n }\r\n return number;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\r\n * traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to clone.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Deep clone\r\n * 2 - Flatten inherited properties\r\n * 4 - Clone symbols\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @param {string} [key] The key of `value`.\r\n * @param {Object} [object] The parent object of `value`.\r\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\r\n * @returns {*} Returns the cloned value.\r\n */\r\n function baseClone(value, bitmask, customizer, key, object, stack) {\r\n var result,\r\n isDeep = bitmask & CLONE_DEEP_FLAG,\r\n isFlat = bitmask & CLONE_FLAT_FLAG,\r\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\r\n\r\n if (customizer) {\r\n result = object ? customizer(value, key, object, stack) : customizer(value);\r\n }\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n if (!isObject(value)) {\r\n return value;\r\n }\r\n var isArr = isArray(value);\r\n if (isArr) {\r\n result = initCloneArray(value);\r\n if (!isDeep) {\r\n return copyArray(value, result);\r\n }\r\n } else {\r\n var tag = getTag(value),\r\n isFunc = tag == funcTag || tag == genTag;\r\n\r\n if (isBuffer(value)) {\r\n return cloneBuffer(value, isDeep);\r\n }\r\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\r\n if (!isDeep) {\r\n return isFlat\r\n ? copySymbolsIn(value, baseAssignIn(result, value))\r\n : copySymbols(value, baseAssign(result, value));\r\n }\r\n } else {\r\n if (!cloneableTags[tag]) {\r\n return object ? value : {};\r\n }\r\n result = initCloneByTag(value, tag, isDeep);\r\n }\r\n }\r\n // Check for circular references and return its corresponding clone.\r\n stack || (stack = new Stack);\r\n var stacked = stack.get(value);\r\n if (stacked) {\r\n return stacked;\r\n }\r\n stack.set(value, result);\r\n\r\n if (isSet(value)) {\r\n value.forEach(function(subValue) {\r\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n if (isMap(value)) {\r\n value.forEach(function(subValue, key) {\r\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n var keysFunc = isFull\r\n ? (isFlat ? getAllKeysIn : getAllKeys)\r\n : (isFlat ? keysIn : keys);\r\n\r\n var props = isArr ? undefined : keysFunc(value);\r\n arrayEach(props || value, function(subValue, key) {\r\n if (props) {\r\n key = subValue;\r\n subValue = value[key];\r\n }\r\n // Recursively populate clone (susceptible to call stack limits).\r\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\r\n * to provide to `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {Array} args The arguments to provide to `func`.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n function baseDelay(func, wait, args) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return setTimeout(function() { func.apply(undefined, args); }, wait);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.difference` without support\r\n * for excluding multiple arrays or iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Array} values The values to exclude.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n */\r\n function baseDifference(array, values, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n isCommon = true,\r\n length = array.length,\r\n result = [],\r\n valuesLength = values.length;\r\n\r\n if (!length) {\r\n return result;\r\n }\r\n if (iteratee) {\r\n values = arrayMap(values, baseUnary(iteratee));\r\n }\r\n if (comparator) {\r\n includes = arrayIncludesWith;\r\n isCommon = false;\r\n }\r\n else if (values.length >= LARGE_ARRAY_SIZE) {\r\n includes = cacheHas;\r\n isCommon = false;\r\n values = new SetCache(values);\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee == null ? value : iteratee(value);\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var valuesIndex = valuesLength;\r\n while (valuesIndex--) {\r\n if (values[valuesIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(values, computed, comparator)) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forEach` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEach = createBaseEach(baseForOwn);\r\n\r\n /**\r\n * The base implementation of `_.every` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`\r\n */\r\n function baseEvery(collection, predicate) {\r\n var result = true;\r\n baseEach(collection, function(value, index, collection) {\r\n result = !!predicate(value, index, collection);\r\n return result;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.max` and `_.min` which accepts a\r\n * `comparator` to determine the extremum value.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The iteratee invoked per iteration.\r\n * @param {Function} comparator The comparator used to compare values.\r\n * @returns {*} Returns the extremum value.\r\n */\r\n function baseExtremum(array, iteratee, comparator) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n current = iteratee(value);\r\n\r\n if (current != null && (computed === undefined\r\n ? (current === current && !isSymbol(current))\r\n : comparator(current, computed)\r\n )) {\r\n var computed = current,\r\n result = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.filter` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function baseFilter(collection, predicate) {\r\n var result = [];\r\n baseEach(collection, function(value, index, collection) {\r\n if (predicate(value, index, collection)) {\r\n result.push(value);\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.flatten` with support for restricting flattening.\r\n *\r\n * @private\r\n * @param {Array} array The array to flatten.\r\n * @param {number} depth The maximum recursion depth.\r\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\r\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\r\n * @param {Array} [result=[]] The initial result value.\r\n * @returns {Array} Returns the new flattened array.\r\n */\r\n function baseFlatten(array, depth, predicate, isStrict, result) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n predicate || (predicate = isFlattenable);\r\n result || (result = []);\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (depth > 0 && predicate(value)) {\r\n if (depth > 1) {\r\n // Recursively flatten arrays (susceptible to call stack limits).\r\n baseFlatten(value, depth - 1, predicate, isStrict, result);\r\n } else {\r\n arrayPush(result, value);\r\n }\r\n } else if (!isStrict) {\r\n result[result.length] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `baseForOwn` which iterates over `object`\r\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseFor = createBaseFor();\r\n\r\n /**\r\n * This function is like `baseFor` except that it iterates over properties\r\n * in the opposite order.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseForRight = createBaseFor(true);\r\n\r\n /**\r\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwn(object, iteratee) {\r\n return object && baseFor(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwnRight(object, iteratee) {\r\n return object && baseForRight(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.functions` which creates an array of\r\n * `object` function property names filtered from `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Array} props The property names to filter.\r\n * @returns {Array} Returns the function names.\r\n */\r\n function baseFunctions(object, props) {\r\n return arrayFilter(props, function(key) {\r\n return isFunction(object[key]);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.get` without support for default values.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseGet(object, path) {\r\n path = castPath(path, object);\r\n\r\n var index = 0,\r\n length = path.length;\r\n\r\n while (object != null && index < length) {\r\n object = object[toKey(path[index++])];\r\n }\r\n return (index && index == length) ? object : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\r\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\r\n var result = keysFunc(object);\r\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\r\n }\r\n\r\n /**\r\n * The base implementation of `getTag` without fallbacks for buggy environments.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n function baseGetTag(value) {\r\n if (value == null) {\r\n return value === undefined ? undefinedTag : nullTag;\r\n }\r\n return (symToStringTag && symToStringTag in Object(value))\r\n ? getRawTag(value)\r\n : objectToString(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.gt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n */\r\n function baseGt(value, other) {\r\n return value > other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.has` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHas(object, key) {\r\n return object != null && hasOwnProperty.call(object, key);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.hasIn` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHasIn(object, key) {\r\n return object != null && key in Object(object);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.intersection`, without support\r\n * for iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of shared values.\r\n */\r\n function baseIntersection(arrays, iteratee, comparator) {\r\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\r\n length = arrays[0].length,\r\n othLength = arrays.length,\r\n othIndex = othLength,\r\n caches = Array(othLength),\r\n maxLength = Infinity,\r\n result = [];\r\n\r\n while (othIndex--) {\r\n var array = arrays[othIndex];\r\n if (othIndex && iteratee) {\r\n array = arrayMap(array, baseUnary(iteratee));\r\n }\r\n maxLength = nativeMin(array.length, maxLength);\r\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\r\n ? new SetCache(othIndex && array)\r\n : undefined;\r\n }\r\n array = arrays[0];\r\n\r\n var index = -1,\r\n seen = caches[0];\r\n\r\n outer:\r\n while (++index < length && result.length < maxLength) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (!(seen\r\n ? cacheHas(seen, computed)\r\n : includes(result, computed, comparator)\r\n )) {\r\n othIndex = othLength;\r\n while (--othIndex) {\r\n var cache = caches[othIndex];\r\n if (!(cache\r\n ? cacheHas(cache, computed)\r\n : includes(arrays[othIndex], computed, comparator))\r\n ) {\r\n continue outer;\r\n }\r\n }\r\n if (seen) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invert` and `_.invertBy` which inverts\r\n * `object` with values transformed by `iteratee` and set by `setter`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform values.\r\n * @param {Object} accumulator The initial inverted object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseInverter(object, setter, iteratee, accumulator) {\r\n baseForOwn(object, function(value, key, object) {\r\n setter(accumulator, iteratee(value), key, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invoke` without support for individual\r\n * method arguments.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {Array} args The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n */\r\n function baseInvoke(object, path, args) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n var func = object == null ? object : object[toKey(last(path))];\r\n return func == null ? undefined : apply(func, object, args);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArguments`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n */\r\n function baseIsArguments(value) {\r\n return isObjectLike(value) && baseGetTag(value) == argsTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isDate` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n */\r\n function baseIsDate(value) {\r\n return isObjectLike(value) && baseGetTag(value) == dateTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isEqual` which supports partial comparisons\r\n * and tracks traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Unordered comparison\r\n * 2 - Partial comparison\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n */\r\n function baseIsEqual(value, other, bitmask, customizer, stack) {\r\n if (value === other) {\r\n return true;\r\n }\r\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\r\n return value !== value && other !== other;\r\n }\r\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqual` for arrays and objects which performs\r\n * deep comparisons and tracks traversed objects enabling objects with circular\r\n * references to be compared.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\r\n var objIsArr = isArray(object),\r\n othIsArr = isArray(other),\r\n objTag = objIsArr ? arrayTag : getTag(object),\r\n othTag = othIsArr ? arrayTag : getTag(other);\r\n\r\n objTag = objTag == argsTag ? objectTag : objTag;\r\n othTag = othTag == argsTag ? objectTag : othTag;\r\n\r\n var objIsObj = objTag == objectTag,\r\n othIsObj = othTag == objectTag,\r\n isSameTag = objTag == othTag;\r\n\r\n if (isSameTag && isBuffer(object)) {\r\n if (!isBuffer(other)) {\r\n return false;\r\n }\r\n objIsArr = true;\r\n objIsObj = false;\r\n }\r\n if (isSameTag && !objIsObj) {\r\n stack || (stack = new Stack);\r\n return (objIsArr || isTypedArray(object))\r\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\r\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\r\n }\r\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\r\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r\n\r\n if (objIsWrapped || othIsWrapped) {\r\n var objUnwrapped = objIsWrapped ? object.value() : object,\r\n othUnwrapped = othIsWrapped ? other.value() : other;\r\n\r\n stack || (stack = new Stack);\r\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\r\n }\r\n }\r\n if (!isSameTag) {\r\n return false;\r\n }\r\n stack || (stack = new Stack);\r\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMap` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n */\r\n function baseIsMap(value) {\r\n return isObjectLike(value) && getTag(value) == mapTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Array} matchData The property names, values, and compare flags to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n */\r\n function baseIsMatch(object, source, matchData, customizer) {\r\n var index = matchData.length,\r\n length = index,\r\n noCustomizer = !customizer;\r\n\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (index--) {\r\n var data = matchData[index];\r\n if ((noCustomizer && data[2])\r\n ? data[1] !== object[data[0]]\r\n : !(data[0] in object)\r\n ) {\r\n return false;\r\n }\r\n }\r\n while (++index < length) {\r\n data = matchData[index];\r\n var key = data[0],\r\n objValue = object[key],\r\n srcValue = data[1];\r\n\r\n if (noCustomizer && data[2]) {\r\n if (objValue === undefined && !(key in object)) {\r\n return false;\r\n }\r\n } else {\r\n var stack = new Stack;\r\n if (customizer) {\r\n var result = customizer(objValue, srcValue, key, object, source, stack);\r\n }\r\n if (!(result === undefined\r\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\r\n : result\r\n )) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNative` without bad shim checks.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n */\r\n function baseIsNative(value) {\r\n if (!isObject(value) || isMasked(value)) {\r\n return false;\r\n }\r\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\r\n return pattern.test(toSource(value));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isRegExp` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n */\r\n function baseIsRegExp(value) {\r\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isSet` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n */\r\n function baseIsSet(value) {\r\n return isObjectLike(value) && getTag(value) == setTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n */\r\n function baseIsTypedArray(value) {\r\n return isObjectLike(value) &&\r\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.iteratee`.\r\n *\r\n * @private\r\n * @param {*} [value=_.identity] The value to convert to an iteratee.\r\n * @returns {Function} Returns the iteratee.\r\n */\r\n function baseIteratee(value) {\r\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\r\n if (typeof value == 'function') {\r\n return value;\r\n }\r\n if (value == null) {\r\n return identity;\r\n }\r\n if (typeof value == 'object') {\r\n return isArray(value)\r\n ? baseMatchesProperty(value[0], value[1])\r\n : baseMatches(value);\r\n }\r\n return property(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeys(object) {\r\n if (!isPrototype(object)) {\r\n return nativeKeys(object);\r\n }\r\n var result = [];\r\n for (var key in Object(object)) {\r\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeysIn(object) {\r\n if (!isObject(object)) {\r\n return nativeKeysIn(object);\r\n }\r\n var isProto = isPrototype(object),\r\n result = [];\r\n\r\n for (var key in object) {\r\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.lt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n */\r\n function baseLt(value, other) {\r\n return value < other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.map` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function baseMap(collection, iteratee) {\r\n var index = -1,\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value, key, collection) {\r\n result[++index] = iteratee(value, key, collection);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matches` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatches(source) {\r\n var matchData = getMatchData(source);\r\n if (matchData.length == 1 && matchData[0][2]) {\r\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\r\n }\r\n return function(object) {\r\n return object === source || baseIsMatch(object, source, matchData);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\r\n *\r\n * @private\r\n * @param {string} path The path of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatchesProperty(path, srcValue) {\r\n if (isKey(path) && isStrictComparable(srcValue)) {\r\n return matchesStrictComparable(toKey(path), srcValue);\r\n }\r\n return function(object) {\r\n var objValue = get(object, path);\r\n return (objValue === undefined && objValue === srcValue)\r\n ? hasIn(object, path)\r\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.merge` without support for multiple sources.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} [customizer] The function to customize merged values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMerge(object, source, srcIndex, customizer, stack) {\r\n if (object === source) {\r\n return;\r\n }\r\n baseFor(source, function(srcValue, key) {\r\n if (isObject(srcValue)) {\r\n stack || (stack = new Stack);\r\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\r\n }\r\n else {\r\n var newValue = customizer\r\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = srcValue;\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n }, keysIn);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseMerge` for arrays and objects which performs\r\n * deep merges and tracks traversed objects enabling objects with circular\r\n * references to be merged.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {string} key The key of the value to merge.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} mergeFunc The function to merge values.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\r\n var objValue = safeGet(object, key),\r\n srcValue = safeGet(source, key),\r\n stacked = stack.get(srcValue);\r\n\r\n if (stacked) {\r\n assignMergeValue(object, key, stacked);\r\n return;\r\n }\r\n var newValue = customizer\r\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n var isCommon = newValue === undefined;\r\n\r\n if (isCommon) {\r\n var isArr = isArray(srcValue),\r\n isBuff = !isArr && isBuffer(srcValue),\r\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\r\n\r\n newValue = srcValue;\r\n if (isArr || isBuff || isTyped) {\r\n if (isArray(objValue)) {\r\n newValue = objValue;\r\n }\r\n else if (isArrayLikeObject(objValue)) {\r\n newValue = copyArray(objValue);\r\n }\r\n else if (isBuff) {\r\n isCommon = false;\r\n newValue = cloneBuffer(srcValue, true);\r\n }\r\n else if (isTyped) {\r\n isCommon = false;\r\n newValue = cloneTypedArray(srcValue, true);\r\n }\r\n else {\r\n newValue = [];\r\n }\r\n }\r\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\r\n newValue = objValue;\r\n if (isArguments(objValue)) {\r\n newValue = toPlainObject(objValue);\r\n }\r\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\r\n newValue = initCloneObject(srcValue);\r\n }\r\n }\r\n else {\r\n isCommon = false;\r\n }\r\n }\r\n if (isCommon) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, newValue);\r\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\r\n stack['delete'](srcValue);\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.orderBy` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\r\n * @param {string[]} orders The sort orders of `iteratees`.\r\n * @returns {Array} Returns the new sorted array.\r\n */\r\n function baseOrderBy(collection, iteratees, orders) {\r\n var index = -1;\r\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\r\n\r\n var result = baseMap(collection, function(value, key, collection) {\r\n var criteria = arrayMap(iteratees, function(iteratee) {\r\n return iteratee(value);\r\n });\r\n return { 'criteria': criteria, 'index': ++index, 'value': value };\r\n });\r\n\r\n return baseSortBy(result, function(object, other) {\r\n return compareMultiple(object, other, orders);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pick` without support for individual\r\n * property identifiers.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePick(object, paths) {\r\n return basePickBy(object, paths, function(value, path) {\r\n return hasIn(object, path);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @param {Function} predicate The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePickBy(object, paths, predicate) {\r\n var index = -1,\r\n length = paths.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var path = paths[index],\r\n value = baseGet(object, path);\r\n\r\n if (predicate(value, path)) {\r\n baseSet(result, castPath(path, object), value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseProperty` which supports deep paths.\r\n *\r\n * @private\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyDeep(path) {\r\n return function(object) {\r\n return baseGet(object, path);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.random` without support for returning\r\n * floating-point numbers.\r\n *\r\n * @private\r\n * @param {number} lower The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the random number.\r\n */\r\n function baseRandom(lower, upper) {\r\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\r\n * coerce arguments.\r\n *\r\n * @private\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} step The value to increment or decrement by.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the range of numbers.\r\n */\r\n function baseRange(start, end, step, fromRight) {\r\n var index = -1,\r\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\r\n result = Array(length);\r\n\r\n while (length--) {\r\n result[fromRight ? length : ++index] = start;\r\n start += step;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function baseRest(func, start) {\r\n return setToString(overRest(func, start, identity), func + '');\r\n }\r\n\r\n /**\r\n * The base implementation of `_.set`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseSet(object, path, value, customizer) {\r\n if (!isObject(object)) {\r\n return object;\r\n }\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n lastIndex = length - 1,\r\n nested = object;\r\n\r\n while (nested != null && ++index < length) {\r\n var key = toKey(path[index]),\r\n newValue = value;\r\n\r\n if (index != lastIndex) {\r\n var objValue = nested[key];\r\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\r\n if (newValue === undefined) {\r\n newValue = isObject(objValue)\r\n ? objValue\r\n : (isIndex(path[index + 1]) ? [] : {});\r\n }\r\n }\r\n assignValue(nested, key, newValue);\r\n nested = nested[key];\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * The base implementation of `setData` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetData = !metaMap ? identity : function(func, data) {\r\n metaMap.set(func, data);\r\n return func;\r\n };\r\n\r\n /**\r\n * The base implementation of `setToString` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetToString = !defineProperty ? identity : function(func, string) {\r\n return defineProperty(func, 'toString', {\r\n 'configurable': true,\r\n 'enumerable': false,\r\n 'value': constant(string),\r\n 'writable': true\r\n });\r\n };\r\n\r\n /**\r\n * The base implementation of `_.slice` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseSlice(array, start, end) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = end > length ? length : end;\r\n if (end < 0) {\r\n end += length;\r\n }\r\n length = start > end ? 0 : ((end - start) >>> 0);\r\n start >>>= 0;\r\n\r\n var result = Array(length);\r\n while (++index < length) {\r\n result[index] = array[index + start];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.some` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function baseSome(collection, predicate) {\r\n var result;\r\n\r\n baseEach(collection, function(value, index, collection) {\r\n result = predicate(value, index, collection);\r\n return !result;\r\n });\r\n return !!result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toString` which doesn't convert nullish\r\n * values to empty strings.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {string} Returns the string.\r\n */\r\n function baseToString(value) {\r\n // Exit early for strings to avoid a performance hit in some environments.\r\n if (typeof value == 'string') {\r\n return value;\r\n }\r\n if (isArray(value)) {\r\n // Recursively convert values (susceptible to call stack limits).\r\n return arrayMap(value, baseToString) + '';\r\n }\r\n if (isSymbol(value)) {\r\n return symbolToString ? symbolToString.call(value) : '';\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseUniq(array, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n length = array.length,\r\n isCommon = true,\r\n result = [],\r\n seen = result;\r\n\r\n if (comparator) {\r\n isCommon = false;\r\n includes = arrayIncludesWith;\r\n }\r\n else if (length >= LARGE_ARRAY_SIZE) {\r\n var set = iteratee ? null : createSet(array);\r\n if (set) {\r\n return setToArray(set);\r\n }\r\n isCommon = false;\r\n includes = cacheHas;\r\n seen = new SetCache;\r\n }\r\n else {\r\n seen = iteratee ? [] : result;\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var seenIndex = seen.length;\r\n while (seenIndex--) {\r\n if (seen[seenIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n if (iteratee) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(seen, computed, comparator)) {\r\n if (seen !== result) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unset`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The property path to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n */\r\n function baseUnset(object, path) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n return object == null || delete object[toKey(last(path))];\r\n }\r\n\r\n /**\r\n * The base implementation of `wrapperValue` which returns the result of\r\n * performing a sequence of actions on the unwrapped `value`, where each\r\n * successive action is supplied the return value of the previous.\r\n *\r\n * @private\r\n * @param {*} value The unwrapped value.\r\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseWrapperValue(value, actions) {\r\n var result = value;\r\n if (result instanceof LazyWrapper) {\r\n result = result.value();\r\n }\r\n return arrayReduce(actions, function(result, action) {\r\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\r\n }, result);\r\n }\r\n\r\n /**\r\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\r\n *\r\n * @private\r\n * @param {Array} props The property identifiers.\r\n * @param {Array} values The property values.\r\n * @param {Function} assignFunc The function to assign values.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function baseZipObject(props, values, assignFunc) {\r\n var index = -1,\r\n length = props.length,\r\n valsLength = values.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var value = index < valsLength ? values[index] : undefined;\r\n assignFunc(result, props[index], value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Casts `value` to an empty array if it's not an array like object.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Array|Object} Returns the cast array-like object.\r\n */\r\n function castArrayLikeObject(value) {\r\n return isArrayLikeObject(value) ? value : [];\r\n }\r\n\r\n /**\r\n * Casts `value` to a path array if it's not one.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {Array} Returns the cast property path array.\r\n */\r\n function castPath(value, object) {\r\n if (isArray(value)) {\r\n return value;\r\n }\r\n return isKey(value, object) ? [value] : stringToPath(toString(value));\r\n }\r\n\r\n /**\r\n * Casts `array` to a slice if it's needed.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {number} start The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the cast slice.\r\n */\r\n function castSlice(array, start, end) {\r\n var length = array.length;\r\n end = end === undefined ? length : end;\r\n return (!start && end >= length) ? array : baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a clone of `buffer`.\r\n *\r\n * @private\r\n * @param {Buffer} buffer The buffer to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Buffer} Returns the cloned buffer.\r\n */\r\n function cloneBuffer(buffer, isDeep) {\r\n if (isDeep) {\r\n return buffer.slice();\r\n }\r\n var length = buffer.length,\r\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\r\n\r\n buffer.copy(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `arrayBuffer`.\r\n *\r\n * @private\r\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\r\n * @returns {ArrayBuffer} Returns the cloned array buffer.\r\n */\r\n function cloneArrayBuffer(arrayBuffer) {\r\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\r\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `dataView`.\r\n *\r\n * @private\r\n * @param {Object} dataView The data view to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned data view.\r\n */\r\n function cloneDataView(dataView, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\r\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n\r\n /**\r\n * Creates a clone of `regexp`.\r\n *\r\n * @private\r\n * @param {Object} regexp The regexp to clone.\r\n * @returns {Object} Returns the cloned regexp.\r\n */\r\n function cloneRegExp(regexp) {\r\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\r\n result.lastIndex = regexp.lastIndex;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of the `symbol` object.\r\n *\r\n * @private\r\n * @param {Object} symbol The symbol object to clone.\r\n * @returns {Object} Returns the cloned symbol object.\r\n */\r\n function cloneSymbol(symbol) {\r\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\r\n }\r\n\r\n /**\r\n * Creates a clone of `typedArray`.\r\n *\r\n * @private\r\n * @param {Object} typedArray The typed array to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned typed array.\r\n */\r\n function cloneTypedArray(typedArray, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\r\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\r\n }\r\n\r\n /**\r\n * Compares values to sort them in ascending order.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {number} Returns the sort order indicator for `value`.\r\n */\r\n function compareAscending(value, other) {\r\n if (value !== other) {\r\n var valIsDefined = value !== undefined,\r\n valIsNull = value === null,\r\n valIsReflexive = value === value,\r\n valIsSymbol = isSymbol(value);\r\n\r\n var othIsDefined = other !== undefined,\r\n othIsNull = other === null,\r\n othIsReflexive = other === other,\r\n othIsSymbol = isSymbol(other);\r\n\r\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\r\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\r\n (valIsNull && othIsDefined && othIsReflexive) ||\r\n (!valIsDefined && othIsReflexive) ||\r\n !valIsReflexive) {\r\n return 1;\r\n }\r\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\r\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\r\n (othIsNull && valIsDefined && valIsReflexive) ||\r\n (!othIsDefined && valIsReflexive) ||\r\n !othIsReflexive) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Used by `_.orderBy` to compare multiple properties of a value to another\r\n * and stable sort them.\r\n *\r\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\r\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\r\n * of corresponding values.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {boolean[]|string[]} orders The order to sort by for each property.\r\n * @returns {number} Returns the sort order indicator for `object`.\r\n */\r\n function compareMultiple(object, other, orders) {\r\n var index = -1,\r\n objCriteria = object.criteria,\r\n othCriteria = other.criteria,\r\n length = objCriteria.length,\r\n ordersLength = orders.length;\r\n\r\n while (++index < length) {\r\n var result = compareAscending(objCriteria[index], othCriteria[index]);\r\n if (result) {\r\n if (index >= ordersLength) {\r\n return result;\r\n }\r\n var order = orders[index];\r\n return result * (order == 'desc' ? -1 : 1);\r\n }\r\n }\r\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\r\n // that causes it, under certain circumstances, to provide the same value for\r\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\r\n // for more details.\r\n //\r\n // This also ensures a stable sort in V8 and other engines.\r\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\r\n return object.index - other.index;\r\n }\r\n\r\n /**\r\n * Creates an array that is the composition of partially applied arguments,\r\n * placeholders, and provided arguments into a single array of arguments.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to prepend to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgs(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersLength = holders.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(leftLength + rangeLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++leftIndex < leftLength) {\r\n result[leftIndex] = partials[leftIndex];\r\n }\r\n while (++argsIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[holders[argsIndex]] = args[argsIndex];\r\n }\r\n }\r\n while (rangeLength--) {\r\n result[leftIndex++] = args[argsIndex++];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `composeArgs` except that the arguments composition\r\n * is tailored for `_.partialRight`.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to append to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgsRight(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersIndex = -1,\r\n holdersLength = holders.length,\r\n rightIndex = -1,\r\n rightLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(rangeLength + rightLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++argsIndex < rangeLength) {\r\n result[argsIndex] = args[argsIndex];\r\n }\r\n var offset = argsIndex;\r\n while (++rightIndex < rightLength) {\r\n result[offset + rightIndex] = partials[rightIndex];\r\n }\r\n while (++holdersIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[offset + holders[holdersIndex]] = args[argsIndex++];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Copies the values of `source` to `array`.\r\n *\r\n * @private\r\n * @param {Array} source The array to copy values from.\r\n * @param {Array} [array=[]] The array to copy values to.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function copyArray(source, array) {\r\n var index = -1,\r\n length = source.length;\r\n\r\n array || (array = Array(length));\r\n while (++index < length) {\r\n array[index] = source[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Copies properties of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy properties from.\r\n * @param {Array} props The property identifiers to copy.\r\n * @param {Object} [object={}] The object to copy properties to.\r\n * @param {Function} [customizer] The function to customize copied values.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copyObject(source, props, object, customizer) {\r\n var isNew = !object;\r\n object || (object = {});\r\n\r\n var index = -1,\r\n length = props.length;\r\n\r\n while (++index < length) {\r\n var key = props[index];\r\n\r\n var newValue = customizer\r\n ? customizer(object[key], source[key], key, object, source)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = source[key];\r\n }\r\n if (isNew) {\r\n baseAssignValue(object, key, newValue);\r\n } else {\r\n assignValue(object, key, newValue);\r\n }\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Copies own symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbols(source, object) {\r\n return copyObject(source, getSymbols(source), object);\r\n }\r\n\r\n /**\r\n * Copies own and inherited symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbolsIn(source, object) {\r\n return copyObject(source, getSymbolsIn(source), object);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.groupBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} [initializer] The accumulator object initializer.\r\n * @returns {Function} Returns the new aggregator function.\r\n */\r\n function createAggregator(setter, initializer) {\r\n return function(collection, iteratee) {\r\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\r\n accumulator = initializer ? initializer() : {};\r\n\r\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.assign`.\r\n *\r\n * @private\r\n * @param {Function} assigner The function to assign values.\r\n * @returns {Function} Returns the new assigner function.\r\n */\r\n function createAssigner(assigner) {\r\n return baseRest(function(object, sources) {\r\n var index = -1,\r\n length = sources.length,\r\n customizer = length > 1 ? sources[length - 1] : undefined,\r\n guard = length > 2 ? sources[2] : undefined;\r\n\r\n customizer = (assigner.length > 3 && typeof customizer == 'function')\r\n ? (length--, customizer)\r\n : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n customizer = length < 3 ? undefined : customizer;\r\n length = 1;\r\n }\r\n object = Object(object);\r\n while (++index < length) {\r\n var source = sources[index];\r\n if (source) {\r\n assigner(object, source, index, customizer);\r\n }\r\n }\r\n return object;\r\n });\r\n }\r\n\r\n /**\r\n * Creates a `baseEach` or `baseEachRight` function.\r\n *\r\n * @private\r\n * @param {Function} eachFunc The function to iterate over a collection.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseEach(eachFunc, fromRight) {\r\n return function(collection, iteratee) {\r\n if (collection == null) {\r\n return collection;\r\n }\r\n if (!isArrayLike(collection)) {\r\n return eachFunc(collection, iteratee);\r\n }\r\n var length = collection.length,\r\n index = fromRight ? length : -1,\r\n iterable = Object(collection);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (iteratee(iterable[index], index, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return collection;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseFor(fromRight) {\r\n return function(object, iteratee, keysFunc) {\r\n var index = -1,\r\n iterable = Object(object),\r\n props = keysFunc(object),\r\n length = props.length;\r\n\r\n while (length--) {\r\n var key = props[fromRight ? length : ++index];\r\n if (iteratee(iterable[key], key, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return object;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the optional `this`\r\n * binding of `thisArg`.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createBind(func, bitmask, thisArg) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return fn.apply(isBind ? thisArg : this, arguments);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function that produces an instance of `Ctor` regardless of\r\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r\n *\r\n * @private\r\n * @param {Function} Ctor The constructor to wrap.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCtor(Ctor) {\r\n return function() {\r\n // Use a `switch` statement to work with class constructors. See\r\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r\n // for more details.\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return new Ctor;\r\n case 1: return new Ctor(args[0]);\r\n case 2: return new Ctor(args[0], args[1]);\r\n case 3: return new Ctor(args[0], args[1], args[2]);\r\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n }\r\n var thisBinding = baseCreate(Ctor.prototype),\r\n result = Ctor.apply(thisBinding, args);\r\n\r\n // Mimic the constructor's `return` behavior.\r\n // See https://es5.github.io/#x13.2.2 for more details.\r\n return isObject(result) ? result : thisBinding;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to enable currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {number} arity The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCurry(func, bitmask, arity) {\r\n var Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length,\r\n placeholder = getHolder(wrapper);\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\r\n ? []\r\n : replaceHolders(args, placeholder);\r\n\r\n length -= holders.length;\r\n if (length < arity) {\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\r\n args, holders, undefined, undefined, arity - length);\r\n }\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return apply(fn, this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.find` or `_.findLast` function.\r\n *\r\n * @private\r\n * @param {Function} findIndexFunc The function to find the collection index.\r\n * @returns {Function} Returns the new find function.\r\n */\r\n function createFind(findIndexFunc) {\r\n return function(collection, predicate, fromIndex) {\r\n var iterable = Object(collection);\r\n if (!isArrayLike(collection)) {\r\n var iteratee = baseIteratee(predicate, 3);\r\n collection = keys(collection);\r\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\r\n }\r\n var index = findIndexFunc(collection, predicate, fromIndex);\r\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with optional `this`\r\n * binding of `thisArg`, partial application, and currying.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [partialsRight] The arguments to append to those provided\r\n * to the new function.\r\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r\n var isAry = bitmask & WRAP_ARY_FLAG,\r\n isBind = bitmask & WRAP_BIND_FLAG,\r\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\r\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\r\n isFlip = bitmask & WRAP_FLIP_FLAG,\r\n Ctor = isBindKey ? undefined : createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length;\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n if (isCurried) {\r\n var placeholder = getHolder(wrapper),\r\n holdersCount = countHolders(args, placeholder);\r\n }\r\n if (partials) {\r\n args = composeArgs(args, partials, holders, isCurried);\r\n }\r\n if (partialsRight) {\r\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\r\n }\r\n length -= holdersCount;\r\n if (isCurried && length < arity) {\r\n var newHolders = replaceHolders(args, placeholder);\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\r\n args, newHolders, argPos, ary, arity - length\r\n );\r\n }\r\n var thisBinding = isBind ? thisArg : this,\r\n fn = isBindKey ? thisBinding[func] : func;\r\n\r\n length = args.length;\r\n if (argPos) {\r\n args = reorder(args, argPos);\r\n } else if (isFlip && length > 1) {\r\n args.reverse();\r\n }\r\n if (isAry && ary < length) {\r\n args.length = ary;\r\n }\r\n if (this && this !== root && this instanceof wrapper) {\r\n fn = Ctor || createCtor(fn);\r\n }\r\n return fn.apply(thisBinding, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.invertBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} toIteratee The function to resolve iteratees.\r\n * @returns {Function} Returns the new inverter function.\r\n */\r\n function createInverter(setter, toIteratee) {\r\n return function(object, iteratee) {\r\n return baseInverter(object, setter, toIteratee(iteratee), {});\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the `this` binding\r\n * of `thisArg` and `partials` prepended to the arguments it receives.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} partials The arguments to prepend to those provided to\r\n * the new function.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createPartial(func, bitmask, thisArg, partials) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var argsIndex = -1,\r\n argsLength = arguments.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n args = Array(leftLength + argsLength),\r\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n\r\n while (++leftIndex < leftLength) {\r\n args[leftIndex] = partials[leftIndex];\r\n }\r\n while (argsLength--) {\r\n args[leftIndex++] = arguments[++argsIndex];\r\n }\r\n return apply(fn, isBind ? thisArg : this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.range` or `_.rangeRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new range function.\r\n */\r\n function createRange(fromRight) {\r\n return function(start, end, step) {\r\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\r\n end = step = undefined;\r\n }\r\n // Ensure the sign of `-0` is preserved.\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\r\n return baseRange(start, end, step, fromRight);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to continue currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {Function} wrapFunc The function to create the `func` wrapper.\r\n * @param {*} placeholder The placeholder value.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\r\n var isCurry = bitmask & WRAP_CURRY_FLAG,\r\n newHolders = isCurry ? holders : undefined,\r\n newHoldersRight = isCurry ? undefined : holders,\r\n newPartials = isCurry ? partials : undefined,\r\n newPartialsRight = isCurry ? undefined : partials;\r\n\r\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\r\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\r\n\r\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\r\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\r\n }\r\n var newData = [\r\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\r\n newHoldersRight, argPos, ary, arity\r\n ];\r\n\r\n var result = wrapFunc.apply(undefined, newData);\r\n if (isLaziable(func)) {\r\n setData(result, newData);\r\n }\r\n result.placeholder = placeholder;\r\n return setWrapToString(result, func, bitmask);\r\n }\r\n\r\n /**\r\n * Creates a set object of `values`.\r\n *\r\n * @private\r\n * @param {Array} values The values to add to the set.\r\n * @returns {Object} Returns the new set.\r\n */\r\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\r\n return new Set(values);\r\n };\r\n\r\n /**\r\n * Creates a function that either curries or invokes `func` with optional\r\n * `this` binding and partially applied arguments.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags.\r\n * 1 - `_.bind`\r\n * 2 - `_.bindKey`\r\n * 4 - `_.curry` or `_.curryRight` of a bound function\r\n * 8 - `_.curry`\r\n * 16 - `_.curryRight`\r\n * 32 - `_.partial`\r\n * 64 - `_.partialRight`\r\n * 128 - `_.rearg`\r\n * 256 - `_.ary`\r\n * 512 - `_.flip`\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to be partially applied.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\r\n if (!isBindKey && typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var length = partials ? partials.length : 0;\r\n if (!length) {\r\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\r\n partials = holders = undefined;\r\n }\r\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\r\n arity = arity === undefined ? arity : toInteger(arity);\r\n length -= holders ? holders.length : 0;\r\n\r\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\r\n var partialsRight = partials,\r\n holdersRight = holders;\r\n\r\n partials = holders = undefined;\r\n }\r\n var data = isBindKey ? undefined : getData(func);\r\n\r\n var newData = [\r\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\r\n argPos, ary, arity\r\n ];\r\n\r\n if (data) {\r\n mergeData(newData, data);\r\n }\r\n func = newData[0];\r\n bitmask = newData[1];\r\n thisArg = newData[2];\r\n partials = newData[3];\r\n holders = newData[4];\r\n arity = newData[9] = newData[9] === undefined\r\n ? (isBindKey ? 0 : func.length)\r\n : nativeMax(newData[9] - length, 0);\r\n\r\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\r\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\r\n }\r\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\r\n var result = createBind(func, bitmask, thisArg);\r\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\r\n result = createCurry(func, bitmask, arity);\r\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\r\n result = createPartial(func, bitmask, thisArg, partials);\r\n } else {\r\n result = createHybrid.apply(undefined, newData);\r\n }\r\n var setter = data ? baseSetData : setData;\r\n return setWrapToString(setter(result, newData), func, bitmask);\r\n }\r\n\r\n /**\r\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\r\n * objects into destination objects that are passed thru.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to merge.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @param {Object} source The parent object of `srcValue`.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\r\n if (isObject(objValue) && isObject(srcValue)) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, objValue);\r\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\r\n stack['delete'](srcValue);\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\r\n * objects.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {string} key The key of the property to inspect.\r\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\r\n */\r\n function customOmitClone(value) {\r\n return isPlainObject(value) ? undefined : value;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for arrays with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Array} array The array to compare.\r\n * @param {Array} other The other array to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `array` and `other` objects.\r\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r\n */\r\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n arrLength = array.length,\r\n othLength = other.length;\r\n\r\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(array);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var index = -1,\r\n result = true,\r\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\r\n\r\n stack.set(array, other);\r\n stack.set(other, array);\r\n\r\n // Ignore non-index properties.\r\n while (++index < arrLength) {\r\n var arrValue = array[index],\r\n othValue = other[index];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, arrValue, index, other, array, stack)\r\n : customizer(arrValue, othValue, index, array, other, stack);\r\n }\r\n if (compared !== undefined) {\r\n if (compared) {\r\n continue;\r\n }\r\n result = false;\r\n break;\r\n }\r\n // Recursively compare arrays (susceptible to call stack limits).\r\n if (seen) {\r\n if (!arraySome(other, function(othValue, othIndex) {\r\n if (!cacheHas(seen, othIndex) &&\r\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\r\n return seen.push(othIndex);\r\n }\r\n })) {\r\n result = false;\r\n break;\r\n }\r\n } else if (!(\r\n arrValue === othValue ||\r\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n }\r\n stack['delete'](array);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for comparing objects of\r\n * the same `toStringTag`.\r\n *\r\n * **Note:** This function only supports comparing values with tags of\r\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {string} tag The `toStringTag` of the objects to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\r\n switch (tag) {\r\n case dataViewTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n (object.byteOffset != other.byteOffset)) {\r\n return false;\r\n }\r\n object = object.buffer;\r\n other = other.buffer;\r\n\r\n case arrayBufferTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\r\n return false;\r\n }\r\n return true;\r\n\r\n case boolTag:\r\n case dateTag:\r\n case numberTag:\r\n // Coerce booleans to `1` or `0` and dates to milliseconds.\r\n // Invalid dates are coerced to `NaN`.\r\n return eq(+object, +other);\r\n\r\n case errorTag:\r\n return object.name == other.name && object.message == other.message;\r\n\r\n case regexpTag:\r\n case stringTag:\r\n // Coerce regexes to strings and treat strings, primitives and objects,\r\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\r\n // for more details.\r\n return object == (other + '');\r\n\r\n case mapTag:\r\n var convert = mapToArray;\r\n\r\n case setTag:\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\r\n convert || (convert = setToArray);\r\n\r\n if (object.size != other.size && !isPartial) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked) {\r\n return stacked == other;\r\n }\r\n bitmask |= COMPARE_UNORDERED_FLAG;\r\n\r\n // Recursively compare objects (susceptible to call stack limits).\r\n stack.set(object, other);\r\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\r\n stack['delete'](object);\r\n return result;\r\n\r\n case symbolTag:\r\n if (symbolValueOf) {\r\n return symbolValueOf.call(object) == symbolValueOf.call(other);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for objects with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n objProps = getAllKeys(object),\r\n objLength = objProps.length,\r\n othProps = getAllKeys(other),\r\n othLength = othProps.length;\r\n\r\n if (objLength != othLength && !isPartial) {\r\n return false;\r\n }\r\n var index = objLength;\r\n while (index--) {\r\n var key = objProps[index];\r\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\r\n return false;\r\n }\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var result = true;\r\n stack.set(object, other);\r\n stack.set(other, object);\r\n\r\n var skipCtor = isPartial;\r\n while (++index < objLength) {\r\n key = objProps[index];\r\n var objValue = object[key],\r\n othValue = other[key];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, objValue, key, other, object, stack)\r\n : customizer(objValue, othValue, key, object, other, stack);\r\n }\r\n // Recursively compare objects (susceptible to call stack limits).\r\n if (!(compared === undefined\r\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\r\n : compared\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n skipCtor || (skipCtor = key == 'constructor');\r\n }\r\n if (result && !skipCtor) {\r\n var objCtor = object.constructor,\r\n othCtor = other.constructor;\r\n\r\n // Non `Object` object instances with different constructors are not equal.\r\n if (objCtor != othCtor &&\r\n ('constructor' in object && 'constructor' in other) &&\r\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r\n result = false;\r\n }\r\n }\r\n stack['delete'](object);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which flattens the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function flatRest(func) {\r\n return setToString(overRest(func, undefined, flatten), func + '');\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable property names and symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeys(object) {\r\n return baseGetAllKeys(object, keys, getSymbols);\r\n }\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeysIn(object) {\r\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\r\n }\r\n\r\n /**\r\n * Gets metadata for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {*} Returns the metadata for `func`.\r\n */\r\n var getData = !metaMap ? noop : function(func) {\r\n return metaMap.get(func);\r\n };\r\n\r\n /**\r\n * Gets the name of `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {string} Returns the function name.\r\n */\r\n function getFuncName(func) {\r\n var result = (func.name + ''),\r\n array = realNames[result],\r\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\r\n\r\n while (length--) {\r\n var data = array[length],\r\n otherFunc = data.func;\r\n if (otherFunc == null || otherFunc == func) {\r\n return data.name;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the argument placeholder value for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to inspect.\r\n * @returns {*} Returns the placeholder value.\r\n */\r\n function getHolder(func) {\r\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\r\n return object.placeholder;\r\n }\r\n\r\n /**\r\n * Gets the data for `map`.\r\n *\r\n * @private\r\n * @param {Object} map The map to query.\r\n * @param {string} key The reference key.\r\n * @returns {*} Returns the map data.\r\n */\r\n function getMapData(map, key) {\r\n var data = map.__data__;\r\n return isKeyable(key)\r\n ? data[typeof key == 'string' ? 'string' : 'hash']\r\n : data.map;\r\n }\r\n\r\n /**\r\n * Gets the property names, values, and compare flags of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the match data of `object`.\r\n */\r\n function getMatchData(object) {\r\n var result = keys(object),\r\n length = result.length;\r\n\r\n while (length--) {\r\n var key = result[length],\r\n value = object[key];\r\n\r\n result[length] = [key, value, isStrictComparable(value)];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the native function at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the method to get.\r\n * @returns {*} Returns the function if it's native, else `undefined`.\r\n */\r\n function getNative(object, key) {\r\n var value = getValue(object, key);\r\n return baseIsNative(value) ? value : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the raw `toStringTag`.\r\n */\r\n function getRawTag(value) {\r\n var isOwn = hasOwnProperty.call(value, symToStringTag),\r\n tag = value[symToStringTag];\r\n\r\n try {\r\n value[symToStringTag] = undefined;\r\n var unmasked = true;\r\n } catch (e) {}\r\n\r\n var result = nativeObjectToString.call(value);\r\n if (unmasked) {\r\n if (isOwn) {\r\n value[symToStringTag] = tag;\r\n } else {\r\n delete value[symToStringTag];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\r\n if (object == null) {\r\n return [];\r\n }\r\n object = Object(object);\r\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\r\n return propertyIsEnumerable.call(object, symbol);\r\n });\r\n };\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\r\n var result = [];\r\n while (object) {\r\n arrayPush(result, getSymbols(object));\r\n object = getPrototype(object);\r\n }\r\n return result;\r\n };\r\n\r\n /**\r\n * Gets the `toStringTag` of `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n var getTag = baseGetTag;\r\n\r\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\r\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\r\n (Map && getTag(new Map) != mapTag) ||\r\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\r\n (Set && getTag(new Set) != setTag) ||\r\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\r\n getTag = function(value) {\r\n var result = baseGetTag(value),\r\n Ctor = result == objectTag ? value.constructor : undefined,\r\n ctorString = Ctor ? toSource(Ctor) : '';\r\n\r\n if (ctorString) {\r\n switch (ctorString) {\r\n case dataViewCtorString: return dataViewTag;\r\n case mapCtorString: return mapTag;\r\n case promiseCtorString: return promiseTag;\r\n case setCtorString: return setTag;\r\n case weakMapCtorString: return weakMapTag;\r\n }\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\r\n *\r\n * @private\r\n * @param {number} start The start of the view.\r\n * @param {number} end The end of the view.\r\n * @param {Array} transforms The transformations to apply to the view.\r\n * @returns {Object} Returns an object containing the `start` and `end`\r\n * positions of the view.\r\n */\r\n function getView(start, end, transforms) {\r\n var index = -1,\r\n length = transforms.length;\r\n\r\n while (++index < length) {\r\n var data = transforms[index],\r\n size = data.size;\r\n\r\n switch (data.type) {\r\n case 'drop': start += size; break;\r\n case 'dropRight': end -= size; break;\r\n case 'take': end = nativeMin(end, start + size); break;\r\n case 'takeRight': start = nativeMax(start, end - size); break;\r\n }\r\n }\r\n return { 'start': start, 'end': end };\r\n }\r\n\r\n /**\r\n * Extracts wrapper details from the `source` body comment.\r\n *\r\n * @private\r\n * @param {string} source The source to inspect.\r\n * @returns {Array} Returns the wrapper details.\r\n */\r\n function getWrapDetails(source) {\r\n var match = source.match(reWrapDetails);\r\n return match ? match[1].split(reSplitDetails) : [];\r\n }\r\n\r\n /**\r\n * Checks if `path` exists on `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @param {Function} hasFunc The function to check properties.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n */\r\n function hasPath(object, path, hasFunc) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n result = false;\r\n\r\n while (++index < length) {\r\n var key = toKey(path[index]);\r\n if (!(result = object != null && hasFunc(object, key))) {\r\n break;\r\n }\r\n object = object[key];\r\n }\r\n if (result || ++index != length) {\r\n return result;\r\n }\r\n length = object == null ? 0 : object.length;\r\n return !!length && isLength(length) && isIndex(key, length) &&\r\n (isArray(object) || isArguments(object));\r\n }\r\n\r\n /**\r\n * Initializes an array clone.\r\n *\r\n * @private\r\n * @param {Array} array The array to clone.\r\n * @returns {Array} Returns the initialized clone.\r\n */\r\n function initCloneArray(array) {\r\n var length = array.length,\r\n result = new array.constructor(length);\r\n\r\n // Add properties assigned by `RegExp#exec`.\r\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r\n result.index = array.index;\r\n result.input = array.input;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes an object clone.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneObject(object) {\r\n return (typeof object.constructor == 'function' && !isPrototype(object))\r\n ? baseCreate(getPrototype(object))\r\n : {};\r\n }\r\n\r\n /**\r\n * Initializes an object clone based on its `toStringTag`.\r\n *\r\n * **Note:** This function only supports cloning values with tags of\r\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @param {string} tag The `toStringTag` of the object to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneByTag(object, tag, isDeep) {\r\n var Ctor = object.constructor;\r\n switch (tag) {\r\n case arrayBufferTag:\r\n return cloneArrayBuffer(object);\r\n\r\n case boolTag:\r\n case dateTag:\r\n return new Ctor(+object);\r\n\r\n case dataViewTag:\r\n return cloneDataView(object, isDeep);\r\n\r\n case float32Tag: case float64Tag:\r\n case int8Tag: case int16Tag: case int32Tag:\r\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r\n return cloneTypedArray(object, isDeep);\r\n\r\n case mapTag:\r\n return new Ctor;\r\n\r\n case numberTag:\r\n case stringTag:\r\n return new Ctor(object);\r\n\r\n case regexpTag:\r\n return cloneRegExp(object);\r\n\r\n case setTag:\r\n return new Ctor;\r\n\r\n case symbolTag:\r\n return cloneSymbol(object);\r\n }\r\n }\r\n\r\n /**\r\n * Inserts wrapper `details` in a comment at the top of the `source` body.\r\n *\r\n * @private\r\n * @param {string} source The source to modify.\r\n * @returns {Array} details The details to insert.\r\n * @returns {string} Returns the modified source.\r\n */\r\n function insertWrapDetails(source, details) {\r\n var length = details.length;\r\n if (!length) {\r\n return source;\r\n }\r\n var lastIndex = length - 1;\r\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\r\n details = details.join(length > 2 ? ', ' : ' ');\r\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\r\n }\r\n\r\n /**\r\n * Checks if `value` is a flattenable `arguments` object or array.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\r\n */\r\n function isFlattenable(value) {\r\n return isArray(value) || isArguments(value) ||\r\n !!(spreadableSymbol && value && value[spreadableSymbol]);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like index.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r\n */\r\n function isIndex(value, length) {\r\n var type = typeof value;\r\n length = length == null ? MAX_SAFE_INTEGER : length;\r\n\r\n return !!length &&\r\n (type == 'number' ||\r\n (type != 'symbol' && reIsUint.test(value))) &&\r\n (value > -1 && value % 1 == 0 && value < length);\r\n }\r\n\r\n /**\r\n * Checks if the given arguments are from an iteratee call.\r\n *\r\n * @private\r\n * @param {*} value The potential iteratee value argument.\r\n * @param {*} index The potential iteratee index or key argument.\r\n * @param {*} object The potential iteratee object argument.\r\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\r\n * else `false`.\r\n */\r\n function isIterateeCall(value, index, object) {\r\n if (!isObject(object)) {\r\n return false;\r\n }\r\n var type = typeof index;\r\n if (type == 'number'\r\n ? (isArrayLike(object) && isIndex(index, object.length))\r\n : (type == 'string' && index in object)\r\n ) {\r\n return eq(object[index], value);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a property name and not a property path.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r\n */\r\n function isKey(value, object) {\r\n if (isArray(value)) {\r\n return false;\r\n }\r\n var type = typeof value;\r\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\r\n value == null || isSymbol(value)) {\r\n return true;\r\n }\r\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\r\n (object != null && value in Object(object));\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for use as unique object key.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\r\n */\r\n function isKeyable(value) {\r\n var type = typeof value;\r\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\r\n ? (value !== '__proto__')\r\n : (value === null);\r\n }\r\n\r\n /**\r\n * Checks if `func` has a lazy counterpart.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\r\n * else `false`.\r\n */\r\n function isLaziable(func) {\r\n var funcName = getFuncName(func),\r\n other = lodash[funcName];\r\n\r\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r\n return false;\r\n }\r\n if (func === other) {\r\n return true;\r\n }\r\n var data = getData(other);\r\n return !!data && func === data[0];\r\n }\r\n\r\n /**\r\n * Checks if `func` has its source masked.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\r\n */\r\n function isMasked(func) {\r\n return !!maskSrcKey && (maskSrcKey in func);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely a prototype object.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\r\n */\r\n function isPrototype(value) {\r\n var Ctor = value && value.constructor,\r\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\r\n\r\n return value === proto;\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` if suitable for strict\r\n * equality comparisons, else `false`.\r\n */\r\n function isStrictComparable(value) {\r\n return value === value && !isObject(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `matchesProperty` for source values suitable\r\n * for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function matchesStrictComparable(key, srcValue) {\r\n return function(object) {\r\n if (object == null) {\r\n return false;\r\n }\r\n return object[key] === srcValue &&\r\n (srcValue !== undefined || (key in Object(object)));\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.memoize` which clears the memoized function's\r\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\r\n *\r\n * @private\r\n * @param {Function} func The function to have its output memoized.\r\n * @returns {Function} Returns the new memoized function.\r\n */\r\n function memoizeCapped(func) {\r\n var result = memoize(func, function(key) {\r\n if (cache.size === MAX_MEMOIZE_SIZE) {\r\n cache.clear();\r\n }\r\n return key;\r\n });\r\n\r\n var cache = result.cache;\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the function metadata of `source` into `data`.\r\n *\r\n * Merging metadata reduces the number of wrappers used to invoke a function.\r\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r\n * may be applied regardless of execution order. Methods like `_.ary` and\r\n * `_.rearg` modify function arguments, making the order in which they are\r\n * executed important, preventing the merging of metadata. However, we make\r\n * an exception for a safe combined case where curried functions have `_.ary`\r\n * and or `_.rearg` applied.\r\n *\r\n * @private\r\n * @param {Array} data The destination metadata.\r\n * @param {Array} source The source metadata.\r\n * @returns {Array} Returns `data`.\r\n */\r\n function mergeData(data, source) {\r\n var bitmask = data[1],\r\n srcBitmask = source[1],\r\n newBitmask = bitmask | srcBitmask,\r\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\r\n\r\n var isCombo =\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\r\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\r\n\r\n // Exit early if metadata can't be merged.\r\n if (!(isCommon || isCombo)) {\r\n return data;\r\n }\r\n // Use source `thisArg` if available.\r\n if (srcBitmask & WRAP_BIND_FLAG) {\r\n data[2] = source[2];\r\n // Set when currying a bound function.\r\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\r\n }\r\n // Compose partial arguments.\r\n var value = source[3];\r\n if (value) {\r\n var partials = data[3];\r\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\r\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\r\n }\r\n // Compose partial right arguments.\r\n value = source[5];\r\n if (value) {\r\n partials = data[5];\r\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\r\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\r\n }\r\n // Use source `argPos` if available.\r\n value = source[7];\r\n if (value) {\r\n data[7] = value;\r\n }\r\n // Use source `ary` if it's smaller.\r\n if (srcBitmask & WRAP_ARY_FLAG) {\r\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r\n }\r\n // Use source `arity` if one is not provided.\r\n if (data[9] == null) {\r\n data[9] = source[9];\r\n }\r\n // Use source `func` and merge bitmasks.\r\n data[0] = source[0];\r\n data[1] = newBitmask;\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * This function is like\r\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * except that it includes inherited enumerable properties.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function nativeKeysIn(object) {\r\n var result = [];\r\n if (object != null) {\r\n for (var key in Object(object)) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `value` to a string using `Object.prototype.toString`.\r\n *\r\n * @private\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n */\r\n function objectToString(value) {\r\n return nativeObjectToString.call(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which transforms the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @param {Function} transform The rest array transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overRest(func, start, transform) {\r\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\r\n return function() {\r\n var args = arguments,\r\n index = -1,\r\n length = nativeMax(args.length - start, 0),\r\n array = Array(length);\r\n\r\n while (++index < length) {\r\n array[index] = args[start + index];\r\n }\r\n index = -1;\r\n var otherArgs = Array(start + 1);\r\n while (++index < start) {\r\n otherArgs[index] = args[index];\r\n }\r\n otherArgs[start] = transform(array);\r\n return apply(func, this, otherArgs);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the parent value at `path` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} path The path to get the parent value of.\r\n * @returns {*} Returns the parent value.\r\n */\r\n function parent(object, path) {\r\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\r\n }\r\n\r\n /**\r\n * Reorder `array` according to the specified indexes where the element at\r\n * the first index is assigned as the first element, the element at\r\n * the second index is assigned as the second element, and so on.\r\n *\r\n * @private\r\n * @param {Array} array The array to reorder.\r\n * @param {Array} indexes The arranged array indexes.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function reorder(array, indexes) {\r\n var arrLength = array.length,\r\n length = nativeMin(indexes.length, arrLength),\r\n oldArray = copyArray(array);\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Sets metadata for `func`.\r\n *\r\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r\n * period of time, it will trip its breaker and transition to an identity\r\n * function to avoid garbage collection pauses in V8. See\r\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\r\n * for more details.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setData = shortOut(baseSetData);\r\n\r\n /**\r\n * Sets the `toString` method of `func` to return `string`.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setToString = shortOut(baseSetToString);\r\n\r\n /**\r\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\r\n * with wrapper details in a comment at the top of the source body.\r\n *\r\n * @private\r\n * @param {Function} wrapper The function to modify.\r\n * @param {Function} reference The reference function.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Function} Returns `wrapper`.\r\n */\r\n function setWrapToString(wrapper, reference, bitmask) {\r\n var source = (reference + '');\r\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\r\n }\r\n\r\n /**\r\n * Creates a function that'll short out and invoke `identity` instead\r\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\r\n * milliseconds.\r\n *\r\n * @private\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new shortable function.\r\n */\r\n function shortOut(func) {\r\n var count = 0,\r\n lastCalled = 0;\r\n\r\n return function() {\r\n var stamp = nativeNow(),\r\n remaining = HOT_SPAN - (stamp - lastCalled);\r\n\r\n lastCalled = stamp;\r\n if (remaining > 0) {\r\n if (++count >= HOT_COUNT) {\r\n return arguments[0];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n return func.apply(undefined, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Converts `string` to a property path array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the property path array.\r\n */\r\n var stringToPath = memoizeCapped(function(string) {\r\n var result = [];\r\n if (string.charCodeAt(0) === 46 /* . */) {\r\n result.push('');\r\n }\r\n string.replace(rePropName, function(match, number, quote, subString) {\r\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Converts `value` to a string key if it's not a string or symbol.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {string|symbol} Returns the key.\r\n */\r\n function toKey(value) {\r\n if (typeof value == 'string' || isSymbol(value)) {\r\n return value;\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * Converts `func` to its source code.\r\n *\r\n * @private\r\n * @param {Function} func The function to convert.\r\n * @returns {string} Returns the source code.\r\n */\r\n function toSource(func) {\r\n if (func != null) {\r\n try {\r\n return funcToString.call(func);\r\n } catch (e) {}\r\n try {\r\n return (func + '');\r\n } catch (e) {}\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Updates wrapper `details` based on `bitmask` flags.\r\n *\r\n * @private\r\n * @returns {Array} details The details to modify.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Array} Returns `details`.\r\n */\r\n function updateWrapDetails(details, bitmask) {\r\n arrayEach(wrapFlags, function(pair) {\r\n var value = '_.' + pair[0];\r\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\r\n details.push(value);\r\n }\r\n });\r\n return details.sort();\r\n }\r\n\r\n /**\r\n * Creates a clone of `wrapper`.\r\n *\r\n * @private\r\n * @param {Object} wrapper The wrapper to clone.\r\n * @returns {Object} Returns the cloned wrapper.\r\n */\r\n function wrapperClone(wrapper) {\r\n if (wrapper instanceof LazyWrapper) {\r\n return wrapper.clone();\r\n }\r\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\r\n result.__actions__ = copyArray(wrapper.__actions__);\r\n result.__index__ = wrapper.__index__;\r\n result.__values__ = wrapper.__values__;\r\n return result;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array with all falsey values removed. The values `false`, `null`,\r\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to compact.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.compact([0, 1, false, 2, '', 3]);\r\n * // => [1, 2, 3]\r\n */\r\n function compact(array) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new array concatenating `array` with any additional arrays\r\n * and/or values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to concatenate.\r\n * @param {...*} [values] The values to concatenate.\r\n * @returns {Array} Returns the new concatenated array.\r\n * @example\r\n *\r\n * var array = [1];\r\n * var other = _.concat(array, 2, [3], [[4]]);\r\n *\r\n * console.log(other);\r\n * // => [1, 2, 3, [4]]\r\n *\r\n * console.log(array);\r\n * // => [1]\r\n */\r\n function concat() {\r\n var length = arguments.length;\r\n if (!length) {\r\n return [];\r\n }\r\n var args = Array(length - 1),\r\n array = arguments[0],\r\n index = length;\r\n\r\n while (index--) {\r\n args[index - 1] = arguments[index];\r\n }\r\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\r\n }\r\n\r\n /**\r\n * Creates an array of `array` values not included in the other given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.without, _.xor\r\n * @example\r\n *\r\n * _.difference([2, 1], [2, 3]);\r\n * // => [1]\r\n */\r\n var difference = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.drop([1, 2, 3]);\r\n * // => [2, 3]\r\n *\r\n * _.drop([1, 2, 3], 2);\r\n * // => [3]\r\n *\r\n * _.drop([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.drop([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function drop(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the index of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\r\n * // => 0\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findIndex(users, { 'user': 'fred', 'active': false });\r\n * // => 1\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findIndex(users, ['active', false]);\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findIndex(users, 'active');\r\n * // => 2\r\n */\r\n function findIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\r\n }\r\n\r\n /**\r\n * This method is like `_.findIndex` except that it iterates over elements\r\n * of `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\r\n * // => 2\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\r\n * // => 0\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastIndex(users, ['active', false]);\r\n * // => 2\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastIndex(users, 'active');\r\n * // => 0\r\n */\r\n function findLastIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length - 1;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = fromIndex < 0\r\n ? nativeMax(length + index, 0)\r\n : nativeMin(index, length - 1);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\r\n }\r\n\r\n /**\r\n * Flattens `array` a single level deep.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flatten([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, [3, [4]], 5]\r\n */\r\n function flatten(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, 1) : [];\r\n }\r\n\r\n /**\r\n * Recursively flattens `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, 3, 4, 5]\r\n */\r\n function flattenDeep(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, INFINITY) : [];\r\n }\r\n\r\n /**\r\n * Gets the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias first\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the first element of `array`.\r\n * @example\r\n *\r\n * _.head([1, 2, 3]);\r\n * // => 1\r\n *\r\n * _.head([]);\r\n * // => undefined\r\n */\r\n function head(array) {\r\n return (array && array.length) ? array[0] : undefined;\r\n }\r\n\r\n /**\r\n * Gets the index at which the first occurrence of `value` is found in `array`\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. If `fromIndex` is negative, it's used as the\r\n * offset from the end of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.indexOf([1, 2, 1, 2], 2);\r\n * // => 1\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.indexOf([1, 2, 1, 2], 2, 2);\r\n * // => 3\r\n */\r\n function indexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseIndexOf(array, value, index);\r\n }\r\n\r\n /**\r\n * Gets all but the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.initial([1, 2, 3]);\r\n * // => [1, 2]\r\n */\r\n function initial(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 0, -1) : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values that are included in all given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersection([2, 1], [2, 3]);\r\n * // => [2]\r\n */\r\n var intersection = baseRest(function(arrays) {\r\n var mapped = arrayMap(arrays, castArrayLikeObject);\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped)\r\n : [];\r\n });\r\n\r\n /**\r\n * Gets the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the last element of `array`.\r\n * @example\r\n *\r\n * _.last([1, 2, 3]);\r\n * // => 3\r\n */\r\n function last(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? array[length - 1] : undefined;\r\n }\r\n\r\n /**\r\n * Reverses `array` so that the first element becomes the last, the second\r\n * element becomes the second to last, and so on.\r\n *\r\n * **Note:** This method mutates `array` and is based on\r\n * [`Array#reverse`](https://mdn.io/Array/reverse).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.reverse(array);\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function reverse(array) {\r\n return array == null ? array : nativeReverse.call(array);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` from `start` up to, but not including, `end`.\r\n *\r\n * **Note:** This method is used instead of\r\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\r\n * returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function slice(array, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\r\n start = 0;\r\n end = length;\r\n }\r\n else {\r\n start = start == null ? 0 : toInteger(start);\r\n end = end === undefined ? length : toInteger(end);\r\n }\r\n return baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.take([1, 2, 3]);\r\n * // => [1]\r\n *\r\n * _.take([1, 2, 3], 2);\r\n * // => [1, 2]\r\n *\r\n * _.take([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.take([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function take(array, n, guard) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.takeRight([1, 2, 3]);\r\n * // => [3]\r\n *\r\n * _.takeRight([1, 2, 3], 2);\r\n * // => [2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function takeRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates an array of unique values, in order, from all given arrays using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.union([2], [1, 2]);\r\n * // => [2, 1]\r\n */\r\n var union = baseRest(function(arrays) {\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\r\n });\r\n\r\n /**\r\n * Creates a duplicate-free version of an array, using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons, in which only the first occurrence of each element\r\n * is kept. The order of result values is determined by the order they occur\r\n * in the array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniq([2, 1, 2]);\r\n * // => [2, 1]\r\n */\r\n function uniq(array) {\r\n return (array && array.length) ? baseUniq(array) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `iteratee` which is\r\n * invoked for each element in `array` to generate the criterion by which\r\n * uniqueness is computed. The order of result values is determined by the\r\n * order they occur in the array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n function uniqBy(array, iteratee) {\r\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts an array of grouped\r\n * elements and creates an array regrouping the elements to their pre-zip\r\n * configuration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.2.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n *\r\n * _.unzip(zipped);\r\n * // => [['a', 'b'], [1, 2], [true, false]]\r\n */\r\n function unzip(array) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var length = 0;\r\n array = arrayFilter(array, function(group) {\r\n if (isArrayLikeObject(group)) {\r\n length = nativeMax(group.length, length);\r\n return true;\r\n }\r\n });\r\n return baseTimes(length, function(index) {\r\n return arrayMap(array, baseProperty(index));\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array excluding all given values using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.pull`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...*} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.xor\r\n * @example\r\n *\r\n * _.without([2, 1, 2, 3], 1, 2);\r\n * // => [3]\r\n */\r\n var without = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, values)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates an array of grouped elements, the first of which contains the\r\n * first elements of the given arrays, the second of which contains the\r\n * second elements of the given arrays, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n */\r\n var zip = baseRest(unzip);\r\n\r\n /**\r\n * This method is like `_.fromPairs` except that it accepts two arrays,\r\n * one of property identifiers and one of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.4.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObject(['a', 'b'], [1, 2]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function zipObject(props, values) {\r\n return baseZipObject(props || [], values || [], assignValue);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\r\n * chain sequences enabled. The result of such sequences must be unwrapped\r\n * with `_#value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Seq\r\n * @param {*} value The value to wrap.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'pebbles', 'age': 1 }\r\n * ];\r\n *\r\n * var youngest = _\r\n * .chain(users)\r\n * .sortBy('age')\r\n * .map(function(o) {\r\n * return o.user + ' is ' + o.age;\r\n * })\r\n * .head()\r\n * .value();\r\n * // => 'pebbles is 1'\r\n */\r\n function chain(value) {\r\n var result = lodash(value);\r\n result.__chain__ = true;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method invokes `interceptor` and returns `value`. The interceptor\r\n * is invoked with one argument; (value). The purpose of this method is to\r\n * \"tap into\" a method chain sequence in order to modify intermediate results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * _([1, 2, 3])\r\n * .tap(function(array) {\r\n * // Mutate input array.\r\n * array.pop();\r\n * })\r\n * .reverse()\r\n * .value();\r\n * // => [2, 1]\r\n */\r\n function tap(value, interceptor) {\r\n interceptor(value);\r\n return value;\r\n }\r\n\r\n /**\r\n * This method is like `_.tap` except that it returns the result of `interceptor`.\r\n * The purpose of this method is to \"pass thru\" values replacing intermediate\r\n * results in a method chain sequence.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns the result of `interceptor`.\r\n * @example\r\n *\r\n * _(' abc ')\r\n * .chain()\r\n * .trim()\r\n * .thru(function(value) {\r\n * return [value];\r\n * })\r\n * .value();\r\n * // => ['abc']\r\n */\r\n function thru(value, interceptor) {\r\n return interceptor(value);\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.at`.\r\n *\r\n * @name at\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Seq\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _(object).at(['a[0].b.c', 'a[1]']).value();\r\n * // => [3, 4]\r\n */\r\n var wrapperAt = flatRest(function(paths) {\r\n var length = paths.length,\r\n start = length ? paths[0] : 0,\r\n value = this.__wrapped__,\r\n interceptor = function(object) { return baseAt(object, paths); };\r\n\r\n if (length > 1 || this.__actions__.length ||\r\n !(value instanceof LazyWrapper) || !isIndex(start)) {\r\n return this.thru(interceptor);\r\n }\r\n value = value.slice(start, +start + (length ? 1 : 0));\r\n value.__actions__.push({\r\n 'func': thru,\r\n 'args': [interceptor],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\r\n if (length && !array.length) {\r\n array.push(undefined);\r\n }\r\n return array;\r\n });\r\n });\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\r\n *\r\n * @name chain\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 }\r\n * ];\r\n *\r\n * // A sequence without explicit chaining.\r\n * _(users).head();\r\n * // => { 'user': 'barney', 'age': 36 }\r\n *\r\n * // A sequence with explicit chaining.\r\n * _(users)\r\n * .chain()\r\n * .head()\r\n * .pick('user')\r\n * .value();\r\n * // => { 'user': 'barney' }\r\n */\r\n function wrapperChain() {\r\n return chain(this);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence and returns the wrapped result.\r\n *\r\n * @name commit\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2];\r\n * var wrapped = _(array).push(3);\r\n *\r\n * console.log(array);\r\n * // => [1, 2]\r\n *\r\n * wrapped = wrapped.commit();\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n *\r\n * wrapped.last();\r\n * // => 3\r\n *\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperCommit() {\r\n return new LodashWrapper(this.value(), this.__chain__);\r\n }\r\n\r\n /**\r\n * Gets the next value on a wrapped object following the\r\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\r\n *\r\n * @name next\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the next iterator value.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 1 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 2 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': true, 'value': undefined }\r\n */\r\n function wrapperNext() {\r\n if (this.__values__ === undefined) {\r\n this.__values__ = toArray(this.value());\r\n }\r\n var done = this.__index__ >= this.__values__.length,\r\n value = done ? undefined : this.__values__[this.__index__++];\r\n\r\n return { 'done': done, 'value': value };\r\n }\r\n\r\n /**\r\n * Enables the wrapper to be iterable.\r\n *\r\n * @name Symbol.iterator\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the wrapper object.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped[Symbol.iterator]() === wrapped;\r\n * // => true\r\n *\r\n * Array.from(wrapped);\r\n * // => [1, 2]\r\n */\r\n function wrapperToIterator() {\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\r\n *\r\n * @name plant\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @param {*} value The value to plant.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2]).map(square);\r\n * var other = wrapped.plant([3, 4]);\r\n *\r\n * other.value();\r\n * // => [9, 16]\r\n *\r\n * wrapped.value();\r\n * // => [1, 4]\r\n */\r\n function wrapperPlant(value) {\r\n var result,\r\n parent = this;\r\n\r\n while (parent instanceof baseLodash) {\r\n var clone = wrapperClone(parent);\r\n clone.__index__ = 0;\r\n clone.__values__ = undefined;\r\n if (result) {\r\n previous.__wrapped__ = clone;\r\n } else {\r\n result = clone;\r\n }\r\n var previous = clone;\r\n parent = parent.__wrapped__;\r\n }\r\n previous.__wrapped__ = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.reverse`.\r\n *\r\n * **Note:** This method mutates the wrapped array.\r\n *\r\n * @name reverse\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _(array).reverse().value()\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function wrapperReverse() {\r\n var value = this.__wrapped__;\r\n if (value instanceof LazyWrapper) {\r\n var wrapped = value;\r\n if (this.__actions__.length) {\r\n wrapped = new LazyWrapper(this);\r\n }\r\n wrapped = wrapped.reverse();\r\n wrapped.__actions__.push({\r\n 'func': thru,\r\n 'args': [reverse],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(wrapped, this.__chain__);\r\n }\r\n return this.thru(reverse);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence to resolve the unwrapped value.\r\n *\r\n * @name value\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias toJSON, valueOf\r\n * @category Seq\r\n * @returns {*} Returns the resolved unwrapped value.\r\n * @example\r\n *\r\n * _([1, 2, 3]).value();\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperValue() {\r\n return baseWrapperValue(this.__wrapped__, this.__actions__);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the number of times the key was returned by `iteratee`. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': 1, '6': 2 }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.countBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': 2, '5': 1 }\r\n */\r\n var countBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n ++result[key];\r\n } else {\r\n baseAssignValue(result, key, 1);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\r\n * Iteration is stopped once `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * **Note:** This method returns `true` for\r\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\r\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\r\n * elements of empty collections.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.every([true, 1, null, 'yes'], Boolean);\r\n * // => false\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.every(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.every(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.every(users, 'active');\r\n * // => false\r\n */\r\n function every(collection, predicate, guard) {\r\n var func = isArray(collection) ? arrayEvery : baseEvery;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning an array of all elements\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * **Note:** Unlike `_.remove`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.reject\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * _.filter(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, { 'age': 36, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.filter(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function filter(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning the first element\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false },\r\n * { 'user': 'pebbles', 'age': 1, 'active': true }\r\n * ];\r\n *\r\n * _.find(users, function(o) { return o.age < 40; });\r\n * // => object for 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.find(users, { 'age': 1, 'active': true });\r\n * // => object for 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.find(users, ['active', false]);\r\n * // => object for 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.find(users, 'active');\r\n * // => object for 'barney'\r\n */\r\n var find = createFind(findIndex);\r\n\r\n /**\r\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\r\n * The iteratee is invoked with three arguments: (value, index|key, collection).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\r\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\r\n * or `_.forOwn` for object iteration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias each\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEachRight\r\n * @example\r\n *\r\n * _.forEach([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `1` then `2`.\r\n *\r\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forEach(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEach : baseEach;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The order of grouped values\r\n * is determined by the order they occur in `collection`. The corresponding\r\n * value of each key is an array of elements responsible for generating the\r\n * key. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': [4.2], '6': [6.1, 6.3] }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.groupBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': ['one', 'two'], '5': ['three'] }\r\n */\r\n var groupBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n result[key].push(value);\r\n } else {\r\n baseAssignValue(result, key, [value]);\r\n }\r\n });\r\n\r\n /**\r\n * Creates an array of values by running each element in `collection` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r\n *\r\n * The guarded methods are:\r\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\r\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\r\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\r\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * _.map([4, 8], square);\r\n * // => [16, 64]\r\n *\r\n * _.map({ 'a': 4, 'b': 8 }, square);\r\n * // => [16, 64] (iteration order is not guaranteed)\r\n *\r\n * var users = [\r\n * { 'user': 'barney' },\r\n * { 'user': 'fred' }\r\n * ];\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, 'user');\r\n * // => ['barney', 'fred']\r\n */\r\n function map(collection, iteratee) {\r\n var func = isArray(collection) ? arrayMap : baseMap;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Reduces `collection` to a value which is the accumulated result of running\r\n * each element in `collection` thru `iteratee`, where each successive\r\n * invocation is supplied the return value of the previous. If `accumulator`\r\n * is not given, the first element of `collection` is used as the initial\r\n * value. The iteratee is invoked with four arguments:\r\n * (accumulator, value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\r\n *\r\n * The guarded methods are:\r\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\r\n * and `sortBy`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduceRight\r\n * @example\r\n *\r\n * _.reduce([1, 2], function(sum, n) {\r\n * return sum + n;\r\n * }, 0);\r\n * // => 3\r\n *\r\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * return result;\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\r\n */\r\n function reduce(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduce : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\r\n }\r\n\r\n /**\r\n * The opposite of `_.filter`; this method returns the elements of `collection`\r\n * that `predicate` does **not** return truthy for.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.filter\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true }\r\n * ];\r\n *\r\n * _.reject(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.reject(users, { 'age': 40, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.reject(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.reject(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function reject(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, negate(baseIteratee(predicate, 3)));\r\n }\r\n\r\n /**\r\n * Gets the size of `collection` by returning its length for array-like\r\n * values or the number of own enumerable string keyed properties for objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @returns {number} Returns the collection size.\r\n * @example\r\n *\r\n * _.size([1, 2, 3]);\r\n * // => 3\r\n *\r\n * _.size({ 'a': 1, 'b': 2 });\r\n * // => 2\r\n *\r\n * _.size('pebbles');\r\n * // => 7\r\n */\r\n function size(collection) {\r\n if (collection == null) {\r\n return 0;\r\n }\r\n if (isArrayLike(collection)) {\r\n return isString(collection) ? stringSize(collection) : collection.length;\r\n }\r\n var tag = getTag(collection);\r\n if (tag == mapTag || tag == setTag) {\r\n return collection.size;\r\n }\r\n return baseKeys(collection).length;\r\n }\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **any** element of `collection`.\r\n * Iteration is stopped once `predicate` returns truthy. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.some([null, 0, 'yes', false], Boolean);\r\n * // => true\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.some(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.some(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.some(users, 'active');\r\n * // => true\r\n */\r\n function some(collection, predicate, guard) {\r\n var func = isArray(collection) ? arraySome : baseSome;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of elements, sorted in ascending order by the results of\r\n * running each element in a collection thru each iteratee. This method\r\n * performs a stable sort, that is, it preserves the original sort order of\r\n * equal elements. The iteratees are invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'barney', 'age': 34 }\r\n * ];\r\n *\r\n * _.sortBy(users, [function(o) { return o.user; }]);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\r\n *\r\n * _.sortBy(users, ['user', 'age']);\r\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\r\n */\r\n var sortBy = baseRest(function(collection, iteratees) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n var length = iteratees.length;\r\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\r\n iteratees = [];\r\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\r\n iteratees = [iteratees[0]];\r\n }\r\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Gets the timestamp of the number of milliseconds that have elapsed since\r\n * the Unix epoch (1 January 1970 00:00:00 UTC).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Date\r\n * @returns {number} Returns the timestamp.\r\n * @example\r\n *\r\n * _.defer(function(stamp) {\r\n * console.log(_.now() - stamp);\r\n * }, _.now());\r\n * // => Logs the number of milliseconds it took for the deferred invocation.\r\n */\r\n var now = function() {\r\n return root.Date.now();\r\n };\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that invokes `func`, with the `this` binding and arguments\r\n * of the created function, while it's called less than `n` times. Subsequent\r\n * calls to the created function return the result of the last `func` invocation.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {number} n The number of calls at which `func` is no longer invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * jQuery(element).on('click', _.before(5, addContactToList));\r\n * // => Allows adding up to 4 contacts to the list.\r\n */\r\n function before(n, func) {\r\n var result;\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n > 0) {\r\n result = func.apply(this, arguments);\r\n }\r\n if (n <= 1) {\r\n func = undefined;\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\r\n * and `partials` prepended to the arguments it receives.\r\n *\r\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\r\n * property of bound functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to bind.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * function greet(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n *\r\n * var object = { 'user': 'fred' };\r\n *\r\n * var bound = _.bind(greet, object, 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bind(greet, object, _, '!');\r\n * bound('hi');\r\n * // => 'hi fred!'\r\n */\r\n var bind = baseRest(function(func, thisArg, partials) {\r\n var bitmask = WRAP_BIND_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bind));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(func, bitmask, thisArg, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a debounced function that delays invoking `func` until after `wait`\r\n * milliseconds have elapsed since the last time the debounced function was\r\n * invoked. The debounced function comes with a `cancel` method to cancel\r\n * delayed `func` invocations and a `flush` method to immediately invoke them.\r\n * Provide `options` to indicate whether `func` should be invoked on the\r\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\r\n * with the last arguments provided to the debounced function. Subsequent\r\n * calls to the debounced function return the result of the last `func`\r\n * invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the debounced function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.debounce` and `_.throttle`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to debounce.\r\n * @param {number} [wait=0] The number of milliseconds to delay.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=false]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {number} [options.maxWait]\r\n * The maximum time `func` is allowed to be delayed before it's invoked.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new debounced function.\r\n * @example\r\n *\r\n * // Avoid costly calculations while the window size is in flux.\r\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\r\n *\r\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\r\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\r\n * 'leading': true,\r\n * 'trailing': false\r\n * }));\r\n *\r\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\r\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\r\n * var source = new EventSource('/stream');\r\n * jQuery(source).on('message', debounced);\r\n *\r\n * // Cancel the trailing debounced invocation.\r\n * jQuery(window).on('popstate', debounced.cancel);\r\n */\r\n function debounce(func, wait, options) {\r\n var lastArgs,\r\n lastThis,\r\n maxWait,\r\n result,\r\n timerId,\r\n lastCallTime,\r\n lastInvokeTime = 0,\r\n leading = false,\r\n maxing = false,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n wait = toNumber(wait) || 0;\r\n if (isObject(options)) {\r\n leading = !!options.leading;\r\n maxing = 'maxWait' in options;\r\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n\r\n function invokeFunc(time) {\r\n var args = lastArgs,\r\n thisArg = lastThis;\r\n\r\n lastArgs = lastThis = undefined;\r\n lastInvokeTime = time;\r\n result = func.apply(thisArg, args);\r\n return result;\r\n }\r\n\r\n function leadingEdge(time) {\r\n // Reset any `maxWait` timer.\r\n lastInvokeTime = time;\r\n // Start the timer for the trailing edge.\r\n timerId = setTimeout(timerExpired, wait);\r\n // Invoke the leading edge.\r\n return leading ? invokeFunc(time) : result;\r\n }\r\n\r\n function remainingWait(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime,\r\n timeWaiting = wait - timeSinceLastCall;\r\n\r\n return maxing\r\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\r\n : timeWaiting;\r\n }\r\n\r\n function shouldInvoke(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime;\r\n\r\n // Either this is the first call, activity has stopped and we're at the\r\n // trailing edge, the system time has gone backwards and we're treating\r\n // it as the trailing edge, or we've hit the `maxWait` limit.\r\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\r\n }\r\n\r\n function timerExpired() {\r\n var time = now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time);\r\n }\r\n // Restart the timer.\r\n timerId = setTimeout(timerExpired, remainingWait(time));\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time);\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result;\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n clearTimeout(timerId);\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined;\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(now());\r\n }\r\n\r\n function debounced() {\r\n var time = now(),\r\n isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime);\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n timerId = setTimeout(timerExpired, wait);\r\n return invokeFunc(lastCallTime);\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = setTimeout(timerExpired, wait);\r\n }\r\n return result;\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n return debounced;\r\n }\r\n\r\n /**\r\n * Defers invoking the `func` until the current call stack has cleared. Any\r\n * additional arguments are provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to defer.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.defer(function(text) {\r\n * console.log(text);\r\n * }, 'deferred');\r\n * // => Logs 'deferred' after one millisecond.\r\n */\r\n var defer = baseRest(function(func, args) {\r\n return baseDelay(func, 1, args);\r\n });\r\n\r\n /**\r\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\r\n * provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.delay(function(text) {\r\n * console.log(text);\r\n * }, 1000, 'later');\r\n * // => Logs 'later' after one second.\r\n */\r\n var delay = baseRest(function(func, wait, args) {\r\n return baseDelay(func, toNumber(wait) || 0, args);\r\n });\r\n\r\n /**\r\n * Creates a function that memoizes the result of `func`. If `resolver` is\r\n * provided, it determines the cache key for storing the result based on the\r\n * arguments provided to the memoized function. By default, the first argument\r\n * provided to the memoized function is used as the map cache key. The `func`\r\n * is invoked with the `this` binding of the memoized function.\r\n *\r\n * **Note:** The cache is exposed as the `cache` property on the memoized\r\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\r\n * constructor with one whose instances implement the\r\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\r\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to have its output memoized.\r\n * @param {Function} [resolver] The function to resolve the cache key.\r\n * @returns {Function} Returns the new memoized function.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n * var other = { 'c': 3, 'd': 4 };\r\n *\r\n * var values = _.memoize(_.values);\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * values(other);\r\n * // => [3, 4]\r\n *\r\n * object.a = 2;\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * // Modify the result cache.\r\n * values.cache.set(object, ['a', 'b']);\r\n * values(object);\r\n * // => ['a', 'b']\r\n *\r\n * // Replace `_.memoize.Cache`.\r\n * _.memoize.Cache = WeakMap;\r\n */\r\n function memoize(func, resolver) {\r\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var memoized = function() {\r\n var args = arguments,\r\n key = resolver ? resolver.apply(this, args) : args[0],\r\n cache = memoized.cache;\r\n\r\n if (cache.has(key)) {\r\n return cache.get(key);\r\n }\r\n var result = func.apply(this, args);\r\n memoized.cache = cache.set(key, result) || cache;\r\n return result;\r\n };\r\n memoized.cache = new (memoize.Cache || MapCache);\r\n return memoized;\r\n }\r\n\r\n // Expose `MapCache`.\r\n memoize.Cache = MapCache;\r\n\r\n /**\r\n * Creates a function that negates the result of the predicate `func`. The\r\n * `func` predicate is invoked with the `this` binding and arguments of the\r\n * created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} predicate The predicate to negate.\r\n * @returns {Function} Returns the new negated function.\r\n * @example\r\n *\r\n * function isEven(n) {\r\n * return n % 2 == 0;\r\n * }\r\n *\r\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\r\n * // => [1, 3, 5]\r\n */\r\n function negate(predicate) {\r\n if (typeof predicate != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return function() {\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return !predicate.call(this);\r\n case 1: return !predicate.call(this, args[0]);\r\n case 2: return !predicate.call(this, args[0], args[1]);\r\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\r\n }\r\n return !predicate.apply(this, args);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that is restricted to invoking `func` once. Repeat calls\r\n * to the function return the value of the first invocation. The `func` is\r\n * invoked with the `this` binding and arguments of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var initialize = _.once(createApplication);\r\n * initialize();\r\n * initialize();\r\n * // => `createApplication` is invoked once\r\n */\r\n function once(func) {\r\n return before(2, func);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * created function and arguments from `start` and beyond provided as\r\n * an array.\r\n *\r\n * **Note:** This method is based on the\r\n * [rest parameter](https://mdn.io/rest_parameters).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.rest(function(what, names) {\r\n * return what + ' ' + _.initial(names).join(', ') +\r\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r\n * });\r\n *\r\n * say('hello', 'fred', 'barney', 'pebbles');\r\n * // => 'hello fred, barney, & pebbles'\r\n */\r\n function rest(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start === undefined ? start : toInteger(start);\r\n return baseRest(func, start);\r\n }\r\n\r\n /**\r\n * Creates a throttled function that only invokes `func` at most once per\r\n * every `wait` milliseconds. The throttled function comes with a `cancel`\r\n * method to cancel delayed `func` invocations and a `flush` method to\r\n * immediately invoke them. Provide `options` to indicate whether `func`\r\n * should be invoked on the leading and/or trailing edge of the `wait`\r\n * timeout. The `func` is invoked with the last arguments provided to the\r\n * throttled function. Subsequent calls to the throttled function return the\r\n * result of the last `func` invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the throttled function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.throttle` and `_.debounce`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to throttle.\r\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=true]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new throttled function.\r\n * @example\r\n *\r\n * // Avoid excessively updating the position while scrolling.\r\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\r\n *\r\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\r\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\r\n * jQuery(element).on('click', throttled);\r\n *\r\n * // Cancel the trailing throttled invocation.\r\n * jQuery(window).on('popstate', throttled.cancel);\r\n */\r\n function throttle(func, wait, options) {\r\n var leading = true,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (isObject(options)) {\r\n leading = 'leading' in options ? !!options.leading : leading;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n return debounce(func, wait, {\r\n 'leading': leading,\r\n 'maxWait': wait,\r\n 'trailing': trailing\r\n });\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a shallow clone of `value`.\r\n *\r\n * **Note:** This method is loosely based on the\r\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\r\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\r\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\r\n * arrays. The own enumerable properties of `arguments` objects are cloned\r\n * as plain objects. An empty object is returned for uncloneable values such\r\n * as error objects, functions, DOM nodes, and WeakMaps.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeep\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var shallow = _.clone(objects);\r\n * console.log(shallow[0] === objects[0]);\r\n * // => true\r\n */\r\n function clone(value) {\r\n return baseClone(value, CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.clone\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var deep = _.cloneDeep(objects);\r\n * console.log(deep[0] === objects[0]);\r\n * // => false\r\n */\r\n function cloneDeep(value) {\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * Performs a\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * comparison between two values to determine if they are equivalent.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.eq(object, object);\r\n * // => true\r\n *\r\n * _.eq(object, other);\r\n * // => false\r\n *\r\n * _.eq('a', 'a');\r\n * // => true\r\n *\r\n * _.eq('a', Object('a'));\r\n * // => false\r\n *\r\n * _.eq(NaN, NaN);\r\n * // => true\r\n */\r\n function eq(value, other) {\r\n return value === other || (value !== value && other !== other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely an `arguments` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArguments(function() { return arguments; }());\r\n * // => true\r\n *\r\n * _.isArguments([1, 2, 3]);\r\n * // => false\r\n */\r\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\r\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\r\n !propertyIsEnumerable.call(value, 'callee');\r\n };\r\n\r\n /**\r\n * Checks if `value` is classified as an `Array` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\r\n * @example\r\n *\r\n * _.isArray([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArray(document.body.children);\r\n * // => false\r\n *\r\n * _.isArray('abc');\r\n * // => false\r\n *\r\n * _.isArray(_.noop);\r\n * // => false\r\n */\r\n var isArray = Array.isArray;\r\n\r\n /**\r\n * Checks if `value` is array-like. A value is considered array-like if it's\r\n * not a function and has a `value.length` that's an integer greater than or\r\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r\n * @example\r\n *\r\n * _.isArrayLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLike(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLike('abc');\r\n * // => true\r\n *\r\n * _.isArrayLike(_.noop);\r\n * // => false\r\n */\r\n function isArrayLike(value) {\r\n return value != null && isLength(value.length) && !isFunction(value);\r\n }\r\n\r\n /**\r\n * This method is like `_.isArrayLike` except that it also checks if `value`\r\n * is an object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array-like object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArrayLikeObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject('abc');\r\n * // => false\r\n *\r\n * _.isArrayLikeObject(_.noop);\r\n * // => false\r\n */\r\n function isArrayLikeObject(value) {\r\n return isObjectLike(value) && isArrayLike(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a boolean primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\r\n * @example\r\n *\r\n * _.isBoolean(false);\r\n * // => true\r\n *\r\n * _.isBoolean(null);\r\n * // => false\r\n */\r\n function isBoolean(value) {\r\n return value === true || value === false ||\r\n (isObjectLike(value) && baseGetTag(value) == boolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a buffer.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\r\n * @example\r\n *\r\n * _.isBuffer(new Buffer(2));\r\n * // => true\r\n *\r\n * _.isBuffer(new Uint8Array(2));\r\n * // => false\r\n */\r\n var isBuffer = nativeIsBuffer || stubFalse;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Date` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n * @example\r\n *\r\n * _.isDate(new Date);\r\n * // => true\r\n *\r\n * _.isDate('Mon April 23 2012');\r\n * // => false\r\n */\r\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\r\n\r\n /**\r\n * Checks if `value` is an empty object, collection, map, or set.\r\n *\r\n * Objects are considered empty if they have no own enumerable string keyed\r\n * properties.\r\n *\r\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\r\n * jQuery-like collections are considered empty if they have a `length` of `0`.\r\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r\n * @example\r\n *\r\n * _.isEmpty(null);\r\n * // => true\r\n *\r\n * _.isEmpty(true);\r\n * // => true\r\n *\r\n * _.isEmpty(1);\r\n * // => true\r\n *\r\n * _.isEmpty([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isEmpty({ 'a': 1 });\r\n * // => false\r\n */\r\n function isEmpty(value) {\r\n if (value == null) {\r\n return true;\r\n }\r\n if (isArrayLike(value) &&\r\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\r\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\r\n return !value.length;\r\n }\r\n var tag = getTag(value);\r\n if (tag == mapTag || tag == setTag) {\r\n return !value.size;\r\n }\r\n if (isPrototype(value)) {\r\n return !baseKeys(value).length;\r\n }\r\n for (var key in value) {\r\n if (hasOwnProperty.call(value, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.isEqual(object, other);\r\n * // => true\r\n *\r\n * object === other;\r\n * // => false\r\n */\r\n function isEqual(value, other) {\r\n return baseIsEqual(value, other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a finite primitive number.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\r\n * @example\r\n *\r\n * _.isFinite(3);\r\n * // => true\r\n *\r\n * _.isFinite(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isFinite(Infinity);\r\n * // => false\r\n *\r\n * _.isFinite('3');\r\n * // => false\r\n */\r\n function isFinite(value) {\r\n return typeof value == 'number' && nativeIsFinite(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Function` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\r\n * @example\r\n *\r\n * _.isFunction(_);\r\n * // => true\r\n *\r\n * _.isFunction(/abc/);\r\n * // => false\r\n */\r\n function isFunction(value) {\r\n if (!isObject(value)) {\r\n return false;\r\n }\r\n // The use of `Object#toString` avoids issues with the `typeof` operator\r\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\r\n var tag = baseGetTag(value);\r\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like length.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r\n * @example\r\n *\r\n * _.isLength(3);\r\n * // => true\r\n *\r\n * _.isLength(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isLength(Infinity);\r\n * // => false\r\n *\r\n * _.isLength('3');\r\n * // => false\r\n */\r\n function isLength(value) {\r\n return typeof value == 'number' &&\r\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is the\r\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\r\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r\n * @example\r\n *\r\n * _.isObject({});\r\n * // => true\r\n *\r\n * _.isObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObject(_.noop);\r\n * // => true\r\n *\r\n * _.isObject(null);\r\n * // => false\r\n */\r\n function isObject(value) {\r\n var type = typeof value;\r\n return value != null && (type == 'object' || type == 'function');\r\n }\r\n\r\n /**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * _.isObjectLike({});\r\n * // => true\r\n *\r\n * _.isObjectLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObjectLike(_.noop);\r\n * // => false\r\n *\r\n * _.isObjectLike(null);\r\n * // => false\r\n */\r\n function isObjectLike(value) {\r\n return value != null && typeof value == 'object';\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Map` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n * @example\r\n *\r\n * _.isMap(new Map);\r\n * // => true\r\n *\r\n * _.isMap(new WeakMap);\r\n * // => false\r\n */\r\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\r\n\r\n /**\r\n * Checks if `value` is `NaN`.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\r\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\r\n * `undefined` and other non-number values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n * @example\r\n *\r\n * _.isNaN(NaN);\r\n * // => true\r\n *\r\n * _.isNaN(new Number(NaN));\r\n * // => true\r\n *\r\n * isNaN(undefined);\r\n * // => true\r\n *\r\n * _.isNaN(undefined);\r\n * // => false\r\n */\r\n function isNaN(value) {\r\n // An `NaN` primitive is the only value that is not equal to itself.\r\n // Perform the `toStringTag` check first to avoid errors with some\r\n // ActiveX objects in IE.\r\n return isNumber(value) && value != +value;\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\r\n * @example\r\n *\r\n * _.isNull(null);\r\n * // => true\r\n *\r\n * _.isNull(void 0);\r\n * // => false\r\n */\r\n function isNull(value) {\r\n return value === null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Number` primitive or object.\r\n *\r\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\r\n * classified as numbers, use the `_.isFinite` method.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\r\n * @example\r\n *\r\n * _.isNumber(3);\r\n * // => true\r\n *\r\n * _.isNumber(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isNumber(Infinity);\r\n * // => true\r\n *\r\n * _.isNumber('3');\r\n * // => false\r\n */\r\n function isNumber(value) {\r\n return typeof value == 'number' ||\r\n (isObjectLike(value) && baseGetTag(value) == numberTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a plain object, that is, an object created by the\r\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.8.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * _.isPlainObject(new Foo);\r\n * // => false\r\n *\r\n * _.isPlainObject([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isPlainObject({ 'x': 0, 'y': 0 });\r\n * // => true\r\n *\r\n * _.isPlainObject(Object.create(null));\r\n * // => true\r\n */\r\n function isPlainObject(value) {\r\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\r\n return false;\r\n }\r\n var proto = getPrototype(value);\r\n if (proto === null) {\r\n return true;\r\n }\r\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\r\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\r\n funcToString.call(Ctor) == objectCtorString;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `RegExp` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n * @example\r\n *\r\n * _.isRegExp(/abc/);\r\n * // => true\r\n *\r\n * _.isRegExp('/abc/');\r\n * // => false\r\n */\r\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Set` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n * @example\r\n *\r\n * _.isSet(new Set);\r\n * // => true\r\n *\r\n * _.isSet(new WeakSet);\r\n * // => false\r\n */\r\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\r\n\r\n /**\r\n * Checks if `value` is classified as a `String` primitive or object.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\r\n * @example\r\n *\r\n * _.isString('abc');\r\n * // => true\r\n *\r\n * _.isString(1);\r\n * // => false\r\n */\r\n function isString(value) {\r\n return typeof value == 'string' ||\r\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * _.isSymbol(Symbol.iterator);\r\n * // => true\r\n *\r\n * _.isSymbol('abc');\r\n * // => false\r\n */\r\n function isSymbol(value) {\r\n return typeof value == 'symbol' ||\r\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a typed array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n * @example\r\n *\r\n * _.isTypedArray(new Uint8Array);\r\n * // => true\r\n *\r\n * _.isTypedArray([]);\r\n * // => false\r\n */\r\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\r\n\r\n /**\r\n * Checks if `value` is `undefined`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r\n * @example\r\n *\r\n * _.isUndefined(void 0);\r\n * // => true\r\n *\r\n * _.isUndefined(null);\r\n * // => false\r\n */\r\n function isUndefined(value) {\r\n return value === undefined;\r\n }\r\n\r\n /**\r\n * Converts `value` to an array.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Array} Returns the converted array.\r\n * @example\r\n *\r\n * _.toArray({ 'a': 1, 'b': 2 });\r\n * // => [1, 2]\r\n *\r\n * _.toArray('abc');\r\n * // => ['a', 'b', 'c']\r\n *\r\n * _.toArray(1);\r\n * // => []\r\n *\r\n * _.toArray(null);\r\n * // => []\r\n */\r\n function toArray(value) {\r\n if (!value) {\r\n return [];\r\n }\r\n if (isArrayLike(value)) {\r\n return isString(value) ? stringToArray(value) : copyArray(value);\r\n }\r\n if (symIterator && value[symIterator]) {\r\n return iteratorToArray(value[symIterator]());\r\n }\r\n var tag = getTag(value),\r\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\r\n\r\n return func(value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a finite number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * _.toFinite(3.2);\r\n * // => 3.2\r\n *\r\n * _.toFinite(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toFinite(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toFinite('3.2');\r\n * // => 3.2\r\n */\r\n function toFinite(value) {\r\n if (!value) {\r\n return value === 0 ? value : 0;\r\n }\r\n value = toNumber(value);\r\n if (value === INFINITY || value === -INFINITY) {\r\n var sign = (value < 0 ? -1 : 1);\r\n return sign * MAX_INTEGER;\r\n }\r\n return value === value ? value : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toInteger(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toInteger('3.2');\r\n * // => 3\r\n */\r\n function toInteger(value) {\r\n var result = toFinite(value),\r\n remainder = result % 1;\r\n\r\n return result === result ? (remainder ? result - remainder : result) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to a number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n * @example\r\n *\r\n * _.toNumber(3.2);\r\n * // => 3.2\r\n *\r\n * _.toNumber(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toNumber(Infinity);\r\n * // => Infinity\r\n *\r\n * _.toNumber('3.2');\r\n * // => 3.2\r\n */\r\n function toNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n if (isObject(value)) {\r\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\r\n value = isObject(other) ? (other + '') : other;\r\n }\r\n if (typeof value != 'string') {\r\n return value === 0 ? value : +value;\r\n }\r\n value = value.replace(reTrim, '');\r\n var isBinary = reIsBinary.test(value);\r\n return (isBinary || reIsOctal.test(value))\r\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\r\n : (reIsBadHex.test(value) ? NAN : +value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a plain object flattening inherited enumerable string\r\n * keyed properties of `value` to own properties of the plain object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Object} Returns the converted plain object.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.assign({ 'a': 1 }, new Foo);\r\n * // => { 'a': 1, 'b': 2 }\r\n *\r\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\r\n * // => { 'a': 1, 'b': 2, 'c': 3 }\r\n */\r\n function toPlainObject(value) {\r\n return copyObject(value, keysIn(value));\r\n }\r\n\r\n /**\r\n * Converts `value` to a string. An empty string is returned for `null`\r\n * and `undefined` values. The sign of `-0` is preserved.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.toString(null);\r\n * // => ''\r\n *\r\n * _.toString(-0);\r\n * // => '-0'\r\n *\r\n * _.toString([1, 2, 3]);\r\n * // => '1,2,3'\r\n */\r\n function toString(value) {\r\n return value == null ? '' : baseToString(value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * This method is like `_.assign` except that it iterates over own and\r\n * inherited source properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extend\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assign\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\r\n */\r\n var assignIn = createAssigner(function(object, source) {\r\n copyObject(source, keysIn(source), object);\r\n });\r\n\r\n /**\r\n * Creates an object that inherits from the `prototype` object. If a\r\n * `properties` object is given, its own enumerable string keyed properties\r\n * are assigned to the created object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Object\r\n * @param {Object} prototype The object to inherit from.\r\n * @param {Object} [properties] The properties to assign to the object.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * function Shape() {\r\n * this.x = 0;\r\n * this.y = 0;\r\n * }\r\n *\r\n * function Circle() {\r\n * Shape.call(this);\r\n * }\r\n *\r\n * Circle.prototype = _.create(Shape.prototype, {\r\n * 'constructor': Circle\r\n * });\r\n *\r\n * var circle = new Circle;\r\n * circle instanceof Circle;\r\n * // => true\r\n *\r\n * circle instanceof Shape;\r\n * // => true\r\n */\r\n function create(prototype, properties) {\r\n var result = baseCreate(prototype);\r\n return properties == null ? result : baseAssign(result, properties);\r\n }\r\n\r\n /**\r\n * Assigns own and inherited enumerable string keyed properties of source\r\n * objects to the destination object for all destination properties that\r\n * resolve to `undefined`. Source objects are applied from left to right.\r\n * Once a property is set, additional values of the same property are ignored.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaultsDeep\r\n * @example\r\n *\r\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var defaults = baseRest(function(object, sources) {\r\n object = Object(object);\r\n\r\n var index = -1;\r\n var length = sources.length;\r\n var guard = length > 2 ? sources[2] : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n length = 1;\r\n }\r\n\r\n while (++index < length) {\r\n var source = sources[index];\r\n var props = keysIn(source);\r\n var propsIndex = -1;\r\n var propsLength = props.length;\r\n\r\n while (++propsIndex < propsLength) {\r\n var key = props[propsIndex];\r\n var value = object[key];\r\n\r\n if (value === undefined ||\r\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n object[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n });\r\n\r\n /**\r\n * This method is like `_.defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaults\r\n * @example\r\n *\r\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */\r\n var defaultsDeep = baseRest(function(args) {\r\n args.push(undefined, customDefaultsMerge);\r\n return apply(mergeWith, undefined, args);\r\n });\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the key of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findKey(users, function(o) { return o.age < 40; });\r\n * // => 'barney' (iteration order is not guaranteed)\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findKey(users, { 'age': 1, 'active': true });\r\n * // => 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findKey(users, 'active');\r\n * // => 'barney'\r\n */\r\n function findKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\r\n }\r\n\r\n /**\r\n * This method is like `_.findKey` except that it iterates over elements of\r\n * a collection in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findLastKey(users, function(o) { return o.age < 40; });\r\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastKey(users, { 'age': 36, 'active': true });\r\n * // => 'barney'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastKey(users, 'active');\r\n * // => 'pebbles'\r\n */\r\n function findLastKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\r\n }\r\n\r\n /**\r\n * Gets the value at `path` of `object`. If the resolved value is\r\n * `undefined`, the `defaultValue` is returned in its place.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.get(object, 'a[0].b.c');\r\n * // => 3\r\n *\r\n * _.get(object, ['a', '0', 'b', 'c']);\r\n * // => 3\r\n *\r\n * _.get(object, 'a.b.c', 'default');\r\n * // => 'default'\r\n */\r\n function get(object, path, defaultValue) {\r\n var result = object == null ? undefined : baseGet(object, path);\r\n return result === undefined ? defaultValue : result;\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct property of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': { 'b': 2 } };\r\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.has(object, 'a');\r\n * // => true\r\n *\r\n * _.has(object, 'a.b');\r\n * // => true\r\n *\r\n * _.has(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.has(other, 'a');\r\n * // => false\r\n */\r\n function has(object, path) {\r\n return object != null && hasPath(object, path, baseHas);\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct or inherited property of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.hasIn(object, 'a');\r\n * // => true\r\n *\r\n * _.hasIn(object, 'a.b');\r\n * // => true\r\n *\r\n * _.hasIn(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.hasIn(object, 'b');\r\n * // => false\r\n */\r\n function hasIn(object, path) {\r\n return object != null && hasPath(object, path, baseHasIn);\r\n }\r\n\r\n /**\r\n * Creates an object composed of the inverted keys and values of `object`.\r\n * If `object` contains duplicate values, subsequent values overwrite\r\n * property assignments of previous values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invert(object);\r\n * // => { '1': 'c', '2': 'b' }\r\n */\r\n var invert = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n result[value] = key;\r\n }, constant(identity));\r\n\r\n /**\r\n * This method is like `_.invert` except that the inverted object is generated\r\n * from the results of running each element of `object` thru `iteratee`. The\r\n * corresponding inverted value of each inverted key is an array of keys\r\n * responsible for generating the inverted value. The iteratee is invoked\r\n * with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invertBy(object);\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n *\r\n * _.invertBy(object, function(value) {\r\n * return 'group' + value;\r\n * });\r\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\r\n */\r\n var invertBy = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n if (hasOwnProperty.call(result, value)) {\r\n result[value].push(key);\r\n } else {\r\n result[value] = [key];\r\n }\r\n }, baseIteratee);\r\n\r\n /**\r\n * Creates an array of the own enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects. See the\r\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * for more details.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keys(new Foo);\r\n * // => ['a', 'b'] (iteration order is not guaranteed)\r\n *\r\n * _.keys('hi');\r\n * // => ['0', '1']\r\n */\r\n function keys(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keysIn(new Foo);\r\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r\n */\r\n function keysIn(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\r\n }\r\n\r\n /**\r\n * This method is like `_.assign` except that it recursively merges own and\r\n * inherited enumerable string keyed properties of source objects into the\r\n * destination object. Source properties that resolve to `undefined` are\r\n * skipped if a destination value exists. Array and plain object properties\r\n * are merged recursively. Other objects and value types are overridden by\r\n * assignment. Source objects are applied from left to right. Subsequent\r\n * sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {\r\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\r\n * };\r\n *\r\n * var other = {\r\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\r\n * };\r\n *\r\n * _.merge(object, other);\r\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\r\n */\r\n var merge = createAssigner(function(object, source, srcIndex) {\r\n baseMerge(object, source, srcIndex);\r\n });\r\n\r\n /**\r\n * This method is like `_.merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (_.isArray(objValue)) {\r\n * return objValue.concat(srcValue);\r\n * }\r\n * }\r\n *\r\n * var object = { 'a': [1], 'b': [2] };\r\n * var other = { 'a': [3], 'b': [4] };\r\n *\r\n * _.mergeWith(object, other, customizer);\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */\r\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n baseMerge(object, source, srcIndex, customizer);\r\n });\r\n\r\n /**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable property paths of `object` that are not omitted.\r\n *\r\n * **Note:** This method is considerably slower than `_.pick`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to omit.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omit(object, ['a', 'c']);\r\n * // => { 'b': '2' }\r\n */\r\n var omit = flatRest(function(object, paths) {\r\n var result = {};\r\n if (object == null) {\r\n return result;\r\n }\r\n var isDeep = false;\r\n paths = arrayMap(paths, function(path) {\r\n path = castPath(path, object);\r\n isDeep || (isDeep = path.length > 1);\r\n return path;\r\n });\r\n copyObject(object, getAllKeysIn(object), result);\r\n if (isDeep) {\r\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\r\n }\r\n var length = paths.length;\r\n while (length--) {\r\n baseUnset(result, paths[length]);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * The opposite of `_.pickBy`; this method creates an object composed of\r\n * the own and inherited enumerable string keyed properties of `object` that\r\n * `predicate` doesn't return truthy for. The predicate is invoked with two\r\n * arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omitBy(object, _.isNumber);\r\n * // => { 'b': '2' }\r\n */\r\n function omitBy(object, predicate) {\r\n return pickBy(object, negate(baseIteratee(predicate)));\r\n }\r\n\r\n /**\r\n * Creates an object composed of the picked `object` properties.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pick(object, ['a', 'c']);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var pick = flatRest(function(object, paths) {\r\n return object == null ? {} : basePick(object, paths);\r\n });\r\n\r\n /**\r\n * Creates an object composed of the `object` properties `predicate` returns\r\n * truthy for. The predicate is invoked with two arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pickBy(object, _.isNumber);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n function pickBy(object, predicate) {\r\n if (object == null) {\r\n return {};\r\n }\r\n var props = arrayMap(getAllKeysIn(object), function(prop) {\r\n return [prop];\r\n });\r\n predicate = baseIteratee(predicate);\r\n return basePickBy(object, props, function(value, path) {\r\n return predicate(value, path[0]);\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.get` except that if the resolved value is a\r\n * function it's invoked with the `this` binding of its parent object and\r\n * its result is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to resolve.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\r\n *\r\n * _.result(object, 'a[0].b.c1');\r\n * // => 3\r\n *\r\n * _.result(object, 'a[0].b.c2');\r\n * // => 4\r\n *\r\n * _.result(object, 'a[0].b.c3', 'default');\r\n * // => 'default'\r\n *\r\n * _.result(object, 'a[0].b.c3', _.constant('default'));\r\n * // => 'default'\r\n */\r\n function result(object, path, defaultValue) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length;\r\n\r\n // Ensure the loop is entered when path is empty.\r\n if (!length) {\r\n length = 1;\r\n object = undefined;\r\n }\r\n while (++index < length) {\r\n var value = object == null ? undefined : object[toKey(path[index])];\r\n if (value === undefined) {\r\n index = length;\r\n value = defaultValue;\r\n }\r\n object = isFunction(value) ? value.call(object) : value;\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\r\n * it's created. Arrays are created for missing index properties while objects\r\n * are created for all other missing properties. Use `_.setWith` to customize\r\n * `path` creation.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.set(object, 'a[0].b.c', 4);\r\n * console.log(object.a[0].b.c);\r\n * // => 4\r\n *\r\n * _.set(object, ['x', '0', 'y', 'z'], 5);\r\n * console.log(object.x[0].y.z);\r\n * // => 5\r\n */\r\n function set(object, path, value) {\r\n return object == null ? object : baseSet(object, path, value);\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.values(new Foo);\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * _.values('hi');\r\n * // => ['h', 'i']\r\n */\r\n function values(object) {\r\n return object == null ? [] : baseValues(object, keys(object));\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Number\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n * @example\r\n *\r\n * _.clamp(-10, -5, 5);\r\n * // => -5\r\n *\r\n * _.clamp(10, -5, 5);\r\n * // => 5\r\n */\r\n function clamp(number, lower, upper) {\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = undefined;\r\n }\r\n if (upper !== undefined) {\r\n upper = toNumber(upper);\r\n upper = upper === upper ? upper : 0;\r\n }\r\n if (lower !== undefined) {\r\n lower = toNumber(lower);\r\n lower = lower === lower ? lower : 0;\r\n }\r\n return baseClamp(toNumber(number), lower, upper);\r\n }\r\n\r\n /**\r\n * Produces a random number between the inclusive `lower` and `upper` bounds.\r\n * If only one argument is provided a number between `0` and the given number\r\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\r\n * floats, a floating-point number is returned instead of an integer.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Number\r\n * @param {number} [lower=0] The lower bound.\r\n * @param {number} [upper=1] The upper bound.\r\n * @param {boolean} [floating] Specify returning a floating-point number.\r\n * @returns {number} Returns the random number.\r\n * @example\r\n *\r\n * _.random(0, 5);\r\n * // => an integer between 0 and 5\r\n *\r\n * _.random(5);\r\n * // => also an integer between 0 and 5\r\n *\r\n * _.random(5, true);\r\n * // => a floating-point number between 0 and 5\r\n *\r\n * _.random(1.2, 5.2);\r\n * // => a floating-point number between 1.2 and 5.2\r\n */\r\n function random(lower, upper, floating) {\r\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\r\n upper = floating = undefined;\r\n }\r\n if (floating === undefined) {\r\n if (typeof upper == 'boolean') {\r\n floating = upper;\r\n upper = undefined;\r\n }\r\n else if (typeof lower == 'boolean') {\r\n floating = lower;\r\n lower = undefined;\r\n }\r\n }\r\n if (lower === undefined && upper === undefined) {\r\n lower = 0;\r\n upper = 1;\r\n }\r\n else {\r\n lower = toFinite(lower);\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = 0;\r\n } else {\r\n upper = toFinite(upper);\r\n }\r\n }\r\n if (lower > upper) {\r\n var temp = lower;\r\n lower = upper;\r\n upper = temp;\r\n }\r\n if (floating || lower % 1 || upper % 1) {\r\n var rand = nativeRandom();\r\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\r\n }\r\n return baseRandom(lower, upper);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\r\n * corresponding HTML entities.\r\n *\r\n * **Note:** No other characters are escaped. To escape additional\r\n * characters use a third-party library like [_he_](https://mths.be/he).\r\n *\r\n * Though the \">\" character is escaped for symmetry, characters like\r\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\r\n * unless they're part of a tag or unquoted attribute value. See\r\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\r\n * (under \"semi-related fun fact\") for more details.\r\n *\r\n * When working with HTML you should always\r\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\r\n * XSS vectors.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escape('fred, barney, & pebbles');\r\n * // => 'fred, barney, & pebbles'\r\n */\r\n function escape(string) {\r\n string = toString(string);\r\n return (string && reHasUnescapedHtml.test(string))\r\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\r\n : string;\r\n }\r\n\r\n /**\r\n * Removes leading and trailing whitespace or specified characters from `string`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to trim.\r\n * @param {string} [chars=whitespace] The characters to trim.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {string} Returns the trimmed string.\r\n * @example\r\n *\r\n * _.trim(' abc ');\r\n * // => 'abc'\r\n *\r\n * _.trim('-_-abc-_-', '_-');\r\n * // => 'abc'\r\n *\r\n * _.map([' foo ', ' bar '], _.trim);\r\n * // => ['foo', 'bar']\r\n */\r\n function trim(string, chars, guard) {\r\n string = toString(string);\r\n if (string && (guard || chars === undefined)) {\r\n return string.replace(reTrim, '');\r\n }\r\n if (!string || !(chars = baseToString(chars))) {\r\n return string;\r\n }\r\n var strSymbols = stringToArray(string),\r\n chrSymbols = stringToArray(chars),\r\n start = charsStartIndex(strSymbols, chrSymbols),\r\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\r\n\r\n return castSlice(strSymbols, start, end).join('');\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that returns `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {*} value The value to return from the new function.\r\n * @returns {Function} Returns the new constant function.\r\n * @example\r\n *\r\n * var objects = _.times(2, _.constant({ 'a': 1 }));\r\n *\r\n * console.log(objects);\r\n * // => [{ 'a': 1 }, { 'a': 1 }]\r\n *\r\n * console.log(objects[0] === objects[1]);\r\n * // => true\r\n */\r\n function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }\r\n\r\n /**\r\n * This method returns the first argument it receives.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} value Any value.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n *\r\n * console.log(_.identity(object) === object);\r\n * // => true\r\n */\r\n function identity(value) {\r\n return value;\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the arguments of the created\r\n * function. If `func` is a property name, the created function returns the\r\n * property value for a given element. If `func` is an array or object, the\r\n * created function returns `true` for elements that contain the equivalent\r\n * source properties, otherwise it returns `false`.\r\n *\r\n * @static\r\n * @since 4.0.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} [func=_.identity] The value to convert to a callback.\r\n * @returns {Function} Returns the callback.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\r\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, _.iteratee(['user', 'fred']));\r\n * // => [{ 'user': 'fred', 'age': 40 }]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, _.iteratee('user'));\r\n * // => ['barney', 'fred']\r\n *\r\n * // Create custom iteratee shorthands.\r\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\r\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\r\n * return func.test(string);\r\n * };\r\n * });\r\n *\r\n * _.filter(['abc', 'def'], /ef/);\r\n * // => ['def']\r\n */\r\n function iteratee(func) {\r\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Creates a function that performs a partial deep comparison between a given\r\n * object and `source`, returning `true` if the given object has equivalent\r\n * property values, else `false`.\r\n *\r\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\r\n * partially applied.\r\n *\r\n * Partial comparisons will match empty array and empty object `source`\r\n * values against any array or object value, respectively. See `_.isEqual`\r\n * for a list of supported value comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Util\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': 1, 'b': 2, 'c': 3 },\r\n * { 'a': 4, 'b': 5, 'c': 6 }\r\n * ];\r\n *\r\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\r\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\r\n */\r\n function matches(source) {\r\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Adds all own enumerable string keyed function properties of a source\r\n * object to the destination object. If `object` is a function, then methods\r\n * are added to its prototype as well.\r\n *\r\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\r\n * avoid conflicts caused by modifying the original.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {Function|Object} [object=lodash] The destination object.\r\n * @param {Object} source The object of functions to add.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\r\n * @returns {Function|Object} Returns `object`.\r\n * @example\r\n *\r\n * function vowels(string) {\r\n * return _.filter(string, function(v) {\r\n * return /[aeiou]/i.test(v);\r\n * });\r\n * }\r\n *\r\n * _.mixin({ 'vowels': vowels });\r\n * _.vowels('fred');\r\n * // => ['e']\r\n *\r\n * _('fred').vowels().value();\r\n * // => ['e']\r\n *\r\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\r\n * _('fred').vowels();\r\n * // => ['e']\r\n */\r\n function mixin(object, source, options) {\r\n var props = keys(source),\r\n methodNames = baseFunctions(source, props);\r\n\r\n if (options == null &&\r\n !(isObject(source) && (methodNames.length || !props.length))) {\r\n options = source;\r\n source = object;\r\n object = this;\r\n methodNames = baseFunctions(source, keys(source));\r\n }\r\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\r\n isFunc = isFunction(object);\r\n\r\n arrayEach(methodNames, function(methodName) {\r\n var func = source[methodName];\r\n object[methodName] = func;\r\n if (isFunc) {\r\n object.prototype[methodName] = function() {\r\n var chainAll = this.__chain__;\r\n if (chain || chainAll) {\r\n var result = object(this.__wrapped__),\r\n actions = result.__actions__ = copyArray(this.__actions__);\r\n\r\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\r\n result.__chain__ = chainAll;\r\n return result;\r\n }\r\n return func.apply(object, arrayPush([this.value()], arguments));\r\n };\r\n }\r\n });\r\n\r\n return object;\r\n }\r\n\r\n /**\r\n * Reverts the `_` variable to its previous value and returns a reference to\r\n * the `lodash` function.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @returns {Function} Returns the `lodash` function.\r\n * @example\r\n *\r\n * var lodash = _.noConflict();\r\n */\r\n function noConflict() {\r\n if (root._ === this) {\r\n root._ = oldDash;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * This method returns `undefined`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Util\r\n * @example\r\n *\r\n * _.times(2, _.noop);\r\n * // => [undefined, undefined]\r\n */\r\n function noop() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * Creates a function that returns the value at `path` of a given object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': { 'b': 2 } },\r\n * { 'a': { 'b': 1 } }\r\n * ];\r\n *\r\n * _.map(objects, _.property('a.b'));\r\n * // => [2, 1]\r\n *\r\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\r\n * // => [1, 2]\r\n */\r\n function property(path) {\r\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\r\n }\r\n\r\n /**\r\n * Creates an array of numbers (positive and/or negative) progressing from\r\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\r\n * `start` is specified without an `end` or `step`. If `end` is not specified,\r\n * it's set to `start` with `start` then set to `0`.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} [step=1] The value to increment or decrement by.\r\n * @returns {Array} Returns the range of numbers.\r\n * @see _.inRange, _.rangeRight\r\n * @example\r\n *\r\n * _.range(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * _.range(-4);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * _.range(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * _.range(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * _.range(0);\r\n * // => []\r\n */\r\n var range = createRange();\r\n\r\n /**\r\n * This method returns a new empty array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {Array} Returns the new empty array.\r\n * @example\r\n *\r\n * var arrays = _.times(2, _.stubArray);\r\n *\r\n * console.log(arrays);\r\n * // => [[], []]\r\n *\r\n * console.log(arrays[0] === arrays[1]);\r\n * // => false\r\n */\r\n function stubArray() {\r\n return [];\r\n }\r\n\r\n /**\r\n * This method returns `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {boolean} Returns `false`.\r\n * @example\r\n *\r\n * _.times(2, _.stubFalse);\r\n * // => [false, false]\r\n */\r\n function stubFalse() {\r\n return false;\r\n }\r\n\r\n /**\r\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {string} [prefix=''] The value to prefix the ID with.\r\n * @returns {string} Returns the unique ID.\r\n * @example\r\n *\r\n * _.uniqueId('contact_');\r\n * // => 'contact_104'\r\n *\r\n * _.uniqueId();\r\n * // => '105'\r\n */\r\n function uniqueId(prefix) {\r\n var id = ++idCounter;\r\n return toString(prefix) + id;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Computes the maximum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the maximum value.\r\n * @example\r\n *\r\n * _.max([4, 2, 8, 6]);\r\n * // => 8\r\n *\r\n * _.max([]);\r\n * // => undefined\r\n */\r\n function max(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseGt)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Computes the minimum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the minimum value.\r\n * @example\r\n *\r\n * _.min([4, 2, 8, 6]);\r\n * // => 2\r\n *\r\n * _.min([]);\r\n * // => undefined\r\n */\r\n function min(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseLt)\r\n : undefined;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return wrapped values in chain sequences.\r\n lodash.assignIn = assignIn;\r\n lodash.before = before;\r\n lodash.bind = bind;\r\n lodash.chain = chain;\r\n lodash.compact = compact;\r\n lodash.concat = concat;\r\n lodash.countBy = countBy;\r\n lodash.create = create;\r\n lodash.debounce = debounce;\r\n lodash.defaults = defaults;\r\n lodash.defaultsDeep = defaultsDeep;\r\n lodash.defer = defer;\r\n lodash.delay = delay;\r\n lodash.difference = difference;\r\n lodash.drop = drop;\r\n lodash.filter = filter;\r\n lodash.flatten = flatten;\r\n lodash.flattenDeep = flattenDeep;\r\n lodash.groupBy = groupBy;\r\n lodash.initial = initial;\r\n lodash.intersection = intersection;\r\n lodash.invert = invert;\r\n lodash.invertBy = invertBy;\r\n lodash.iteratee = iteratee;\r\n lodash.keys = keys;\r\n lodash.map = map;\r\n lodash.matches = matches;\r\n lodash.merge = merge;\r\n lodash.mixin = mixin;\r\n lodash.negate = negate;\r\n lodash.omit = omit;\r\n lodash.omitBy = omitBy;\r\n lodash.once = once;\r\n lodash.pick = pick;\r\n lodash.range = range;\r\n lodash.reject = reject;\r\n lodash.rest = rest;\r\n lodash.set = set;\r\n lodash.slice = slice;\r\n lodash.sortBy = sortBy;\r\n lodash.take = take;\r\n lodash.takeRight = takeRight;\r\n lodash.tap = tap;\r\n lodash.throttle = throttle;\r\n lodash.thru = thru;\r\n lodash.toArray = toArray;\r\n lodash.union = union;\r\n lodash.uniq = uniq;\r\n lodash.uniqBy = uniqBy;\r\n lodash.unzip = unzip;\r\n lodash.values = values;\r\n lodash.without = without;\r\n lodash.zip = zip;\r\n lodash.zipObject = zipObject;\r\n\r\n // Add aliases.\r\n lodash.extend = assignIn;\r\n\r\n // Add methods to `lodash.prototype`.\r\n mixin(lodash, lodash);\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return unwrapped values in chain sequences.\r\n lodash.clamp = clamp;\r\n lodash.clone = clone;\r\n lodash.cloneDeep = cloneDeep;\r\n lodash.escape = escape;\r\n lodash.every = every;\r\n lodash.find = find;\r\n lodash.findIndex = findIndex;\r\n lodash.findKey = findKey;\r\n lodash.findLastIndex = findLastIndex;\r\n lodash.findLastKey = findLastKey;\r\n lodash.forEach = forEach;\r\n lodash.get = get;\r\n lodash.has = has;\r\n lodash.head = head;\r\n lodash.identity = identity;\r\n lodash.indexOf = indexOf;\r\n lodash.isArguments = isArguments;\r\n lodash.isArray = isArray;\r\n lodash.isArrayLike = isArrayLike;\r\n lodash.isBoolean = isBoolean;\r\n lodash.isDate = isDate;\r\n lodash.isEmpty = isEmpty;\r\n lodash.isEqual = isEqual;\r\n lodash.isFinite = isFinite;\r\n lodash.isFunction = isFunction;\r\n lodash.isNaN = isNaN;\r\n lodash.isNull = isNull;\r\n lodash.isNumber = isNumber;\r\n lodash.isObject = isObject;\r\n lodash.isPlainObject = isPlainObject;\r\n lodash.isRegExp = isRegExp;\r\n lodash.isString = isString;\r\n lodash.isUndefined = isUndefined;\r\n lodash.last = last;\r\n lodash.max = max;\r\n lodash.min = min;\r\n lodash.noConflict = noConflict;\r\n lodash.noop = noop;\r\n lodash.random = random;\r\n lodash.reduce = reduce;\r\n lodash.result = result;\r\n lodash.size = size;\r\n lodash.some = some;\r\n lodash.trim = trim;\r\n lodash.uniqueId = uniqueId;\r\n\r\n // Add aliases.\r\n lodash.each = forEach;\r\n lodash.first = head;\r\n\r\n mixin(lodash, (function() {\r\n var source = {};\r\n baseForOwn(lodash, function(func, methodName) {\r\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\r\n source[methodName] = func;\r\n }\r\n });\r\n return source;\r\n }()), { 'chain': false });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The semantic version number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @type {string}\r\n */\r\n lodash.VERSION = VERSION;\r\n\r\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\r\n arrayEach(['drop', 'take'], function(methodName, index) {\r\n LazyWrapper.prototype[methodName] = function(n) {\r\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\r\n\r\n var result = (this.__filtered__ && !index)\r\n ? new LazyWrapper(this)\r\n : this.clone();\r\n\r\n if (result.__filtered__) {\r\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\r\n } else {\r\n result.__views__.push({\r\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\r\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\r\n });\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\r\n return this.reverse()[methodName](n).reverse();\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods that accept an `iteratee` value.\r\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\r\n var type = index + 1,\r\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\r\n\r\n LazyWrapper.prototype[methodName] = function(iteratee) {\r\n var result = this.clone();\r\n result.__iteratees__.push({\r\n 'iteratee': getIteratee(iteratee, 3),\r\n 'type': type\r\n });\r\n result.__filtered__ = result.__filtered__ || isFilter;\r\n return result;\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\r\n arrayEach(['head', 'last'], function(methodName, index) {\r\n var takeName = 'take' + (index ? 'Right' : '');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this[takeName](1).value()[0];\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\r\n arrayEach(['initial', 'tail'], function(methodName, index) {\r\n var dropName = 'drop' + (index ? '' : 'Right');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\r\n };\r\n });\r\n\r\n LazyWrapper.prototype.compact = function() {\r\n return this.filter(identity);\r\n };\r\n\r\n LazyWrapper.prototype.find = function(predicate) {\r\n return this.filter(predicate).head();\r\n };\r\n\r\n LazyWrapper.prototype.findLast = function(predicate) {\r\n return this.reverse().find(predicate);\r\n };\r\n\r\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\r\n if (typeof path == 'function') {\r\n return new LazyWrapper(this);\r\n }\r\n return this.map(function(value) {\r\n return baseInvoke(value, path, args);\r\n });\r\n });\r\n\r\n LazyWrapper.prototype.reject = function(predicate) {\r\n return this.filter(negate(getIteratee(predicate)));\r\n };\r\n\r\n LazyWrapper.prototype.slice = function(start, end) {\r\n start = toInteger(start);\r\n\r\n var result = this;\r\n if (result.__filtered__ && (start > 0 || end < 0)) {\r\n return new LazyWrapper(result);\r\n }\r\n if (start < 0) {\r\n result = result.takeRight(-start);\r\n } else if (start) {\r\n result = result.drop(start);\r\n }\r\n if (end !== undefined) {\r\n end = toInteger(end);\r\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\r\n return this.reverse().takeWhile(predicate).reverse();\r\n };\r\n\r\n LazyWrapper.prototype.toArray = function() {\r\n return this.take(MAX_ARRAY_LENGTH);\r\n };\r\n\r\n // Add `LazyWrapper` methods to `lodash.prototype`.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\r\n isTaker = /^(?:head|last)$/.test(methodName),\r\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\r\n retUnwrapped = isTaker || /^find/.test(methodName);\r\n\r\n if (!lodashFunc) {\r\n return;\r\n }\r\n lodash.prototype[methodName] = function() {\r\n var value = this.__wrapped__,\r\n args = isTaker ? [1] : arguments,\r\n isLazy = value instanceof LazyWrapper,\r\n iteratee = args[0],\r\n useLazy = isLazy || isArray(value);\r\n\r\n var interceptor = function(value) {\r\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\r\n return (isTaker && chainAll) ? result[0] : result;\r\n };\r\n\r\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\r\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\r\n isLazy = useLazy = false;\r\n }\r\n var chainAll = this.__chain__,\r\n isHybrid = !!this.__actions__.length,\r\n isUnwrapped = retUnwrapped && !chainAll,\r\n onlyLazy = isLazy && !isHybrid;\r\n\r\n if (!retUnwrapped && useLazy) {\r\n value = onlyLazy ? value : new LazyWrapper(this);\r\n var result = func.apply(value, args);\r\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\r\n return new LodashWrapper(result, chainAll);\r\n }\r\n if (isUnwrapped && onlyLazy) {\r\n return func.apply(this, args);\r\n }\r\n result = this.thru(interceptor);\r\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\r\n };\r\n });\r\n\r\n // Add `Array` methods to `lodash.prototype`.\r\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\r\n var func = arrayProto[methodName],\r\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\r\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\r\n\r\n lodash.prototype[methodName] = function() {\r\n var args = arguments;\r\n if (retUnwrapped && !this.__chain__) {\r\n var value = this.value();\r\n return func.apply(isArray(value) ? value : [], args);\r\n }\r\n return this[chainName](function(value) {\r\n return func.apply(isArray(value) ? value : [], args);\r\n });\r\n };\r\n });\r\n\r\n // Map minified method names to their real names.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var lodashFunc = lodash[methodName];\r\n if (lodashFunc) {\r\n var key = (lodashFunc.name + ''),\r\n names = realNames[key] || (realNames[key] = []);\r\n\r\n names.push({ 'name': methodName, 'func': lodashFunc });\r\n }\r\n });\r\n\r\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\r\n 'name': 'wrapper',\r\n 'func': undefined\r\n }];\r\n\r\n // Add methods to `LazyWrapper`.\r\n LazyWrapper.prototype.clone = lazyClone;\r\n LazyWrapper.prototype.reverse = lazyReverse;\r\n LazyWrapper.prototype.value = lazyValue;\r\n\r\n // Add lazy aliases.\r\n lodash.prototype.first = lodash.prototype.head;\r\n\r\n if (symIterator) {\r\n lodash.prototype[symIterator] = wrapperToIterator;\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n // Some AMD build optimizers, like r.js, check for condition patterns like:\r\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\r\n // Expose Lodash on the global object to prevent errors when Lodash is\r\n // loaded by a script tag in the presence of an AMD loader.\r\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\r\n // Use `_.noConflict` to remove Lodash from the global object.\r\n root._ = lodash;\r\n\r\n // Define as an anonymous module so, through path mapping, it can be\r\n // referenced as the \"underscore\" module.\r\n define(function() {\r\n return lodash;\r\n });\r\n }\r\n // Check for `exports` after `define` in case a build optimizer adds it.\r\n else if (freeModule) {\r\n // Export for Node.js.\r\n (freeModule.exports = lodash)._ = lodash;\r\n // Export for CommonJS support.\r\n freeExports._ = lodash;\r\n }\r\n else {\r\n // Export to the global object.\r\n root._ = lodash;\r\n }\r\n}.call(this));\r\n/**\r\n * 基本函数\r\n * Create By GUY 2014\\11\\17\r\n *\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (!_global.BI) {\r\n _global.BI = {};\r\n}\r\n\r\n!(function (undefined) {\r\n var traverse = function (func, context) {\r\n return function (value, key, obj) {\r\n return func.call(context, key, value, obj);\r\n };\r\n };\r\n var _apply = function (name) {\r\n return function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n };\r\n var _applyFunc = function (name) {\r\n return function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[1] = _.isFunction(args[1]) ? traverse(args[1], args[2]) : args[1];\r\n return _[name].apply(_, args);\r\n };\r\n };\r\n\r\n // Utility\r\n _.extend(BI, {\r\n assert: function (v, is) {\r\n if (this.isFunction(is)) {\r\n if (!is(v)) {\r\n throw new Error(v + \" error\");\r\n } else {\r\n return true;\r\n }\r\n }\r\n if (!this.isArray(is)) {\r\n is = [is];\r\n }\r\n if (!this.deepContains(is, v)) {\r\n throw new Error(v + \" error\");\r\n }\r\n return true;\r\n },\r\n\r\n warn: function (message) {\r\n console.warn(message);\r\n },\r\n\r\n UUID: function () {\r\n var f = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n var str = \"\";\r\n for (var i = 0; i < 16; i++) {\r\n var r = parseInt(f.length * Math.random(), 10);\r\n str += f[r];\r\n }\r\n return str;\r\n },\r\n\r\n isWidget: function (widget) {\r\n return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);\r\n },\r\n\r\n createWidgets: function (items, options, context) {\r\n if (!BI.isArray(items)) {\r\n throw new Error(\"cannot create Widgets\");\r\n }\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n return BI.map(BI.flatten(items), function (i, item) {\r\n return BI.createWidget(item, BI.deepClone(options));\r\n });\r\n },\r\n\r\n createItems: function (data, innerAttr, outerAttr) {\r\n innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});\r\n outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});\r\n return BI.map(data, function (i, item) {\r\n if (BI.isArray(item)) {\r\n return BI.createItems(item, innerAttr, outerAttr);\r\n }\r\n if (item instanceof BI.Widget) {\r\n return BI.extend({}, innerAttr.shift(), outerAttr.shift(), {\r\n type: null,\r\n el: item\r\n });\r\n }\r\n if (innerAttr[0] instanceof BI.Widget) {\r\n outerAttr.shift();\r\n return BI.extend({}, item, {\r\n el: innerAttr.shift()\r\n });\r\n }\r\n if (item.el instanceof BI.Widget || (BI.View && item.el instanceof BI.View)) {\r\n innerAttr.shift();\r\n return BI.extend({}, outerAttr.shift(), {type: null}, item);\r\n }\r\n if (item.el) {\r\n return BI.extend({}, outerAttr.shift(), item, {\r\n el: BI.extend({}, innerAttr.shift(), item.el)\r\n });\r\n }\r\n return BI.extend({}, outerAttr.shift(), {\r\n el: BI.extend({}, innerAttr.shift(), item)\r\n });\r\n });\r\n },\r\n\r\n // 用容器包装items\r\n packageItems: function (items, layouts) {\r\n for (var i = layouts.length - 1; i >= 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n return BI.extend({}, layouts[i], {\r\n items: [\r\n BI.extend({}, layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n formatEL: function (obj) {\r\n if (obj && !obj.type && obj.el) {\r\n return obj;\r\n }\r\n return {\r\n el: obj\r\n };\r\n },\r\n\r\n // 剥开EL\r\n stripEL: function (obj) {\r\n return obj.type && obj || obj.el || obj;\r\n },\r\n\r\n trans2Element: function (widgets) {\r\n return BI.map(widgets, function (i, wi) {\r\n return wi.element;\r\n });\r\n }\r\n });\r\n\r\n // 集合相关方法\r\n _.each([\"where\", \"findWhere\", \"invoke\", \"pluck\", \"shuffle\", \"sample\", \"toArray\", \"size\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"get\", \"set\", \"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\", \"clamp\"], function (name) {\r\n if (name === \"any\") {\r\n BI[name] = _applyFunc(\"some\");\r\n } else {\r\n BI[name] = _applyFunc(name);\r\n }\r\n });\r\n _.extend(BI, {\r\n // 数数\r\n count: function (from, to, predicate) {\r\n var t;\r\n if (predicate) {\r\n for (t = from; t < to; t++) {\r\n predicate(t);\r\n }\r\n }\r\n return to - from;\r\n },\r\n\r\n // 倒数\r\n inverse: function (from, to, predicate) {\r\n return BI.count(to, from, predicate);\r\n },\r\n\r\n firstKey: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastKey: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n firstObject: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastObject: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n concat: function (obj1, obj2) {\r\n if (BI.isKey(obj1)) {\r\n return BI.map([].slice.apply(arguments), function (idx, v) {\r\n return v;\r\n }).join(\"\");\r\n }\r\n if (BI.isArray(obj1)) {\r\n return _.concat.apply([], arguments);\r\n }\r\n if (BI.isObject(obj1)) {\r\n return _.extend.apply({}, arguments);\r\n }\r\n },\r\n\r\n backEach: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n predicate(index, obj[index], obj);\r\n }\r\n return false;\r\n },\r\n\r\n backAny: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (predicate(index, obj[index], obj)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n backEvery: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (!predicate(index, obj[index], obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n backFindKey: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) {\r\n return key;\r\n }\r\n }\r\n },\r\n\r\n backFind: function (obj, predicate, context) {\r\n var key;\r\n if (BI.isArray(obj)) {\r\n key = BI.findLastIndex(obj, predicate, context);\r\n } else {\r\n key = BI.backFindKey(obj, predicate, context);\r\n }\r\n if (key !== void 0 && key !== -1) {\r\n return obj[key];\r\n }\r\n },\r\n\r\n remove: function (obj, target, context) {\r\n var isFunction = BI.isFunction(target);\r\n target = isFunction || BI.isArray(target) ? target : [target];\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n obj.splice(i--, 1);\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n delete obj[i];\r\n }\r\n });\r\n }\r\n },\r\n\r\n removeAt: function (obj, index) {\r\n index = BI.isArray(index) ? index : [index];\r\n var isArray = BI.isArray(obj), i;\r\n for (i = 0; i < index.length; i++) {\r\n if (isArray) {\r\n obj[index[i]] = \"$deleteIndex\";\r\n } else {\r\n delete obj[index[i]];\r\n }\r\n }\r\n if (isArray) {\r\n BI.remove(obj, \"$deleteIndex\");\r\n }\r\n },\r\n\r\n string2Array: function (str) {\r\n return str.split(\"&-&\");\r\n },\r\n\r\n array2String: function (array) {\r\n return array.join(\"&-&\");\r\n },\r\n\r\n abc2Int: function (str) {\r\n var idx = 0, start = \"A\", str = str.toUpperCase();\r\n for (var i = 0, len = str.length; i < len; ++i) {\r\n idx = str.charAt(i).charCodeAt(0) - start.charCodeAt(0) + 26 * idx + 1;\r\n if (idx > (2147483646 - str.charAt(i).charCodeAt(0) + start.charCodeAt(0)) / 26) {\r\n return 0;\r\n }\r\n }\r\n return idx;\r\n },\r\n\r\n int2Abc: function (num) {\r\n var DIGITS = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\r\n var idx = num, str = \"\";\r\n if (num === 0) {\r\n return \"\";\r\n }\r\n while (idx !== 0) {\r\n var t = idx % 26;\r\n if (t === 0) {\r\n t = 26;\r\n }\r\n str = DIGITS[t - 1] + str;\r\n idx = (idx - t) / 26;\r\n }\r\n return str;\r\n }\r\n });\r\n\r\n // 数组相关的方法\r\n _.each([\"first\", \"initial\", \"last\", \"rest\", \"compact\", \"flatten\", \"without\", \"union\", \"intersection\",\r\n \"difference\", \"zip\", \"unzip\", \"object\", \"indexOf\", \"lastIndexOf\", \"sortedIndex\", \"range\", \"take\", \"takeRight\", \"uniqBy\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"findIndex\", \"findLastIndex\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n // 构建一个长度为length的数组\r\n makeArray: function (length, value) {\r\n var res = [];\r\n for (var i = 0; i < length; i++) {\r\n if (BI.isNull(value)) {\r\n res.push(i);\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n makeObject: function (array, value) {\r\n var map = {};\r\n for (var i = 0; i < array.length; i++) {\r\n if (BI.isNull(value)) {\r\n map[array[i]] = array[i];\r\n } else {\r\n map[array[i]] = BI.deepClone(value);\r\n }\r\n }\r\n return map;\r\n },\r\n\r\n makeArrayByArray: function (array, value) {\r\n var res = [];\r\n if (!array) {\r\n return res;\r\n }\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n if (BI.isArray(array[i])) {\r\n res.push(arguments.callee(array[i], value));\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n uniq: function (array, isSorted, iteratee, context) {\r\n if (array == null) {\r\n return [];\r\n }\r\n if (!_.isBoolean(isSorted)) {\r\n context = iteratee;\r\n iteratee = isSorted;\r\n isSorted = false;\r\n }\r\n iteratee && (iteratee = traverse(iteratee, context));\r\n return _.uniq.call(_, array, isSorted, iteratee, context);\r\n }\r\n });\r\n\r\n // 对象相关方法\r\n _.each([\"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\", \"create\", \"functions\", \"extend\", \"extendOwn\",\r\n \"defaults\", \"clone\", \"property\", \"propertyOf\", \"matcher\", \"isEqual\", \"isMatch\", \"isEmpty\",\r\n \"isElement\", \"isNumber\", \"isString\", \"isArray\", \"isObject\", \"isPlainObject\", \"isArguments\", \"isFunction\", \"isFinite\",\r\n \"isBoolean\", \"isDate\", \"isRegExp\", \"isError\", \"isNaN\", \"isUndefined\", \"zipObject\", \"cloneDeep\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n\r\n inherit: function (sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function () {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function () {\r\n }, spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n },\r\n\r\n init: function () {\r\n // 先把准备环境准备好\r\n while (BI.prepares && BI.prepares.length > 0) {\r\n BI.prepares.shift()();\r\n }\r\n BI.initialized = true;\r\n },\r\n\r\n has: function (obj, keys) {\r\n if (BI.isArray(keys)) {\r\n if (keys.length === 0) {\r\n return false;\r\n }\r\n return BI.every(keys, function (i, key) {\r\n return _.has(obj, key);\r\n });\r\n }\r\n return _.has.apply(_, arguments);\r\n },\r\n\r\n freeze: function (value) {\r\n // 在ES5中,如果这个方法的参数不是一个对象(一个原始值),那么它会导致 TypeError\r\n // 在ES2015中,非对象参数将被视为要被冻结的普通对象,并被简单地返回\r\n if (Object.freeze && BI.isObject(value)) {\r\n return Object.freeze(value);\r\n }\r\n return value;\r\n },\r\n\r\n // 数字和字符串可以作为key\r\n isKey: function (key) {\r\n return BI.isNumber(key) || (BI.isString(key) && key.length > 0);\r\n },\r\n\r\n // 忽略大小写的等于\r\n isCapitalEqual: function (a, b) {\r\n a = BI.isNull(a) ? a : (\"\" + a).toLowerCase();\r\n b = BI.isNull(b) ? b : (\"\" + b).toLowerCase();\r\n return BI.isEqual(a, b);\r\n },\r\n\r\n isWidthOrHeight: function (w) {\r\n if (typeof w === \"number\") {\r\n return w >= 0;\r\n } else if (typeof w === \"string\") {\r\n return /^\\d{1,3}%$/.exec(w) || w == \"auto\" || /^\\d+px$/.exec(w);\r\n }\r\n },\r\n\r\n isNotNull: function (obj) {\r\n return !BI.isNull(obj);\r\n },\r\n\r\n isNull: function (obj) {\r\n return typeof obj === \"undefined\" || obj === null;\r\n },\r\n\r\n isEmptyArray: function (arr) {\r\n return BI.isArray(arr) && BI.isEmpty(arr);\r\n },\r\n\r\n isNotEmptyArray: function (arr) {\r\n return BI.isArray(arr) && !BI.isEmpty(arr);\r\n },\r\n\r\n isEmptyObject: function (obj) {\r\n return BI.isEqual(obj, {});\r\n },\r\n\r\n isNotEmptyObject: function (obj) {\r\n return BI.isPlainObject(obj) && !BI.isEmptyObject(obj);\r\n },\r\n\r\n isEmptyString: function (obj) {\r\n return BI.isString(obj) && obj.length === 0;\r\n },\r\n\r\n isNotEmptyString: function (obj) {\r\n return BI.isString(obj) && !BI.isEmptyString(obj);\r\n },\r\n\r\n isWindow: function (obj) {\r\n return obj != null && obj == obj.window;\r\n }\r\n });\r\n\r\n // deep方法\r\n _.extend(BI, {\r\n deepClone: _.cloneDeep,\r\n deepExtend: _.merge,\r\n\r\n isDeepMatch: function (object, attrs) {\r\n var keys = BI.keys(attrs), length = keys.length;\r\n if (object == null) {\r\n return !length;\r\n }\r\n var obj = Object(object);\r\n for (var i = 0; i < length; i++) {\r\n var key = keys[i];\r\n if (!BI.isEqual(attrs[key], obj[key]) || !(key in obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n contains: function (obj, target, fromIndex) {\r\n if (!_.isArrayLike(obj)) obj = _.values(obj);\r\n return _.indexOf(obj, target, typeof fromIndex === \"number\" && fromIndex) >= 0;\r\n },\r\n\r\n deepContains: function (obj, copy) {\r\n if (BI.isObject(copy)) {\r\n return BI.any(obj, function (i, v) {\r\n if (BI.isEqual(v, copy)) {\r\n return true;\r\n }\r\n });\r\n }\r\n return BI.contains(obj, copy);\r\n },\r\n\r\n deepIndexOf: function (obj, target) {\r\n for (var i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n },\r\n\r\n deepRemove: function (obj, target) {\r\n var done = false;\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n obj.splice(i--, 1);\r\n done = true;\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if (BI.isEqual(target, obj[i])) {\r\n delete obj[i];\r\n done = true;\r\n }\r\n });\r\n }\r\n return done;\r\n },\r\n\r\n deepWithout: function (obj, target) {\r\n if (BI.isArray(obj)) {\r\n var result = [];\r\n for (var i = 0; i < obj.length; i++) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result.push(obj[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n var result = {};\r\n BI.each(obj, function (i, v) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result[i] = v;\r\n }\r\n });\r\n return result;\r\n\r\n },\r\n\r\n deepUnique: function (array) {\r\n var result = [];\r\n BI.each(array, function (i, item) {\r\n if (!BI.deepContains(result, item)) {\r\n result.push(item);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n // 比较两个对象得出不一样的key值\r\n deepDiff: function (object, other) {\r\n object || (object = {});\r\n other || (other = {});\r\n var result = [];\r\n var used = [];\r\n for (var b in object) {\r\n if (this.has(object, b)) {\r\n if (!this.isEqual(object[b], other[b])) {\r\n result.push(b);\r\n }\r\n used.push(b);\r\n }\r\n }\r\n for (var b in other) {\r\n if (this.has(other, b) && !BI.contains(used, b)) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n }\r\n });\r\n\r\n // 通用方法\r\n _.each([\"uniqueId\", \"result\", \"chain\", \"iteratee\", \"escape\", \"unescape\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n // 事件相关方法\r\n _.each([\"bind\", \"once\", \"partial\", \"debounce\", \"throttle\", \"delay\", \"defer\", \"wrap\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n _.extend(BI, {\r\n nextTick: (function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n if (typeof Promise !== \"undefined\") {\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(String(counter));\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function timerFunc() {\r\n counter = (counter + 1) % 2;\r\n textNode.data = String(counter);\r\n };\r\n } else if (typeof setImmediate !== \"undefined\") {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else {\r\n // Fallback to setTimeout.\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb) {\r\n var _resolve = void 0;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.apply(null, args);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve.apply(null, args);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n })()\r\n });\r\n\r\n // 数字相关方法\r\n _.each([\"random\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.extend(BI, {\r\n getTime: function () {\r\n if (_global.performance && _global.performance.now) {\r\n return _global.performance.now();\r\n }\r\n if (_global.performance && _global.performance.webkitNow) {\r\n return _global.performance.webkitNow();\r\n }\r\n if (Date.now) {\r\n return Date.now();\r\n }\r\n return BI.getDate().getTime();\r\n\r\n\r\n },\r\n\r\n parseInt: function (number) {\r\n var radix = 10;\r\n if (/^0x/g.test(number)) {\r\n radix = 16;\r\n }\r\n try {\r\n return parseInt(number, radix);\r\n } catch (e) {\r\n throw new Error(number + \"parse int error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n parseSafeInt: function (value) {\r\n var MAX_SAFE_INTEGER = 9007199254740991;\r\n return value\r\n ? this.clamp(this.parseInt(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\r\n : (value === 0 ? value : 0);\r\n },\r\n\r\n parseFloat: function (number) {\r\n try {\r\n return parseFloat(number);\r\n } catch (e) {\r\n throw new Error(number + \"parse float error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n isNaturalNumber: function (number) {\r\n if (/^\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isPositiveInteger: function (number) {\r\n if (/^\\+?[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNegativeInteger: function (number) {\r\n if (/^\\-[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isInteger: function (number) {\r\n if (/^\\-?\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNumeric: function (number) {\r\n return !isNaN(parseFloat(number)) && isFinite(number);\r\n },\r\n\r\n isFloat: function (number) {\r\n if (/^([+-]?)\\\\d*\\\\.\\\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isOdd: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 1;\r\n },\r\n\r\n isEven: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 0;\r\n },\r\n\r\n sum: function (array, iteratee, context) {\r\n var sum = 0;\r\n BI.each(array, function (i, item) {\r\n if (iteratee) {\r\n sum += Number(iteratee.apply(context, [i, item]));\r\n } else {\r\n sum += Number(item);\r\n }\r\n });\r\n return sum;\r\n },\r\n\r\n average: function (array, iteratee, context) {\r\n var sum = BI.sum(array, iteratee, context);\r\n return sum / array.length;\r\n }\r\n });\r\n\r\n // 字符串相关方法\r\n _.extend(BI, {\r\n trim: function () {\r\n return _.trim.apply(_, arguments);\r\n },\r\n\r\n toUpperCase: function (string) {\r\n return (string + \"\").toLocaleUpperCase();\r\n },\r\n\r\n toLowerCase: function (string) {\r\n return (string + \"\").toLocaleLowerCase();\r\n },\r\n\r\n isEndWithBlank: function (string) {\r\n return /(\\s|\\u00A0)$/.test(string);\r\n },\r\n\r\n isLiteral: function (exp) {\r\n var literalValueRE = /^\\s?(true|false|-?[\\d\\.]+|'[^']*'|\"[^\"]*\")\\s?$/;\r\n return literalValueRE.test(exp);\r\n },\r\n\r\n stripQuotes: function (str) {\r\n var a = str.charCodeAt(0);\r\n var b = str.charCodeAt(str.length - 1);\r\n return a === b && (a === 0x22 || a === 0x27)\r\n ? str.slice(1, -1)\r\n : str;\r\n },\r\n\r\n // background-color => backgroundColor\r\n camelize: function (str) {\r\n return str.replace(/-(.)/g, function (_, character) {\r\n return character.toUpperCase();\r\n });\r\n },\r\n\r\n // backgroundColor => background-color\r\n hyphenate: function (str) {\r\n return str.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n },\r\n\r\n isNotEmptyString: function (str) {\r\n return BI.isString(str) && !BI.isEmpty(str);\r\n },\r\n\r\n isEmptyString: function (str) {\r\n return BI.isString(str) && BI.isEmpty(str);\r\n },\r\n\r\n /**\r\n * 通用加密方法\r\n */\r\n encrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesEncrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 通用解密方法\r\n * @param type 解密方式\r\n * @param text 文本\r\n * @param key 种子\r\n * @return {*}\r\n */\r\n decrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesDecrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 对字符串中的'和\\做编码处理\r\n * @static\r\n * @param {String} string 要做编码处理的字符串\r\n * @return {String} 编码后的字符串\r\n */\r\n escape: function (string) {\r\n return string.replace(/('|\\\\)/g, \"\\\\$1\");\r\n },\r\n\r\n /**\r\n * 让字符串通过指定字符做补齐的函数\r\n *\r\n * var s = BI.leftPad('123', 5, '0');//s的值为:'00123'\r\n *\r\n * @static\r\n * @param {String} val 原始值\r\n * @param {Number} size 总共需要的位数\r\n * @param {String} ch 用于补齐的字符\r\n * @return {String} 补齐后的字符串\r\n */\r\n leftPad: function (val, size, ch) {\r\n var result = String(val);\r\n if (!ch) {\r\n ch = \" \";\r\n }\r\n while (result.length < size) {\r\n result = ch + result;\r\n }\r\n return result.toString();\r\n },\r\n\r\n /**\r\n * 对字符串做替换的函数\r\n *\r\n * var cls = 'my-class', text = 'Some text';\r\n * var res = BI.format('<div class=\"{0}\">{1}</div>', cls, text);\r\n * //res的值为:'<div class=\"my-class\">Some text</div>';\r\n *\r\n * @static\r\n * @param {String} format 要做替换的字符串,替换字符串1,替换字符串2...\r\n * @return {String} 做了替换后的字符串\r\n */\r\n format: function (format) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n return format.replace(/\\{(\\d+)\\}/g, function (m, i) {\r\n return args[i];\r\n });\r\n }\r\n });\r\n\r\n // 日期相关方法\r\n _.extend(BI, {\r\n /**\r\n * 是否是闰年\r\n * @param year\r\n * @returns {boolean}\r\n */\r\n isLeapYear: function (year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n },\r\n\r\n /**\r\n * 检测是否在有效期\r\n *\r\n * @param YY 年\r\n * @param MM 月\r\n * @param DD 日\r\n * @param minDate '1900-01-01'\r\n * @param maxDate '2099-12-31'\r\n * @returns {Array} 若无效返回无效状态\r\n */\r\n checkDateVoid: function (YY, MM, DD, minDate, maxDate) {\r\n var back = [];\r\n YY = YY | 0;\r\n MM = MM | 0;\r\n DD = DD | 0;\r\n minDate = BI.isString(minDate) ? minDate.match(/\\d+/g) : minDate;\r\n maxDate = BI.isString(maxDate) ? maxDate.match(/\\d+/g) : maxDate;\r\n if (YY < minDate[0]) {\r\n back = [\"y\"];\r\n } else if (YY > maxDate[0]) {\r\n back = [\"y\", 1];\r\n } else if (YY >= minDate[0] && YY <= maxDate[0]) {\r\n if (YY == minDate[0]) {\r\n if (MM < minDate[1]) {\r\n back = [\"m\"];\r\n } else if (MM == minDate[1]) {\r\n if (DD < minDate[2]) {\r\n back = [\"d\"];\r\n }\r\n }\r\n }\r\n if (YY == maxDate[0]) {\r\n if (MM > maxDate[1]) {\r\n back = [\"m\", 1];\r\n } else if (MM == maxDate[1]) {\r\n if (DD > maxDate[2]) {\r\n back = [\"d\", 1];\r\n }\r\n }\r\n }\r\n }\r\n return back;\r\n },\r\n\r\n checkDateLegal: function (str) {\r\n var ar = str.match(/\\d+/g);\r\n var YY = ar[0] | 0, MM = ar[1] | 0, DD = ar[2] | 0;\r\n if (ar.length <= 1) {\r\n return true;\r\n }\r\n if (ar.length <= 2) {\r\n return MM >= 1 && MM <= 12;\r\n }\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(YY) ? 29 : 28;\r\n return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];\r\n },\r\n\r\n parseDateTime: function (str, fmt) {\r\n var today = BI.getDate();\r\n var y = 0;\r\n var m = 0;\r\n var d = 1;\r\n // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。\r\n var a = str.split(/\\W+/);\r\n if (fmt.toLowerCase() == \"%y%x\" || fmt.toLowerCase() == \"%y%x%d\") {\r\n var yearlength = 4;\r\n var otherlength = 2;\r\n a[0] = str.substring(0, yearlength);\r\n a[1] = str.substring(yearlength, yearlength + otherlength);\r\n a[2] = str.substring(yearlength + otherlength, yearlength + otherlength * 2);\r\n }\r\n var b = fmt.match(/%./g);\r\n var i = 0, j = 0;\r\n var hr = 0;\r\n var min = 0;\r\n var sec = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n switch (b[i]) {\r\n case \"%d\":\r\n case \"%e\":\r\n d = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%X\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n case \"%x\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n\r\n case \"%Y\":\r\n case \"%y\":\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n break;\r\n\r\n case \"%b\":\r\n case \"%B\":\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n m = j;\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case \"%H\":\r\n case \"%I\":\r\n case \"%k\":\r\n case \"%l\":\r\n hr = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%P\":\r\n case \"%p\":\r\n if (/pm/i.test(a[i]) && hr < 12) {\r\n hr += 12;\r\n } else if (/am/i.test(a[i]) && hr >= 12) {\r\n hr -= 12;\r\n }\r\n break;\r\n\r\n case \"%M\":\r\n min = parseInt(a[i], 10);\r\n case \"%S\":\r\n sec = parseInt(a[i], 10);\r\n break;\r\n }\r\n }\r\n // if (!a[i]) {\r\n // continue;\r\n //\t}\r\n if (isNaN(y)) {\r\n y = today.getFullYear();\r\n }\r\n if (isNaN(m)) {\r\n m = today.getMonth();\r\n }\r\n if (isNaN(d)) {\r\n d = today.getDate();\r\n }\r\n if (isNaN(hr)) {\r\n hr = today.getHours();\r\n }\r\n if (isNaN(min)) {\r\n min = today.getMinutes();\r\n }\r\n if (isNaN(sec)) {\r\n sec = today.getSeconds();\r\n }\r\n if (y != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n y = 0;\r\n m = -1;\r\n d = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n if (a[i].search(/[a-zA-Z]+/) != -1) {\r\n var t = -1;\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n t = j;\r\n break;\r\n }\r\n }\r\n if (t != -1) {\r\n if (m != -1) {\r\n d = m + 1;\r\n }\r\n m = t;\r\n }\r\n } else if (parseInt(a[i], 10) <= 12 && m == -1) {\r\n m = a[i] - 1;\r\n } else if (parseInt(a[i], 10) > 31 && y == 0) {\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n } else if (d == 0) {\r\n d = a[i];\r\n }\r\n }\r\n if (y == 0) {\r\n y = today.getFullYear();\r\n }\r\n if (m != -1 && d != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n return today;\r\n },\r\n\r\n getDate: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {\r\n var localTime = dt.getTime();\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数\r\n var utc = localTime + localOffset; // utc即GMT时间标准时区\r\n return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);\r\n }\r\n return dt;\r\n\r\n },\r\n\r\n getTime: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone)) {\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;\r\n }\r\n return dt.getTime();\r\n\r\n }\r\n });\r\n})();\r\n!(function () {\r\n function extend () {\r\n var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy;\r\n for (; i < length; i++) {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null) {\r\n // Extend the base object\r\n for (name in options) {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy) {\r\n continue;\r\n }\r\n\r\n if (copy !== undefined) {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n\r\n /**\r\n * 客户端观察者,主要处理事件的添加、删除、执行等\r\n * @class BI.OB\r\n * @abstract\r\n */\r\n BI.OB = function (config) {\r\n this._constructor(config);\r\n };\r\n _.extend(BI.OB.prototype, {\r\n props: {},\r\n init: null,\r\n destroyed: null,\r\n\r\n _constructor: function (config) {\r\n this._initProps(config);\r\n this._init();\r\n this._initRef();\r\n },\r\n\r\n _defaultConfig: function (config) {\r\n return {};\r\n },\r\n\r\n _initProps: function (config) {\r\n var props = this.props;\r\n if (BI.isFunction(this.props)) {\r\n props = this.props(config);\r\n }\r\n this.options = extend(this._defaultConfig(config), props, config);\r\n },\r\n\r\n _init: function () {\r\n this._initListeners();\r\n this.init && this.init();\r\n },\r\n\r\n _initListeners: function () {\r\n var self = this;\r\n if (this.options.listeners != null) {\r\n _.each(this.options.listeners, function (lis) {\r\n (lis.target ? lis.target : self)[lis.once ? \"once\" : \"on\"]\r\n (lis.eventName, _.bind(lis.action, self));\r\n });\r\n delete this.options.listeners;\r\n }\r\n },\r\n\r\n // 获得一个当前对象的引用\r\n _initRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(this, this);\r\n }\r\n },\r\n\r\n //释放当前对象\r\n _purgeRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(null);\r\n this.options.ref = null;\r\n }\r\n },\r\n\r\n _getEvents: function () {\r\n if (!_.isArray(this.events)) {\r\n this.events = [];\r\n }\r\n return this.events;\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n on: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (!_.isArray(fns)) {\r\n fns = [];\r\n this._getEvents()[eventName] = fns;\r\n }\r\n fns.push(fn);\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个只执行一次的事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n once: function (eventName, fn) {\r\n var proxy = function () {\r\n fn.apply(this, arguments);\r\n this.un(eventName, proxy);\r\n };\r\n this.on(eventName, proxy);\r\n },\r\n /**\r\n * 解除观察者绑定的指定事件\r\n * @param {String} eventName 要解除绑定事件的名字\r\n * @param {Function} fn 事件对应的执行函数,该参数是可选的,没有该参数时,将解除绑定所有同名字的事件\r\n */\r\n un: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n\r\n /* alex:如果fn是null,就是把eventName上面所有方法都un掉*/\r\n if (fn == null) {\r\n delete this._getEvents()[eventName];\r\n } else {\r\n var fns = this._getEvents()[eventName];\r\n if (_.isArray(fns)) {\r\n var newFns = [];\r\n _.each(fns, function (ifn) {\r\n if (ifn != fn) {\r\n newFns.push(ifn);\r\n }\r\n });\r\n this._getEvents()[eventName] = newFns;\r\n }\r\n }\r\n },\r\n /**\r\n * 清除观察者的所有事件绑定\r\n */\r\n purgeListeners: function () {\r\n /* alex:清空events*/\r\n this.events = [];\r\n },\r\n /**\r\n * 触发绑定过的事件\r\n *\r\n * @param {String} eventName 要触发的事件的名字\r\n * @returns {Boolean} 如果事件函数返回false,则返回false并中断其他同名事件的执行,否则执行所有的同名事件并返回true\r\n */\r\n fireEvent: function () {\r\n var eventName = arguments[0].toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (BI.isArray(fns)) {\r\n if (BI.isArguments(arguments[1])) {\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, arguments[1]) === false) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, args) === false) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n destroy: function () {\r\n this.destroyed && this.destroyed();\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n})();/**\r\n * Widget超类\r\n * @class BI.Widget\r\n * @extends BI.OB\r\n *\r\n * @cfg {JSON} options 配置属性\r\n */\r\n\r\n!(function () {\r\n BI.Widget = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), {\r\n root: false,\r\n tagName: \"div\",\r\n attributes: null,\r\n data: null,\r\n\r\n tag: null,\r\n disabled: false,\r\n invisible: false,\r\n invalid: false,\r\n baseCls: \"\",\r\n extraCls: \"\",\r\n cls: \"\",\r\n css: null\r\n });\r\n },\r\n\r\n // 覆盖父类的_constructor方法,widget不走ob的生命周期\r\n _constructor: function () {\r\n },\r\n\r\n beforeInit: null,\r\n\r\n // 生命周期函数\r\n beforeCreate: null,\r\n\r\n created: null,\r\n\r\n render: null,\r\n\r\n beforeMount: null,\r\n\r\n mounted: null,\r\n\r\n shouldUpdate: null,\r\n\r\n update: function () {\r\n },\r\n\r\n beforeDestroy: null,\r\n\r\n destroyed: null,\r\n\r\n _init: function () {\r\n BI.Widget.superclass._init.apply(this, arguments);\r\n this._initRoot();\r\n this._initElementWidth();\r\n this._initElementHeight();\r\n this._initVisual();\r\n this._initState();\r\n this._initRender();\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(this._render, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n _render: function () {\r\n this.__asking = false;\r\n this.beforeCreate && this.beforeCreate();\r\n this._initElement();\r\n this._initEffects();\r\n this.created && this.created();\r\n },\r\n\r\n /**\r\n * 初始化根节点\r\n * @private\r\n */\r\n _initRoot: function () {\r\n var o = this.options;\r\n this.widgetName = o.widgetName || BI.uniqueId(\"widget\");\r\n this._isRoot = o.root;\r\n if (BI.isWidget(o.element)) {\r\n if (o.element instanceof BI.Widget) {\r\n this._parent = o.element;\r\n this._parent.addWidget(this.widgetName, this);\r\n } else {\r\n this._isRoot = true;\r\n }\r\n this.element = this.options.element.element;\r\n } else if (o.element) {\r\n // if (o.root !== true) {\r\n // throw new Error(\"root is a required property\");\r\n // }\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n this._isRoot = true;\r\n } else {\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n }\r\n this.element._isWidget = true;\r\n if (o._baseCls || o.baseCls || o.extraCls || o.cls) {\r\n this.element.addClass((o._baseCls || \"\") + \" \" + (o.baseCls || \"\") + \" \" + (o.extraCls || \"\") + \" \" + (o.cls || \"\"));\r\n }\r\n if (o.attributes) {\r\n this.element.attr(o.attributes);\r\n }\r\n if (o.data) {\r\n this.element.data(o.data);\r\n }\r\n if (o.css) {\r\n this.element.css(o.css);\r\n }\r\n this._children = {};\r\n },\r\n\r\n _initElementWidth: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.width)) {\r\n this.element.css(\"width\", o.width);\r\n }\r\n },\r\n\r\n _initElementHeight: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.height)) {\r\n this.element.css(\"height\", o.height);\r\n }\r\n },\r\n\r\n _initVisual: function () {\r\n var o = this.options;\r\n if (o.invisible) {\r\n // 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性\r\n this.element.css(\"display\", \"none\");\r\n }\r\n },\r\n\r\n _initEffects: function () {\r\n var o = this.options;\r\n if (o.disabled || o.invalid) {\r\n if (this.options.disabled) {\r\n this.setEnable(false);\r\n }\r\n if (this.options.invalid) {\r\n this.setValid(false);\r\n }\r\n }\r\n },\r\n\r\n _initState: function () {\r\n this._isMounted = false;\r\n },\r\n\r\n _initElement: function () {\r\n var self = this;\r\n var els = this.render && this.render();\r\n if (BI.isPlainObject(els)) {\r\n els = [els];\r\n }\r\n if (BI.isArray(els)) {\r\n BI.each(els, function (i, el) {\r\n BI.createWidget(el, {\r\n element: self\r\n });\r\n });\r\n }\r\n // if (this._isRoot === true || !(this instanceof BI.Layout)) {\r\n this._mount();\r\n // }\r\n },\r\n\r\n _setParent: function (parent) {\r\n this._parent = parent;\r\n },\r\n\r\n /**\r\n *\r\n * @param force 是否强制挂载子节点\r\n * @param deep 子节点是否也是按照当前force处理\r\n * @param lifeHook 生命周期钩子触不触发,默认触发\r\n * @param predicate 递归每个widget的回调\r\n * @returns {boolean}\r\n * @private\r\n */\r\n _mount: function (force, deep, lifeHook, predicate) {\r\n var self = this;\r\n if (!force && (this._isMounted || !this.isVisible() || this.__asking === true || !(this._isRoot === true || (this._parent && this._parent._isMounted === true)))) {\r\n return false;\r\n }\r\n lifeHook !== false && this.beforeMount && this.beforeMount();\r\n this._isMounted = true;\r\n this._mountChildren && this._mountChildren();\r\n BI.each(this._children, function (i, widget) {\r\n !self.isEnabled() && widget._setEnable(false);\r\n !self.isValid() && widget._setValid(false);\r\n widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate);\r\n });\r\n lifeHook !== false && this.mounted && this.mounted();\r\n this.fireEvent(BI.Events.MOUNT);\r\n predicate && predicate(this);\r\n return true;\r\n },\r\n\r\n _mountChildren: null,\r\n\r\n isMounted: function () {\r\n return this._isMounted;\r\n },\r\n\r\n setWidth: function (w) {\r\n this.options.width = w;\r\n this._initElementWidth();\r\n },\r\n\r\n setHeight: function (h) {\r\n this.options.height = h;\r\n this._initElementHeight();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n if (enable === true) {\r\n this.options.disabled = false;\r\n } else if (enable === false) {\r\n this.options.disabled = true;\r\n }\r\n // 递归将所有子组件使能\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetEnable && child._setEnable && child._setEnable(enable);\r\n });\r\n },\r\n\r\n _setValid: function (valid) {\r\n if (valid === true) {\r\n this.options.invalid = false;\r\n } else if (valid === false) {\r\n this.options.invalid = true;\r\n }\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetValid && child._setValid && child._setValid(valid);\r\n });\r\n },\r\n\r\n _setVisible: function (visible) {\r\n if (visible === true) {\r\n this.options.invisible = false;\r\n } else if (visible === false) {\r\n this.options.invisible = true;\r\n }\r\n },\r\n\r\n setEnable: function (enable) {\r\n this._manualSetEnable = true;\r\n this._setEnable(enable);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setVisible: function (visible) {\r\n this._setVisible(visible);\r\n if (visible === true) {\r\n // 用this.element.show()会把display属性改成block\r\n this.element.css(\"display\", \"\");\r\n this._mount();\r\n } else if (visible === false) {\r\n this.element.css(\"display\", \"none\");\r\n }\r\n this.fireEvent(BI.Events.VIEW, visible);\r\n },\r\n\r\n setValid: function (valid) {\r\n this._manualSetValid = true;\r\n this._setValid(valid);\r\n if (valid === true) {\r\n this.element.removeClass(\"base-invalid invalid\");\r\n } else if (valid === false) {\r\n this.element.addClass(\"base-invalid invalid\");\r\n }\r\n },\r\n\r\n doBehavior: function () {\r\n var args = arguments;\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n child.doBehavior && child.doBehavior.apply(child, args);\r\n });\r\n },\r\n\r\n getWidth: function () {\r\n return this.options.width;\r\n },\r\n\r\n getHeight: function () {\r\n return this.options.height;\r\n },\r\n\r\n isValid: function () {\r\n return !this.options.invalid;\r\n },\r\n\r\n addWidget: function (name, widget) {\r\n var self = this;\r\n if (name instanceof BI.Widget) {\r\n widget = name;\r\n name = widget.getName();\r\n }\r\n if (BI.isKey(name)) {\r\n name = name + \"\";\r\n }\r\n name = name || widget.getName() || BI.uniqueId(\"widget\");\r\n if (this._children[name]) {\r\n throw new Error(\"name has already been existed\");\r\n }\r\n widget._setParent && widget._setParent(this);\r\n widget.on(BI.Events.DESTROY, function () {\r\n BI.remove(self._children, this);\r\n });\r\n return (this._children[name] = widget);\r\n },\r\n\r\n getWidgetByName: function (name) {\r\n if (!BI.isKey(name) || name === this.getName()) {\r\n return this;\r\n }\r\n name = name + \"\";\r\n var widget = void 0, other = {};\r\n BI.any(this._children, function (i, wi) {\r\n if (i === name) {\r\n widget = wi;\r\n return true;\r\n }\r\n other[i] = wi;\r\n });\r\n if (!widget) {\r\n BI.any(other, function (i, wi) {\r\n return (widget = wi.getWidgetByName(i));\r\n });\r\n }\r\n return widget;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var self = this;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.remove(this._children, nameOrWidget);\r\n } else {\r\n delete this._children[nameOrWidget];\r\n }\r\n },\r\n\r\n hasWidget: function (name) {\r\n return this._children[name] != null;\r\n },\r\n\r\n getName: function () {\r\n return this.widgetName;\r\n },\r\n\r\n setTag: function (tag) {\r\n this.options.tag = tag;\r\n },\r\n\r\n getTag: function () {\r\n return this.options.tag;\r\n },\r\n\r\n attr: function (key, value) {\r\n var self = this;\r\n if (BI.isPlainObject(key)) {\r\n BI.each(key, function (k, v) {\r\n self.attr(k, v);\r\n });\r\n return;\r\n }\r\n if (BI.isNotNull(value)) {\r\n return this.options[key] = value;\r\n }\r\n return this.options[key];\r\n },\r\n\r\n css: function (name, value) {\r\n return this.element.css(name, value);\r\n },\r\n\r\n getText: function () {\r\n\r\n },\r\n\r\n setText: function (text) {\r\n\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n setValue: function (value) {\r\n\r\n },\r\n\r\n isEnabled: function () {\r\n return !this.options.disabled;\r\n },\r\n\r\n isVisible: function () {\r\n return !this.options.invisible;\r\n },\r\n\r\n disable: function () {\r\n this.setEnable(false);\r\n },\r\n\r\n enable: function () {\r\n this.setEnable(true);\r\n },\r\n\r\n valid: function () {\r\n this.setValid(true);\r\n },\r\n\r\n invalid: function () {\r\n this.setValid(false);\r\n },\r\n\r\n invisible: function () {\r\n this.setVisible(false);\r\n },\r\n\r\n visible: function () {\r\n this.setVisible(true);\r\n },\r\n\r\n __d: function () {\r\n this.beforeDestroy && this.beforeDestroy();\r\n this.beforeDestroy = null;\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this._parent = null;\r\n this._isMounted = false;\r\n this.destroyed && this.destroyed();\r\n this.destroyed = null;\r\n },\r\n\r\n _unMount: function () {\r\n this.__d();\r\n this.fireEvent(BI.Events.UNMOUNT);\r\n this.purgeListeners();\r\n },\r\n\r\n isolate: function () {\r\n if (this._parent) {\r\n this._parent.removeWidget(this);\r\n }\r\n BI.DOM.hang([this]);\r\n },\r\n\r\n empty: function () {\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this.element.empty();\r\n },\r\n\r\n _destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.purgeListeners();\r\n },\r\n\r\n destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.fireEvent(BI.Events.DESTROY);\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n BI.Widget.registerRenderEngine = function (engine) {\r\n BI.Widget._renderEngine = engine;\r\n };\r\n BI.Widget.registerRenderEngine({\r\n createElement: function (widget) {\r\n if (BI.isWidget(widget)) {\r\n var o = widget.options;\r\n if (o.element) {\r\n return BI.$(o.element);\r\n }\r\n return BI.$(document.createElement(o.tagName));\r\n }\r\n return BI.$(widget);\r\n },\r\n createFragment: function () {\r\n return document.createDocumentFragment();\r\n }\r\n });\r\n\r\n BI.mount = function (widget, container, predicate, hydrate) {\r\n if (hydrate === true) {\r\n // 将widget的element元素都挂载好,并建立相互关系\r\n widget.element.data(\"__widgets\", [widget]);\r\n var res = widget._mount(true, false, false, function (w) {\r\n BI.each(w._children, function (i, child) {\r\n var ws = child.element.data(\"__widgets\");\r\n if (!ws) {\r\n ws = [];\r\n }\r\n ws.push(child);\r\n child.element.data(\"__widgets\", ws);\r\n });\r\n predicate && predicate.apply(this, arguments);\r\n });\r\n // 将新的dom树属性(事件等)patch到已存在的dom上\r\n var c = BI.Widget._renderEngine.createElement;\r\n BI.DOM.patchProps(widget.element, c(c(container).children()[0]));\r\n\r\n var triggerLifeHook = function (w) {\r\n w.beforeMount && w.beforeMount();\r\n w.mounted && w.mounted();\r\n BI.each(w._children, function (i, child) {\r\n triggerLifeHook(child);\r\n });\r\n };\r\n // 最后触发组件树生命周期函数\r\n triggerLifeHook(widget);\r\n return res;\r\n }\r\n if (container) {\r\n BI.Widget._renderEngine.createElement(container).append(widget.element);\r\n }\r\n return widget._mount(true, false, false, predicate);\r\n };\r\n})();(function () {\r\n var kv = {};\r\n BI.shortcut = BI.component = function (xtype, cls) {\r\n if (kv[xtype] != null) {\r\n _global.console && console.error(\"shortcut:[\" + xtype + \"] has been registed\");\r\n }\r\n kv[xtype] = cls;\r\n };\r\n\r\n // 根据配置属性生成widget\r\n var createWidget = function (config) {\r\n var cls = kv[config.type];\r\n\r\n var widget = new cls();\r\n\r\n widget._initProps(config);\r\n widget._init();\r\n widget._initRef();\r\n\r\n return widget;\r\n };\r\n\r\n BI.createWidget = function (item, options, context) {\r\n // 先把准备环境准备好\r\n BI.init();\r\n var el, w;\r\n item || (item = {});\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n if (BI.isEmpty(item) && BI.isEmpty(options)) {\r\n return BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n if (BI.isWidget(item)) {\r\n return item;\r\n }\r\n if (item.type || options.type) {\r\n el = BI.extend({}, options, item);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (item.el && (item.el.type || options.type)) {\r\n el = BI.extend({}, options, item.el);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (BI.isWidget(item.el)) {\r\n return item.el;\r\n }\r\n throw new Error(\"无法根据item创建组件\");\r\n };\r\n\r\n BI.createElement = function () {\r\n var widget = BI.createWidget.apply(this, arguments);\r\n return widget.element;\r\n };\r\n\r\n})();!(function () {\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * CryptoJS core components.\r\n */\r\n BI.CRYPT_TYPE = BI.CRYPT_TYPE || {};\r\n BI.CRYPT_TYPE.AES = \"aes\";\r\n\r\n var CryptoJS = CryptoJS || (function (Math, undefined) {\r\n /**\r\n * CryptoJS namespace.\r\n */\r\n var C = {};\r\n\r\n /**\r\n * Library namespace.\r\n */\r\n var C_lib = C.lib = {};\r\n\r\n /**\r\n * Base object for prototypal inheritance.\r\n */\r\n var Base = C_lib.Base = (function () {\r\n function F () {\r\n }\r\n\r\n return {\r\n /**\r\n * Creates a new object that inherits from this object.\r\n *\r\n * @param {Object} overrides Properties to copy into the new object.\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * field: 'value',\r\n *\r\n * method: function () {\r\n * }\r\n * });\r\n */\r\n extend: function (overrides) {\r\n // Spawn\r\n F.prototype = this;\r\n var subtype = new F();\r\n\r\n // Augment\r\n if (overrides) {\r\n subtype.mixIn(overrides);\r\n }\r\n\r\n // Create default initializer\r\n if (!subtype.hasOwnProperty('init')) {\r\n subtype.init = function () {\r\n subtype.$super.init.apply(this, arguments);\r\n };\r\n }\r\n\r\n // Initializer's prototype is the subtype object\r\n subtype.init.prototype = subtype;\r\n\r\n // Reference supertype\r\n subtype.$super = this;\r\n\r\n return subtype;\r\n },\r\n\r\n /**\r\n * Extends this object and runs the init method.\r\n * Arguments to create() will be passed to init().\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var instance = MyType.create();\r\n */\r\n create: function () {\r\n var instance = this.extend();\r\n instance.init.apply(instance, arguments);\r\n\r\n return instance;\r\n },\r\n\r\n /**\r\n * Initializes a newly created object.\r\n * Override this method to add some logic when your objects are created.\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * init: function () {\r\n * // ...\r\n * }\r\n * });\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n * Copies properties into this object.\r\n *\r\n * @param {Object} properties The properties to mix in.\r\n *\r\n * @example\r\n *\r\n * MyType.mixIn({\r\n * field: 'value'\r\n * });\r\n */\r\n mixIn: function (properties) {\r\n for (var propertyName in properties) {\r\n if (properties.hasOwnProperty(propertyName)) {\r\n this[propertyName] = properties[propertyName];\r\n }\r\n }\r\n\r\n // IE won't copy toString using the loop above\r\n if (properties.hasOwnProperty('toString')) {\r\n this.toString = properties.toString;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = instance.clone();\r\n */\r\n clone: function () {\r\n return this.init.prototype.extend(this);\r\n }\r\n };\r\n }());\r\n\r\n /**\r\n * An array of 32-bit words.\r\n *\r\n * @property {Array} words The array of 32-bit words.\r\n * @property {number} sigBytes The number of significant bytes in this word array.\r\n */\r\n var WordArray = C_lib.WordArray = Base.extend({\r\n /**\r\n * Initializes a newly created word array.\r\n *\r\n * @param {Array} words (Optional) An array of 32-bit words.\r\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.create();\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\r\n */\r\n init: function (words, sigBytes) {\r\n words = this.words = words || [];\r\n\r\n if (sigBytes != undefined) {\r\n this.sigBytes = sigBytes;\r\n } else {\r\n this.sigBytes = words.length * 4;\r\n }\r\n },\r\n\r\n /**\r\n * Converts this word array to a string.\r\n *\r\n * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\r\n *\r\n * @return {string} The stringified word array.\r\n *\r\n * @example\r\n *\r\n * var string = wordArray + '';\r\n * var string = wordArray.toString();\r\n * var string = wordArray.toString(CryptoJS.enc.Utf8);\r\n */\r\n toString: function (encoder) {\r\n return (encoder || Hex).stringify(this);\r\n },\r\n\r\n /**\r\n * Concatenates a word array to this word array.\r\n *\r\n * @param {WordArray} wordArray The word array to append.\r\n *\r\n * @return {WordArray} This word array.\r\n *\r\n * @example\r\n *\r\n * wordArray1.concat(wordArray2);\r\n */\r\n concat: function (wordArray) {\r\n // Shortcuts\r\n var thisWords = this.words;\r\n var thatWords = wordArray.words;\r\n var thisSigBytes = this.sigBytes;\r\n var thatSigBytes = wordArray.sigBytes;\r\n\r\n // Clamp excess bits\r\n this.clamp();\r\n\r\n // Concat\r\n if (thisSigBytes % 4) {\r\n // Copy one byte at a time\r\n for (var i = 0; i < thatSigBytes; i++) {\r\n var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\r\n }\r\n } else if (thatWords.length > 0xffff) {\r\n // Copy one word at a time\r\n for (var i = 0; i < thatSigBytes; i += 4) {\r\n thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\r\n }\r\n } else {\r\n // Copy all words at once\r\n thisWords.push.apply(thisWords, thatWords);\r\n }\r\n this.sigBytes += thatSigBytes;\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes insignificant bits.\r\n *\r\n * @example\r\n *\r\n * wordArray.clamp();\r\n */\r\n clamp: function () {\r\n // Shortcuts\r\n var words = this.words;\r\n var sigBytes = this.sigBytes;\r\n\r\n // Clamp\r\n words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\r\n words.length = Math.ceil(sigBytes / 4);\r\n },\r\n\r\n /**\r\n * Creates a copy of this word array.\r\n *\r\n * @return {WordArray} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = wordArray.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone.words = this.words.slice(0);\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Creates a word array filled with random bytes.\r\n *\r\n * @param {number} nBytes The number of random bytes to generate.\r\n *\r\n * @return {WordArray} The random word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.random(16);\r\n */\r\n random: function (nBytes) {\r\n var words = [];\r\n for (var i = 0; i < nBytes; i += 4) {\r\n words.push((Math.random() * 0x100000000) | 0);\r\n }\r\n\r\n return new WordArray.init(words, nBytes);\r\n }\r\n });\r\n\r\n /**\r\n * Encoder namespace.\r\n */\r\n var C_enc = C.enc = {};\r\n\r\n /**\r\n * Hex encoding strategy.\r\n */\r\n var Hex = C_enc.Hex = {\r\n /**\r\n * Converts a word array to a hex string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The hex string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var hexChars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n hexChars.push((bite >>> 4).toString(16));\r\n hexChars.push((bite & 0x0f).toString(16));\r\n }\r\n\r\n return hexChars.join('');\r\n },\r\n\r\n /**\r\n * Converts a hex string to a word array.\r\n *\r\n * @param {string} hexStr The hex string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Hex.parse(hexString);\r\n */\r\n parse: function (hexStr) {\r\n // Shortcut\r\n var hexStrLength = hexStr.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < hexStrLength; i += 2) {\r\n words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\r\n }\r\n\r\n return new WordArray.init(words, hexStrLength / 2);\r\n }\r\n };\r\n\r\n /**\r\n * Latin1 encoding strategy.\r\n */\r\n var Latin1 = C_enc.Latin1 = {\r\n /**\r\n * Converts a word array to a Latin1 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Latin1 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var latin1Chars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n latin1Chars.push(String.fromCharCode(bite));\r\n }\r\n\r\n return latin1Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Latin1 string to a word array.\r\n *\r\n * @param {string} latin1Str The Latin1 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\r\n */\r\n parse: function (latin1Str) {\r\n // Shortcut\r\n var latin1StrLength = latin1Str.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < latin1StrLength; i++) {\r\n words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\r\n }\r\n\r\n return new WordArray.init(words, latin1StrLength);\r\n }\r\n };\r\n\r\n /**\r\n * UTF-8 encoding strategy.\r\n */\r\n var Utf8 = C_enc.Utf8 = {\r\n /**\r\n * Converts a word array to a UTF-8 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The UTF-8 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n try {\r\n return decodeURIComponent(escape(Latin1.stringify(wordArray)));\r\n } catch (e) {\r\n throw new Error('Malformed UTF-8 data');\r\n }\r\n },\r\n\r\n /**\r\n * Converts a UTF-8 string to a word array.\r\n *\r\n * @param {string} utf8Str The UTF-8 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\r\n */\r\n parse: function (utf8Str) {\r\n return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\r\n }\r\n };\r\n\r\n /**\r\n * Abstract buffered block algorithm template.\r\n *\r\n * The property blockSize must be implemented in a concrete subtype.\r\n *\r\n * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\r\n */\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\r\n /**\r\n * Resets this block algorithm's data buffer to its initial state.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm.reset();\r\n */\r\n reset: function () {\r\n // Initial values\r\n this._data = new WordArray.init();\r\n this._nDataBytes = 0;\r\n },\r\n\r\n /**\r\n * Adds new data to this block algorithm's buffer.\r\n *\r\n * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm._append('data');\r\n * bufferedBlockAlgorithm._append(wordArray);\r\n */\r\n _append: function (data) {\r\n // Convert string to WordArray, else assume WordArray already\r\n if (typeof data == 'string') {\r\n data = Utf8.parse(data);\r\n }\r\n\r\n // Append\r\n this._data.concat(data);\r\n this._nDataBytes += data.sigBytes;\r\n },\r\n\r\n /**\r\n * Processes available data blocks.\r\n *\r\n * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\r\n *\r\n * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\r\n *\r\n * @return {WordArray} The processed data.\r\n *\r\n * @example\r\n *\r\n * var processedData = bufferedBlockAlgorithm._process();\r\n * var processedData = bufferedBlockAlgorithm._process(!!'flush');\r\n */\r\n _process: function (doFlush) {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n var dataSigBytes = data.sigBytes;\r\n var blockSize = this.blockSize;\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count blocks ready\r\n var nBlocksReady = dataSigBytes / blockSizeBytes;\r\n if (doFlush) {\r\n // Round up to include partial blocks\r\n nBlocksReady = Math.ceil(nBlocksReady);\r\n } else {\r\n // Round down to include only full blocks,\r\n // less the number of blocks that must remain in the buffer\r\n nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\r\n }\r\n\r\n // Count words ready\r\n var nWordsReady = nBlocksReady * blockSize;\r\n\r\n // Count bytes ready\r\n var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\r\n\r\n // Process blocks\r\n if (nWordsReady) {\r\n for (var offset = 0; offset < nWordsReady; offset += blockSize) {\r\n // Perform concrete-algorithm logic\r\n this._doProcessBlock(dataWords, offset);\r\n }\r\n\r\n // Remove processed words\r\n var processedWords = dataWords.splice(0, nWordsReady);\r\n data.sigBytes -= nBytesReady;\r\n }\r\n\r\n // Return processed words\r\n return new WordArray.init(processedWords, nBytesReady);\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = bufferedBlockAlgorithm.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone._data = this._data.clone();\r\n\r\n return clone;\r\n },\r\n\r\n _minBufferSize: 0\r\n });\r\n\r\n /**\r\n * Abstract hasher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\r\n */\r\n var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Initializes a newly created hasher.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\r\n *\r\n * @example\r\n *\r\n * var hasher = CryptoJS.algo.SHA256.create();\r\n */\r\n init: function (cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this hasher to its initial state.\r\n *\r\n * @example\r\n *\r\n * hasher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-hasher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Updates this hasher with a message.\r\n *\r\n * @param {WordArray|string} messageUpdate The message to append.\r\n *\r\n * @return {Hasher} This hasher.\r\n *\r\n * @example\r\n *\r\n * hasher.update('message');\r\n * hasher.update(wordArray);\r\n */\r\n update: function (messageUpdate) {\r\n // Append\r\n this._append(messageUpdate);\r\n\r\n // Update the hash\r\n this._process();\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Finalizes the hash computation.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @example\r\n *\r\n * var hash = hasher.finalize();\r\n * var hash = hasher.finalize('message');\r\n * var hash = hasher.finalize(wordArray);\r\n */\r\n finalize: function (messageUpdate) {\r\n // Final message update\r\n if (messageUpdate) {\r\n this._append(messageUpdate);\r\n }\r\n\r\n // Perform concrete-hasher logic\r\n var hash = this._doFinalize();\r\n\r\n return hash;\r\n },\r\n\r\n blockSize: 512 / 32,\r\n\r\n /**\r\n * Creates a shortcut function to a hasher's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to create a helper for.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHelper: function (hasher) {\r\n return function (message, cfg) {\r\n return new hasher.init(cfg).finalize(message);\r\n };\r\n },\r\n\r\n /**\r\n * Creates a shortcut function to the HMAC's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to use in this HMAC helper.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHmacHelper: function (hasher) {\r\n return function (message, key) {\r\n return new C_algo.HMAC.init(hasher, key).finalize(message);\r\n };\r\n }\r\n });\r\n\r\n /**\r\n * Algorithm namespace.\r\n */\r\n var C_algo = C.algo = {};\r\n\r\n return C;\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var C_enc = C.enc;\r\n\r\n /**\r\n * Base64 encoding strategy.\r\n */\r\n var Base64 = C_enc.Base64 = {\r\n /**\r\n * Converts a word array to a Base64 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Base64 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n var map = this._map;\r\n\r\n // Clamp excess bits\r\n wordArray.clamp();\r\n\r\n // Convert\r\n var base64Chars = [];\r\n for (var i = 0; i < sigBytes; i += 3) {\r\n var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\r\n var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\r\n\r\n var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\r\n\r\n for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\r\n base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\r\n }\r\n }\r\n\r\n // Add padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n while (base64Chars.length % 4) {\r\n base64Chars.push(paddingChar);\r\n }\r\n }\r\n\r\n return base64Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Base64 string to a word array.\r\n *\r\n * @param {string} base64Str The Base64 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\r\n */\r\n parse: function (base64Str) {\r\n // Shortcuts\r\n var base64StrLength = base64Str.length;\r\n var map = this._map;\r\n\r\n // Ignore padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n var paddingIndex = base64Str.indexOf(paddingChar);\r\n if (paddingIndex != -1) {\r\n base64StrLength = paddingIndex;\r\n }\r\n }\r\n\r\n // Convert\r\n var words = [];\r\n var nBytes = 0;\r\n for (var i = 0; i < base64StrLength; i++) {\r\n if (i % 4) {\r\n var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\r\n var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\r\n words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\r\n nBytes++;\r\n }\r\n }\r\n\r\n return WordArray.create(words, nBytes);\r\n },\r\n\r\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\r\n };\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function (Math) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var Hasher = C_lib.Hasher;\r\n var C_algo = C.algo;\r\n\r\n // Constants table\r\n var T = [];\r\n\r\n // Compute constants\r\n (function () {\r\n for (var i = 0; i < 64; i++) {\r\n T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\r\n }\r\n }());\r\n\r\n /**\r\n * MD5 hash algorithm.\r\n */\r\n var MD5 = C_algo.MD5 = Hasher.extend({\r\n _doReset: function () {\r\n this._hash = new WordArray.init([\r\n 0x67452301, 0xefcdab89,\r\n 0x98badcfe, 0x10325476\r\n ]);\r\n },\r\n\r\n _doProcessBlock: function (M, offset) {\r\n // Swap endian\r\n for (var i = 0; i < 16; i++) {\r\n // Shortcuts\r\n var offset_i = offset + i;\r\n var M_offset_i = M[offset_i];\r\n\r\n M[offset_i] = (\r\n (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\r\n (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\r\n );\r\n }\r\n\r\n // Shortcuts\r\n var H = this._hash.words;\r\n\r\n var M_offset_0 = M[offset + 0];\r\n var M_offset_1 = M[offset + 1];\r\n var M_offset_2 = M[offset + 2];\r\n var M_offset_3 = M[offset + 3];\r\n var M_offset_4 = M[offset + 4];\r\n var M_offset_5 = M[offset + 5];\r\n var M_offset_6 = M[offset + 6];\r\n var M_offset_7 = M[offset + 7];\r\n var M_offset_8 = M[offset + 8];\r\n var M_offset_9 = M[offset + 9];\r\n var M_offset_10 = M[offset + 10];\r\n var M_offset_11 = M[offset + 11];\r\n var M_offset_12 = M[offset + 12];\r\n var M_offset_13 = M[offset + 13];\r\n var M_offset_14 = M[offset + 14];\r\n var M_offset_15 = M[offset + 15];\r\n\r\n // Working varialbes\r\n var a = H[0];\r\n var b = H[1];\r\n var c = H[2];\r\n var d = H[3];\r\n\r\n // Computation\r\n a = FF(a, b, c, d, M_offset_0, 7, T[0]);\r\n d = FF(d, a, b, c, M_offset_1, 12, T[1]);\r\n c = FF(c, d, a, b, M_offset_2, 17, T[2]);\r\n b = FF(b, c, d, a, M_offset_3, 22, T[3]);\r\n a = FF(a, b, c, d, M_offset_4, 7, T[4]);\r\n d = FF(d, a, b, c, M_offset_5, 12, T[5]);\r\n c = FF(c, d, a, b, M_offset_6, 17, T[6]);\r\n b = FF(b, c, d, a, M_offset_7, 22, T[7]);\r\n a = FF(a, b, c, d, M_offset_8, 7, T[8]);\r\n d = FF(d, a, b, c, M_offset_9, 12, T[9]);\r\n c = FF(c, d, a, b, M_offset_10, 17, T[10]);\r\n b = FF(b, c, d, a, M_offset_11, 22, T[11]);\r\n a = FF(a, b, c, d, M_offset_12, 7, T[12]);\r\n d = FF(d, a, b, c, M_offset_13, 12, T[13]);\r\n c = FF(c, d, a, b, M_offset_14, 17, T[14]);\r\n b = FF(b, c, d, a, M_offset_15, 22, T[15]);\r\n\r\n a = GG(a, b, c, d, M_offset_1, 5, T[16]);\r\n d = GG(d, a, b, c, M_offset_6, 9, T[17]);\r\n c = GG(c, d, a, b, M_offset_11, 14, T[18]);\r\n b = GG(b, c, d, a, M_offset_0, 20, T[19]);\r\n a = GG(a, b, c, d, M_offset_5, 5, T[20]);\r\n d = GG(d, a, b, c, M_offset_10, 9, T[21]);\r\n c = GG(c, d, a, b, M_offset_15, 14, T[22]);\r\n b = GG(b, c, d, a, M_offset_4, 20, T[23]);\r\n a = GG(a, b, c, d, M_offset_9, 5, T[24]);\r\n d = GG(d, a, b, c, M_offset_14, 9, T[25]);\r\n c = GG(c, d, a, b, M_offset_3, 14, T[26]);\r\n b = GG(b, c, d, a, M_offset_8, 20, T[27]);\r\n a = GG(a, b, c, d, M_offset_13, 5, T[28]);\r\n d = GG(d, a, b, c, M_offset_2, 9, T[29]);\r\n c = GG(c, d, a, b, M_offset_7, 14, T[30]);\r\n b = GG(b, c, d, a, M_offset_12, 20, T[31]);\r\n\r\n a = HH(a, b, c, d, M_offset_5, 4, T[32]);\r\n d = HH(d, a, b, c, M_offset_8, 11, T[33]);\r\n c = HH(c, d, a, b, M_offset_11, 16, T[34]);\r\n b = HH(b, c, d, a, M_offset_14, 23, T[35]);\r\n a = HH(a, b, c, d, M_offset_1, 4, T[36]);\r\n d = HH(d, a, b, c, M_offset_4, 11, T[37]);\r\n c = HH(c, d, a, b, M_offset_7, 16, T[38]);\r\n b = HH(b, c, d, a, M_offset_10, 23, T[39]);\r\n a = HH(a, b, c, d, M_offset_13, 4, T[40]);\r\n d = HH(d, a, b, c, M_offset_0, 11, T[41]);\r\n c = HH(c, d, a, b, M_offset_3, 16, T[42]);\r\n b = HH(b, c, d, a, M_offset_6, 23, T[43]);\r\n a = HH(a, b, c, d, M_offset_9, 4, T[44]);\r\n d = HH(d, a, b, c, M_offset_12, 11, T[45]);\r\n c = HH(c, d, a, b, M_offset_15, 16, T[46]);\r\n b = HH(b, c, d, a, M_offset_2, 23, T[47]);\r\n\r\n a = II(a, b, c, d, M_offset_0, 6, T[48]);\r\n d = II(d, a, b, c, M_offset_7, 10, T[49]);\r\n c = II(c, d, a, b, M_offset_14, 15, T[50]);\r\n b = II(b, c, d, a, M_offset_5, 21, T[51]);\r\n a = II(a, b, c, d, M_offset_12, 6, T[52]);\r\n d = II(d, a, b, c, M_offset_3, 10, T[53]);\r\n c = II(c, d, a, b, M_offset_10, 15, T[54]);\r\n b = II(b, c, d, a, M_offset_1, 21, T[55]);\r\n a = II(a, b, c, d, M_offset_8, 6, T[56]);\r\n d = II(d, a, b, c, M_offset_15, 10, T[57]);\r\n c = II(c, d, a, b, M_offset_6, 15, T[58]);\r\n b = II(b, c, d, a, M_offset_13, 21, T[59]);\r\n a = II(a, b, c, d, M_offset_4, 6, T[60]);\r\n d = II(d, a, b, c, M_offset_11, 10, T[61]);\r\n c = II(c, d, a, b, M_offset_2, 15, T[62]);\r\n b = II(b, c, d, a, M_offset_9, 21, T[63]);\r\n\r\n // Intermediate hash value\r\n H[0] = (H[0] + a) | 0;\r\n H[1] = (H[1] + b) | 0;\r\n H[2] = (H[2] + c) | 0;\r\n H[3] = (H[3] + d) | 0;\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n\r\n var nBitsTotal = this._nDataBytes * 8;\r\n var nBitsLeft = data.sigBytes * 8;\r\n\r\n // Add padding\r\n dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\r\n\r\n var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\r\n var nBitsTotalL = nBitsTotal;\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\r\n (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\r\n );\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\r\n (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\r\n );\r\n\r\n data.sigBytes = (dataWords.length + 1) * 4;\r\n\r\n // Hash final blocks\r\n this._process();\r\n\r\n // Shortcuts\r\n var hash = this._hash;\r\n var H = hash.words;\r\n\r\n // Swap endian\r\n for (var i = 0; i < 4; i++) {\r\n // Shortcut\r\n var H_i = H[i];\r\n\r\n H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\r\n (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\r\n }\r\n\r\n // Return final computed hash\r\n return hash;\r\n },\r\n\r\n clone: function () {\r\n var clone = Hasher.clone.call(this);\r\n clone._hash = this._hash.clone();\r\n\r\n return clone;\r\n }\r\n });\r\n\r\n function FF (a, b, c, d, x, s, t) {\r\n var n = a + ((b & c) | (~b & d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function GG (a, b, c, d, x, s, t) {\r\n var n = a + ((b & d) | (c & ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function HH (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function II (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n /**\r\n * Shortcut function to the hasher's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hash = CryptoJS.MD5('message');\r\n * var hash = CryptoJS.MD5(wordArray);\r\n */\r\n C.MD5 = Hasher._createHelper(MD5);\r\n\r\n /**\r\n * Shortcut function to the HMAC's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n * @param {WordArray|string} key The secret key.\r\n *\r\n * @return {WordArray} The HMAC.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hmac = CryptoJS.HmacMD5(message, key);\r\n */\r\n C.HmacMD5 = Hasher._createHmacHelper(MD5);\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var C_algo = C.algo;\r\n var MD5 = C_algo.MD5;\r\n\r\n /**\r\n * This key derivation function is meant to conform with EVP_BytesToKey.\r\n * www.openssl.org/docs/crypto/EVP_BytesToKey.html\r\n */\r\n var EvpKDF = C_algo.EvpKDF = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\r\n * @property {Hasher} hasher The hash algorithm to use. Default: MD5\r\n * @property {number} iterations The number of iterations to perform. Default: 1\r\n */\r\n cfg: Base.extend({\r\n keySize: 128 / 32,\r\n hasher: MD5,\r\n iterations: 1\r\n }),\r\n\r\n /**\r\n * Initializes a newly created key derivation function.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for the derivation.\r\n *\r\n * @example\r\n *\r\n * var kdf = CryptoJS.algo.EvpKDF.create();\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\r\n */\r\n init: function (cfg) {\r\n this.cfg = this.cfg.extend(cfg);\r\n },\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @example\r\n *\r\n * var key = kdf.compute(password, salt);\r\n */\r\n compute: function (password, salt) {\r\n // Shortcut\r\n var cfg = this.cfg;\r\n\r\n // Init hasher\r\n var hasher = cfg.hasher.create();\r\n\r\n // Initial values\r\n var derivedKey = WordArray.create();\r\n\r\n // Shortcuts\r\n var derivedKeyWords = derivedKey.words;\r\n var keySize = cfg.keySize;\r\n var iterations = cfg.iterations;\r\n\r\n // Generate key\r\n while (derivedKeyWords.length < keySize) {\r\n if (block) {\r\n hasher.update(block);\r\n }\r\n var block = hasher.update(password).finalize(salt);\r\n hasher.reset();\r\n\r\n // Iterations\r\n for (var i = 1; i < iterations; i++) {\r\n block = hasher.finalize(block);\r\n hasher.reset();\r\n }\r\n\r\n derivedKey.concat(block);\r\n }\r\n derivedKey.sigBytes = keySize * 4;\r\n\r\n return derivedKey;\r\n }\r\n });\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n * @param {Object} cfg (Optional) The configuration options to use for this computation.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var key = CryptoJS.EvpKDF(password, salt);\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\r\n */\r\n C.EvpKDF = function (password, salt, cfg) {\r\n return EvpKDF.create(cfg).compute(password, salt);\r\n };\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Cipher core components.\r\n */\r\n CryptoJS.lib.Cipher || (function (undefined) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\r\n var C_enc = C.enc;\r\n var Utf8 = C_enc.Utf8;\r\n var Base64 = C_enc.Base64;\r\n var C_algo = C.algo;\r\n var EvpKDF = C_algo.EvpKDF;\r\n\r\n /**\r\n * Abstract base cipher template.\r\n *\r\n * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\r\n * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\r\n * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\r\n * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\r\n */\r\n var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {WordArray} iv The IV to use for this operation.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Creates this cipher in encryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createEncryptor: function (key, cfg) {\r\n return this.create(this._ENC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Creates this cipher in decryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createDecryptor: function (key, cfg) {\r\n return this.create(this._DEC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Initializes a newly created cipher.\r\n *\r\n * @param {number} xformMode Either the encryption or decryption transormation mode constant.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\r\n */\r\n init: function (xformMode, key, cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Store transform mode and key\r\n this._xformMode = xformMode;\r\n this._key = key;\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this cipher to its initial state.\r\n *\r\n * @example\r\n *\r\n * cipher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-cipher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Adds data to be encrypted or decrypted.\r\n *\r\n * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.process('data');\r\n * var encrypted = cipher.process(wordArray);\r\n */\r\n process: function (dataUpdate) {\r\n // Append\r\n this._append(dataUpdate);\r\n\r\n // Process available blocks\r\n return this._process();\r\n },\r\n\r\n /**\r\n * Finalizes the encryption or decryption process.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after final processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.finalize();\r\n * var encrypted = cipher.finalize('data');\r\n * var encrypted = cipher.finalize(wordArray);\r\n */\r\n finalize: function (dataUpdate) {\r\n // Final data update\r\n if (dataUpdate) {\r\n this._append(dataUpdate);\r\n }\r\n\r\n // Perform concrete-cipher logic\r\n var finalProcessedData = this._doFinalize();\r\n\r\n return finalProcessedData;\r\n },\r\n\r\n keySize: 128 / 32,\r\n\r\n ivSize: 128 / 32,\r\n\r\n _ENC_XFORM_MODE: 1,\r\n\r\n _DEC_XFORM_MODE: 2,\r\n\r\n /**\r\n * Creates shortcut functions to a cipher's object interface.\r\n *\r\n * @param {Cipher} cipher The cipher to create a helper for.\r\n *\r\n * @return {Object} An object with encrypt and decrypt shortcut functions.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\r\n */\r\n _createHelper: (function () {\r\n function selectCipherStrategy (key) {\r\n if (typeof key == 'string') {\r\n return PasswordBasedCipher;\r\n } else {\r\n return SerializableCipher;\r\n }\r\n }\r\n\r\n return function (cipher) {\r\n return {\r\n encrypt: function (message, key, cfg) {\r\n return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\r\n },\r\n\r\n decrypt: function (ciphertext, key, cfg) {\r\n return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\r\n }\r\n };\r\n };\r\n }())\r\n });\r\n\r\n /**\r\n * Abstract base stream cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\r\n */\r\n var StreamCipher = C_lib.StreamCipher = Cipher.extend({\r\n _doFinalize: function () {\r\n // Process partial blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 1\r\n });\r\n\r\n /**\r\n * Mode namespace.\r\n */\r\n var C_mode = C.mode = {};\r\n\r\n /**\r\n * Abstract base block cipher mode template.\r\n */\r\n var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\r\n /**\r\n * Creates this mode for encryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\r\n */\r\n createEncryptor: function (cipher, iv) {\r\n return this.Encryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Creates this mode for decryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\r\n */\r\n createDecryptor: function (cipher, iv) {\r\n return this.Decryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Initializes a newly created mode.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\r\n */\r\n init: function (cipher, iv) {\r\n this._cipher = cipher;\r\n this._iv = iv;\r\n }\r\n });\r\n\r\n /**\r\n * Cipher Block Chaining mode.\r\n */\r\n var CBC = C_mode.CBC = (function () {\r\n /**\r\n * Abstract base CBC mode.\r\n */\r\n var CBC = BlockCipherMode.extend();\r\n\r\n /**\r\n * CBC encryptor.\r\n */\r\n CBC.Encryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // XOR and encrypt\r\n xorBlock.call(this, words, offset, blockSize);\r\n cipher.encryptBlock(words, offset);\r\n\r\n // Remember this block to use with next block\r\n this._prevBlock = words.slice(offset, offset + blockSize);\r\n }\r\n });\r\n\r\n /**\r\n * CBC decryptor.\r\n */\r\n CBC.Decryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // Remember this block to use with next block\r\n var thisBlock = words.slice(offset, offset + blockSize);\r\n\r\n // Decrypt and XOR\r\n cipher.decryptBlock(words, offset);\r\n xorBlock.call(this, words, offset, blockSize);\r\n\r\n // This block becomes the previous block\r\n this._prevBlock = thisBlock;\r\n }\r\n });\r\n\r\n function xorBlock (words, offset, blockSize) {\r\n // Shortcut\r\n var iv = this._iv;\r\n\r\n // Choose mixing block\r\n if (iv) {\r\n var block = iv;\r\n\r\n // Remove IV for subsequent blocks\r\n this._iv = undefined;\r\n } else {\r\n var block = this._prevBlock;\r\n }\r\n\r\n // XOR blocks\r\n for (var i = 0; i < blockSize; i++) {\r\n words[offset + i] ^= block[i];\r\n }\r\n }\r\n\r\n return CBC;\r\n }());\r\n\r\n /**\r\n * Padding namespace.\r\n */\r\n var C_pad = C.pad = {};\r\n\r\n /**\r\n * PKCS #5/7 padding strategy.\r\n */\r\n var Pkcs7 = C_pad.Pkcs7 = {\r\n /**\r\n * Pads data using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to pad.\r\n * @param {number} blockSize The multiple that the data should be padded to.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\r\n */\r\n pad: function (data, blockSize) {\r\n // Shortcut\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count padding bytes\r\n var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\r\n\r\n // Create padding word\r\n var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\r\n\r\n // Create padding\r\n var paddingWords = [];\r\n for (var i = 0; i < nPaddingBytes; i += 4) {\r\n paddingWords.push(paddingWord);\r\n }\r\n var padding = WordArray.create(paddingWords, nPaddingBytes);\r\n\r\n // Add padding\r\n data.concat(padding);\r\n },\r\n\r\n /**\r\n * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to unpad.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.unpad(wordArray);\r\n */\r\n unpad: function (data) {\r\n // Get number of padding bytes from last byte\r\n var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\r\n\r\n // Remove padding\r\n data.sigBytes -= nPaddingBytes;\r\n }\r\n };\r\n\r\n /**\r\n * Abstract base block cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\r\n */\r\n var BlockCipher = C_lib.BlockCipher = Cipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Mode} mode The block mode to use. Default: CBC\r\n * @property {Padding} padding The padding strategy to use. Default: Pkcs7\r\n */\r\n cfg: Cipher.cfg.extend({\r\n mode: CBC,\r\n padding: Pkcs7\r\n }),\r\n\r\n reset: function () {\r\n // Reset cipher\r\n Cipher.reset.call(this);\r\n\r\n // Shortcuts\r\n var cfg = this.cfg;\r\n var iv = cfg.iv;\r\n var mode = cfg.mode;\r\n\r\n // Reset block mode\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n var modeCreator = mode.createEncryptor;\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n var modeCreator = mode.createDecryptor;\r\n\r\n // Keep at least one block in the buffer for unpadding\r\n this._minBufferSize = 1;\r\n }\r\n this._mode = modeCreator.call(mode, this, iv && iv.words);\r\n },\r\n\r\n _doProcessBlock: function (words, offset) {\r\n this._mode.processBlock(words, offset);\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcut\r\n var padding = this.cfg.padding;\r\n\r\n // Finalize\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n // Pad data\r\n padding.pad(this._data, this.blockSize);\r\n\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n // Unpad data\r\n padding.unpad(finalProcessedBlocks);\r\n }\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 128 / 32\r\n });\r\n\r\n /**\r\n * A collection of cipher parameters.\r\n *\r\n * @property {WordArray} ciphertext The raw ciphertext.\r\n * @property {WordArray} key The key to this ciphertext.\r\n * @property {WordArray} iv The IV used in the ciphering operation.\r\n * @property {WordArray} salt The salt used with a key derivation function.\r\n * @property {Cipher} algorithm The cipher algorithm.\r\n * @property {Mode} mode The block mode used in the ciphering operation.\r\n * @property {Padding} padding The padding scheme used in the ciphering operation.\r\n * @property {number} blockSize The block size of the cipher.\r\n * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\r\n */\r\n var CipherParams = C_lib.CipherParams = Base.extend({\r\n /**\r\n * Initializes a newly created cipher params object.\r\n *\r\n * @param {Object} cipherParams An object with any of the possible cipher parameters.\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.lib.CipherParams.create({\r\n * ciphertext: ciphertextWordArray,\r\n * key: keyWordArray,\r\n * iv: ivWordArray,\r\n * salt: saltWordArray,\r\n * algorithm: CryptoJS.algo.AES,\r\n * mode: CryptoJS.mode.CBC,\r\n * padding: CryptoJS.pad.PKCS7,\r\n * blockSize: 4,\r\n * formatter: CryptoJS.format.OpenSSL\r\n * });\r\n */\r\n init: function (cipherParams) {\r\n this.mixIn(cipherParams);\r\n },\r\n\r\n /**\r\n * Converts this cipher params object to a string.\r\n *\r\n * @param {Format} formatter (Optional) The formatting strategy to use.\r\n *\r\n * @return {string} The stringified cipher params.\r\n *\r\n * @throws Error If neither the formatter nor the default formatter is set.\r\n *\r\n * @example\r\n *\r\n * var string = cipherParams + '';\r\n * var string = cipherParams.toString();\r\n * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\r\n */\r\n toString: function (formatter) {\r\n return (formatter || this.formatter).stringify(this);\r\n }\r\n });\r\n\r\n /**\r\n * Format namespace.\r\n */\r\n var C_format = C.format = {};\r\n\r\n /**\r\n * OpenSSL formatting strategy.\r\n */\r\n var OpenSSLFormatter = C_format.OpenSSL = {\r\n /**\r\n * Converts a cipher params object to an OpenSSL-compatible string.\r\n *\r\n * @param {CipherParams} cipherParams The cipher params object.\r\n *\r\n * @return {string} The OpenSSL-compatible string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\r\n */\r\n stringify: function (cipherParams) {\r\n // Shortcuts\r\n var ciphertext = cipherParams.ciphertext;\r\n var salt = cipherParams.salt;\r\n\r\n // Format\r\n if (salt) {\r\n var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\r\n } else {\r\n var wordArray = ciphertext;\r\n }\r\n\r\n return wordArray.toString(Base64);\r\n },\r\n\r\n /**\r\n * Converts an OpenSSL-compatible string to a cipher params object.\r\n *\r\n * @param {string} openSSLStr The OpenSSL-compatible string.\r\n *\r\n * @return {CipherParams} The cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\r\n */\r\n parse: function (openSSLStr) {\r\n // Parse base64\r\n var ciphertext = Base64.parse(openSSLStr);\r\n\r\n // Shortcut\r\n var ciphertextWords = ciphertext.words;\r\n\r\n // Test for salt\r\n if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\r\n // Extract salt\r\n var salt = WordArray.create(ciphertextWords.slice(2, 4));\r\n\r\n // Remove salt from ciphertext\r\n ciphertextWords.splice(0, 4);\r\n ciphertext.sigBytes -= 16;\r\n }\r\n\r\n return CipherParams.create({ciphertext: ciphertext, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A cipher wrapper that returns ciphertext as a serializable cipher params object.\r\n */\r\n var SerializableCipher = C_lib.SerializableCipher = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\r\n */\r\n cfg: Base.extend({\r\n format: OpenSSLFormatter\r\n }),\r\n\r\n /**\r\n * Encrypts a message.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Encrypt\r\n var encryptor = cipher.createEncryptor(key, cfg);\r\n var ciphertext = encryptor.finalize(message);\r\n\r\n // Shortcut\r\n var cipherCfg = encryptor.cfg;\r\n\r\n // Create and return serializable cipher params\r\n return CipherParams.create({\r\n ciphertext: ciphertext,\r\n key: key,\r\n iv: cipherCfg.iv,\r\n algorithm: cipher,\r\n mode: cipherCfg.mode,\r\n padding: cipherCfg.padding,\r\n blockSize: cipher.blockSize,\r\n formatter: cfg.format\r\n });\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Decrypt\r\n var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\r\n\r\n return plaintext;\r\n },\r\n\r\n /**\r\n * Converts serialized ciphertext to CipherParams,\r\n * else assumed CipherParams already and returns ciphertext unchanged.\r\n *\r\n * @param {CipherParams|string} ciphertext The ciphertext.\r\n * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\r\n *\r\n * @return {CipherParams} The unserialized ciphertext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\r\n */\r\n _parse: function (ciphertext, format) {\r\n if (typeof ciphertext == 'string') {\r\n return format.parse(ciphertext, this);\r\n } else {\r\n return ciphertext;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Key derivation function namespace.\r\n */\r\n var C_kdf = C.kdf = {};\r\n\r\n /**\r\n * OpenSSL key derivation function.\r\n */\r\n var OpenSSLKdf = C_kdf.OpenSSL = {\r\n /**\r\n * Derives a key and IV from a password.\r\n *\r\n * @param {string} password The password to derive from.\r\n * @param {number} keySize The size in words of the key to generate.\r\n * @param {number} ivSize The size in words of the IV to generate.\r\n * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\r\n *\r\n * @return {CipherParams} A cipher params object with the key, IV, and salt.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\r\n */\r\n execute: function (password, keySize, ivSize, salt) {\r\n // Generate random salt\r\n if (!salt) {\r\n salt = WordArray.random(64 / 8);\r\n }\r\n\r\n // Derive key and IV\r\n var key = EvpKDF.create({keySize: keySize + ivSize}).compute(password, salt);\r\n\r\n // Separate key and IV\r\n var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\r\n key.sigBytes = keySize * 4;\r\n\r\n // Return params\r\n return CipherParams.create({key: key, iv: iv, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A serializable cipher wrapper that derives the key from a password,\r\n * and returns ciphertext as a serializable cipher params object.\r\n */\r\n var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\r\n */\r\n cfg: SerializableCipher.cfg.extend({\r\n kdf: OpenSSLKdf\r\n }),\r\n\r\n /**\r\n * Encrypts a message using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Encrypt\r\n var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\r\n\r\n // Mix in derived params\r\n ciphertext.mixIn(derivedParams);\r\n\r\n return ciphertext;\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Decrypt\r\n var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\r\n\r\n return plaintext;\r\n }\r\n });\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Electronic Codebook block mode.\r\n */\r\n CryptoJS.mode.ECB = (function () {\r\n var ECB = CryptoJS.lib.BlockCipherMode.extend();\r\n\r\n ECB.Encryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.encryptBlock(words, offset);\r\n }\r\n });\r\n\r\n ECB.Decryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.decryptBlock(words, offset);\r\n }\r\n });\r\n\r\n return ECB;\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var BlockCipher = C_lib.BlockCipher;\r\n var C_algo = C.algo;\r\n\r\n // Lookup tables\r\n var SBOX = [];\r\n var INV_SBOX = [];\r\n var SUB_MIX_0 = [];\r\n var SUB_MIX_1 = [];\r\n var SUB_MIX_2 = [];\r\n var SUB_MIX_3 = [];\r\n var INV_SUB_MIX_0 = [];\r\n var INV_SUB_MIX_1 = [];\r\n var INV_SUB_MIX_2 = [];\r\n var INV_SUB_MIX_3 = [];\r\n\r\n // Compute lookup tables\r\n (function () {\r\n // Compute double table\r\n var d = [];\r\n for (var i = 0; i < 256; i++) {\r\n if (i < 128) {\r\n d[i] = i << 1;\r\n } else {\r\n d[i] = (i << 1) ^ 0x11b;\r\n }\r\n }\r\n\r\n // Walk GF(2^8)\r\n var x = 0;\r\n var xi = 0;\r\n for (var i = 0; i < 256; i++) {\r\n // Compute sbox\r\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\r\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\r\n SBOX[x] = sx;\r\n INV_SBOX[sx] = x;\r\n\r\n // Compute multiplication\r\n var x2 = d[x];\r\n var x4 = d[x2];\r\n var x8 = d[x4];\r\n\r\n // Compute sub bytes, mix columns tables\r\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\r\n SUB_MIX_0[x] = (t << 24) | (t >>> 8);\r\n SUB_MIX_1[x] = (t << 16) | (t >>> 16);\r\n SUB_MIX_2[x] = (t << 8) | (t >>> 24);\r\n SUB_MIX_3[x] = t;\r\n\r\n // Compute inv sub bytes, inv mix columns tables\r\n var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\r\n INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\r\n INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\r\n INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\r\n INV_SUB_MIX_3[sx] = t;\r\n\r\n // Compute next counter\r\n if (!x) {\r\n x = xi = 1;\r\n } else {\r\n x = x2 ^ d[d[d[x8 ^ x2]]];\r\n xi ^= d[d[xi]];\r\n }\r\n }\r\n }());\r\n\r\n // Precomputed Rcon lookup\r\n var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\r\n\r\n /**\r\n * AES block cipher algorithm.\r\n */\r\n var AES = C_algo.AES = BlockCipher.extend({\r\n _doReset: function () {\r\n // Shortcuts\r\n var key = this._key;\r\n var keyWords = key.words;\r\n var keySize = key.sigBytes / 4;\r\n\r\n // Compute number of rounds\r\n var nRounds = this._nRounds = keySize + 6;\r\n\r\n // Compute number of key schedule rows\r\n var ksRows = (nRounds + 1) * 4;\r\n\r\n // Compute key schedule\r\n var keySchedule = this._keySchedule = [];\r\n for (var ksRow = 0; ksRow < ksRows; ksRow++) {\r\n if (ksRow < keySize) {\r\n keySchedule[ksRow] = keyWords[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 1];\r\n\r\n if (!(ksRow % keySize)) {\r\n // Rot word\r\n t = (t << 8) | (t >>> 24);\r\n\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n\r\n // Mix Rcon\r\n t ^= RCON[(ksRow / keySize) | 0] << 24;\r\n } else if (keySize > 6 && ksRow % keySize == 4) {\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n }\r\n\r\n keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\r\n }\r\n }\r\n\r\n // Compute inv key schedule\r\n var invKeySchedule = this._invKeySchedule = [];\r\n for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\r\n var ksRow = ksRows - invKsRow;\r\n\r\n if (invKsRow % 4) {\r\n var t = keySchedule[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 4];\r\n }\r\n\r\n if (invKsRow < 4 || ksRow <= 4) {\r\n invKeySchedule[invKsRow] = t;\r\n } else {\r\n invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\r\n INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\r\n }\r\n }\r\n },\r\n\r\n encryptBlock: function (M, offset) {\r\n this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\r\n },\r\n\r\n decryptBlock: function (M, offset) {\r\n // Swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n\r\n this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\r\n\r\n // Inv swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n },\r\n\r\n _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\r\n // Shortcut\r\n var nRounds = this._nRounds;\r\n\r\n // Get input, add round key\r\n var s0 = M[offset] ^ keySchedule[0];\r\n var s1 = M[offset + 1] ^ keySchedule[1];\r\n var s2 = M[offset + 2] ^ keySchedule[2];\r\n var s3 = M[offset + 3] ^ keySchedule[3];\r\n\r\n // Key schedule row counter\r\n var ksRow = 4;\r\n\r\n // Rounds\r\n for (var round = 1; round < nRounds; round++) {\r\n // Shift rows, sub bytes, mix columns, add round key\r\n var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\r\n var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\r\n var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\r\n var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\r\n\r\n // Update state\r\n s0 = t0;\r\n s1 = t1;\r\n s2 = t2;\r\n s3 = t3;\r\n }\r\n\r\n // Shift rows, sub bytes, add round key\r\n var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\r\n var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\r\n var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\r\n var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\r\n\r\n // Set output\r\n M[offset] = t0;\r\n M[offset + 1] = t1;\r\n M[offset + 2] = t2;\r\n M[offset + 3] = t3;\r\n },\r\n\r\n keySize: 256 / 32\r\n });\r\n\r\n /**\r\n * Shortcut functions to the cipher's object interface.\r\n *\r\n * @example\r\n *\r\n * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\r\n * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\r\n */\r\n C.AES = BlockCipher._createHelper(AES);\r\n }());\r\n\r\n\r\n _.extend(BI, {\r\n /**\r\n * aes加密方法\r\n * aes-128-ecb\r\n *\r\n * @example\r\n *\r\n * var ciphertext = BI.aesEncrypt(text, key);\r\n */\r\n aesEncrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var cipher = CryptoJS.AES.encrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n var base64Cipher = cipher.ciphertext.toString(CryptoJS.enc.Base64);\r\n return base64Cipher;\r\n },\r\n\r\n /**\r\n * aes解密方法\r\n * @param {String} text \r\n * @param {String} key \r\n */\r\n aesDecrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var decipher = CryptoJS.AES.decrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n return CryptoJS.enc.Utf8.stringify(decipher);\r\n }\r\n });\r\n}());!(function () {\r\n function aspect (type) {\r\n return function (target, methodName, advice) {\r\n var exist = target[methodName],\r\n dispatcher;\r\n\r\n if (!exist || exist.target != target) {\r\n dispatcher = target[methodName] = function () {\r\n // before methods\r\n var beforeArr = dispatcher.before;\r\n var args = arguments, next;\r\n for (var l = beforeArr.length; l--;) {\r\n next = beforeArr[l].advice.apply(this, args);\r\n if (next === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n // target method\r\n var rs = dispatcher.method.apply(this, args);\r\n // after methods\r\n var afterArr = dispatcher.after;\r\n for (var i = 0, ii = afterArr.length; i < ii; i++) {\r\n next = afterArr[i].advice.call(this, rs, args);\r\n if (rs === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n return rs;\r\n };\r\n\r\n dispatcher.before = [];\r\n dispatcher.after = [];\r\n\r\n if (exist) {\r\n dispatcher.method = exist;\r\n }\r\n dispatcher.target = target;\r\n }\r\n\r\n var aspectArr = (dispatcher || exist)[type];\r\n var obj = {\r\n advice: advice,\r\n _index: aspectArr.length,\r\n remove: function () {\r\n aspectArr.splice(this._index, 1);\r\n }\r\n };\r\n aspectArr.push(obj);\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n BI.aspect = {\r\n before: aspect(\"before\"),\r\n after: aspect(\"after\")\r\n };\r\n\r\n return BI.aspect;\r\n\r\n})();\r\n!(function () {\r\n\r\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n\r\n\r\n // private method for UTF-8 encoding\r\n var _utf8_encode = function (string) {\r\n string = string.replace(/\\r\\n/g, \"\\n\");\r\n var utftext = \"\";\r\n\r\n for (var n = 0; n < string.length; n++) {\r\n\r\n var c = string.charCodeAt(n);\r\n\r\n if (c < 128) {\r\n utftext += String.fromCharCode(c);\r\n } else if ((c > 127) && (c < 2048)) {\r\n utftext += String.fromCharCode((c >> 6) | 192);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n } else {\r\n utftext += String.fromCharCode((c >> 12) | 224);\r\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n }\r\n\r\n }\r\n\r\n return utftext;\r\n };\r\n\r\n // private method for UTF-8 decoding\r\n var _utf8_decode = function (utftext) {\r\n var string = \"\";\r\n var i = 0;\r\n var c = 0, c3 = 0, c2 = 0;\r\n\r\n while (i < utftext.length) {\r\n\r\n c = utftext.charCodeAt(i);\r\n\r\n if (c < 128) {\r\n string += String.fromCharCode(c);\r\n i++;\r\n } else if ((c > 191) && (c < 224)) {\r\n c2 = utftext.charCodeAt(i + 1);\r\n string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\r\n i += 2;\r\n } else {\r\n c2 = utftext.charCodeAt(i + 1);\r\n c3 = utftext.charCodeAt(i + 2);\r\n string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n i += 3;\r\n }\r\n\r\n }\r\n return string;\r\n };\r\n\r\n _.extend(BI, {\r\n\r\n encode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = _utf8_encode(input);\r\n\r\n while (i < input.length) {\r\n\r\n chr1 = input.charCodeAt(i++);\r\n chr2 = input.charCodeAt(i++);\r\n chr3 = input.charCodeAt(i++);\r\n\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n } else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n\r\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\r\n\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // public method for decoding\r\n decode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3;\r\n var enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\r\n\r\n while (i < input.length) {\r\n\r\n enc1 = _keyStr.indexOf(input.charAt(i++));\r\n enc2 = _keyStr.indexOf(input.charAt(i++));\r\n enc3 = _keyStr.indexOf(input.charAt(i++));\r\n enc4 = _keyStr.indexOf(input.charAt(i++));\r\n\r\n chr1 = (enc1 << 2) | (enc2 >> 4);\r\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\r\n chr3 = ((enc3 & 3) << 6) | enc4;\r\n\r\n output = output + String.fromCharCode(chr1);\r\n\r\n if (enc3 != 64) {\r\n output = output + String.fromCharCode(chr2);\r\n }\r\n if (enc4 != 64) {\r\n output = output + String.fromCharCode(chr3);\r\n }\r\n\r\n }\r\n\r\n output = _utf8_decode(output);\r\n\r\n return output;\r\n\r\n }\r\n });\r\n})();\r\nBI.Cache = {\r\n _prefix: \"bi\",\r\n setUsername: function (username) {\r\n localStorage.setItem(BI.Cache._prefix + \".username\", (username + \"\" || \"\").toUpperCase());\r\n },\r\n getUsername: function () {\r\n return localStorage.getItem(BI.Cache._prefix + \".username\") || \"\";\r\n },\r\n _getKeyPrefix: function () {\r\n return BI.Cache.getUsername() + \".\" + BI.Cache._prefix + \".\";\r\n },\r\n _generateKey: function (key) {\r\n return BI.Cache._getKeyPrefix() + (key || \"\");\r\n },\r\n getItem: function (key) {\r\n return localStorage.getItem(BI.Cache._generateKey(key));\r\n },\r\n setItem: function (key, value) {\r\n localStorage.setItem(BI.Cache._generateKey(key), value);\r\n },\r\n removeItem: function (key) {\r\n localStorage.removeItem(BI.Cache._generateKey(key));\r\n },\r\n clear: function () {\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n if (key.indexOf(BI.Cache._getKeyPrefix()) === 0) {\r\n localStorage.removeItem(key);\r\n }\r\n }\r\n }\r\n },\r\n keys: function () {\r\n var result = [];\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n var prefix = BI.Cache._getKeyPrefix();\r\n if (key.indexOf(prefix) === 0) {\r\n result[result.length] = key.substring(prefix.length);\r\n }\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n addCookie: function (name, value, path, expiresHours) {\r\n var cookieString = name + \"=\" + escape(value);\r\n // 判断是否设置过期时间\r\n if (expiresHours && expiresHours > 0) {\r\n var date = new Date();\r\n // expires是标准GMT格式时间,应该使用时间戳作为起始时间\r\n date.setTime(date.getTime() + expiresHours * 3600 * 1000);\r\n cookieString = cookieString + \"; expires=\" + date.toUTCString();\r\n }\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n },\r\n getCookie: function (name) {\r\n var arr, reg = new RegExp(\"(^| )\" + name + \"=([^;]*)(;|$)\");\r\n if (arr = document.cookie.match(reg)) {return unescape(arr[2]);}\r\n return null;\r\n },\r\n deleteCookie: function (name, path) {\r\n var date = new Date();\r\n date.setTime(date.getTime() - 10000);\r\n var cookieString = name + \"=v; expires=\" + date.toUTCString();\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n }\r\n};BI.CellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize) {\r\n this._cellSizeGetter = cellSizeGetter;\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n this._cellSizeAndPositionData = {};\r\n this._lastMeasuredIndex = -1;\r\n};\r\n\r\nBI.CellSizeAndPositionManager.prototype = {\r\n constructor: BI.CellSizeAndPositionManager,\r\n configure: function (cellCount, estimatedCellSize) {\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellCount;\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._estimatedCellSize;\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._lastMeasuredIndex;\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n if (index < 0 || index >= this._cellCount) {\r\n return;\r\n }\r\n if (index > this._lastMeasuredIndex) {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\r\n\r\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\r\n var size = this._cellSizeGetter(i);\r\n\r\n if (size == null || isNaN(size)) {\r\n continue;\r\n }\r\n\r\n this._cellSizeAndPositionData[i] = {\r\n offset: offset,\r\n size: size\r\n };\r\n\r\n offset += size;\r\n }\r\n\r\n this._lastMeasuredIndex = index;\r\n }\r\n return this._cellSizeAndPositionData[index];\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._lastMeasuredIndex >= 0\r\n ? this._cellSizeAndPositionData[this._lastMeasuredIndex]\r\n : {\r\n offset: 0,\r\n size: 0\r\n };\r\n },\r\n\r\n getTotalSize: function () {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n var datum = this.getSizeAndPositionOfCell(targetIndex);\r\n var maxOffset = datum.offset;\r\n var minOffset = maxOffset - containerSize + datum.size;\r\n\r\n var idealOffset;\r\n\r\n switch (align) {\r\n case \"start\":\r\n idealOffset = maxOffset;\r\n break;\r\n case \"end\":\r\n idealOffset = minOffset;\r\n break;\r\n case \"center\":\r\n idealOffset = maxOffset - ((containerSize - datum.size) / 2);\r\n break;\r\n default:\r\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\r\n break;\r\n }\r\n\r\n var totalSize = this.getTotalSize();\r\n\r\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n var totalSize = this.getTotalSize();\r\n\r\n if (totalSize === 0) {\r\n return {};\r\n }\r\n\r\n var maxOffset = offset + containerSize;\r\n var start = this._findNearestCell(offset);\r\n\r\n var datum = this.getSizeAndPositionOfCell(start);\r\n offset = datum.offset + datum.size;\r\n\r\n var stop = start;\r\n\r\n while (offset < maxOffset && stop < this._cellCount - 1) {\r\n stop++;\r\n offset += this.getSizeAndPositionOfCell(stop).size;\r\n }\r\n\r\n return {\r\n start: start,\r\n stop: stop\r\n };\r\n },\r\n\r\n resetCell: function (index) {\r\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\r\n },\r\n\r\n _binarySearch: function (high, low, offset) {\r\n var middle;\r\n var currentOffset;\r\n\r\n while (low <= high) {\r\n middle = low + Math.floor((high - low) / 2);\r\n currentOffset = this.getSizeAndPositionOfCell(middle).offset;\r\n\r\n if (currentOffset === offset) {\r\n return middle;\r\n } else if (currentOffset < offset) {\r\n low = middle + 1;\r\n } else if (currentOffset > offset) {\r\n high = middle - 1;\r\n }\r\n }\r\n\r\n if (low > 0) {\r\n return low - 1;\r\n }\r\n },\r\n\r\n _exponentialSearch: function (index, offset) {\r\n var interval = 1;\r\n\r\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\r\n index += interval;\r\n interval *= 2;\r\n }\r\n\r\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\r\n },\r\n\r\n _findNearestCell: function (offset) {\r\n if (isNaN(offset)) {\r\n return;\r\n }\r\n\r\n offset = Math.max(0, offset);\r\n\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\r\n\r\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\r\n return this._binarySearch(lastMeasuredIndex, 0, offset);\r\n }\r\n return this._exponentialSearch(lastMeasuredIndex, offset);\r\n \r\n }\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize, maxScrollSize) {\r\n this._cellSizeAndPositionManager = new BI.CellSizeAndPositionManager(cellCount, cellSizeGetter, estimatedCellSize);\r\n this._maxScrollSize = maxScrollSize || 10000000;\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager.prototype = {\r\n constructor: BI.ScalingCellSizeAndPositionManager,\r\n\r\n configure: function () {\r\n this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager, arguments);\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellSizeAndPositionManager.getCellCount();\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\r\n },\r\n\r\n getOffsetAdjustment: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\r\n },\r\n\r\n getTotalSize: function () {\r\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n currentOffset = this._safeOffsetToOffset(containerSize, currentOffset);\r\n\r\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align, containerSize, currentOffset, targetIndex);\r\n\r\n return this._offsetToSafeOffset(containerSize, offset);\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n offset = this._safeOffsetToOffset(containerSize, offset);\r\n\r\n return this._cellSizeAndPositionManager.getVisibleCellRange(containerSize, offset);\r\n },\r\n\r\n resetCell: function (index) {\r\n this._cellSizeAndPositionManager.resetCell(index);\r\n },\r\n\r\n _getOffsetPercentage: function (containerSize, offset, totalSize) {\r\n return totalSize <= containerSize\r\n ? 0\r\n : offset / (totalSize - containerSize);\r\n },\r\n\r\n _offsetToSafeOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, totalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\r\n \r\n },\r\n\r\n _safeOffsetToOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (totalSize - containerSize));\r\n \r\n }\r\n};/**\r\n * 汉字拼音索引\r\n */\r\n\r\n!(function () {\r\n var _ChineseFirstPY = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYX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",\r\n 20094: \"QG\",\r\n 20127: \"QJ\",\r\n 20167: \"QC\",\r\n 20193: \"YG\",\r\n 20250: \"KH\",\r\n 20256: \"ZC\",\r\n 20282: \"SC\",\r\n 20285: \"QJG\",\r\n 20291: \"TD\",\r\n 20314: \"YD\",\r\n 20315: \"BF\",\r\n 20340: \"NE\",\r\n 20375: \"TD\",\r\n 20389: \"YJ\",\r\n 20391: \"CZ\",\r\n 20415: \"PB\",\r\n 20446: \"YS\",\r\n 20447: \"SQ\",\r\n 20504: \"TC\",\r\n 20608: \"KG\",\r\n 20854: \"QJ\",\r\n 20857: \"ZC\",\r\n 20911: \"PF\",\r\n 20985: \"AW\",\r\n 21032: \"PB\",\r\n 21048: \"XQ\",\r\n 21049: \"SC\",\r\n 21089: \"YS\",\r\n 21119: \"JC\",\r\n 21242: \"SB\",\r\n 21273: \"SC\",\r\n 21305: \"YP\",\r\n 21306: \"QO\",\r\n 21330: \"ZC\",\r\n 21333: \"SDC\",\r\n 21345: \"QK\",\r\n 21378: \"CA\",\r\n 21397: \"SC\",\r\n 21414: \"XS\",\r\n 21442: \"SC\",\r\n 21477: \"JG\",\r\n 21480: \"TD\",\r\n 21484: \"ZS\",\r\n 21494: \"YX\",\r\n 21505: \"YX\",\r\n 21512: \"HG\",\r\n 21523: \"XH\",\r\n 21537: \"PB\",\r\n 21542: \"PF\",\r\n 21549: \"KH\",\r\n 21571: \"E\",\r\n 21574: \"DA\",\r\n 21588: \"TD\",\r\n 21589: \"O\",\r\n 21618: \"ZC\",\r\n 21621: \"KHA\",\r\n 21632: \"ZJ\",\r\n 21654: \"KG\",\r\n 21679: \"LKG\",\r\n 21683: \"KH\",\r\n 21710: \"A\",\r\n 21719: \"YH\",\r\n 21734: \"WOE\",\r\n 21769: \"A\",\r\n 21780: \"WN\",\r\n 21804: \"XH\",\r\n 21834: \"A\",\r\n 21899: \"ZD\",\r\n 21903: \"RN\",\r\n 21908: \"WO\",\r\n 21939: \"ZC\",\r\n 21956: \"SA\",\r\n 21964: \"YA\",\r\n 21970: \"TD\",\r\n 22003: \"A\",\r\n 22031: \"JG\",\r\n 22040: \"XS\",\r\n 22060: \"ZC\",\r\n 22066: \"ZC\",\r\n 22079: \"MH\",\r\n 22129: \"XJ\",\r\n 22179: \"XA\",\r\n 22237: \"NJ\",\r\n 22244: \"TD\",\r\n 22280: \"JQ\",\r\n 22300: \"YH\",\r\n 22313: \"XW\",\r\n 22331: \"YQ\",\r\n 22343: \"YJ\",\r\n 22351: \"PH\",\r\n 22395: \"DC\",\r\n 22412: \"TD\",\r\n 22484: \"PB\",\r\n 22500: \"PB\",\r\n 22534: \"ZD\",\r\n 22549: \"DH\",\r\n 22561: \"PB\",\r\n 22612: \"TD\",\r\n 22771: \"KQ\",\r\n 22831: \"HB\",\r\n 22841: \"JG\",\r\n 22855: \"QJ\",\r\n 22865: \"XQ\",\r\n 23013: \"ML\",\r\n 23081: \"WM\",\r\n 23487: \"SX\",\r\n 23558: \"QJ\",\r\n 23561: \"YW\",\r\n 23586: \"YW\",\r\n 23614: \"YW\",\r\n 23615: \"SN\",\r\n 23631: \"PB\",\r\n 23646: \"ZS\",\r\n 23663: \"ZT\",\r\n 23673: \"YG\",\r\n 23762: \"TD\",\r\n 23769: \"ZS\",\r\n 23780: \"QJ\",\r\n 23884: \"QK\",\r\n 24055: \"XH\",\r\n 24113: \"DC\",\r\n 24162: \"ZC\",\r\n 24191: \"GA\",\r\n 24273: \"QJ\",\r\n 24324: \"NL\",\r\n 24377: \"TD\",\r\n 24378: \"QJ\",\r\n 24439: \"PF\",\r\n 24554: \"ZS\",\r\n 24683: \"TD\",\r\n 24694: \"WE\",\r\n 24733: \"LK\",\r\n 24925: \"TN\",\r\n 25094: \"ZG\",\r\n 25100: \"XQ\",\r\n 25103: \"XH\",\r\n 25153: \"PB\",\r\n 25170: \"PB\",\r\n 25179: \"KG\",\r\n 25203: \"PB\",\r\n 25240: \"ZS\",\r\n 25282: \"FB\",\r\n 25303: \"NA\",\r\n 25324: \"KG\",\r\n 25341: \"ZY\",\r\n 25373: \"WZ\",\r\n 25375: \"XJ\",\r\n 25384: \"A\",\r\n 25457: \"A\",\r\n 25528: \"SD\",\r\n 25530: \"SC\",\r\n 25552: \"TD\",\r\n 25774: \"ZC\",\r\n 25874: \"ZC\",\r\n 26044: \"YW\",\r\n 26080: \"WM\",\r\n 26292: \"PB\",\r\n 26333: \"PB\",\r\n 26355: \"ZY\",\r\n 26366: \"CZ\",\r\n 26397: \"ZC\",\r\n 26399: \"QJ\",\r\n 26415: \"ZS\",\r\n 26451: \"SB\",\r\n 26526: \"ZC\",\r\n 26552: \"JG\",\r\n 26561: \"TD\",\r\n 26588: \"JG\",\r\n 26597: \"CZ\",\r\n 26629: \"ZS\",\r\n 26638: \"YL\",\r\n 26646: \"XQ\",\r\n 26653: \"KG\",\r\n 26657: \"XJ\",\r\n 26727: \"HG\",\r\n 26894: \"ZC\",\r\n 26937: \"ZS\",\r\n 26946: \"ZC\",\r\n 26999: \"KJ\",\r\n 27099: \"KJ\",\r\n 27449: \"YQ\",\r\n 27481: \"XS\",\r\n 27542: \"ZS\",\r\n 27663: \"ZS\",\r\n 27748: \"TS\",\r\n 27784: \"SC\",\r\n 27788: \"ZD\",\r\n 27795: \"TD\",\r\n 27812: \"O\",\r\n 27850: \"PB\",\r\n 27852: \"MB\",\r\n 27895: \"SL\",\r\n 27898: \"PL\",\r\n 27973: \"QJ\",\r\n 27981: \"KH\",\r\n 27986: \"HX\",\r\n 27994: \"XJ\",\r\n 28044: \"YC\",\r\n 28065: \"WG\",\r\n 28177: \"SM\",\r\n 28267: \"QJ\",\r\n 28291: \"KH\",\r\n 28337: \"ZQ\",\r\n 28463: \"TL\",\r\n 28548: \"DC\",\r\n 28601: \"TD\",\r\n 28689: \"PB\",\r\n 28805: \"JG\",\r\n 28820: \"QG\",\r\n 28846: \"PB\",\r\n 28952: \"TD\",\r\n 28975: \"ZC\",\r\n 29100: \"A\",\r\n 29325: \"QJ\",\r\n 29575: \"SL\",\r\n 29602: \"FB\",\r\n 30010: \"TD\",\r\n 30044: \"CX\",\r\n 30058: \"PF\",\r\n 30091: \"YSP\",\r\n 30111: \"YN\",\r\n 30229: \"XJ\",\r\n 30427: \"SC\",\r\n 30465: \"SX\",\r\n 30631: \"YQ\",\r\n 30655: \"QJ\",\r\n 30684: \"QJG\",\r\n 30707: \"SD\",\r\n 30729: \"XH\",\r\n 30796: \"LG\",\r\n 30917: \"PB\",\r\n 31074: \"NM\",\r\n 31085: \"JZ\",\r\n 31109: \"SC\",\r\n 31181: \"ZC\",\r\n 31192: \"MLB\",\r\n 31293: \"JQ\",\r\n 31400: \"YX\",\r\n 31584: \"YJ\",\r\n 31896: \"ZN\",\r\n 31909: \"ZY\",\r\n 31995: \"XJ\",\r\n 32321: \"PF\",\r\n 32327: \"ZY\",\r\n 32418: \"HG\",\r\n 32420: \"XQ\",\r\n 32421: \"HG\",\r\n 32438: \"LG\",\r\n 32473: \"GJ\",\r\n 32488: \"TD\",\r\n 32521: \"QJ\",\r\n 32527: \"PB\",\r\n 32562: \"ZSQ\",\r\n 32564: \"JZ\",\r\n 32735: \"ZD\",\r\n 32793: \"PB\",\r\n 33071: \"PF\",\r\n 33098: \"XL\",\r\n 33100: \"YA\",\r\n 33152: \"PB\",\r\n 33261: \"CX\",\r\n 33324: \"BP\",\r\n 33333: \"TD\",\r\n 33406: \"YA\",\r\n 33426: \"WM\",\r\n 33432: \"PB\",\r\n 33445: \"JG\",\r\n 33486: \"ZN\",\r\n 33493: \"TS\",\r\n 33507: \"QJ\",\r\n 33540: \"QJ\",\r\n 33544: \"ZC\",\r\n 33564: \"XQ\",\r\n 33617: \"YT\",\r\n 33632: \"QJ\",\r\n 33636: \"XH\",\r\n 33637: \"YX\",\r\n 33694: \"WG\",\r\n 33705: \"PF\",\r\n 33728: \"YW\",\r\n 33882: \"SR\",\r\n 34067: \"WM\",\r\n 34074: \"YW\",\r\n 34121: \"QJ\",\r\n 34255: \"ZC\",\r\n 34259: \"XL\",\r\n 34425: \"JH\",\r\n 34430: \"XH\",\r\n 34485: \"KH\",\r\n 34503: \"YS\",\r\n 34532: \"HG\",\r\n 34552: \"XS\",\r\n 34558: \"YE\",\r\n 34593: \"ZL\",\r\n 34660: \"YQ\",\r\n 34892: \"XH\",\r\n 34928: \"SC\",\r\n 34999: \"QJ\",\r\n 35048: \"PB\",\r\n 35059: \"SC\",\r\n 35098: \"ZC\",\r\n 35203: \"TQ\",\r\n 35265: \"JX\",\r\n 35299: \"JX\",\r\n 35782: \"SZ\",\r\n 35828: \"YS\",\r\n 35830: \"E\",\r\n 35843: \"TD\",\r\n 35895: \"YG\",\r\n 35977: \"MH\",\r\n 36158: \"JG\",\r\n 36228: \"QJ\",\r\n 36426: \"XQ\",\r\n 36466: \"DC\",\r\n 36710: \"CJ\",\r\n 36711: \"ZYG\",\r\n 36767: \"PB\",\r\n 36866: \"SK\",\r\n 36951: \"YW\",\r\n 37034: \"YX\",\r\n 37063: \"XH\",\r\n 37218: \"ZC\",\r\n 37325: \"ZC\",\r\n 38063: \"PB\",\r\n 38079: \"TD\",\r\n 38085: \"QY\",\r\n 38107: \"DC\",\r\n 38116: \"TD\",\r\n 38123: \"YD\",\r\n 38224: \"HG\",\r\n 38241: \"XTC\",\r\n 38271: \"ZC\",\r\n 38415: \"YE\",\r\n 38426: \"KH\",\r\n 38461: \"YD\",\r\n 38463: \"AE\",\r\n 38466: \"PB\",\r\n 38477: \"XJ\",\r\n 38518: \"YT\",\r\n 38551: \"WK\",\r\n 38585: \"ZC\",\r\n 38704: \"XS\",\r\n 38739: \"LJ\",\r\n 38761: \"GJ\",\r\n 38808: \"SQ\",\r\n 39048: \"JG\",\r\n 39049: \"XJ\",\r\n 39052: \"HG\",\r\n 39076: \"CZ\",\r\n 39271: \"XT\",\r\n 39534: \"TD\",\r\n 39552: \"TD\",\r\n 39584: \"PB\",\r\n 39647: \"SB\",\r\n 39730: \"LG\",\r\n 39748: \"TPB\",\r\n 40109: \"ZQ\",\r\n 40479: \"ND\",\r\n 40516: \"HG\",\r\n 40536: \"HG\",\r\n 40583: \"QJ\",\r\n 40765: \"YQ\",\r\n 40784: \"QJ\",\r\n 40840: \"YK\",\r\n 40863: \"QJG\"\r\n };\r\n\r\n var _checkPYCh = function (ch) {\r\n var uni = ch.charCodeAt(0);\r\n // 如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (uni > 40869 || uni < 19968) {return ch;} // dealWithOthers(ch);\r\n return (oMultiDiff[uni] ? oMultiDiff[uni] : (_ChineseFirstPY.charAt(uni - 19968)));\r\n };\r\n\r\n var _mkPYRslt = function (arr, options) {\r\n var ignoreMulti = options.ignoreMulti;\r\n var splitChar = options.splitChar;\r\n var arrRslt = [\"\"], k, multiLen = 0;\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n var str = arr[i];\r\n var strlen = str.length;\r\n // 多音字过多的情况下,指数增长会造成浏览器卡死,超过20完全卡死,18勉强能用,考虑到不同性能最好是16或者14\r\n // 超过14个多音字之后,后面的都用第一个拼音\r\n if (strlen == 1 || multiLen > 14 || ignoreMulti) {\r\n var tmpStr = str.substring(0, 1);\r\n for (k = 0; k < arrRslt.length; k++) {\r\n arrRslt[k] += tmpStr;\r\n }\r\n } else {\r\n var tmpArr = arrRslt.slice(0);\r\n arrRslt = [];\r\n multiLen ++;\r\n for (k = 0; k < strlen; k++) {\r\n // 复制一个相同的arrRslt\r\n var tmp = tmpArr.slice(0);\r\n // 把当前字符str[k]添加到每个元素末尾\r\n for (var j = 0; j < tmp.length; j++) {\r\n tmp[j] += str.charAt(k);\r\n }\r\n // 把复制并修改后的数组连接到arrRslt上\r\n arrRslt = arrRslt.concat(tmp);\r\n }\r\n }\r\n }\r\n // BI-56386 这边直接将所有多音字组合拼接是有风险的,因为丢失了每一组的起始索引信息, 外部使用indexOf等方法会造成错位\r\n // 一旦错位就可能认为不符合条件, 但实际上还是有可能符合条件的,故此处以一个无法搜索的不可见字符作为连接\r\n return arrRslt.join(splitChar || \"\").toLowerCase();\r\n };\r\n\r\n _.extend(BI, {\r\n makeFirstPY: function (str, options) {\r\n options = options || {};\r\n if (typeof (str) !== \"string\") {return \"\" + str;}\r\n var arrResult = []; // 保存中间结果的数组\r\n for (var i = 0, len = str.length; i < len; i++) {\r\n // 获得unicode码\r\n var ch = str.charAt(i);\r\n // 检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理\r\n arrResult.push(_checkPYCh(ch));\r\n }\r\n // 处理arrResult,返回所有可能的拼音首字母串数组\r\n return _mkPYRslt(arrResult, options);\r\n }\r\n });\r\n})();!(function () {\r\n var cancelAnimationFrame =\r\n _global.cancelAnimationFrame ||\r\n _global.webkitCancelAnimationFrame ||\r\n _global.mozCancelAnimationFrame ||\r\n _global.oCancelAnimationFrame ||\r\n _global.msCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n\r\n BI.MouseMoveTracker = function (onMove, onMoveEnd, domNode) {\r\n this._isDragging = false;\r\n this._animationFrameID = null;\r\n this._domNode = domNode;\r\n this._onMove = onMove;\r\n this._onMoveEnd = onMoveEnd;\r\n\r\n this._onMouseMove = BI.bind(this._onMouseMove, this);\r\n this._onMouseUp = BI.bind(this._onMouseUp, this);\r\n this._didMouseMove = BI.bind(this._didMouseMove, this);\r\n };\r\n BI.MouseMoveTracker.prototype = {\r\n constructor: BI.MouseMoveTracker,\r\n captureMouseMoves: function (/* object*/ event) {\r\n if (!this._eventMoveToken && !this._eventUpToken) {\r\n this._eventMoveToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mousemove\",\r\n this._onMouseMove\r\n );\r\n this._eventUpToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mouseup\",\r\n this._onMouseUp\r\n );\r\n }\r\n\r\n if (!this._isDragging) {\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._isDragging = true;\r\n this._x = event.clientX;\r\n this._y = event.clientY;\r\n }\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n releaseMouseMoves: function () {\r\n if (this._eventMoveToken && this._eventUpToken) {\r\n this._eventMoveToken.remove();\r\n this._eventMoveToken = null;\r\n this._eventUpToken.remove();\r\n this._eventUpToken = null;\r\n }\r\n\r\n if (this._animationFrameID !== null) {\r\n cancelAnimationFrame(this._animationFrameID);\r\n this._animationFrameID = null;\r\n }\r\n\r\n if (this._isDragging) {\r\n this._isDragging = false;\r\n this._x = null;\r\n this._y = null;\r\n }\r\n },\r\n\r\n isDragging: function () /* boolean*/ {\r\n return this._isDragging;\r\n },\r\n\r\n _onMouseMove: function (/* object*/ event) {\r\n var x = event.clientX;\r\n var y = event.clientY;\r\n\r\n this._deltaX += (x - this._x);\r\n this._deltaY += (y - this._y);\r\n\r\n if (this._animationFrameID === null) {\r\n // The mouse may move faster then the animation frame does.\r\n // Use `requestAnimationFrame` to avoid over-updating.\r\n this._animationFrameID =\r\n requestAnimationFrame(this._didMouseMove);\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n _didMouseMove: function () {\r\n this._animationFrameID = null;\r\n this._onMove(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n },\r\n\r\n _onMouseUp: function () {\r\n if (this._animationFrameID) {\r\n this._didMouseMove();\r\n }\r\n this._onMoveEnd();\r\n }\r\n };\r\n})();!(function () {\r\n var PIXEL_STEP = 10;\r\n var LINE_HEIGHT = 40;\r\n var PAGE_HEIGHT = 800;\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n function normalizeWheel (/* object*/event) /* object*/ {\r\n var sX = 0,\r\n sY = 0,\r\n // spinX, spinY\r\n pX = 0,\r\n pY = 0; // pixelX, pixelY\r\n\r\n // Legacy\r\n if (\"detail\" in event) {\r\n sY = event.detail;\r\n }\r\n if (\"wheelDelta\" in event) {\r\n sY = -event.wheelDelta / 120;\r\n }\r\n if (\"wheelDeltaY\" in event) {\r\n sY = -event.wheelDeltaY / 120;\r\n }\r\n if (\"wheelDeltaX\" in event) {\r\n sX = -event.wheelDeltaX / 120;\r\n }\r\n\r\n // side scrolling on FF with DOMMouseScroll\r\n if (\"axis\" in event && event.axis === event.HORIZONTAL_AXIS) {\r\n sX = sY;\r\n sY = 0;\r\n }\r\n\r\n pX = sX * PIXEL_STEP;\r\n pY = sY * PIXEL_STEP;\r\n\r\n if (\"deltaY\" in event) {\r\n pY = event.deltaY;\r\n }\r\n if (\"deltaX\" in event) {\r\n pX = event.deltaX;\r\n }\r\n\r\n if ((pX || pY) && event.deltaMode) {\r\n if (event.deltaMode === 1) {\r\n // delta in LINE units\r\n pX *= LINE_HEIGHT;\r\n pY *= LINE_HEIGHT;\r\n } else {\r\n // delta in PAGE units\r\n pX *= PAGE_HEIGHT;\r\n pY *= PAGE_HEIGHT;\r\n }\r\n }\r\n\r\n // Fall-back if spin cannot be determined\r\n if (pX && !sX) {\r\n sX = pX < 1 ? -1 : 1;\r\n }\r\n if (pY && !sY) {\r\n sY = pY < 1 ? -1 : 1;\r\n }\r\n\r\n return {\r\n spinX: sX,\r\n spinY: sY,\r\n pixelX: pX,\r\n pixelY: pY\r\n };\r\n }\r\n\r\n BI.WheelHandler = function (onWheel, handleScrollX, handleScrollY, stopPropagation) {\r\n this._animationFrameID = null;\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._didWheel = BI.bind(this._didWheel, this);\r\n if (typeof handleScrollX !== \"function\") {\r\n handleScrollX = handleScrollX ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof handleScrollY !== \"function\") {\r\n handleScrollY = handleScrollY ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof stopPropagation !== \"function\") {\r\n stopPropagation = stopPropagation ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n this._handleScrollX = handleScrollX;\r\n this._handleScrollY = handleScrollY;\r\n this._stopPropagation = stopPropagation;\r\n this._onWheelCallback = onWheel;\r\n this.onWheel = BI.bind(this.onWheel, this);\r\n };\r\n BI.WheelHandler.prototype = {\r\n constructor: BI.WheelHandler,\r\n onWheel: function (/* object*/ event) {\r\n var normalizedEvent = normalizeWheel(event);\r\n var deltaX = this._deltaX + normalizedEvent.pixelX;\r\n var deltaY = this._deltaY + normalizedEvent.pixelY;\r\n var handleScrollX = this._handleScrollX(deltaX, deltaY);\r\n var handleScrollY = this._handleScrollY(deltaY, deltaX);\r\n if (!handleScrollX && !handleScrollY) {\r\n return;\r\n }\r\n\r\n this._deltaX += handleScrollX ? normalizedEvent.pixelX : 0;\r\n this._deltaY += handleScrollY ? normalizedEvent.pixelY : 0;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n\r\n var changed;\r\n if (this._deltaX !== 0 || this._deltaY !== 0) {\r\n if (this._stopPropagation()) {\r\n event.stopPropagation ? event.stopPropagation() : (event.cancelBubble = true);\r\n }\r\n changed = true;\r\n }\r\n\r\n if (changed === true && this._animationFrameID === null) {\r\n this._animationFrameID = requestAnimationFrame(this._didWheel);\r\n }\r\n },\r\n\r\n _didWheel: function () {\r\n this._animationFrameID = null;\r\n this._onWheelCallback(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n }\r\n };\r\n})();\r\n(function () {\r\n function defaultComparator (a, b) {\r\n return a < b;\r\n }\r\n\r\n BI.Heap = function (items, comparator) {\r\n this._items = items || [];\r\n this._size = this._items.length;\r\n this._comparator = comparator || defaultComparator;\r\n this._heapify();\r\n };\r\n\r\n BI.Heap.prototype = {\r\n constructor: BI.Heap,\r\n empty: function () {\r\n return this._size === 0;\r\n },\r\n\r\n pop: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n var elt = this._items[0];\r\n\r\n var lastElt = this._items.pop();\r\n this._size--;\r\n\r\n if (this._size > 0) {\r\n this._items[0] = lastElt;\r\n this._sinkDown(0);\r\n }\r\n\r\n return elt;\r\n },\r\n\r\n push: function (item) {\r\n this._items[this._size++] = item;\r\n this._bubbleUp(this._size - 1);\r\n },\r\n\r\n size: function () {\r\n return this._size;\r\n },\r\n\r\n peek: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n return this._items[0];\r\n },\r\n\r\n _heapify: function () {\r\n for (var index = Math.floor((this._size + 1) / 2); index >= 0; index--) {\r\n this._sinkDown(index);\r\n }\r\n },\r\n\r\n _bubbleUp: function (index) {\r\n var elt = this._items[index];\r\n while (index > 0) {\r\n var parentIndex = Math.floor((index + 1) / 2) - 1;\r\n var parentElt = this._items[parentIndex];\r\n\r\n // if parentElt < elt, stop\r\n if (this._comparator(parentElt, elt)) {\r\n return;\r\n }\r\n\r\n // swap\r\n this._items[parentIndex] = elt;\r\n this._items[index] = parentElt;\r\n index = parentIndex;\r\n }\r\n },\r\n\r\n _sinkDown: function (index) {\r\n var elt = this._items[index];\r\n\r\n while (true) {\r\n var leftChildIndex = 2 * (index + 1) - 1;\r\n var rightChildIndex = 2 * (index + 1);\r\n var swapIndex = -1;\r\n\r\n if (leftChildIndex < this._size) {\r\n var leftChild = this._items[leftChildIndex];\r\n if (this._comparator(leftChild, elt)) {\r\n swapIndex = leftChildIndex;\r\n }\r\n }\r\n\r\n if (rightChildIndex < this._size) {\r\n var rightChild = this._items[rightChildIndex];\r\n if (this._comparator(rightChild, elt)) {\r\n if (swapIndex === -1 ||\r\n this._comparator(rightChild, this._items[swapIndex])) {\r\n swapIndex = rightChildIndex;\r\n }\r\n }\r\n }\r\n\r\n // if we don't have a swap, stop\r\n if (swapIndex === -1) {\r\n return;\r\n }\r\n\r\n this._items[index] = this._items[swapIndex];\r\n this._items[swapIndex] = elt;\r\n index = swapIndex;\r\n }\r\n }\r\n };\r\n})();\r\n\r\n!(function () {\r\n BI.LinkHashMap = function () {\r\n this.array = [];\r\n this.map = {};\r\n };\r\n BI.LinkHashMap.prototype = {\r\n constructor: BI.LinkHashMap,\r\n has: function (key) {\r\n if (key in this.map) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n add: function (key, value) {\r\n if (typeof key === \"undefined\") {\r\n return;\r\n }\r\n if (key in this.map) {\r\n this.map[key] = value;\r\n } else {\r\n this.array.push(key);\r\n this.map[key] = value;\r\n }\r\n },\r\n\r\n remove: function (key) {\r\n if (key in this.map) {\r\n delete this.map[key];\r\n for (var i = 0; i < this.array.length; i++) {\r\n if (this.array[i] == key) {\r\n this.array.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var key = this.array[i];\r\n var value = this.map[key];\r\n var re = fn.call(scope, key, value, i, this.array, this.map);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n get: function (key) {\r\n return this.map[key];\r\n },\r\n\r\n toArray: function () {\r\n var array = [];\r\n this.each(function (key, value) {\r\n array.push(value);\r\n });\r\n return array;\r\n }\r\n };\r\n})();\r\n!(function () {\r\n BI.LRU = function (limit) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.head = this.tail = undefined;\r\n this._keymap = {};\r\n };\r\n\r\n var p = BI.LRU.prototype;\r\n\r\n p.put = function (key, value) {\r\n var removed;\r\n if (this.size === this.limit) {\r\n removed = this.shift();\r\n }\r\n\r\n var entry = this.get(key, true);\r\n if (!entry) {\r\n entry = {\r\n key: key\r\n };\r\n this._keymap[key] = entry;\r\n if (this.tail) {\r\n this.tail.newer = entry;\r\n entry.older = this.tail;\r\n } else {\r\n this.head = entry;\r\n }\r\n this.tail = entry;\r\n this.size++;\r\n }\r\n entry.value = value;\r\n\r\n return removed;\r\n };\r\n\r\n p.shift = function () {\r\n var entry = this.head;\r\n if (entry) {\r\n this.head = this.head.newer;\r\n this.head.older = undefined;\r\n entry.newer = entry.older = undefined;\r\n this._keymap[entry.key] = undefined;\r\n this.size--;\r\n }\r\n return entry;\r\n };\r\n\r\n\r\n p.get = function (key, returnEntry) {\r\n var entry = this._keymap[key];\r\n if (entry === undefined) return;\r\n if (entry === this.tail) {\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n }\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.head) {\r\n this.head = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.tail; // D. --> E\r\n if (this.tail) {\r\n this.tail.newer = entry; // E. <-- D\r\n }\r\n this.tail = entry;\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n };\r\n\r\n p.has = function (key) {\r\n return this._keymap[key] != null;\r\n };\r\n})();// 线段树\r\n(function () {\r\n var parent = function (node) {\r\n return Math.floor(node / 2);\r\n };\r\n\r\n var Int32Array = _global.Int32Array || function (size) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = 0;\r\n }\r\n return xs;\r\n };\r\n\r\n var ceilLog2 = function (x) {\r\n var y = 1;\r\n while (y < x) {\r\n y *= 2;\r\n }\r\n return y;\r\n };\r\n\r\n BI.PrefixIntervalTree = function (xs) {\r\n this._size = xs.length;\r\n this._half = ceilLog2(this._size);\r\n // _heap是一个_size两倍以上的堆\r\n this._heap = new Int32Array(2 * this._half);\r\n\r\n var i;\r\n // 初始化 >= _size 的堆空间, 即叶子节点\r\n for (i = 0; i < this._size; ++i) {\r\n this._heap[this._half + i] = xs[i];\r\n }\r\n // 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间\r\n for (i = this._half - 1; i > 0; --i) {\r\n this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.prototype = {\r\n constructor: BI.PrefixIntervalTree,\r\n // 往_half之后的空间set值,需要更新其所有祖先节点的值\r\n set: function (index, value) {\r\n var node = this._half + index;\r\n this._heap[node] = value;\r\n\r\n node = parent(node);\r\n for (; node !== 0; node = parent(node)) {\r\n this._heap[node] =\r\n this._heap[2 * node] + this._heap[2 * node + 1];\r\n }\r\n },\r\n\r\n get: function (index) {\r\n var node = this._half + index;\r\n return this._heap[node];\r\n },\r\n\r\n getSize: function () {\r\n return this._size;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(end - 1).\r\n */\r\n sumUntil: function (end) {\r\n if (end === 0) {\r\n return 0;\r\n }\r\n\r\n var node = this._half + end - 1;\r\n var sum = this._heap[node];\r\n for (; node !== 1; node = parent(node)) {\r\n if (node % 2 === 1) {\r\n sum += this._heap[node - 1];\r\n }\r\n }\r\n\r\n return sum;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(inclusiveEnd).\r\n */\r\n sumTo: function (inclusiveEnd) {\r\n return this.sumUntil(inclusiveEnd + 1);\r\n },\r\n\r\n /**\r\n * sum get(begin) + get(begin + 1) + ... + get(end - 1).\r\n */\r\n sum: function (begin, end) {\r\n return this.sumUntil(end) - this.sumUntil(begin);\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) <= t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestLowerBound: function (t) {\r\n if (t < 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] <= t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t < leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) < t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestStrictLowerBound: function (t) {\r\n if (t <= 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] < t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t <= leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t <= sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastUpperBound: function (t) {\r\n return this.greatestStrictLowerBound(t) + 1;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t < sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastStrictUpperBound: function (t) {\r\n return this.greatestLowerBound(t) + 1;\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.uniform = function (size, initialValue) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = initialValue;\r\n }\r\n\r\n return new BI.PrefixIntervalTree(xs);\r\n };\r\n\r\n BI.PrefixIntervalTree.empty = function (size) {\r\n return BI.PrefixIntervalTree.uniform(size, 0);\r\n };\r\n\r\n})();\r\n\r\n!(function () {\r\n BI.Queue = function (capacity) {\r\n this.capacity = capacity;\r\n this.array = [];\r\n };\r\n BI.Queue.prototype = {\r\n constructor: BI.Queue,\r\n\r\n contains: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n indexOf: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n getElementByIndex: function (index) {\r\n return this.array[index];\r\n },\r\n\r\n push: function (v) {\r\n this.array.push(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.shift();\r\n }\r\n },\r\n\r\n pop: function () {\r\n this.array.pop();\r\n },\r\n\r\n shift: function () {\r\n this.array.shift();\r\n },\r\n\r\n unshift: function (v) {\r\n this.array.unshift(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.pop();\r\n }\r\n },\r\n\r\n remove: function (v) {\r\n BI.remove(this.array, v);\r\n },\r\n\r\n splice: function () {\r\n this.array.splice.apply(this.array, arguments);\r\n },\r\n\r\n slice: function () {\r\n this.array.slice.apply(this.array, arguments);\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var re = fn.call(scope, i, this.array[i], this.array);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n toArray: function () {\r\n return this.array;\r\n },\r\n\r\n fromArray: function (array) {\r\n var self = this;\r\n BI.each(array, function (i, v) {\r\n self.push(v);\r\n });\r\n },\r\n\r\n clear: function () {\r\n this.array.length = 0;\r\n }\r\n };\r\n})();!(function () {\r\n var Section = function (height, width, x, y) {\r\n this.height = height;\r\n this.width = width;\r\n this.x = x;\r\n this.y = y;\r\n\r\n this._indexMap = {};\r\n this._indices = [];\r\n };\r\n\r\n Section.prototype = {\r\n constructor: Section,\r\n addCellIndex: function (index) {\r\n if (!this._indexMap[index]) {\r\n this._indexMap[index] = true;\r\n this._indices.push(index);\r\n }\r\n },\r\n\r\n getCellIndices: function () {\r\n return this._indices;\r\n }\r\n };\r\n\r\n var SECTION_SIZE = 100;\r\n BI.SectionManager = function (sectionSize) {\r\n this._sectionSize = sectionSize || SECTION_SIZE;\r\n this._cellMetadata = [];\r\n this._sections = {};\r\n };\r\n\r\n BI.SectionManager.prototype = {\r\n constructor: BI.SectionManager,\r\n getCellIndices: function (height, width, x, y) {\r\n var indices = {};\r\n\r\n BI.each(this.getSections(height, width, x, y), function (i, section) {\r\n BI.each(section.getCellIndices(), function (j, index) {\r\n indices[index] = index;\r\n });\r\n });\r\n\r\n return BI.map(BI.keys(indices), function (i, index) {\r\n return indices[index];\r\n });\r\n },\r\n\r\n getCellMetadata: function (index) {\r\n return this._cellMetadata[index];\r\n },\r\n\r\n getSections: function (height, width, x, y) {\r\n var sectionXStart = Math.floor(x / this._sectionSize);\r\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\r\n var sectionYStart = Math.floor(y / this._sectionSize);\r\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\r\n\r\n var sections = [];\r\n\r\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\r\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\r\n var key = sectionX + \".\" + sectionY;\r\n\r\n if (!this._sections[key]) {\r\n this._sections[key] = new Section(this._sectionSize, this._sectionSize, sectionX * this._sectionSize, sectionY * this._sectionSize);\r\n }\r\n\r\n sections.push(this._sections[key]);\r\n }\r\n }\r\n\r\n return sections;\r\n },\r\n\r\n getTotalSectionCount: function () {\r\n return BI.size(this._sections);\r\n },\r\n\r\n registerCell: function (cellMetadatum, index) {\r\n this._cellMetadata[index] = cellMetadatum;\r\n\r\n BI.each(this.getSections(cellMetadatum.height, cellMetadatum.width, cellMetadatum.x, cellMetadatum.y), function (i, section) {\r\n section.addCellIndex(index);\r\n });\r\n }\r\n };\r\n})();(function () {\r\n BI.Tree = function () {\r\n this.root = new BI.Node(BI.UUID());\r\n };\r\n\r\n BI.Tree.prototype = {\r\n constructor: BI.Tree,\r\n addNode: function (node, newNode, index) {\r\n if (BI.isNull(newNode)) {\r\n this.root.addChild(node, index);\r\n } else if (BI.isNull(node)) {\r\n this.root.addChild(newNode, index);\r\n } else {\r\n node.addChild(newNode, index);\r\n }\r\n },\r\n\r\n isRoot: function (node) {\r\n return node === this.root;\r\n },\r\n\r\n getRoot: function () {\r\n return this.root;\r\n },\r\n\r\n clear: function () {\r\n this.root.clear();\r\n },\r\n\r\n initTree: function (nodes) {\r\n var self = this;\r\n this.clear();\r\n var queue = [];\r\n BI.each(nodes, function (i, node) {\r\n var n = new BI.Node(node);\r\n n.set(\"data\", node);\r\n self.addNode(n);\r\n queue.push(n);\r\n });\r\n while (!BI.isEmpty(queue)) {\r\n var parent = queue.shift();\r\n var node = parent.get(\"data\");\r\n BI.each(node.children, function (i, child) {\r\n var n = new BI.Node(child);\r\n n.set(\"data\", child);\r\n queue.push(n);\r\n self.addNode(parent, n);\r\n });\r\n }\r\n },\r\n\r\n _toJSON: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSON(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSON: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSON(child));\r\n });\r\n return result;\r\n },\r\n\r\n _toJSONWithNode: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSONWithNode(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), {\r\n node: node\r\n }, (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSONWithNode: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSONWithNode(child));\r\n });\r\n return result;\r\n },\r\n\r\n search: function (root, target, param) {\r\n if (!(root instanceof BI.Node)) {\r\n return arguments.callee.apply(this, [this.root, root, target]);\r\n }\r\n var self = this, next = null;\r\n\r\n if (BI.isNull(target)) {\r\n return null;\r\n }\r\n if (BI.isEqual(root[param || \"id\"], target)) {\r\n return root;\r\n }\r\n BI.any(root.getChildren(), function (i, child) {\r\n next = self.search(child, target, param);\r\n if (null !== next) {\r\n return true;\r\n }\r\n });\r\n return next;\r\n },\r\n\r\n _traverse: function (node, callback) {\r\n var queue = [];\r\n queue.push(node);\r\n while (!BI.isEmpty(queue)) {\r\n var temp = queue.shift();\r\n var b = callback && callback(temp);\r\n if (b === false) {\r\n break;\r\n }\r\n if (b === true) {\r\n continue;\r\n }\r\n if (temp != null) {\r\n queue = queue.concat(temp.getChildren());\r\n }\r\n }\r\n },\r\n\r\n traverse: function (callback) {\r\n this._traverse(this.root, callback);\r\n },\r\n\r\n _recursion: function (node, route, callback) {\r\n var self = this;\r\n return BI.every(node.getChildren(), function (i, child) {\r\n var next = BI.clone(route);\r\n next.push(child.id);\r\n var b = callback && callback(child, next);\r\n if (b === false) {\r\n return false;\r\n }\r\n if (b === true) {\r\n return true;\r\n }\r\n return self._recursion(child, next, callback);\r\n });\r\n },\r\n\r\n recursion: function (callback) {\r\n this._recursion(this.root, [], callback);\r\n },\r\n\r\n inOrderTraverse: function (callback) {\r\n this._inOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 中序遍历(递归)\r\n _inOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._inOrderTraverse(node.getLeft());\r\n callback && callback(node);\r\n this._inOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 中序遍历(非递归)\r\n nrInOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n while (node != null || !BI.isEmpty(stack)) {\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n callback && callback(node);\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n preOrderTraverse: function (callback) {\r\n this._preOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 先序遍历(递归)\r\n _preOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n callback && callback(node);\r\n this._preOrderTraverse(node.getLeft());\r\n this._preOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 先序遍历(非递归)\r\n nrPreOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n callback && callback(node);\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n postOrderTraverse: function (callback) {\r\n this._postOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 后序遍历(递归)\r\n _postOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._postOrderTraverse(node.getLeft());\r\n this._postOrderTraverse(node.getRight());\r\n callback && callback(node);\r\n }\r\n },\r\n\r\n // 后续遍历(非递归)\r\n nrPostOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n var preNode = null;// 表示最近一次访问的节点\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n\r\n node = BI.last(stack);\r\n\r\n if (node.getRight() == null || node.getRight() == preNode) {\r\n callback && callback(node);\r\n node = stack.pop();\r\n preNode = node;\r\n node = null;\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n }\r\n };\r\n\r\n BI.Node = function (id) {\r\n if (BI.isObject(id)) {\r\n BI.extend(this, id);\r\n } else {\r\n this.id = id;\r\n }\r\n this.clear.apply(this, arguments);\r\n };\r\n\r\n BI.Node.prototype = {\r\n constructor: BI.Node,\r\n\r\n set: function (key, value) {\r\n if (BI.isObject(key)) {\r\n BI.extend(this, key);\r\n return;\r\n }\r\n this[key] = value;\r\n },\r\n\r\n get: function (key) {\r\n return this[key];\r\n },\r\n\r\n isLeaf: function () {\r\n return BI.isEmpty(this.children);\r\n },\r\n\r\n getChildren: function () {\r\n return this.children;\r\n },\r\n\r\n getChildrenLength: function () {\r\n return this.children.length;\r\n },\r\n\r\n getFirstChild: function () {\r\n return BI.first(this.children);\r\n },\r\n\r\n getLastChild: function () {\r\n return BI.last(this.children);\r\n },\r\n\r\n setLeft: function (left) {\r\n this.left = left;\r\n },\r\n\r\n getLeft: function () {\r\n return this.left;\r\n },\r\n\r\n setRight: function (right) {\r\n this.right = right;\r\n },\r\n\r\n getRight: function () {\r\n return this.right;\r\n },\r\n\r\n setParent: function (parent) {\r\n this.parent = parent;\r\n },\r\n\r\n getParent: function () {\r\n return this.parent;\r\n },\r\n\r\n getChild: function (index) {\r\n return this.children[index];\r\n },\r\n\r\n getChildIndex: function (id) {\r\n return BI.findIndex(this.children, function (i, ch) {\r\n return ch.get(\"id\") === id;\r\n });\r\n },\r\n\r\n removeChild: function (id) {\r\n this.removeChildByIndex(this.getChildIndex(id));\r\n },\r\n\r\n removeChildByIndex: function (index) {\r\n var before = this.getChild(index - 1);\r\n var behind = this.getChild(index + 1);\r\n if (before != null) {\r\n before.setRight(behind || null);\r\n }\r\n if (behind != null) {\r\n behind.setLeft(before || null);\r\n }\r\n this.children.splice(index, 1);\r\n },\r\n\r\n removeAllChilds: function () {\r\n this.children = [];\r\n },\r\n\r\n addChild: function (child, index) {\r\n var cur = null;\r\n if (BI.isUndefined(index)) {\r\n cur = this.children.length - 1;\r\n } else {\r\n cur = index - 1;\r\n }\r\n child.setParent(this);\r\n if (cur >= 0) {\r\n this.getChild(cur) && this.getChild(cur).setRight(child);\r\n child.setLeft(this.getChild(cur));\r\n }\r\n if (BI.isUndefined(index)) {\r\n this.children.push(child);\r\n } else {\r\n this.children.splice(index, 0, child);\r\n }\r\n },\r\n\r\n equals: function (obj) {\r\n return this === obj || this.id === obj.id;\r\n },\r\n\r\n clear: function () {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n this.children = [];\r\n }\r\n };\r\n\r\n BI.extend(BI.Tree, {\r\n transformToArrayFormat: function (nodes, pId) {\r\n if (!nodes) return [];\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = BI.clone(nodes[i]);\r\n node.pId = node.pId == null ? pId : node.pId;\r\n delete node.children;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = BI.clone(nodes);\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n delete newNodes.children;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n arrayFormat: function (nodes, pId) {\r\n if (!nodes) {\r\n return [];\r\n }\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = nodes[i];\r\n node.pId = node.pId == null ? pId : node.pId;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = nodes;\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n transformToTreeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = BI.clone(sNodes[i]);\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n delete tmpMap[sNodes[i].id].pId;\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n treeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = sNodes[i];\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n traversal: function (array, callback) {\r\n if (BI.isNull(array)) {\r\n return;\r\n }\r\n var self = this;\r\n BI.some(array, function (i, item) {\r\n if (callback(i, item) === false) {\r\n return true;\r\n }\r\n self.traversal(item.children, callback);\r\n });\r\n }\r\n });\r\n})();// 向量操作\r\nBI.Vector = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n};\r\nBI.Vector.prototype = {\r\n constructor: BI.Vector,\r\n cross: function (v) {\r\n return (this.x * v.y - this.y * v.x);\r\n },\r\n length: function (v) {\r\n return (Math.sqrt(this.x * v.x + this.y * v.y));\r\n }\r\n};\r\nBI.Region = function (x, y, w, h) {\r\n this.x = x;\r\n this.y = y;\r\n this.w = w;\r\n this.h = h;\r\n};\r\nBI.Region.prototype = {\r\n constructor: BI.Region,\r\n // 判断两个区域是否相交,若相交,则要么顶点互相包含,要么矩形边界(或对角线)相交\r\n isIntersects: function (obj) {\r\n if (this.isPointInside(obj.x, obj.y) ||\r\n this.isPointInside(obj.x + obj.w, obj.y) ||\r\n this.isPointInside(obj.x, obj.y + obj.h) ||\r\n this.isPointInside(obj.x + obj.w, obj.y + obj.h)) {\r\n return true;\r\n } else if (obj.isPointInside(this.x, this.y) ||\r\n obj.isPointInside(this.x + this.w, this.y) ||\r\n obj.isPointInside(this.x, this.y + this.h) ||\r\n obj.isPointInside(this.x + this.w, this.y + this.h)) {\r\n return true;\r\n } else if (obj.x != null && obj.y != null)// 判断矩形对角线相交 |v1 X v2||v1 X v3| < 0\r\n {\r\n var vector1 = new BI.Vector(this.w, this.h);// 矩形对角线向量\r\n var vector2 = new BI.Vector(obj.x - this.x, obj.y - this.y);\r\n var vector3 = new BI.Vector(vector2.x + obj.w, vector2.y + obj.h);\r\n if ((vector1.cross(vector2) * vector1.cross(vector3)) < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n // 判断一个点是否在这个区域内部\r\n isPointInside: function (x, y) {\r\n if (this.x == null || this.y == null) {\r\n return false;\r\n }\r\n if (x >= this.x && x <= this.x + this.w && y >= this.y && y <= this.y + this.h) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n // 返回区域的重心,因为是矩形所以返回中点\r\n getPosition: function () {\r\n var pos = [];\r\n pos.push(this.x + this.w / 2);\r\n pos.push(this.y + this.h / 2);\r\n return pos;\r\n }\r\n};BI.BehaviorFactory = {\r\n createBehavior: function (key, options) {\r\n var behavior;\r\n switch (key) {\r\n case \"highlight\":\r\n behavior = BI.HighlightBehavior;\r\n break;\r\n case \"redmark\":\r\n behavior = BI.RedMarkBehavior;\r\n break;\r\n }\r\n return new behavior(options);\r\n }\r\n};\r\n\r\n/**\r\n * guy\r\n * 行为控件\r\n * @class BI.Behavior\r\n * @extends BI.OB\r\n */\r\nBI.Behavior = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this, arguments), {\r\n rule: function () {return true;}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Behavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function () {\r\n\r\n }\r\n});/**\r\n * 布局容器类\r\n * @class BI.Layout\r\n * @extends BI.Widget\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Boolean} [options.scrollable=false] 子组件超出容器边界之后是否会出现滚动条\r\n * @cfg {Boolean} [options.scrollx=false] 子组件超出容器边界之后是否会出现横向滚动条\r\n * @cfg {Boolean} [options.scrolly=false] 子组件超出容器边界之后是否会出现纵向滚动条\r\n */\r\nBI.Layout = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n scrollable: null, // true, false, null\r\n scrollx: false, // true, false\r\n scrolly: false, // true, false\r\n items: []\r\n };\r\n },\r\n\r\n render: function () {\r\n this._init4Margin();\r\n this._init4Scroll();\r\n },\r\n\r\n _init4Margin: function () {\r\n if (this.options.top) {\r\n this.element.css(\"top\", this.options.top);\r\n }\r\n if (this.options.left) {\r\n this.element.css(\"left\", this.options.left);\r\n }\r\n if (this.options.bottom) {\r\n this.element.css(\"bottom\", this.options.bottom);\r\n }\r\n if (this.options.right) {\r\n this.element.css(\"right\", this.options.right);\r\n }\r\n },\r\n\r\n _init4Scroll: function () {\r\n switch (this.options.scrollable) {\r\n case true:\r\n this.element.css(\"overflow\", \"auto\");\r\n break;\r\n case false:\r\n this.element.css(\"overflow\", \"hidden\");\r\n break;\r\n default :\r\n break;\r\n }\r\n if (this.options.scrollx) {\r\n this.element.css({\r\n \"overflow-x\": \"auto\",\r\n \"overflow-y\": \"hidden\"\r\n });\r\n }\r\n if (this.options.scrolly) {\r\n this.element.css({\r\n \"overflow-x\": \"hidden\",\r\n \"overflow-y\": \"auto\"\r\n });\r\n }\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.element.append(frag);\r\n },\r\n\r\n _mountChildren: function () {\r\n var self = this;\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n var hasChild = false;\r\n BI.each(this._children, function (i, widget) {\r\n if (widget.element !== self.element) {\r\n frag.appendChild(widget.element[0]);\r\n hasChild = true;\r\n }\r\n });\r\n if (hasChild === true) {\r\n this.appendFragment(frag);\r\n }\r\n },\r\n\r\n _getChildName: function (index) {\r\n return index + \"\";\r\n },\r\n\r\n _addElement: function (i, item, context) {\r\n var self = this, w;\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n w = BI.createWidget(item, context);\r\n w.on(BI.Events.DESTROY, function () {\r\n BI.each(self._children, function (name, child) {\r\n if (child === w) {\r\n BI.remove(self._children, child);\r\n self.removeItemAt(name | 0);\r\n }\r\n });\r\n });\r\n this.addWidget(this._getChildName(i), w);\r\n } else {\r\n w = this.getWidgetByName(this._getChildName(i));\r\n }\r\n return w;\r\n },\r\n\r\n _getOptions: function (item) {\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n item = BI.stripEL(item);\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n return item;\r\n },\r\n\r\n _compare: function (item1, item2) {\r\n var self = this;\r\n return eq(item1, item2);\r\n\r\n // 不比较函数\r\n function eq (a, b, aStack, bStack) {\r\n if (a === b) {\r\n return a !== 0 || 1 / a === 1 / b;\r\n }\r\n if (a == null || b == null) {\r\n return a === b;\r\n }\r\n var className = Object.prototype.toString.call(a);\r\n switch (className) {\r\n case \"[object RegExp]\":\r\n case \"[object String]\":\r\n return \"\" + a === \"\" + b;\r\n case \"[object Number]\":\r\n if (+a !== +a) {\r\n return +b !== +b;\r\n }\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case \"[object Date]\":\r\n case \"[object Boolean]\":\r\n return +a === +b;\r\n }\r\n\r\n var areArrays = className === \"[object Array]\";\r\n if (!areArrays) {\r\n if (BI.isFunction(a) && BI.isFunction(b)) {\r\n return true;\r\n }\r\n a = self._getOptions(a);\r\n b = self._getOptions(b);\r\n }\r\n\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n if (aStack[length] === a) {\r\n return bStack[length] === b;\r\n }\r\n }\r\n\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n if (areArrays) {\r\n length = a.length;\r\n if (length !== b.length) {\r\n return false;\r\n }\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var keys = _.keys(a), key;\r\n length = keys.length;\r\n if (_.keys(b).length !== length) {\r\n return false;\r\n }\r\n while (length--) {\r\n key = keys[length];\r\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) {\r\n return false;\r\n }\r\n }\r\n }\r\n aStack.pop();\r\n bStack.pop();\r\n return true;\r\n }\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.element;\r\n },\r\n\r\n _addItemAt: function (index, item) {\r\n for (var i = this.options.items.length; i > index; i--) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];\r\n }\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 0, item);\r\n },\r\n\r\n _removeItemAt: function (index) {\r\n for (var i = index; i < this.options.items.length - 1; i++) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];\r\n }\r\n delete this._children[this._getChildName(this.options.items.length - 1)];\r\n this.options.items.splice(index, 1);\r\n },\r\n\r\n /**\r\n * 添加一个子组件到容器中\r\n * @param {JSON/BI.Widget} item 子组件\r\n */\r\n addItem: function (item) {\r\n return this.addItemAt(this.options.items.length, item);\r\n },\r\n\r\n prependItem: function (item) {\r\n return this.addItemAt(0, item);\r\n },\r\n\r\n addItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length) {\r\n return;\r\n }\r\n this._addItemAt(index, item);\r\n var w = this._addElement(index, item);\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n w._mount();\r\n return w;\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = BI.isArray(indexes) ? indexes : [indexes];\r\n var deleted = [];\r\n var newItems = [], newChildren = {};\r\n for (var i = 0, len = this.options.items.length; i < len; i++) {\r\n var child = this._children[this._getChildName(i)];\r\n if (BI.contains(indexes, i)) {\r\n child && deleted.push(child);\r\n } else {\r\n newChildren[this._getChildName(newItems.length)] = child;\r\n newItems.push(this.options.items[i]);\r\n }\r\n }\r\n this.options.items = newItems;\r\n this._children = newChildren;\r\n BI.each(deleted, function (i, c) {\r\n c._destroy();\r\n });\r\n },\r\n\r\n shouldUpdateItem: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return false;\r\n }\r\n var child = this._children[this._getChildName(index)];\r\n if (!child.shouldUpdate) {\r\n return null;\r\n }\r\n return child.shouldUpdate(this._getOptions(item)) === true;\r\n },\r\n\r\n updateItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return;\r\n }\r\n\r\n var child = this._children[this._getChildName(index)];\r\n var updated;\r\n if (updated = child.update(this._getOptions(item))) {\r\n return updated;\r\n }\r\n var del = this._children[this._getChildName(index)];\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 1);\r\n var w = this._addElement(index, item);\r\n this.options.items.splice(index, 0, item);\r\n this._children[this._getChildName(index)] = w;\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n del._destroy();\r\n w._mount();\r\n },\r\n\r\n addItems: function (items, context) {\r\n var self = this, o = this.options;\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n BI.each(items, function (i, item) {\r\n var w = self._addElement(o.items.length, item, context);\r\n self._children[self._getChildName(o.items.length)] = w;\r\n o.items.push(item);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n });\r\n if (this._isMounted) {\r\n this._getWrapper().append(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n prependItems: function (items, context) {\r\n var self = this;\r\n items = items || [];\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n for (var i = items.length - 1; i >= 0; i--) {\r\n this._addItemAt(0, items[i]);\r\n var w = this._addElement(0, items[i], context);\r\n self._children[self._getChildName(0)] = w;\r\n this.options.items.unshift(items[i]);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n }\r\n if (this._isMounted) {\r\n this._getWrapper().prepend(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var self = this, value = [], child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n var v = child.getValue();\r\n v = BI.isArray(v) ? v : [v];\r\n value = value.concat(v);\r\n }\r\n });\r\n return value;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setValue(v);\r\n }\r\n });\r\n },\r\n\r\n setText: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setText(v);\r\n }\r\n });\r\n },\r\n\r\n patchItem: function (oldVnode, vnode, index) {\r\n var shouldUpdate = this.shouldUpdateItem(index, vnode);\r\n if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {\r\n return this.updateItemAt(index, vnode);\r\n }\r\n },\r\n\r\n updateChildren: function (oldCh, newCh) {\r\n var self = this;\r\n var oldStartIdx = 0, newStartIdx = 0;\r\n var oldEndIdx = oldCh.length - 1;\r\n var oldStartVnode = oldCh[0];\r\n var oldEndVnode = oldCh[oldEndIdx];\r\n var newEndIdx = newCh.length - 1;\r\n var newStartVnode = newCh[0];\r\n var newEndVnode = newCh[newEndIdx];\r\n var before;\r\n var updated;\r\n var children = {};\r\n BI.each(oldCh, function (i, child) {\r\n child = self._getOptions(child);\r\n var key = child.key == null ? i : child.key;\r\n if (BI.isKey(key)) {\r\n children[key] = self._children[self._getChildName(i)];\r\n }\r\n });\r\n\r\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\r\n if (BI.isNull(oldStartVnode)) {\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n } else if (BI.isNull(oldEndVnode)) {\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n } else if (sameVnode(oldStartVnode, newStartVnode, oldStartIdx, newStartIdx)) {\r\n updated = this.patchItem(oldStartVnode, newStartVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else if (sameVnode(oldEndVnode, newEndVnode, oldEndIdx, newEndIdx)) {\r\n updated = this.patchItem(oldEndVnode, newEndVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldStartVnode, newEndVnode)) {\r\n updated = this.patchItem(oldStartVnode, newEndVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n insertBefore(oldStartVnode, oldEndVnode, true);\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldEndVnode, newStartVnode)) {\r\n updated = this.patchItem(oldEndVnode, newStartVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n insertBefore(oldEndVnode, oldStartVnode);\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else {\r\n var sameOldVnode = findOldVnode(oldCh, newStartVnode, oldStartIdx, oldEndIdx);\r\n if (BI.isNull(sameOldVnode)) { // 不存在就把新的放到左边\r\n var node = addNode(newStartVnode);\r\n insertBefore(node, oldStartVnode);\r\n newStartVnode = newCh[++newStartIdx];\r\n } else { // 如果新节点在就旧节点区间中存在就复用一下\r\n BI.each(oldCh, function (index, child) {\r\n if (child && sameVnode(child, newStartVnode)) {\r\n updated = self.patchItem(sameOldVnode, newStartVnode, index) || updated;\r\n children[sameOldVnode.key == null ? self._getChildName(index) : sameOldVnode.key] = self._children[self._getChildName(index)];\r\n oldCh[index] = undefined;\r\n insertBefore(sameOldVnode, oldStartVnode);\r\n }\r\n });\r\n newStartVnode = newCh[++newStartIdx];\r\n }\r\n }\r\n }\r\n if (oldStartIdx > oldEndIdx) {\r\n before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];\r\n addVnodes(before, newCh, newStartIdx, newEndIdx);\r\n } else if (newStartIdx > newEndIdx) {\r\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\r\n }\r\n\r\n this._children = {};\r\n BI.each(newCh, function (i, child) {\r\n var node = self._getOptions(child);\r\n var key = node.key == null ? self._getChildName(i) : node.key;\r\n children[key]._mount();\r\n self._children[self._getChildName(i)] = children[key];\r\n });\r\n\r\n function sameVnode (vnode1, vnode2, oldIndex, newIndex) {\r\n vnode1 = self._getOptions(vnode1);\r\n vnode2 = self._getOptions(vnode2);\r\n if (BI.isKey(vnode1.key)) {\r\n return vnode1.key === vnode2.key;\r\n }\r\n if (oldIndex >= 0) {\r\n return oldIndex === newIndex;\r\n }\r\n }\r\n\r\n function addNode (vnode, index) {\r\n var opt = self._getOptions(vnode);\r\n var key = opt.key == null ? self._getChildName(index) : opt.key;\r\n return children[key] = self._addElement(key, vnode);\r\n }\r\n\r\n function addVnodes (before, vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var node = addNode(vnodes[startIdx], startIdx);\r\n insertBefore(node, before, false, startIdx);\r\n }\r\n }\r\n\r\n function removeVnodes (vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var ch = vnodes[startIdx];\r\n if (BI.isNotNull(ch)) {\r\n var node = self._getOptions(ch);\r\n var key = node.key == null ? self._getChildName(startIdx) : node.key;\r\n delete self._children[self._getChildName(key)];\r\n children[key]._destroy();\r\n }\r\n }\r\n }\r\n\r\n function insertBefore (insert, before, isNext, index) {\r\n insert = self._getOptions(insert);\r\n before = before && self._getOptions(before);\r\n var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);\r\n if (before && children[before.key]) {\r\n var beforeKey = BI.isKey(before.key) ? before.key : self._getChildName(index);\r\n var next;\r\n if (isNext) {\r\n next = children[beforeKey].element.next();\r\n } else {\r\n next = children[beforeKey].element;\r\n }\r\n if (next.length > 0) {\r\n next.before(children[insertKey].element);\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n }\r\n\r\n function findOldVnode (vnodes, vNode, beginIdx, endIdx) {\r\n var i, found;\r\n for (i = beginIdx; i <= endIdx; ++i) {\r\n if (vnodes[i] && sameVnode(vnodes[i], vNode)) {\r\n found = vnodes[i];\r\n }\r\n }\r\n return found;\r\n }\r\n\r\n return updated;\r\n },\r\n\r\n update: function (opt) {\r\n var o = this.options;\r\n var items = opt.items || [];\r\n var updated = this.updateChildren(o.items, items);\r\n this.options.items = items;\r\n return updated;\r\n // var updated, i, len;\r\n // for (i = 0, len = Math.min(o.items.length, items.length); i < len; i++) {\r\n // if (!this._compare(o.items[i], items[i])) {\r\n // updated = this.updateItemAt(i, items[i]) || updated;\r\n // }\r\n // }\r\n // if (o.items.length > items.length) {\r\n // var deleted = [];\r\n // for (i = items.length; i < o.items.length; i++) {\r\n // deleted.push(this._children[this._getChildName(i)]);\r\n // delete this._children[this._getChildName(i)];\r\n // }\r\n // o.items.splice(items.length);\r\n // BI.each(deleted, function (i, w) {\r\n // w._destroy();\r\n // })\r\n // } else if (items.length > o.items.length) {\r\n // for (i = o.items.length; i < items.length; i++) {\r\n // this.addItemAt(i, items[i]);\r\n // }\r\n // }\r\n // return updated;\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeIndex;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeIndex = name;\r\n }\r\n });\r\n } else {\r\n removeIndex = nameOrWidget;\r\n }\r\n if (removeIndex) {\r\n this._removeItemAt(removeIndex | 0);\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Layout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.Layout.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n items = items || [];\r\n if (this._isMounted) {\r\n this.update({items: items});\r\n return;\r\n }\r\n this.options.items = items;\r\n this.stroke(items);\r\n },\r\n\r\n resize: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.layout\", BI.Layout);\r\nBI.Plugin = BI.Plugin || {};\r\n!(function () {\r\n var _WidgetsPlugin = {};\r\n var _ObjectPlugin = {};\r\n var _ConfigPlugin = {};\r\n var _GlobalWidgetConfigFn, _GlobalObjectConfigFn;\r\n BI.extend(BI.Plugin, {\r\n\r\n getWidget: function (type, options) {\r\n if (_GlobalWidgetConfigFn) {\r\n _GlobalWidgetConfigFn(type, options);\r\n }\r\n var res;\r\n if (_ConfigPlugin[type]) {\r\n for (var i = _ConfigPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _ConfigPlugin[type][i](options)) {\r\n options = res;\r\n }\r\n }\r\n }\r\n // Deprecated\r\n if (_WidgetsPlugin[type]) {\r\n for (var i = _WidgetsPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _WidgetsPlugin[type][i](options)) {\r\n return res;\r\n }\r\n }\r\n }\r\n return options;\r\n },\r\n\r\n config: function (widgetConfigFn, objectConfigFn) {\r\n _GlobalWidgetConfigFn = widgetConfigFn;\r\n _GlobalObjectConfigFn = objectConfigFn;\r\n },\r\n\r\n configWidget: function (type, fn) {\r\n if (!_ConfigPlugin[type]) {\r\n _ConfigPlugin[type] = [];\r\n }\r\n _ConfigPlugin[type].push(fn);\r\n },\r\n\r\n registerWidget: function (type, fn) {\r\n if (!_WidgetsPlugin[type]) {\r\n _WidgetsPlugin[type] = [];\r\n }\r\n if (_WidgetsPlugin[type].length > 0) {\r\n console.log(\"组件已经注册过了!\");\r\n }\r\n _WidgetsPlugin[type].push(fn);\r\n },\r\n\r\n relieveWidget: function (type) {\r\n delete _WidgetsPlugin[type];\r\n },\r\n\r\n getObject: function (type, object) {\r\n if (_GlobalObjectConfigFn) {\r\n _GlobalObjectConfigFn(type, object);\r\n }\r\n if (_ObjectPlugin[type]) {\r\n var res;\r\n for (var i = 0, len = _ObjectPlugin[type].length; i < len; i++) {\r\n if (res = _ObjectPlugin[type][i](object)) {\r\n object = res;\r\n };\r\n }\r\n }\r\n return res || object;\r\n },\r\n\r\n registerObject: function (type, fn) {\r\n if (!_ObjectPlugin[type]) {\r\n _ObjectPlugin[type] = [];\r\n }\r\n if (_ObjectPlugin[type].length > 0) {\r\n console.log(\"对象已经注册过了!\");\r\n }\r\n _ObjectPlugin[type].push(fn);\r\n },\r\n\r\n relieveObject: function (type) {\r\n delete _ObjectPlugin[type];\r\n }\r\n });\r\n})();/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.Action\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Action = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Action.superclass._defaultConfig.apply(this, arguments), {\r\n src: null,\r\n tar: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Action.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n\r\n }\r\n});\r\n\r\nBI.ActionFactory = {\r\n createAction: function (key, options) {\r\n var action;\r\n switch (key) {\r\n case \"show\":\r\n action = BI.ShowAction;\r\n break;\r\n }\r\n return new action(options);\r\n }\r\n};/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.ShowAction\r\n * @extends BI.Action\r\n */\r\nBI.ShowAction = BI.inherit(BI.Action, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ShowAction.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(true);\r\n callback && callback();\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(false);\r\n callback && callback();\r\n }\r\n});(function () {\r\n var _global;\r\n if (typeof window !== \"undefined\") {\r\n _global = window;\r\n } else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n } else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n } else {\r\n _global = this;\r\n }\r\n if (!_global.BI) {\r\n _global.BI = {};\r\n }\r\n\r\n function isEmpty (value) {\r\n // 判断是否为空值\r\n var result = value === \"\" || value === null || value === undefined;\r\n return result;\r\n }\r\n\r\n // 判断是否是无效的日期\r\n function isInvalidDate (date) {\r\n return date == \"Invalid Date\" || date == \"NaN\";\r\n }\r\n\r\n /**\r\n * CHART-1400\r\n * 使用数值计算的方式来获取任意数值的科学技术表示值。\r\n * 科学计数格式\r\n */\r\n function _eFormat (text, fmt) {\r\n text = +text;\r\n\r\n return eFormat(text, fmt);\r\n\r\n /**\r\n * 科学计数格式具体计算过程\r\n * @param num\r\n * @param format {String}有两种形式,\r\n * 1、\"0.00E00\"这样的字符串表示正常的科学计数表示,只不过规定了数值精确到百分位,\r\n * 而数量级的绝对值如果是10以下的时候在前面补零。\r\n * 2、 \"##0.0E0\"这样的字符串则规定用科学计数法表示之后的数值的整数部分是三位,精确到十分位,\r\n * 数量级没有规定,因为没见过实数里有用科学计数法表示之后E的后面会小于一位的情况(0无所谓)。\r\n * @returns {*}\r\n */\r\n function eFormat (num, format) {\r\n var neg = num < 0 ? (num *= -1, \"-\") : \"\",\r\n magnitudeNeg = \"\";\r\n\r\n var funcName = num > 0 && num < 1 ? \"floor\" : \"ceil\"; // -0.9999->-1\r\n // 数量级\r\n var magnitude = Math[funcName](Math.log(num) / Math.log(10));\r\n\r\n if (!isFinite(magnitude)) {\r\n return format.replace(/#/ig, \"\").replace(/\\.e/ig, \"E\");\r\n }\r\n\r\n num = num / Math.pow(10, magnitude);\r\n\r\n // 让num转化成[1, 10)区间上的数\r\n if (num > 0 && num < 1) {\r\n num *= 10;\r\n magnitude -= 1;\r\n }\r\n\r\n // 计算出format中需要显示的整数部分的位数,然后更新这个数值,也更新数量级\r\n var integerLen = getInteger(magnitude, format);\r\n integerLen > 1 && (magnitude -= integerLen - 1, num *= Math.pow(10, integerLen - 1));\r\n\r\n magnitude < 0 && (magnitudeNeg = \"-\", magnitude *= -1);\r\n\r\n // 获取科学计数法精确到的位数\r\n var precision = getPrecision(format);\r\n // 判断num经过四舍五入之后是否有进位\r\n var isValueCarry = isValueCarried(num);\r\n\r\n num *= Math.pow(10, precision);\r\n num = Math.round(num);\r\n // 如果出现进位的情况,将num除以10\r\n isValueCarry && (num /= 10, magnitude += magnitudeNeg === \"-\" ? -1 : 1);\r\n num /= Math.pow(10, precision);\r\n\r\n // 小数部分保留precision位\r\n num = num.toFixed(precision);\r\n // 格式化指数的部分\r\n magnitude = formatExponential(format, magnitude, magnitudeNeg);\r\n\r\n return neg + num + \"E\" + magnitude;\r\n }\r\n\r\n // 获取format格式规定的数量级的形式\r\n function formatExponential (format, num, magnitudeNeg) {\r\n num += \"\";\r\n if (!/e/ig.test(format)) {\r\n return num;\r\n }\r\n format = format.split(/e/ig)[1];\r\n\r\n while (num.length < format.length) {\r\n num = \"0\" + num;\r\n }\r\n\r\n // 如果magnitudeNeg是一个\"-\",而且num正好全是0,那么就别显示负号了\r\n var isAllZero = true;\r\n for (var i = 0, len = num.length; i < len; i++) {\r\n if (!isAllZero) {\r\n continue;\r\n }\r\n isAllZero = num.charAt(i) === \"0\";\r\n }\r\n magnitudeNeg = isAllZero ? \"\" : magnitudeNeg;\r\n\r\n return magnitudeNeg + num;\r\n }\r\n\r\n // 获取format规定的科学计数法精确到的位数\r\n function getPrecision (format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n var arr = format.split(/e/ig)[0].split(\".\");\r\n\r\n return arr.length > 1 ? arr[1].length : 0;\r\n }\r\n\r\n // 获取数值科学计数法表示之后整数的位数\r\n // 这边我们还需要考虑#和0的问题\r\n function getInteger (magnitude, format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n // return format.split(/e/ig)[0].split(\".\")[0].length;\r\n\r\n var formatLeft = format.split(/e/ig)[0].split(\".\")[0], i, f, len = formatLeft.length;\r\n var valueLeftLen = 0;\r\n\r\n for (i = 0; i < len; i++) {\r\n f = formatLeft.charAt(i);\r\n // \"#\"所在的位置到末尾长度小于等于值的整数部分长度,那么这个#才可以占位\r\n if (f == 0 || (f == \"#\" && (len - i <= magnitude + 1))) {\r\n valueLeftLen++;\r\n }\r\n }\r\n\r\n return valueLeftLen;\r\n }\r\n\r\n // 判断num通过round函数之后是否有进位\r\n function isValueCarried (num) {\r\n var roundNum = Math.round(num);\r\n num = (num + \"\").split(\".\")[0];\r\n roundNum = (roundNum + \"\").split(\".\")[0];\r\n return num.length !== roundNum.length;\r\n }\r\n }\r\n\r\n //'#.##'之类的格式处理 1.324e-18 这种的科学数字\r\n function _dealNumberPrecision (text, fright) {\r\n if (/[eE]/.test(text)) {\r\n var precision = 0, i = 0, ch;\r\n\r\n if (/[%‰]$/.test(fright)) {\r\n precision = /[%]$/.test(fright) ? 2 : 3;\r\n }\r\n\r\n for (var len = fright.length; i < len; i++) {\r\n if ((ch = fright.charAt(i)) == \"0\" || ch == \"#\") {\r\n precision++;\r\n }\r\n }\r\n return Number(text).toFixed(precision);\r\n }\r\n\r\n return text;\r\n }\r\n\r\n /**\r\n * 数字格式\r\n */\r\n function _numberFormat (text, format) {\r\n var text = text + \"\";\r\n\r\n //在调用数字格式的时候如果text里没有任何数字则不处理\r\n if (!(/[0-9]/.test(text)) || !format) {\r\n return text;\r\n }\r\n\r\n // 数字格式,区分正负数\r\n var numMod = format.indexOf(\";\");\r\n if (numMod > -1) {\r\n if (text >= 0) {\r\n return _numberFormat(text + \"\", format.substring(0, numMod));\r\n }\r\n return _numberFormat((-text) + \"\", format.substr(numMod + 1));\r\n\r\n } else {\r\n // 兼容格式处理负数的情况(copy:fr-jquery.format.js)\r\n if (+text < 0 && format.charAt(0) !== \"-\") {\r\n return _numberFormat((-text) + \"\", \"-\" + format);\r\n }\r\n }\r\n\r\n var fp = format.split(\".\"), fleft = fp[0] || \"\", fright = fp[1] || \"\";\r\n text = _dealNumberPrecision(text, fright);\r\n var tp = text.split(\".\"), tleft = tp[0] || \"\", tright = tp[1] || \"\";\r\n\r\n // 百分比,千分比的小数点移位处理\r\n if (/[%‰]$/.test(format)) {\r\n var paddingZero = /[%]$/.test(format) ? \"00\" : \"000\";\r\n tright += paddingZero;\r\n tleft += tright.substr(0, paddingZero.length);\r\n tleft = tleft.replace(/^0+/gi, \"\");\r\n tright = tright.substr(paddingZero.length).replace(/0+$/gi, \"\");\r\n }\r\n var right = _dealWithRight(tright, fright);\r\n if (right.leftPlus) {\r\n // 小数点后有进位\r\n tleft = parseInt(tleft) + 1 + \"\";\r\n\r\n tleft = isNaN(tleft) ? \"1\" : tleft;\r\n }\r\n right = right.num;\r\n var left = _dealWithLeft(tleft, fleft);\r\n if (!(/[0-9]/.test(left))) {\r\n left = left + \"0\";\r\n }\r\n if (!(/[0-9]/.test(right))) {\r\n return left + right;\r\n } else {\r\n return left + \".\" + right;\r\n }\r\n }\r\n\r\n /**\r\n * 处理小数点右边小数部分\r\n * @param tright 右边内容\r\n * @param fright 右边格式\r\n * @returns {JSON} 返回处理结果和整数部分是否需要进位\r\n * @private\r\n */\r\n function _dealWithRight (tright, fright) {\r\n var right = \"\", j = 0, i = 0;\r\n for (var len = fright.length; i < len; i++) {\r\n var ch = fright.charAt(i);\r\n var c = tright.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n right += c;\r\n j++;\r\n break;\r\n case \"#\":\r\n right += c;\r\n j++;\r\n break;\r\n default :\r\n right += ch;\r\n break;\r\n }\r\n }\r\n var rll = tright.substr(j);\r\n var result = {};\r\n if (!isEmpty(rll) && rll.charAt(0) > 4) {\r\n // 有多余字符,需要四舍五入\r\n result.leftPlus = true;\r\n var numReg = right.match(/^[0-9]+/);\r\n if (numReg) {\r\n var num = numReg[0];\r\n var orilen = num.length;\r\n var newnum = parseInt(num) + 1 + \"\";\r\n // 进位到整数部分\r\n if (newnum.length > orilen) {\r\n newnum = newnum.substr(1);\r\n } else {\r\n newnum = BI.leftPad(newnum, orilen, \"0\");\r\n result.leftPlus = false;\r\n }\r\n right = right.replace(/^[0-9]+/, newnum);\r\n }\r\n }\r\n result.num = right;\r\n return result;\r\n }\r\n\r\n /**\r\n * 处理小数点左边整数部分\r\n * @param tleft 左边内容\r\n * @param fleft 左边格式\r\n * @returns {string} 返回处理结果\r\n * @private\r\n */\r\n function _dealWithLeft (tleft, fleft) {\r\n var left = \"\";\r\n var j = tleft.length - 1;\r\n var combo = -1, last = -1;\r\n var i = fleft.length - 1;\r\n for (; i >= 0; i--) {\r\n var ch = fleft.charAt(i);\r\n var c = tleft.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n last = -1;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \"#\":\r\n last = i;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \",\":\r\n if (!isEmpty(c)) {\r\n // 计算一个,分隔区间的长度\r\n var com = fleft.match(/,[#0]+/);\r\n if (com) {\r\n combo = com[0].length - 1;\r\n }\r\n left = \",\" + left;\r\n }\r\n break;\r\n default :\r\n left = ch + left;\r\n break;\r\n }\r\n }\r\n if (last > -1) {\r\n // 处理剩余字符\r\n var tll = tleft.substr(0, j + 1);\r\n left = left.substr(0, last) + tll + left.substr(last);\r\n }\r\n if (combo > 0) {\r\n // 处理,分隔区间\r\n var res = left.match(/[0-9]+,/);\r\n if (res) {\r\n res = res[0];\r\n var newstr = \"\", n = res.length - 1 - combo;\r\n for (; n >= 0; n = n - combo) {\r\n newstr = res.substr(n, combo) + \",\" + newstr;\r\n }\r\n var lres = res.substr(0, n + combo);\r\n if (!isEmpty(lres)) {\r\n newstr = lres + \",\" + newstr;\r\n }\r\n }\r\n left = left.replace(/[0-9]+,/, newstr);\r\n }\r\n return left;\r\n }\r\n\r\n\r\n BI.cjkEncode = function (text) {\r\n // alex:如果非字符串,返回其本身(cjkEncode(234) 返回 \"\"是不对的)\r\n if (typeof text !== \"string\") {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var code = text.charCodeAt(i);\r\n if (code >= 128 || code === 91 || code === 93) {// 91 is \"[\", 93 is \"]\".\r\n newText += \"[\" + code.toString(16) + \"]\";\r\n } else {\r\n newText += text.charAt(i);\r\n }\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n /**\r\n * 将cjkEncode处理过的字符串转化为原始字符串\r\n *\r\n * @static\r\n * @param text 需要做解码的字符串\r\n * @return {String} 解码后的字符串\r\n */\r\n BI.cjkDecode = function (text) {\r\n if (text == null) {\r\n return \"\";\r\n }\r\n // 查找没有 \"[\", 直接返回. kunsnat:数字的时候, 不支持indexOf方法, 也是直接返回.\r\n if (!isNaN(text) || text.indexOf(\"[\") == -1) {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var ch = text.charAt(i);\r\n if (ch == \"[\") {\r\n var rightIdx = text.indexOf(\"]\", i + 1);\r\n if (rightIdx > i + 1) {\r\n var subText = text.substring(i + 1, rightIdx);\r\n // james:主要是考虑[CDATA[]]这样的值的出现\r\n if (subText.length > 0) {\r\n ch = String.fromCharCode(eval(\"0x\" + subText));\r\n }\r\n\r\n i = rightIdx;\r\n }\r\n }\r\n\r\n newText += ch;\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n // replace the html special tags\r\n var SPECIAL_TAGS = {\r\n \"&\": \"&\",\r\n \"\\\"\": \""\",\r\n \"<\": \"<\",\r\n \">\": \">\"\r\n };\r\n BI.htmlEncode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|\\\"|<|>\", function (v) {\r\n return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : \" \";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|"|<|>| \", function (v) {\r\n switch (v) {\r\n case \"&\":\r\n return \"&\";\r\n case \""\":\r\n return \"\\\"\";\r\n case \"<\":\r\n return \"<\";\r\n case \">\":\r\n return \">\";\r\n case \" \":\r\n default:\r\n return \" \";\r\n }\r\n });\r\n };\r\n\r\n BI.cjkEncodeDO = function (o) {\r\n if (BI.isPlainObject(o)) {\r\n var result = {};\r\n _.each(o, function (v, k) {\r\n if (!(typeof v === \"string\")) {\r\n v = BI.jsonEncode(v);\r\n }\r\n // wei:bug 43338,如果key是中文,cjkencode后o的长度就加了1,ie9以下版本死循环,所以新建对象result。\r\n k = BI.cjkEncode(k);\r\n result[k] = BI.cjkEncode(v);\r\n });\r\n return result;\r\n }\r\n return o;\r\n };\r\n\r\n BI.jsonEncode = function (o) {\r\n // james:这个Encode是抄的EXT的\r\n var useHasOwn = !!{}.hasOwnProperty;\r\n\r\n // crashes Safari in some instances\r\n // var validRE = /^(\"(\\\\.|[^\"\\\\\\n\\r])*?\"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/;\r\n\r\n var m = {\r\n \"\\b\": \"\\\\b\",\r\n \"\\t\": \"\\\\t\",\r\n \"\\n\": \"\\\\n\",\r\n \"\\f\": \"\\\\f\",\r\n \"\\r\": \"\\\\r\",\r\n \"\\\"\": \"\\\\\\\"\",\r\n \"\\\\\": \"\\\\\\\\\"\r\n };\r\n\r\n var encodeString = function (s) {\r\n if (/[\"\\\\\\x00-\\x1f]/.test(s)) {\r\n return \"\\\"\" + s.replace(/([\\x00-\\x1f\\\\\"])/g, function (a, b) {\r\n var c = m[b];\r\n if (c) {\r\n return c;\r\n }\r\n c = b.charCodeAt();\r\n return \"\\\\u00\" +\r\n Math.floor(c / 16).toString(16) +\r\n (c % 16).toString(16);\r\n }) + \"\\\"\";\r\n }\r\n return \"\\\"\" + s + \"\\\"\";\r\n };\r\n\r\n var encodeArray = function (o) {\r\n var a = [\"[\"], b, i, l = o.length, v;\r\n for (i = 0; i < l; i += 1) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"function\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n a.push(\"]\");\r\n return a.join(\"\");\r\n };\r\n\r\n if (typeof o === \"undefined\" || o === null) {\r\n return \"null\";\r\n } else if (BI.isArray(o)) {\r\n return encodeArray(o);\r\n } else if (o instanceof Date) {\r\n /*\r\n * alex:原来只是把年月日时分秒简单地拼成一个String,无法decode\r\n * 现在这么处理就可以decode了,但是JS.jsonDecode和Java.JSONObject也要跟着改一下\r\n */\r\n return BI.jsonEncode({\r\n __time__: o.getTime()\r\n });\r\n } else if (typeof o === \"string\") {\r\n return encodeString(o);\r\n } else if (typeof o === \"number\") {\r\n return isFinite(o) ? String(o) : \"null\";\r\n } else if (typeof o === \"boolean\") {\r\n return String(o);\r\n } else if (BI.isFunction(o)) {\r\n return String(o);\r\n }\r\n var a = [\"{\"], b, i, v;\r\n for (i in o) {\r\n if (!useHasOwn || o.hasOwnProperty(i)) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(BI.jsonEncode(i), \":\",\r\n v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n }\r\n a.push(\"}\");\r\n return a.join(\"\");\r\n\r\n };\r\n\r\n BI.jsonDecode = function (text) {\r\n\r\n try {\r\n // 注意0啊\r\n // var jo = $.parseJSON(text) || {};\r\n var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);\r\n if (jo == null) {\r\n jo = {};\r\n }\r\n } catch (e) {\r\n /*\r\n * richie:浏览器只支持标准的JSON字符串转换,而jQuery会默认调用浏览器的window.JSON.parse()函数进行解析\r\n * 比如:var str = \"{'a':'b'}\",这种形式的字符串转换为JSON就会抛异常\r\n */\r\n try {\r\n jo = new Function(\"return \" + text)() || {};\r\n } catch (e) {\r\n // do nothing\r\n }\r\n if (jo == null) {\r\n jo = [];\r\n }\r\n }\r\n if (!_hasDateInJson(text)) {\r\n return jo;\r\n }\r\n\r\n function _hasDateInJson (json) {\r\n if (!json || typeof json !== \"string\") {\r\n return false;\r\n }\r\n return json.indexOf(\"__time__\") != -1;\r\n }\r\n\r\n return (function (o) {\r\n if (typeof o === \"string\") {\r\n return o;\r\n }\r\n if (o && o.__time__ != null) {\r\n return new Date(o.__time__);\r\n }\r\n for (var a in o) {\r\n if (o[a] == o || typeof o[a] === \"object\" || _.isFunction(o[a])) {\r\n break;\r\n }\r\n o[a] = arguments.callee(o[a]);\r\n }\r\n\r\n return o;\r\n })(jo);\r\n };\r\n\r\n /**\r\n * 获取编码后的url\r\n * @param urlTemplate url模板\r\n * @param param 参数\r\n * @returns {*|String}\r\n * @example\r\n * BI.getEncodeURL(\"design/{tableName}/{fieldName}\",{tableName: \"A\", fieldName: \"a\"}) // design/A/a\r\n */\r\n BI.getEncodeURL = function (urlTemplate, param) {\r\n return urlTemplate.replaceAll(\"\\\\{(.*?)\\\\}\", function (ori, str) {\r\n return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);\r\n });\r\n };\r\n\r\n BI.encodeURIComponent = function (url) {\r\n BI.specialCharsMap = BI.specialCharsMap || {};\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(BI.specialCharsMap || []).join(\"|\"), function (str) {\r\n switch (str) {\r\n case \"\\\\\":\r\n return BI.specialCharsMap[\"\\\\\\\\\"] || str;\r\n default:\r\n return BI.specialCharsMap[str] || str;\r\n }\r\n });\r\n return _global.encodeURIComponent(url);\r\n };\r\n\r\n BI.decodeURIComponent = function (url) {\r\n var reserveSpecialCharsMap = {};\r\n BI.each(BI.specialCharsMap, function (initialChar, encodeChar) {\r\n reserveSpecialCharsMap[encodeChar] = initialChar === \"\\\\\\\\\" ? \"\\\\\" : initialChar;\r\n });\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(reserveSpecialCharsMap || []).join(\"|\"), function (str) {\r\n return reserveSpecialCharsMap[str] || str;\r\n });\r\n return _global.decodeURIComponent(url);\r\n };\r\n\r\n BI.contentFormat = function (cv, fmt) {\r\n if (isEmpty(cv)) {\r\n // 原值为空,返回空字符\r\n return \"\";\r\n }\r\n var text = cv.toString();\r\n if (isEmpty(fmt)) {\r\n // 格式为空,返回原字符\r\n return text;\r\n }\r\n if (fmt.match(/^T/)) {\r\n // T - 文本格式\r\n return text;\r\n } else if (fmt.match(/^D/)) {\r\n // D - 日期(时间)格式\r\n if (!(cv instanceof Date)) {\r\n if (typeof cv === \"number\") {\r\n // 毫秒数类型\r\n cv = new Date(cv);\r\n } else {\r\n //字符串类型转化为date类型\r\n cv = new Date(Date.parse((\"\" + cv).replace(/-|\\./g, \"/\")));\r\n }\r\n }\r\n if (!isInvalidDate(cv) && !BI.isNull(cv)) {\r\n var needTrim = fmt.match(/^DT/);\r\n text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));\r\n }\r\n } else if (fmt.match(/E/)) {\r\n // 科学计数格式\r\n text = _eFormat(text, fmt);\r\n } else {\r\n // 数字格式\r\n text = _numberFormat(text, fmt);\r\n }\r\n // ¤ - 货币格式\r\n text = text.replace(/¤/g, \"¥\");\r\n return text;\r\n };\r\n\r\n /**\r\n * 将Java提供的日期格式字符串装换为JS识别的日期格式字符串\r\n * @class FR.parseFmt\r\n * @param fmt 日期格式\r\n * @returns {String}\r\n */\r\n BI.parseFmt = function (fmt) {\r\n if (!fmt) {\r\n return \"\";\r\n }\r\n //日期\r\n fmt = String(fmt)\r\n //年\r\n .replace(/y{4,}/g, \"%Y\")//yyyy的时候替换为Y\r\n .replace(/y{2}/g, \"%y\")//yy的时候替换为y\r\n //月\r\n .replace(/M{4,}/g, \"%b\")//MMMM的时候替换为b,八\r\n .replace(/M{3}/g, \"%B\")//MMM的时候替换为M,八月\r\n .replace(/M{2}/g, \"%X\")//MM的时候替换为X,08\r\n .replace(/M{1}/g, \"%x\")//M的时候替换为x,8\r\n .replace(/a{1}/g, \"%p\");\r\n //天\r\n if (new RegExp(\"d{2,}\", \"g\").test(fmt)) {\r\n fmt = fmt.replace(/d{2,}/g, \"%d\");//dd的时候替换为d\r\n } else {\r\n fmt = fmt.replace(/d{1}/g, \"%e\");//d的时候替换为j\r\n }\r\n //时\r\n if (new RegExp(\"h{2,}\", \"g\").test(fmt)) {//12小时制\r\n fmt = fmt.replace(/h{2,}/g, \"%I\");\r\n } else {\r\n fmt = fmt.replace(/h{1}/g, \"%I\");\r\n }\r\n if (new RegExp(\"H{2,}\", \"g\").test(fmt)) {//24小时制\r\n fmt = fmt.replace(/H{2,}/g, \"%H\");\r\n } else {\r\n fmt = fmt.replace(/H{1}/g, \"%H\");\r\n }\r\n fmt = fmt.replace(/m{2,}/g, \"%M\")//分\r\n //秒\r\n .replace(/s{2,}/g, \"%S\");\r\n\r\n return fmt;\r\n };\r\n\r\n /**\r\n * 把字符串按照对应的格式转化成日期对象\r\n *\r\n * @example\r\n * var result = BI.str2Date('2013-12-12', 'yyyy-MM-dd');//Thu Dec 12 2013 00:00:00 GMT+0800\r\n *\r\n * @class BI.str2Date\r\n * @param str 字符串\r\n * @param format 日期格式\r\n * @returns {*}\r\n */\r\n BI.str2Date = function (str, format) {\r\n if (typeof str != \"string\" || typeof format != \"string\") {\r\n return null;\r\n }\r\n var fmt = BI.parseFmt(format);\r\n return BI.parseDateTime(str, fmt);\r\n };\r\n\r\n /**\r\n * 把日期对象按照指定格式转化成字符串\r\n *\r\n * @example\r\n * var date = new Date('Thu Dec 12 2013 00:00:00 GMT+0800');\r\n * var result = BI.date2Str(date, 'yyyy-MM-dd');//2013-12-12\r\n *\r\n * @class BI.date2Str\r\n * @param date 日期\r\n * @param format 日期格式\r\n * @returns {String}\r\n */\r\n BI.date2Str = function (date, format) {\r\n if (!date) {\r\n return \"\";\r\n }\r\n // O(len(format))\r\n var len = format.length, result = \"\";\r\n if (len > 0) {\r\n var flagch = format.charAt(0), start = 0, str = flagch;\r\n for (var i = 1; i < len; i++) {\r\n var ch = format.charAt(i);\r\n if (flagch !== ch) {\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: i - start\r\n }, date);\r\n flagch = ch;\r\n start = i;\r\n str = flagch;\r\n } else {\r\n str += ch;\r\n }\r\n }\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: len - start\r\n }, date);\r\n }\r\n return result;\r\n\r\n function compileJFmt (jfmt, date) {\r\n var str = jfmt.str, len = jfmt.len, ch = jfmt[\"char\"];\r\n switch (ch) {\r\n case \"E\": // 星期\r\n str = BI.Date._DN[date.getDay()];\r\n break;\r\n case \"y\": // 年\r\n if (len <= 3) {\r\n str = (date.getFullYear() + \"\").slice(2, 4);\r\n } else {\r\n str = date.getFullYear();\r\n }\r\n break;\r\n case \"M\": // 月\r\n if (len > 2) {\r\n str = BI.Date._MN[date.getMonth()];\r\n } else if (len < 2) {\r\n str = date.getMonth() + 1;\r\n } else {\r\n str = BI.leftPad(date.getMonth() + 1 + \"\", 2, \"0\");\r\n }\r\n break;\r\n case \"d\": // 日\r\n if (len > 1) {\r\n str = BI.leftPad(date.getDate() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getDate();\r\n }\r\n break;\r\n case \"h\": // 时(12)\r\n var hour = date.getHours() % 12;\r\n if (hour === 0) {\r\n hour = 12;\r\n }\r\n if (len > 1) {\r\n str = BI.leftPad(hour + \"\", 2, \"0\");\r\n } else {\r\n str = hour;\r\n }\r\n break;\r\n case \"H\": // 时(24)\r\n if (len > 1) {\r\n str = BI.leftPad(date.getHours() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getHours();\r\n }\r\n break;\r\n case \"m\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getMinutes() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getMinutes();\r\n }\r\n break;\r\n case \"s\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getSeconds() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getSeconds();\r\n }\r\n break;\r\n case \"a\":\r\n str = date.getHours() < 12 ? \"am\" : \"pm\";\r\n break;\r\n case \"z\":\r\n str = BI.getTimezone(date);\r\n break;\r\n default:\r\n str = jfmt.str;\r\n break;\r\n }\r\n return str;\r\n }\r\n };\r\n\r\n BI.object2Number = function (value) {\r\n if (value == null) {\r\n return 0;\r\n }\r\n if (typeof value === \"number\") {\r\n return value;\r\n }\r\n var str = value + \"\";\r\n if (str.indexOf(\".\") === -1) {\r\n return parseInt(str);\r\n }\r\n return parseFloat(str);\r\n };\r\n\r\n BI.object2Date = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n } else if (typeof obj === \"number\") {\r\n return new Date(obj);\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n\r\n return new Date();\r\n\r\n };\r\n\r\n BI.object2Time = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n if (str.indexOf(\"/\") === -1 && str.indexOf(\":\") !== -1) {\r\n dt = new Date(\"1970/01/01 \" + str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n }\r\n dt = BI.parseDateTime(str, \"HH:mm:ss\");\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n return new Date();\r\n\r\n };\r\n})();\r\n/**\r\n * guy\r\n *\r\n * @class BI.HighlightBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.HighlightBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.HighlightBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if (item instanceof BI.Single) {\r\n var rule = o.rule(item.getValue(), item);\r\n\r\n function doBe (run) {\r\n if (run === true) {\r\n item.doHighLight && item.doHighLight.apply(item, args);\r\n } else {\r\n item.unHighLight && item.unHighLight.apply(item, args);\r\n }\r\n }\r\n\r\n if (BI.isFunction(rule)) {\r\n rule(doBe);\r\n } else {\r\n doBe(rule);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 标红行为\r\n * @class BI.RedMarkBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.RedMarkBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.RedMarkBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if(item instanceof BI.Single) {\r\n if (o.rule(item.getValue(), item)) {\r\n item.doRedMark && item.doRedMark.apply(item, args);\r\n } else {\r\n item.doRedMark && item.unRedMark.apply(item, args);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 控制器\r\n * Controller层超类\r\n * @class BI.Controller\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Controller = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Controller.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n _init: function () {\r\n BI.Controller.superclass._init.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n\r\n }\r\n});\r\nBI.Controller.EVENT_CHANGE = \"__EVENT_CHANGE__\";/**\r\n * 广播\r\n *\r\n * Created by GUY on 2015/12/23.\r\n * @class\r\n */\r\nBI.BroadcastController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BroadcastController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.BroadcastController.superclass._init.apply(this, arguments);\r\n this._broadcasts = {};\r\n },\r\n\r\n on: function (name, fn) {\r\n var self = this;\r\n if (!this._broadcasts[name]) {\r\n this._broadcasts[name] = [];\r\n }\r\n this._broadcasts[name].push(fn);\r\n return function () {\r\n self.remove(name, fn);\r\n };\r\n },\r\n\r\n send: function (name) {\r\n var args = [].slice.call(arguments, 1);\r\n BI.each(this._broadcasts[name], function (i, fn) {\r\n fn.apply(null, args);\r\n });\r\n },\r\n\r\n remove: function (name, fn) {\r\n var self = this;\r\n if (fn) {\r\n BI.remove(this._broadcasts[name], function (idx) {\r\n return self._broadcasts[name].indexOf(fn) === idx;\r\n });\r\n this._broadcasts[name].remove(fn);\r\n if (this._broadcasts[name].length === 0) {\r\n delete this._broadcasts[name];\r\n }\r\n } else {\r\n delete this._broadcasts[name];\r\n }\r\n return this;\r\n }\r\n});/**\r\n * 气泡图控制器\r\n * 控制气泡图的显示方向\r\n *\r\n * Created by GUY on 2015/8/21.\r\n * @class\r\n */\r\nBI.BubblesController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblesController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n bubbleHeight: 18\r\n },\r\n\r\n _init: function () {\r\n BI.BubblesController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.bubblesManager = {};\r\n this.storeBubbles = {};\r\n BI.Resizers.add(\"bubbleController\" + BI.uniqueId(), function () {\r\n BI.each(self.bubblesManager, function (name) {\r\n self.remove(name);\r\n });\r\n self.bubblesManager = {};\r\n self.storeBubbles = {};\r\n });\r\n },\r\n\r\n _createBubble: function (direct, text, level, height) {\r\n return BI.createWidget({\r\n type: \"bi.bubble\",\r\n text: text,\r\n level: level,\r\n height: height || 18,\r\n direction: direct\r\n });\r\n },\r\n\r\n _getOffsetLeft: function (name, context, offsetStyle) {\r\n var left = 0;\r\n if (\"center\" === offsetStyle) {\r\n left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n if (\"right\" === offsetStyle) {\r\n left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n return context.element.offset().left;\r\n },\r\n\r\n _getOffsetTop: function (name, context, offsetStyle) {\r\n var top = 0;\r\n if (\"center\" === offsetStyle) {\r\n top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n } else if (\"right\" === offsetStyle) {\r\n top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n }\r\n return context.element.offset().top;\r\n },\r\n\r\n _getLeftPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getLeftPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getBottomPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getBottomPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getTopPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getTopPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getRightPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getRightPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n /**\r\n *\r\n * @param name\r\n * @param text\r\n * @param context\r\n * @param offsetStyle center, left, right三种类型, 默认left\r\n * @returns {BI.BubblesController}\r\n */\r\n show: function (name, text, context, opt) {\r\n opt || (opt = {});\r\n var container = opt.container || context;\r\n var offsetStyle = opt.offsetStyle || {};\r\n var level = opt.level || \"error\";\r\n var adjustYOffset = opt.adjustYOffset || 0;\r\n var adjustXOffset = opt.adjustXOffset || 0;\r\n if (!this.storeBubbles[name]) {\r\n this.storeBubbles[name] = {};\r\n }\r\n if (!this.storeBubbles[name][\"top\"]) {\r\n this.storeBubbles[name][\"top\"] = this._createBubble(\"top\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"top\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"top\"]);\r\n var position = this._getTopPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {\r\n if (!this.storeBubbles[name][\"left\"]) {\r\n this.storeBubbles[name][\"left\"] = this._createBubble(\"left\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"left\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"left\"]);\r\n var position = this._getLeftPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left - adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isLeftSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"right\"]) {\r\n this.storeBubbles[name][\"right\"] = this._createBubble(\"right\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"right\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"right\"]);\r\n var position = this._getRightPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"bottom\"]) {\r\n this.storeBubbles[name][\"bottom\"] = this._createBubble(\"bottom\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"bottom\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"bottom\"]);\r\n var position = this._getBottomPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});\r\n this.get(name).invisible();\r\n }\r\n }\r\n }\r\n this.get(name).setText(text);\r\n this.get(name).visible();\r\n return this;\r\n },\r\n\r\n hide: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.bubblesManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.bubblesManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.bubblesManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n BI.each(this.storeBubbles[name], function (dir, bubble) {\r\n bubble.destroy();\r\n });\r\n delete this.storeBubbles[name];\r\n delete this.bubblesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 弹出层面板控制器, z-index在10w层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.LayerController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LayerController.superclass._defaultConfig.apply(this, arguments), {\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LayerController.superclass._init.apply(this, arguments);\r\n this.layerManager = {};\r\n this.layouts = {};\r\n this.zindex = BI.zIndex_layer;\r\n BI.Resizers.add(\"layerController\" + BI.uniqueId(), BI.bind(this._resize, this));\r\n },\r\n\r\n _resize: function () {\r\n BI.each(this.layouts, function (i, layer) {\r\n if (layer.element.is(\":visible\")) {\r\n layer.element.trigger(\"__resize__\");\r\n }\r\n });\r\n },\r\n\r\n make: function (name, container, op, context) {\r\n if (BI.isWidget(container)) {\r\n op = op || {};\r\n op.container = container;\r\n } else {\r\n context = op;\r\n op = container;\r\n }\r\n return this.create(name, null, op, context);\r\n },\r\n\r\n create: function (name, from, op, context) {\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n op || (op = {});\r\n var offset = op.offset || {};\r\n var w = from;\r\n if (BI.isWidget(from)) {\r\n w = from.element;\r\n }\r\n if (BI.isNotEmptyString(w)) {\r\n w = BI.Widget._renderEngine.createElement(w);\r\n }\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n var widget = BI.createWidget((op.render || {}), BI.extend({\r\n type: \"bi.layout\"\r\n }, op), context);\r\n var layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n invisible: true,\r\n items: [{\r\n el: widget,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, context);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: op.container || this.options.render,\r\n items: [{\r\n el: layout,\r\n left: offset.left || 0,\r\n right: offset.right || 0,\r\n top: offset.top || 0,\r\n bottom: offset.bottom || 0\r\n }]\r\n });\r\n if (w) {\r\n layout.element.addClass(\"bi-popup-view\");\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n layout.element.on(\"__resize__\", function () {\r\n w.is(\":visible\") &&\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n });\r\n }\r\n this.add(name, widget, layout);\r\n return widget;\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).invisible();\r\n this._getLayout(name).element.hide(0, callback);\r\n return this;\r\n },\r\n\r\n show: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).visible();\r\n this._getLayout(name).element.css(\"z-index\", this.zindex++).show(0, callback).trigger(\"__resize__\");\r\n return this;\r\n },\r\n\r\n isVisible: function (name) {\r\n return this.has(name) && this._getLayout(name).isVisible();\r\n },\r\n\r\n add: function (name, layer, layout) {\r\n if (this.has(name)) {\r\n throw new Error(\"name is already exist\");\r\n }\r\n layout.setVisible(false);\r\n this.layerManager[name] = layer;\r\n this.layouts[name] = layout;\r\n layout.element.css(\"z-index\", this.zindex++);\r\n return this;\r\n },\r\n\r\n _getLayout: function (name) {\r\n return this.layouts[name];\r\n },\r\n\r\n get: function (name) {\r\n return this.layerManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.layerManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.layerManager[name].destroy();\r\n this.layouts[name].destroy();\r\n delete this.layerManager[name];\r\n delete this.layouts[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(BI.keys(this.layerManager), function (index, name) {\r\n self.layerManager[name].destroy();\r\n self.layouts[name].destroy();\r\n });\r\n this.layerManager = {};\r\n this.layouts = {};\r\n return this;\r\n }\r\n});/**\r\n * 遮罩面板, z-index在1亿层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.MaskersController = BI.inherit(BI.LayerController, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MaskersController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.MaskersController.superclass._init.apply(this, arguments);\r\n this.zindex = BI.zIndex_masker;\r\n }\r\n});/**\r\n * guy\r\n * popover弹出层控制器, z-index在100w层级\r\n * @class BI.popoverController\r\n * @extends BI.Controller\r\n */\r\nBI.PopoverController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this, arguments), {\r\n modal: true, // 模态窗口\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopoverController.superclass._init.apply(this, arguments);\r\n this.modal = this.options.modal;\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindex = BI.zIndex_popover;\r\n this.zindexMap = {};\r\n },\r\n\r\n _check: function (name) {\r\n return BI.isNotNull(this.floatManager[name]);\r\n },\r\n\r\n create: function (name, options, context) {\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n var popover = BI.createWidget(options || {}, {\r\n type: \"bi.popover\"\r\n }, context);\r\n this.add(name, popover, options, context);\r\n return this;\r\n },\r\n\r\n add: function (name, popover, options, context) {\r\n var self = this;\r\n options || (options = {});\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n cls: \"bi-popup-view\",\r\n items: [{\r\n el: (this.floatLayer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [popover]\r\n }, context)),\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.floatManager[name] = popover;\r\n (function (key) {\r\n popover.on(BI.Popover.EVENT_CLOSE, function () {\r\n self.close(key);\r\n });\r\n })(name);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: options.container || this.options.render,\r\n items: [{\r\n el: this.floatContainer[name],\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n return this;\r\n },\r\n\r\n open: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (!this.floatOpened[name]) {\r\n this.floatOpened[name] = true;\r\n var container = this.floatContainer[name];\r\n container.element.css(\"zIndex\", this.zindex++);\r\n this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);\r\n this.zindexMap[name] = this.zindex;\r\n this.modal && container.element.__buildZIndexMask__(this.zindex++);\r\n this.get(name).setZindex(this.zindex++);\r\n this.floatContainer[name].visible();\r\n var popover = this.get(name);\r\n popover.show && popover.show();\r\n var W = BI.Widget._renderEngine.createElement(this.options.render).width(), H = BI.Widget._renderEngine.createElement(this.options.render).height();\r\n var w = popover.element.width(), h = popover.element.height();\r\n var left = (W - w) / 2, top = (H - h) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n popover.element.css({\r\n left: left + \"px\",\r\n top: top + \"px\"\r\n });\r\n }\r\n return this;\r\n },\r\n\r\n close: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (this.floatOpened[name]) {\r\n delete this.floatOpened[name];\r\n this.floatContainer[name].invisible();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n }\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.floatManager[name];\r\n },\r\n\r\n remove: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name].destroy();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n delete this.floatManager[name];\r\n delete this.floatLayer[name];\r\n delete this.zindexMap[name];\r\n delete this.floatContainer[name];\r\n delete this.floatOpened[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(this.floatContainer, function (name, container) {\r\n container.destroy();\r\n self.modal && self.floatContainer[name].element.__releaseZIndexMask__(self.zindexMap[name]);\r\n });\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindexMap = {};\r\n return this;\r\n }\r\n});/**\r\n * window.resize 控制器\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.ResizeController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ResizeController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.resizerManger = {};\r\n var fn = BI.debounce(function (ev) {\r\n // if (BI.isWindow(ev.target)) {\r\n self._resize(ev);\r\n // }\r\n }, 30);\r\n BI.Widget._renderEngine.createElement(_global).resize(fn);\r\n },\r\n\r\n _resize: function (ev) {\r\n BI.each(this.resizerManger, function (key, resizer) {\r\n if (resizer instanceof BI.$) {\r\n if (resizer.is(\":visible\")) {\r\n resizer.trigger(\"__resize__\");\r\n }\r\n return;\r\n }\r\n if (resizer instanceof BI.Layout) {\r\n resizer.resize();\r\n return;\r\n }\r\n if (BI.isFunction(resizer)) {\r\n resizer(ev);\r\n return;\r\n }\r\n });\r\n },\r\n\r\n add: function (name, resizer) {\r\n var self = this;\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.resizerManger[name] = resizer;\r\n return function () {\r\n self.remove(name);\r\n };\r\n },\r\n\r\n get: function (name) {\r\n return this.resizerManger[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.resizerManger[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.resizerManger[name];\r\n return this;\r\n }\r\n});/**\r\n * tooltip控制器\r\n * 控制tooltip的显示, 且页面中只有一个tooltip显示\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.TooltipsController\r\n * @extends BI.Controller\r\n */\r\nBI.TooltipsController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n height: 18\r\n },\r\n\r\n _init: function () {\r\n BI.TooltipsController.superclass._init.apply(this, arguments);\r\n this.tooltipsManager = {};\r\n this.showingTips = {};// 存储正在显示的tooltip\r\n },\r\n\r\n _createTooltip: function (text, level) {\r\n return BI.createWidget({\r\n type: \"bi.tooltip\",\r\n text: text,\r\n level: level,\r\n stopEvent: true\r\n });\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.showingTips[name];\r\n this.get(name).element.hide(0, callback);\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n create: function (name, text, level, context) {\r\n if (!this.has(name)) {\r\n var tooltip = this._createTooltip(text, level);\r\n this.add(name, tooltip);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context || \"body\",\r\n items: [{\r\n el: tooltip\r\n }]\r\n });\r\n tooltip.invisible();\r\n }\r\n return this.get(name);\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n show: function (e, name, text, level, context, opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n BI.each(this.showingTips, function (i, tip) {\r\n self.hide(i);\r\n });\r\n this.showingTips = {};\r\n if (!this.has(name)) {\r\n this.create(name, text, level, opt.container || \"body\");\r\n }\r\n if (!opt.belowMouse) {\r\n var offset = context.element.offset();\r\n var bounds = context.element.bounds();\r\n if (bounds.height === 0 || bounds.width === 0) {\r\n return;\r\n }\r\n var top = offset.top + bounds.height + 5;\r\n }\r\n var tooltip = this.get(name);\r\n tooltip.setText(text);\r\n tooltip.element.css({\r\n left: \"0px\",\r\n top: \"0px\"\r\n });\r\n tooltip.visible();\r\n tooltip.element.height(tooltip.element[0].scrollHeight);\r\n this.showingTips[name] = true;\r\n // scale影响要计算在内\r\n // var scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;\r\n // var x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;\r\n var x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15;\r\n if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement(\"body\").outerWidth()) {\r\n x -= tooltip.element.outerWidth() + 15;\r\n }\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").outerHeight();\r\n if (y + tooltip.element.outerHeight() > bodyHeight || top + tooltip.element.outerHeight() > bodyHeight) {\r\n y -= tooltip.element.outerHeight() + 15;\r\n !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));\r\n } else {\r\n !opt.belowMouse && (y = Math.max(y, top));\r\n }\r\n tooltip.element.css({\r\n left: x < 0 ? 0 : x + \"px\",\r\n top: y < 0 ? 0 : y + \"px\"\r\n });\r\n tooltip.element.hover(function () {\r\n self.remove(name);\r\n context.element.trigger(\"mouseleave.title\" + context.getName());\r\n });\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.tooltipsManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.tooltipsManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.tooltipsManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.tooltipsManager[name].destroy();\r\n delete this.tooltipsManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 事件集合\r\n * @class BI.Events\r\n */\r\n_.extend(BI, {\r\n Events: {\r\n\r\n /**\r\n * @static\r\n * @property keydown事件\r\n */\r\n KEYDOWN: \"_KEYDOWN\",\r\n\r\n /**\r\n * @static\r\n * @property 回撤事件\r\n */\r\n BACKSPACE: \"_BACKSPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 空格事件\r\n */\r\n SPACE: \"_SPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 回车事件\r\n */\r\n ENTER: \"_ENTER\",\r\n\r\n /**\r\n * @static\r\n * @property 确定事件\r\n */\r\n CONFIRM: \"_CONFIRM\",\r\n\r\n /**\r\n * @static\r\n * @property 错误事件\r\n */\r\n ERROR: \"_ERROR\",\r\n\r\n /**\r\n * @static\r\n * @property 暂停事件\r\n */\r\n PAUSE: \"_PAUSE\",\r\n\r\n /**\r\n * @static\r\n * @property destroy事件\r\n */\r\n DESTROY: \"_DESTROY\",\r\n\r\n /**\r\n * @static\r\n * @property 挂载事件\r\n */\r\n MOUNT: \"_MOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 取消挂载事件\r\n */\r\n UNMOUNT: \"_UNMOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 清除选择\r\n */\r\n CLEAR: \"_CLEAR\",\r\n\r\n /**\r\n * @static\r\n * @property 添加数据\r\n */\r\n ADD: \"_ADD\",\r\n\r\n /**\r\n * @static\r\n * @property 正在编辑状态事件\r\n */\r\n EDITING: \"_EDITING\",\r\n\r\n /**\r\n * @static\r\n * @property 空状态事件\r\n */\r\n EMPTY: \"_EMPTY\",\r\n\r\n /**\r\n * @static\r\n * @property 显示隐藏事件\r\n */\r\n VIEW: \"_VIEW\",\r\n\r\n /**\r\n * @static\r\n * @property 窗体改变大小\r\n */\r\n RESIZE: \"_RESIZE\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑前事件\r\n */\r\n BEFOREEDIT: \"_BEFOREEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑后事件\r\n */\r\n AFTEREDIT: \"_AFTEREDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 开始编辑事件\r\n */\r\n STARTEDIT: \"_STARTEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 停止编辑事件\r\n */\r\n STOPEDIT: \"_STOPEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 值改变事件\r\n */\r\n CHANGE: \"_CHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 下拉弹出菜单事件\r\n */\r\n EXPAND: \"_EXPAND\",\r\n\r\n /**\r\n * @static\r\n * @property 关闭下拉菜单事件\r\n */\r\n COLLAPSE: \"_COLLAPSE\",\r\n\r\n /**\r\n * @static\r\n * @property 回调事件\r\n */\r\n CALLBACK: \"_CALLBACK\",\r\n\r\n /**\r\n * @static\r\n * @property 点击事件\r\n */\r\n CLICK: \"_CLICK\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变事件,一般是用在复选按钮和单选按钮\r\n */\r\n STATECHANGE: \"_STATECHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变前事件\r\n */\r\n BEFORESTATECHANGE: \"_BEFORESTATECHANGE\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 初始化事件\r\n */\r\n INIT: \"_INIT\",\r\n\r\n /**\r\n * @static\r\n * @property 初始化后事件\r\n */\r\n AFTERINIT: \"_AFTERINIT\",\r\n\r\n /**\r\n * @static\r\n * @property 滚动条滚动事件\r\n */\r\n SCROLL: \"_SCROLL\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 开始加载事件\r\n */\r\n STARTLOAD: \"_STARTLOAD\",\r\n\r\n /**\r\n * @static\r\n * @property 加载后事件\r\n */\r\n AFTERLOAD: \"_AFTERLOAD\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 提交前事件\r\n */\r\n BS: \"beforesubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交后事件\r\n */\r\n AS: \"aftersubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交完成事件\r\n */\r\n SC: \"submitcomplete\",\r\n\r\n /**\r\n * @static\r\n * @property 提交失败事件\r\n */\r\n SF: \"submitfailure\",\r\n\r\n /**\r\n * @static\r\n * @property 提交成功事件\r\n */\r\n SS: \"submitsuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交前事件\r\n */\r\n BVW: \"beforeverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交后事件\r\n */\r\n AVW: \"afterverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验后事件\r\n */\r\n AV: \"afterverify\",\r\n\r\n /**\r\n * @static\r\n * @property 填报前事件\r\n */\r\n BW: \"beforewrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报后事件\r\n */\r\n AW: \"afterwrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报成功事件\r\n */\r\n WS: \"writesuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 填报失败事件\r\n */\r\n WF: \"writefailure\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行前事件\r\n */\r\n BA: \"beforeappend\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行后事件\r\n */\r\n AA: \"afterappend\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行前事件\r\n */\r\n BD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行后事件\r\n */\r\n AD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 未提交离开事件\r\n */\r\n UC: \"unloadcheck\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property PDF导出前事件\r\n */\r\n BTOPDF: \"beforetopdf\",\r\n\r\n /**\r\n * @static\r\n * @property PDF导出后事件\r\n */\r\n ATOPDF: \"aftertopdf\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出前事件\r\n */\r\n BTOEXCEL: \"beforetoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n ATOEXCEL: \"aftertoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出前事件\r\n */\r\n BTOWORD: \"beforetoword\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出后事件\r\n */\r\n ATOWORD: \"aftertoword\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出前事件\r\n */\r\n BTOIMAGE: \"beforetoimage\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出后事件\r\n */\r\n ATOIMAGE: \"aftertoimage\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出前事件\r\n */\r\n BTOHTML: \"beforetohtml\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出后事件\r\n */\r\n ATOHTML: \"aftertohtml\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导入前事件\r\n */\r\n BIMEXCEL: \"beforeimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n AIMEXCEL: \"afterimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印前事件\r\n */\r\n BPDFPRINT: \"beforepdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印后事件\r\n */\r\n APDFPRINT: \"afterpdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印前事件\r\n */\r\n BFLASHPRINT: \"beforeflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印后事件\r\n */\r\n AFLASHPRINT: \"afterflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印前事件\r\n */\r\n BAPPLETPRINT: \"beforeappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印后事件\r\n */\r\n AAPPLETPRINT: \"afterappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印前事件\r\n */\r\n BSEVERPRINT: \"beforeserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印后事件\r\n */\r\n ASERVERPRINT: \"afterserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送前事件\r\n */\r\n BEMAIL: \"beforeemail\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送后事件\r\n */\r\n AEMAIL: \"afteremail\"\r\n }\r\n});/**\r\n * 对数组对象的扩展\r\n * @class Array\r\n */\r\n_.extend(BI, {\r\n\r\n pushArray: function (sArray, array) {\r\n for (var i = 0; i < array.length; i++) {\r\n sArray.push(array[i]);\r\n }\r\n },\r\n pushDistinct: function (sArray, obj) {\r\n if (!BI.contains(sArray, obj)) {\r\n sArray.push(obj);\r\n }\r\n },\r\n pushDistinctArray: function (sArray, array) {\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n BI.pushDistinct(sArray, array[i]);\r\n }\r\n }\r\n});\r\nBI.prepares.push(function () {\r\n BI.Date = BI.Date || {};\r\n // 牵扯到国际化这些常量在页面加载后再生效\r\n // full day names\r\n BI.Date._DN = [BI.i18nText(\"BI-Basic_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Monday\"),\r\n BI.i18nText(\"BI-Basic_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Friday\"),\r\n BI.i18nText(\"BI-Basic_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Sunday\")];\r\n\r\n // short day names\r\n BI.Date._SDN = [BI.i18nText(\"BI-Basic_Simple_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Monday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Friday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Sunday\")];\r\n\r\n // Monday first, etc.\r\n BI.Date._FD = 1;\r\n\r\n // full month namesdat\r\n BI.Date._MN = [\r\n BI.i18nText(\"BI-Basic_January\"),\r\n BI.i18nText(\"BI-Basic_February\"),\r\n BI.i18nText(\"BI-Basic_March\"),\r\n BI.i18nText(\"BI-Basic_April\"),\r\n BI.i18nText(\"BI-Basic_May\"),\r\n BI.i18nText(\"BI-Basic_June\"),\r\n BI.i18nText(\"BI-Basic_July\"),\r\n BI.i18nText(\"BI-Basic_August\"),\r\n BI.i18nText(\"BI-Basic_September\"),\r\n BI.i18nText(\"BI-Basic_October\"),\r\n BI.i18nText(\"BI-Basic_November\"),\r\n BI.i18nText(\"BI-Basic_December\")];\r\n\r\n // short month names\r\n BI.Date._SMN = [0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n 5,\r\n 6,\r\n 7,\r\n 8,\r\n 9,\r\n 10,\r\n 11];\r\n\r\n BI.Date._QN = [\"\", BI.i18nText(\"BI-Quarter_1\"),\r\n BI.i18nText(\"BI-Quarter_2\"),\r\n BI.i18nText(\"BI-Quarter_3\"),\r\n BI.i18nText(\"BI-Quarter_4\")];\r\n\r\n /** Adds the number of days array to the Date object. */\r\n BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n // 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以\r\n BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];\r\n});/** Constants used for time computations */\r\nBI.Date = BI.Date || {};\r\nBI.Date.SECOND = 1000;\r\nBI.Date.MINUTE = 60 * BI.Date.SECOND;\r\nBI.Date.HOUR = 60 * BI.Date.MINUTE;\r\nBI.Date.DAY = 24 * BI.Date.HOUR;\r\nBI.Date.WEEK = 7 * BI.Date.DAY;\r\n\r\n_.extend(BI, {\r\n /**\r\n * 获取时区\r\n * @returns {String}\r\n */\r\n getTimezone: function (date) {\r\n return date.toString().replace(/^.* (?:\\((.*)\\)|([A-Z]{1,4})(?:[\\-+][0-9]{4})?(?: -?\\d+)?)$/, \"$1$2\").replace(/[^A-Z]/g, \"\");\r\n },\r\n\r\n /** Returns the number of days in the current month */\r\n getMonthDays: function (date, month) {\r\n var year = date.getFullYear();\r\n if (typeof month === \"undefined\") {\r\n month = date.getMonth();\r\n }\r\n if (((0 == (year % 4)) && ((0 != (year % 100)) || (0 == (year % 400)))) && month == 1) {\r\n return 29;\r\n }\r\n return BI.Date._MD[month];\r\n\r\n },\r\n\r\n /**\r\n * 获取每月的最后一天\r\n * @returns {Date}\r\n */\r\n getLastDateOfMonth: function (date) {\r\n return BI.getDate(date.getFullYear(), date.getMonth(), BI.getMonthDays(date));\r\n },\r\n\r\n /** Returns the number of day in the year. */\r\n getDayOfYear: function (date) {\r\n var now = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var then = BI.getDate(date.getFullYear(), 0, 0, 0, 0, 0);\r\n var time = now - then;\r\n return Math.floor(time / BI.Date.DAY);\r\n },\r\n\r\n /** Returns the number of the week in year, as defined in ISO 8601. */\r\n getWeekNumber: function (date) {\r\n var d = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var week = d.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n var middleDay = (startOfWeek + 3) % 7;\r\n middleDay = middleDay || 7;\r\n // 偏移到周周首之前需要多少天\r\n var offsetWeekStartCount = week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek);\r\n var offsetWeekMiddleCount = middleDay < startOfWeek ? (7 + middleDay - startOfWeek) : (middleDay - startOfWeek);\r\n d.setDate(d.getDate() - offsetWeekStartCount + offsetWeekMiddleCount);\r\n var ms = d.valueOf();\r\n d.setMonth(0);\r\n d.setDate(1);\r\n return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;\r\n },\r\n\r\n getQuarter: function (date) {\r\n return Math.floor(date.getMonth() / 3) + 1;\r\n },\r\n\r\n // 离当前时间多少天的时间\r\n getOffsetDate: function (date, offset) {\r\n return BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()) + offset * 864e5);\r\n },\r\n\r\n getOffsetQuarter: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + BI.parseInt(n) * 3, 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n) * 3);\r\n return dt;\r\n },\r\n\r\n // 得到本季度的起始月份\r\n getQuarterStartMonth: function (date) {\r\n var quarterStartMonth = 0;\r\n var nowMonth = date.getMonth();\r\n if (nowMonth < 3) {\r\n quarterStartMonth = 0;\r\n }\r\n if (2 < nowMonth && nowMonth < 6) {\r\n quarterStartMonth = 3;\r\n }\r\n if (5 < nowMonth && nowMonth < 9) {\r\n quarterStartMonth = 6;\r\n }\r\n if (nowMonth > 8) {\r\n quarterStartMonth = 9;\r\n }\r\n return quarterStartMonth;\r\n },\r\n // 获得本季度的起始日期\r\n getQuarterStartDate: function (date) {\r\n return BI.getDate(date.getFullYear(), BI.getQuarterStartMonth(date), 1);\r\n },\r\n // 得到本季度的结束日期\r\n getQuarterEndDate: function (date) {\r\n var quarterEndMonth = BI.getQuarterStartMonth(date) + 2;\r\n return BI.getDate(date.getFullYear(), quarterEndMonth, BI.getMonthDays(date, quarterEndMonth));\r\n },\r\n\r\n // 指定日期n个月之前或之后的日期\r\n getOffsetMonth: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + parseInt(n), 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n));\r\n return dt;\r\n },\r\n\r\n // 获得本周的起始日期\r\n getWeekStartDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)]);\r\n },\r\n // 得到本周的结束日期\r\n getWeekEndDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6);\r\n },\r\n\r\n // 格式化打印日期\r\n print: function (date, str) {\r\n var m = date.getMonth();\r\n var d = date.getDate();\r\n var y = date.getFullYear();\r\n var yWith4number = y + \"\";\r\n while (yWith4number.length < 4) {\r\n yWith4number = \"0\" + yWith4number;\r\n }\r\n var wn = BI.getWeekNumber(date);\r\n var qr = BI.getQuarter(date);\r\n var w = date.getDay();\r\n var s = {};\r\n var hr = date.getHours();\r\n var pm = (hr >= 12);\r\n var ir = (pm) ? (hr - 12) : hr;\r\n var dy = BI.getDayOfYear(date);\r\n if (ir == 0) {\r\n ir = 12;\r\n }\r\n var min = date.getMinutes();\r\n var sec = date.getSeconds();\r\n s[\"%a\"] = BI.Date._SDN[w]; // abbreviated weekday name [FIXME: I18N]\r\n s[\"%A\"] = BI.Date._DN[w]; // full weekday name\r\n s[\"%b\"] = BI.Date._SMN[m]; // abbreviated month name [FIXME: I18N]\r\n s[\"%B\"] = BI.Date._MN[m]; // full month name\r\n // FIXME: %c : preferred date and time representation for the current locale\r\n s[\"%C\"] = 1 + Math.floor(y / 100); // the century number\r\n s[\"%d\"] = (d < 10) ? (\"0\" + d) : d; // the day of the month (range 01 to 31)\r\n s[\"%e\"] = d; // the day of the month (range 1 to 31)\r\n // FIXME: %D : american date style: %m/%d/%y\r\n // FIXME: %E, %F, %G, %g, %h (man strftime)\r\n s[\"%H\"] = (hr < 10) ? (\"0\" + hr) : hr; // hour, range 00 to 23 (24h format)\r\n s[\"%I\"] = (ir < 10) ? (\"0\" + ir) : ir; // hour, range 01 to 12 (12h format)\r\n s[\"%j\"] = (dy < 100) ? ((dy < 10) ? (\"00\" + dy) : (\"0\" + dy)) : dy; // day of the year (range 001 to 366)\r\n s[\"%k\"] = hr + \"\";\t\t// hour, range 0 to 23 (24h format)\r\n s[\"%l\"] = ir + \"\";\t\t// hour, range 1 to 12 (12h format)\r\n s[\"%X\"] = (m < 9) ? (\"0\" + (1 + m)) : (1 + m); // month, range 01 to 12\r\n s[\"%x\"] = m + 1; // month, range 1 to 12\r\n s[\"%M\"] = (min < 10) ? (\"0\" + min) : min; // minute, range 00 to 59\r\n s[\"%n\"] = \"\\n\";\t\t// a newline character\r\n s[\"%p\"] = pm ? \"PM\" : \"AM\";\r\n s[\"%P\"] = pm ? \"pm\" : \"am\";\r\n // FIXME: %r : the time in am/pm notation %I:%M:%S %p\r\n // FIXME: %R : the time in 24-hour notation %H:%M\r\n s[\"%s\"] = Math.floor(date.getTime() / 1000);\r\n s[\"%S\"] = (sec < 10) ? (\"0\" + sec) : sec; // seconds, range 00 to 59\r\n s[\"%t\"] = \"\\t\";\t\t// a tab character\r\n // FIXME: %T : the time in 24-hour notation (%H:%M:%S)\r\n s[\"%U\"] = s[\"%W\"] = s[\"%V\"] = (wn < 10) ? (\"0\" + wn) : wn;\r\n s[\"%u\"] = w + 1;\t// the day of the week (range 1 to 7, 1 = MON)\r\n s[\"%w\"] = w;\t\t// the day of the week (range 0 to 6, 0 = SUN)\r\n // FIXME: %x : preferred date representation for the current locale without the time\r\n // FIXME: %X : preferred time representation for the current locale without the date\r\n s[\"%y\"] = yWith4number.substr(2, 2); // year without the century (range 00 to 99)\r\n s[\"%Y\"] = yWith4number;\t\t// year with the century\r\n s[\"%%\"] = \"%\";\t\t// a literal '%' character\r\n s[\"%Q\"] = qr;\r\n\r\n var re = /%./g;\r\n BI.isKhtml = BI.isKhtml || function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n };\r\n\r\n // 包含年周的格式化,ISO8601标准周的计数会影响年\r\n if ((str.indexOf(\"%Y\") !== -1 || str.indexOf(\"%y\") !== -1) && (str.indexOf(\"%W\") !== -1 || str.indexOf(\"%U\") !== -1 || str.indexOf(\"%V\") !== -1)) {\r\n switch (wn) {\r\n // 如果周数是1,但是当前却在12月,表示此周数为下一年的\r\n case 1:\r\n if (m === 11) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) + 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) + 1;\r\n }\r\n break;\r\n // 如果周数是53,但是当前却在1月,表示此周数为上一年的\r\n case 53:\r\n if (m === 0) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) - 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) - 1;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (!BI.isKhtml()) {\r\n return str.replace(re, function (par) {\r\n return s[par] || par;\r\n });\r\n }\r\n var a = str.match(re);\r\n for (var i = 0; i < a.length; i++) {\r\n var tmp = s[a[i]];\r\n if (tmp) {\r\n re = new RegExp(a[i], \"g\");\r\n str = str.replace(re, tmp);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n});\r\n/**\r\n * 基本的函数\r\n * Created by GUY on 2015/6/24.\r\n */\r\nBI.Func = {};\r\n_.extend(BI.Func, {\r\n /**\r\n * 创建唯一的名字\r\n * @param array\r\n * @param name\r\n * @returns {*}\r\n */\r\n createDistinctName: function (array, name) {\r\n var src = name, idx = 1;\r\n name = name || \"\";\r\n while (true) {\r\n if (BI.every(array, function (i, item) {\r\n return BI.isKey(item) ? item !== name : item.name !== name;\r\n })) {\r\n break;\r\n }\r\n name = src + (idx++);\r\n }\r\n return name;\r\n },\r\n\r\n /**\r\n * 获取字符宽度\r\n * @param str\r\n * @return {number}\r\n */\r\n getGBWidth: function (str) {\r\n str = str + \"\";\r\n str = str.replace(/[^\\x00-\\xff]/g, \"xx\");\r\n return Math.ceil(str.length / 2);\r\n },\r\n\r\n /**\r\n * 获取搜索结果\r\n * @param items\r\n * @param keyword\r\n * @param param 搜索哪个属性\r\n */\r\n getSearchResult: function (items, keyword, param) {\r\n var isArray = BI.isArray(items);\r\n items = isArray ? BI.flatten(items) : items;\r\n param || (param = \"text\");\r\n if (!BI.isKey(keyword)) {\r\n return {\r\n find: BI.deepClone(items),\r\n match: isArray ? [] : {}\r\n };\r\n }\r\n var t, text, py;\r\n keyword = BI.toUpperCase(keyword);\r\n var matched = isArray ? [] : {}, find = isArray ? [] : {};\r\n BI.each(items, function (i, item) {\r\n // 兼容item为null的处理\r\n if (BI.isNull(item)) {\r\n return;\r\n }\r\n item = BI.deepClone(item);\r\n t = BI.stripEL(item);\r\n text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {\r\n return BI.isNotNull(val);\r\n });\r\n\r\n if (BI.isNull(text) || BI.isObject(text)) return;\r\n\r\n py = BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n });\r\n text = BI.toUpperCase(text);\r\n py = BI.toUpperCase(py);\r\n var pidx;\r\n if (text.indexOf(keyword) > -1) {\r\n if (text === keyword) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n } else if (pidx = py.indexOf(keyword), (pidx > -1)) {\r\n if (text === keyword || keyword.length === text.length) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n }\r\n });\r\n return {\r\n match: matched,\r\n find: find\r\n };\r\n }\r\n});\r\n\r\n_.extend(BI, {\r\n beforeFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n if (func.apply(sFunc, arguments) === false) {\r\n return false;\r\n }\r\n return __self.apply(sFunc, arguments);\r\n };\r\n },\r\n\r\n afterFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n var ret = __self.apply(sFunc, arguments);\r\n if (ret === false) {\r\n return false;\r\n }\r\n func.apply(sFunc, arguments);\r\n return ret;\r\n };\r\n }\r\n});_.extend(BI, {\r\n // 给Number类型增加一个add方法,调用起来更加方便。\r\n add: function (num, arg) {\r\n return accAdd(arg, num);\r\n\r\n /**\r\n ** 加法函数,用来得到精确的加法结果\r\n ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。\r\n ** 调用:accAdd(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accAdd (arg1, arg2) {\r\n var r1, r2, m, c;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n c = Math.abs(r1 - r2);\r\n m = Math.pow(10, Math.max(r1, r2));\r\n if (c > 0) {\r\n var cm = Math.pow(10, c);\r\n if (r1 > r2) {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\")) * cm;\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\")) * cm;\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n return (arg1 + arg2) / m;\r\n }\r\n },\r\n\r\n // 给Number类型增加一个sub方法,调用起来更加方便。\r\n sub: function (num, arg) {\r\n return accSub(num, arg);\r\n\r\n /**\r\n ** 减法函数,用来得到精确的减法结果\r\n ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。\r\n ** 调用:accSub(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accSub (arg1, arg2) {\r\n var r1, r2, m, n;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n m = Math.pow(10, Math.max(r1, r2)); // last modify by deeka //动态控制精度长度\r\n n = (r1 >= r2) ? r1 : r2;\r\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\r\n }\r\n },\r\n\r\n // 给Number类型增加一个mul方法,调用起来更加方便。\r\n mul: function (num, arg) {\r\n return accMul(arg, num);\r\n\r\n /**\r\n ** 乘法函数,用来得到精确的乘法结果\r\n ** 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。\r\n ** 调用:accMul(arg1,arg2)\r\n ** 返回值:arg1乘以 arg2的精确结果\r\n **/\r\n function accMul (arg1, arg2) {\r\n var m = 0, s1 = arg1.toString(), s2 = arg2.toString();\r\n try {\r\n m += s1.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n try {\r\n m += s2.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n return Number(s1.replace(\".\", \"\")) * Number(s2.replace(\".\", \"\")) / Math.pow(10, m);\r\n }\r\n },\r\n \r\n // 给Number类型增加一个div方法,调用起来更加方便。\r\n div: function (num, arg) {\r\n return accDivide(num, arg);\r\n\r\n /**\r\n * Return digits length of a number\r\n * @param {*number} num Input number\r\n */\r\n function digitLength (num) {\r\n // Get digit length of e\r\n var eSplit = num.toString().split(/[eE]/);\r\n var len = (eSplit[0].split(\".\")[1] || \"\").length - (+(eSplit[1] || 0));\r\n return len > 0 ? len : 0;\r\n }\r\n /**\r\n * 把小数转成整数,支持科学计数法。如果是小数则放大成整数\r\n * @param {*number} num 输入数\r\n */\r\n function float2Fixed (num) {\r\n if (num.toString().indexOf(\"e\") === -1) {\r\n return Number(num.toString().replace(\".\", \"\"));\r\n }\r\n var dLen = digitLength(num);\r\n return dLen > 0 ? num * Math.pow(10, dLen) : num;\r\n }\r\n\r\n /**\r\n * 精确乘法\r\n */\r\n function times (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return times.apply(void 0, [times(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n var baseNum = digitLength(num1) + digitLength(num2);\r\n var leftValue = num1Changed * num2Changed;\r\n return leftValue / Math.pow(10, baseNum);\r\n }\r\n\r\n /**\r\n * 精确除法\r\n */\r\n function accDivide (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return accDivide.apply(void 0, [accDivide(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n return times((num1Changed / num2Changed), Math.pow(10, digitLength(num2) - digitLength(num1)));\r\n }\r\n }\r\n\r\n});/**\r\n * 对字符串对象的扩展\r\n * @class String\r\n */\r\n_.extend(BI, {\r\n\r\n /**\r\n * 判断字符串是否已指定的字符串开始\r\n * @param str source字符串\r\n * @param {String} startTag 指定的开始字符串\r\n * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false\r\n */\r\n startWith: function (str, startTag) {\r\n str = str || \"\";\r\n if (startTag == null || startTag == \"\" || str.length === 0 || startTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substr(0, startTag.length) == startTag;\r\n },\r\n /**\r\n * 判断字符串是否以指定的字符串结束\r\n * @param str source字符串\r\n * @param {String} endTag 指定的字符串\r\n * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false\r\n */\r\n endWith: function (str, endTag) {\r\n if (endTag == null || endTag == \"\" || str.length === 0 || endTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substring(str.length - endTag.length) == endTag;\r\n },\r\n\r\n /**\r\n * 获取url中指定名字的参数\r\n * @param str source字符串\r\n * @param {String} name 参数的名字\r\n * @return {String} 参数的值\r\n */\r\n getQuery: function (str, name) {\r\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\r\n var r = str.substr(str.indexOf(\"?\") + 1).match(reg);\r\n if (r) {\r\n return unescape(r[2]);\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * 给url加上给定的参数\r\n * @param str source字符串\r\n * @param {Object} paras 参数对象,是一个键值对对象\r\n * @return {String} 添加了给定参数的url\r\n */\r\n appendQuery: function (str, paras) {\r\n if (!paras) {\r\n return str;\r\n }\r\n var src = str;\r\n // 没有问号说明还没有参数\r\n if (src.indexOf(\"?\") === -1) {\r\n src += \"?\";\r\n }\r\n // 如果以问号结尾,说明没有其他参数\r\n if (BI.endWith(src, \"?\") !== false) {\r\n } else {\r\n src += \"&\";\r\n }\r\n _.each(paras, function (value, name) {\r\n if (typeof(name) === \"string\") {\r\n src += name + \"=\" + value + \"&\";\r\n }\r\n });\r\n src = src.substr(0, src.length - 1);\r\n return src;\r\n },\r\n /**\r\n * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串\r\n * @param str source字符串\r\n * @param {String} s1 要替换的字符串的正则表达式\r\n * @param {String} s2 替换的结果字符串\r\n * @returns {String} 替换后的字符串\r\n */\r\n replaceAll: function (str, s1, s2) {\r\n return str.replace(new RegExp(s1, \"gm\"), s2);\r\n },\r\n /**\r\n * 总是让字符串以指定的字符开头\r\n * @param str source字符串\r\n * @param {String} start 指定的字符\r\n * @returns {String} 以指定字符开头的字符串\r\n */\r\n perfectStart: function (str, start) {\r\n if (BI.startWith(str, start)) {\r\n return str;\r\n }\r\n return start + str;\r\n\r\n },\r\n\r\n /**\r\n * 获取字符串中某字符串的所有项位置数组\r\n * @param str source字符串\r\n * @param {String} sub 子字符串\r\n * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组\r\n */\r\n allIndexOf: function (str, sub) {\r\n if (typeof sub !== \"string\") {\r\n return [];\r\n }\r\n var location = [];\r\n var offset = 0;\r\n while (str.length > 0) {\r\n var loc = str.indexOf(sub);\r\n if (loc === -1) {\r\n break;\r\n }\r\n location.push(offset + loc);\r\n str = str.substring(loc + sub.length, str.length);\r\n offset += loc + sub.length;\r\n }\r\n return location;\r\n }\r\n});!(function () {\r\n var i18nStore = {};\r\n _.extend(BI, {\r\n addI18n: function (i18n) {\r\n BI.extend(i18nStore, i18n);\r\n },\r\n i18nText: function (key) {\r\n var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || \"\";\r\n if (!localeText) {\r\n localeText = key;\r\n }\r\n var len = arguments.length;\r\n if (len > 1) {\r\n if (localeText.indexOf(\"{R1}\") > -1) {\r\n for (var i = 1; i < len; i++) {\r\n var key = \"{R\" + i + \"}\";\r\n localeText = BI.replaceAll(localeText, key, arguments[i] + \"\");\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments);\r\n var count = 1;\r\n return BI.replaceAll(localeText, \"\\\\{\\\\s*\\\\}\", function () {\r\n return args[count++] + \"\";\r\n });\r\n }\r\n }\r\n return localeText;\r\n }\r\n });\r\n})();(function () {\r\n var moduleInjection = {};\r\n BI.module = function (xtype, cls) {\r\n if (moduleInjection[xtype] != null) {\r\n _global.console && console.error(\"module:[\" + xtype + \"] has been registed\");\r\n }\r\n moduleInjection[xtype] = cls;\r\n };\r\n\r\n var constantInjection = {};\r\n BI.constant = function (xtype, cls) {\r\n if (constantInjection[xtype] != null) {\r\n _global.console && console.error(\"constant:[\" + xtype + \"] has been registed\");\r\n }\r\n constantInjection[xtype] = cls;\r\n };\r\n\r\n var modelInjection = {};\r\n BI.model = function (xtype, cls) {\r\n if (modelInjection[xtype] != null) {\r\n _global.console && console.error(\"model:[\" + xtype + \"] has been registed\");\r\n }\r\n modelInjection[xtype] = cls;\r\n };\r\n\r\n var storeInjection = {};\r\n BI.store = function (xtype, cls) {\r\n if (storeInjection[xtype] != null) {\r\n _global.console && console.error(\"store:[\" + xtype + \"] has been registed\");\r\n }\r\n storeInjection[xtype] = cls;\r\n };\r\n\r\n var serviceInjection = {};\r\n BI.service = function (xtype, cls) {\r\n if (serviceInjection[xtype] != null) {\r\n _global.console && console.error(\"service:[\" + xtype + \"] has been registed\");\r\n }\r\n serviceInjection[xtype] = cls;\r\n };\r\n\r\n var providerInjection = {};\r\n BI.provider = function (xtype, cls) {\r\n if (providerInjection[xtype] != null) {\r\n _global.console && console.error(\"provider:[\" + xtype + \"] has been registed\");\r\n }\r\n providerInjection[xtype] = cls;\r\n };\r\n\r\n var configFunctions = {};\r\n BI.config = function (type, configFn) {\r\n if (BI.initialized) {\r\n if (constantInjection[type]) {\r\n return (constantInjection[type] = configFn(constantInjection[type]));\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n return configFn(providers[type]);\r\n }\r\n return BI.Plugin.configWidget(type, configFn);\r\n }\r\n if (!configFunctions[type]) {\r\n configFunctions[type] = [];\r\n BI.prepares.push(function () {\r\n var queue = configFunctions[type];\r\n for (var i = 0; i < queue.length; i++) {\r\n if (constantInjection[type]) {\r\n constantInjection[type] = queue[i](constantInjection[type]);\r\n continue;\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n queue[i](providers[type]);\r\n continue;\r\n }\r\n BI.Plugin.configWidget(type, queue[i]);\r\n }\r\n configFunctions[type] = null;\r\n });\r\n }\r\n configFunctions[type].push(configFn);\r\n };\r\n\r\n var actions = {};\r\n var globalAction = [];\r\n BI.action = function (type, actionFn) {\r\n if (BI.isFunction(type)) {\r\n globalAction.push(type);\r\n return function () {\r\n BI.remove(globalAction, function (idx) {\r\n return globalAction.indexOf(actionFn) === idx;\r\n });\r\n };\r\n }\r\n if (!actions[type]) {\r\n actions[type] = [];\r\n }\r\n actions[type].push(actionFn);\r\n return function () {\r\n BI.remove(actions[type], function (idx) {\r\n return actions[type].indexOf(actionFn) === idx;\r\n });\r\n if (actions[type].length === 0) {\r\n delete actions[type];\r\n }\r\n };\r\n };\r\n\r\n var points = {};\r\n BI.point = function (type, action, pointFn, after) {\r\n if (!points[type]) {\r\n points[type] = {};\r\n }\r\n if (!points[type][action]) {\r\n points[type][action] = {};\r\n }\r\n if (!points[type][action][after ? \"after\" : \"before\"]) {\r\n points[type][action][after ? \"after\" : \"before\"] = [];\r\n }\r\n points[type][action][after ? \"after\" : \"before\"].push(pointFn);\r\n };\r\n\r\n BI.Modules = {\r\n getModule: function (type) {\r\n if (!moduleInjection[type]) {\r\n _global.console && console.error(\"module:[\" + type + \"] does not exists\");\r\n return false;\r\n }\r\n return moduleInjection[type];\r\n },\r\n getAllModules: function () {\r\n return moduleInjection;\r\n }\r\n };\r\n\r\n BI.Constants = {\r\n getConstant: function (type) {\r\n return constantInjection[type];\r\n }\r\n };\r\n\r\n var callPoint = function (inst, types) {\r\n types = BI.isArray(types) ? types : [types];\r\n BI.each(types, function (idx, type) {\r\n if (points[type]) {\r\n for (var action in points[type]) {\r\n var bfns = points[type][action].before;\r\n if (bfns) {\r\n BI.aspect.before(inst, action, function (bfns) {\r\n return function () {\r\n for (var i = 0, len = bfns.length; i < len; i++) {\r\n try {\r\n bfns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(bfns));\r\n }\r\n var afns = points[type][action].after;\r\n if (afns) {\r\n BI.aspect.after(inst, action, function (afns) {\r\n return function () {\r\n for (var i = 0, len = afns.length; i < len; i++) {\r\n try {\r\n afns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(afns));\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n BI.Models = {\r\n getModel: function (type, config) {\r\n var inst = new modelInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n inst.mixins && callPoint(inst, inst.mixins);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var stores = {};\r\n\r\n BI.Stores = {\r\n getStore: function (type, config) {\r\n if (stores[type]) {\r\n return stores[type];\r\n }\r\n var inst = stores[type] = new storeInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var services = {};\r\n\r\n BI.Services = {\r\n getService: function (type, config) {\r\n if (services[type]) {\r\n return services[type];\r\n }\r\n services[type] = new serviceInjection[type](config);\r\n callPoint(services[type], type);\r\n return services[type];\r\n }\r\n };\r\n\r\n var providers = {},\r\n providerInstance = {};\r\n\r\n BI.Providers = {\r\n getProvider: function (type, config) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (!providerInstance[type]) {\r\n providerInstance[type] = new (providers[type].$get())(config);\r\n }\r\n return providerInstance[type];\r\n }\r\n };\r\n\r\n BI.Actions = {\r\n runAction: function (type, event, config) {\r\n BI.each(actions[type], function (i, act) {\r\n try {\r\n act(event, config);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n },\r\n runGlobalAction: function () {\r\n var args = [].slice.call(arguments);\r\n BI.each(globalAction, function (i, act) {\r\n try {\r\n act.apply(null, args);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n BI.getContext = function (type, config) {\r\n if (constantInjection[type]) {\r\n return BI.Constants.getConstant(type);\r\n }\r\n if (modelInjection[type]) {\r\n return BI.Models.getModel(type, config);\r\n }\r\n if (storeInjection[type]) {\r\n return BI.Stores.getStore(type, config);\r\n }\r\n if (serviceInjection[type]) {\r\n return BI.Services.getService(type, config);\r\n }\r\n if (providerInjection[type]) {\r\n return BI.Providers.getProvider(type, config);\r\n }\r\n };\r\n})();/**\r\n * guy\r\n * 检测某个Widget的EventChange事件然后去show某个card\r\n * @type {*|void|Object}\r\n * @class BI.ShowListener\r\n * @extends BI.OB\r\n */\r\nBI.ShowListener = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this, arguments), {\r\n eventObj: BI.createWidget(),\r\n cardLayout: null,\r\n cardNameCreator: function (v) {\r\n return v;\r\n },\r\n cardCreator: BI.emptyFn,\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShowListener.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.eventObj) {\r\n o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) {\r\n if (type === BI.Events.CLICK) {\r\n v = v || o.eventObj.getValue();\r\n v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v;\r\n if (BI.isNull(v)) {\r\n throw new Error(\"value cannot be null\");\r\n }\r\n var cardName = o.cardNameCreator(v);\r\n if (!o.cardLayout.isCardExisted(cardName)) {\r\n var card = o.cardCreator(cardName);\r\n o.cardLayout.addCardByName(cardName, card);\r\n o.afterCardCreated(cardName);\r\n }\r\n o.cardLayout.showCardByName(cardName);\r\n BI.nextTick(function () {\r\n o.afterCardShow(cardName);\r\n self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName);\r\n });\r\n }\r\n });\r\n }\r\n }\r\n});\r\nBI.ShowListener.EVENT_CHANGE = \"EVENT_CHANGE\";/**\r\n * style加载管理器\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class\r\n */\r\nBI.StyleLoaderManager = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.StyleLoaderManager.superclass._init.apply(this, arguments);\r\n this.stylesManager = {};\r\n },\r\n\r\n loadStyle: function (name, styleString) {\r\n if(!_global.document) {\r\n return;\r\n }\r\n var d = document, styles = d.createElement(\"style\");\r\n d.getElementsByTagName(\"head\")[0].appendChild(styles);\r\n styles.setAttribute(\"type\", \"text/css\");\r\n if (styles.styleSheet) {\r\n styles.styleSheet.cssText = styleString;\r\n } else {\r\n styles.appendChild(document.createTextNode(styleString));\r\n }\r\n this.stylesManager[name] = styles;\r\n\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.stylesManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.stylesManager[name] != null;\r\n },\r\n\r\n removeStyle: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.stylesManager[name].parentNode.removeChild(this.stylesManager[name]);\r\n delete this.stylesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * @class BI.Logic\r\n * @extends BI.OB\r\n */\r\nBI.Logic = BI.inherit(BI.OB, {\r\n createLogic: function () {\r\n return this.options || {};\r\n }\r\n});\r\n\r\nBI.LogicFactory = {\r\n Type: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\",\r\n Table: \"table\",\r\n HorizontalFill: \"horizontal_fill\"\r\n },\r\n createLogic: function (key, options) {\r\n var logic;\r\n switch (key) {\r\n case BI.LogicFactory.Type.Vertical:\r\n logic = BI.VerticalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Horizontal:\r\n logic = BI.HorizontalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Table:\r\n logic = BI.TableLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.HorizontalFill:\r\n logic = BI.HorizontalFillLayoutLogic;\r\n break;\r\n default :\r\n logic = BI.Logic;\r\n break;\r\n }\r\n return new logic(options).createLogic();\r\n },\r\n\r\n createLogicTypeByDirection: function (direction) {\r\n switch (direction) {\r\n case BI.Direction.Top:\r\n case BI.Direction.Bottom:\r\n case BI.Direction.Custom:\r\n return BI.LogicFactory.Type.Vertical;\r\n break;\r\n case BI.Direction.Left:\r\n case BI.Direction.Right:\r\n return BI.LogicFactory.Type.Horizontal;\r\n }\r\n },\r\n\r\n createLogicItemsByDirection: function (direction) {\r\n var layout;\r\n var items = Array.prototype.slice.call(arguments, 1);\r\n items = BI.map(items, function (i, item) {\r\n if (BI.isWidget(item)) {\r\n return {\r\n el: item,\r\n width: item.options.width,\r\n height: item.options.height\r\n };\r\n }\r\n return item;\r\n });\r\n switch (direction) {\r\n case BI.Direction.Bottom:\r\n layout = BI.LogicFactory.Type.Vertical;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Right:\r\n layout = BI.LogicFactory.Type.Horizontal;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Custom:\r\n items = items.slice(1);\r\n break;\r\n }\r\n return items;\r\n }\r\n};/**\r\n * guy\r\n * 上下布局逻辑\r\n * 上下布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.VerticalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.VerticalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical\";\r\n } else {\r\n layout = \"bi.vtape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.VerticalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n\r\n/**\r\n * guy\r\n * 左右布局逻辑\r\n * 左右布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.HorizontalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 表格布局逻辑\r\n * 表格布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.TableLayoutLogic\r\n * @extends BI.OB\r\n */\r\nBI.TableLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n columns: 0,\r\n rows: 0,\r\n columnSize: [],\r\n rowSize: [],\r\n hgap: 0,\r\n vgap: 0,\r\n items: []\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.table\";\r\n } else {\r\n layout = \"bi.window\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n columns: o.columns,\r\n rows: o.rows,\r\n columnSize: o.columnSize,\r\n rowSize: o.rowSize,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.TableLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 左右充满布局逻辑\r\n *\r\n * @class BI.HorizontalFillLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n var columnSize = [];\r\n BI.each(o.items, function (i, item) {\r\n columnSize.push(item.width || 0);\r\n });\r\n if (o.dynamic) {\r\n layout = \"bi.horizontal_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n columnSize: columnSize,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalFillLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});// 工程配置\r\nBI.prepares.push(function () {\r\n // 注册布局\r\n // adapt类布局优先级规则\r\n // 1、在非IE且支持flex的浏览器下使用flex布局\r\n // 2、IE或者不支持flex的浏览器下使用inline布局\r\n // 3、在2的情况下如果布局的items大于1的话使用display:table的布局\r\n // 4、在3的情况下如果IE版本低于8使用table标签布局\r\n var _isSupportFlex;\r\n var isSupportFlex = function () {\r\n if (_isSupportFlex == null) {\r\n _isSupportFlex = !!(BI.isSupportCss3 && BI.isSupportCss3(\"flex\"));\r\n }\r\n return _isSupportFlex;\r\n };\r\n BI.Plugin.registerWidget(\"bi.horizontal\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;\r\n // center_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // vertical_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // horizontal_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n if (!isIE) {\r\n if (supportFlex) {\r\n return BI.extend(ob, {type: \"bi.flex_horizontal\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.center_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);\r\n if (!isIE && supportFlex && justOneItem) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend(ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n // 一个item的情况下inline布局睥睨天下\r\n if (justOneItem) {\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.vertical_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex();\r\n if (!isIE && supportFlex) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex__scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_vertical_adapt\"});\r\n });\r\n BI.Plugin.registerWidget(\"bi.horizontal_adapt\", function (ob) {\r\n if (ob.items && ob.items.length <= 1) {\r\n return BI.extend(ob, {type: \"bi.horizontal_auto\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.float_center_adapt\", function (ob) {\r\n if (!BI.isIE() && isSupportFlex()) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.radio\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_radio\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.checkbox\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_checkbox\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.half_icon_button\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.half_button\"});\r\n });\r\n});/**\r\n * Detect Element Resize.\r\n * Forked in order to guard against unsafe 'window' and 'document' references.\r\n *\r\n * https://github.com/sdecima/javascript-detect-element-resize\r\n * Sebastian Decima\r\n *\r\n * version: 0.5.3\r\n **/\r\n!(function () {\r\n var attachEvent = _global.document && _global.document.attachEvent,\r\n stylesCreated = false;\r\n\r\n if (_global.document && !attachEvent) {\r\n var requestFrame = (function () {\r\n var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame ||\r\n function (fn) { return _global.setTimeout(fn, 20); };\r\n return function (fn) { return raf(fn); };\r\n })();\r\n\r\n var cancelFrame = (function () {\r\n var cancel = _global.cancelAnimationFrame || _global.mozCancelAnimationFrame || _global.webkitCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n return function (id) { return cancel(id); };\r\n })();\r\n\r\n var resetTriggers = function (element) {\r\n var triggers = element.__resizeTriggers__,\r\n expand = triggers.firstElementChild,\r\n contract = triggers.lastElementChild,\r\n expandChild = expand.firstElementChild;\r\n contract.scrollLeft = contract.scrollWidth;\r\n contract.scrollTop = contract.scrollHeight;\r\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\r\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\r\n expand.scrollLeft = expand.scrollWidth;\r\n expand.scrollTop = expand.scrollHeight;\r\n };\r\n\r\n var checkTriggers = function (element) {\r\n return element.offsetWidth !== element.__resizeLast__.width ||\r\n element.offsetHeight !== element.__resizeLast__.height;\r\n };\r\n\r\n var scrollListener = function (e) {\r\n var element = this;\r\n resetTriggers(this);\r\n if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);\r\n this.__resizeRAF__ = requestFrame(function () {\r\n if (checkTriggers(element)) {\r\n element.__resizeLast__.width = element.offsetWidth;\r\n element.__resizeLast__.height = element.offsetHeight;\r\n element.__resizeListeners__.forEach(function (fn) {\r\n fn.call(element, e);\r\n });\r\n }\r\n });\r\n };\r\n\r\n /* Detect CSS Animations support to detect element display/re-attach */\r\n var animation = false,\r\n animationstring = \"animation\",\r\n keyframeprefix = \"\",\r\n animationstartevent = \"animationstart\",\r\n domPrefixes = \"Webkit Moz O ms\".split(\" \"),\r\n startEvents = \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\" \"),\r\n pfx = \"\";\r\n {\r\n var elm = document.createElement(\"fakeelement\");\r\n if (elm.style.animationName !== undefined) {\r\n animation = true;\r\n }\r\n\r\n if (animation === false) {\r\n for (var i = 0; i < domPrefixes.length; i++) {\r\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\r\n pfx = domPrefixes[i];\r\n animationstring = pfx + \"Animation\";\r\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\r\n animationstartevent = startEvents[i];\r\n animation = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var animationName = \"resizeanim\";\r\n var animationKeyframes = \"@\" + keyframeprefix + \"keyframes \" + animationName + \" { from { opacity: 0; } to { opacity: 0; } } \";\r\n var animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\r\n }\r\n\r\n var createStyles = function () {\r\n if (!stylesCreated) {\r\n // opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\r\n var css = (animationKeyframes ? animationKeyframes : \"\") +\r\n \".resize-triggers { \" + (animationStyle ? animationStyle : \"\") + \"visibility: hidden; opacity: 0; } \" +\r\n \".resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \\\" \\\"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }\",\r\n head = document.head || document.getElementsByTagName(\"head\")[0],\r\n style = document.createElement(\"style\");\r\n\r\n style.type = \"text/css\";\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n\r\n head.appendChild(style);\r\n stylesCreated = true;\r\n }\r\n };\r\n\r\n var addResizeListener = function (element, fn) {\r\n if (attachEvent) {\r\n element.attachEvent(\"onresize\", fn);\r\n BI.nextTick(fn);\r\n } else {\r\n if (!element.__resizeTriggers__) {\r\n if (getComputedStyle(element).position === \"static\") element.style.position = \"relative\";\r\n createStyles();\r\n element.__resizeLast__ = {};\r\n element.__resizeListeners__ = [];\r\n (element.__resizeTriggers__ = document.createElement(\"div\")).className = \"resize-triggers\";\r\n element.__resizeTriggers__.innerHTML = \"<div class=\\\"expand-trigger\\\"><div></div></div>\" +\r\n \"<div class=\\\"contract-trigger\\\"></div>\";\r\n element.appendChild(element.__resizeTriggers__);\r\n resetTriggers(element);\r\n element.addEventListener(\"scroll\", scrollListener, true);\r\n\r\n /* Listen for a css animation to detect element display/re-attach */\r\n animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) {\r\n if (e.animationName === animationName) {resetTriggers(element);}\r\n });\r\n }\r\n element.__resizeListeners__.push(fn);\r\n }\r\n };\r\n var removeResizeListener = function (element, fn) {\r\n if (attachEvent) element.detachEvent(\"onresize\", fn);\r\n else {\r\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\r\n if (!element.__resizeListeners__.length) {\r\n element.removeEventListener(\"scroll\", scrollListener);\r\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\r\n }\r\n }\r\n };\r\n\r\n BI.ResizeDetector = {\r\n addResizeListener: function (widget, fn) {\r\n addResizeListener(widget.element[0], fn);\r\n return function () {\r\n removeResizeListener(widget.element[0], fn);\r\n };\r\n },\r\n removeResizeListener: function (widget, fn) {\r\n removeResizeListener(widget.element[0], fn);\r\n }\r\n };\r\n})();\r\n/**\r\n * 对DOM操作的通用函数\r\n * @type {{}}\r\n */\r\n!(function () {\r\n BI.DOM = {};\r\n\r\n BI.extend(BI.DOM, {\r\n ready: function (fn) {\r\n BI.Widget._renderEngine.createElement(document).ready(fn);\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n patchProps: function (fromElement, toElement) {\r\n var elemData = BI.jQuery._data(fromElement[0]);\r\n var events = elemData.events;\r\n BI.each(events, function (eventKey, event) {\r\n BI.each(event, function (i, handler) {\r\n toElement.on(eventKey + (handler.namespace ? (\".\" + handler.namespace) : \"\"), handler);\r\n });\r\n });\r\n var fromChildren = fromElement.children(), toChildren = toElement.children();\r\n if (fromChildren.length !== toChildren.length) {\r\n throw new Error(\"不匹配\");\r\n }\r\n BI.each(fromChildren, function (i, child) {\r\n BI.DOM.patchProps(BI.jQuery(child), BI.jQuery(toChildren[i]));\r\n });\r\n BI.each(fromElement.data(\"__widgets\"), function (i, widget) {\r\n widget.element = toElement;\r\n });\r\n },\r\n /**\r\n * 把dom数组或元素悬挂起来,使其不对html产生影响\r\n * @param dom\r\n */\r\n hang: function (doms) {\r\n if (BI.isEmpty(doms)) {\r\n return;\r\n }\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n BI.each(doms, function (i, dom) {\r\n dom instanceof BI.Widget && (dom = dom.element);\r\n dom instanceof BI.$ && dom[0] && frag.appendChild(dom[0]);\r\n });\r\n return frag;\r\n },\r\n\r\n isExist: function (obj) {\r\n return BI.Widget._renderEngine.createElement(\"body\").find(obj.element).length > 0;\r\n },\r\n\r\n // 预加载图片\r\n preloadImages: function (srcArray, onload) {\r\n var count = 0, images = [];\r\n\r\n function complete () {\r\n count++;\r\n if (count >= srcArray.length) {\r\n onload();\r\n }\r\n }\r\n\r\n BI.each(srcArray, function (i, src) {\r\n images[i] = new Image();\r\n images[i].src = src;\r\n images[i].onload = function () {\r\n complete();\r\n };\r\n images[i].onerror = function () {\r\n complete();\r\n };\r\n });\r\n },\r\n\r\n getTextSizeWidth: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var width = span.width();\r\n span.remove();\r\n\r\n return width;\r\n },\r\n\r\n getTextSizeHeight: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var height = span.height();\r\n span.remove();\r\n\r\n return height;\r\n },\r\n\r\n // 获取滚动条的宽度,页面display: none时候获取到的为0\r\n getScrollWidth: function () {\r\n if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) {\r\n var ul = BI.Widget._renderEngine.createElement(\"<div>\").width(50).height(50).css({\r\n position: \"absolute\",\r\n top: \"-9999px\",\r\n overflow: \"scroll\"\r\n }).appendTo(\"body\");\r\n this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;\r\n ul.destroy();\r\n }\r\n return this._scrollWidth;\r\n },\r\n\r\n getImage: function (param, fillStyle, backgroundColor) {\r\n var canvas = document.createElement(\"canvas\");\r\n var ratio = 2;\r\n BI.Widget._renderEngine.createElement(\"body\").append(canvas);\r\n\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.font = \"12px Georgia\";\r\n var w = ctx.measureText(param).width + 4;\r\n canvas.width = w * ratio;\r\n canvas.height = 16 * ratio;\r\n ctx.font = 12 * ratio + \"px Georgia\";\r\n ctx.fillStyle = fillStyle || \"#3685f2\";\r\n ctx.textBaseline = \"middle\";\r\n // ctx.fillStyle = \"#EAF2FD\";\r\n ctx.fillText(param, 2 * ratio, 9 * ratio);\r\n BI.Widget._renderEngine.createElement(canvas).destroy();\r\n var backColor = backgroundColor || \"rgba(54, 133, 242, 0.1)\";\r\n // IE可以放大缩小所以要固定最大最小宽高\r\n return {\r\n width: w,\r\n height: 16,\r\n src: canvas.toDataURL(\"image/png\"),\r\n style: \"background-color: \" + backColor + \";vertical-align: middle; margin: 0 1px; width:\" + w + \"px;height: 16px; max-width:\" + w + \"px;max-height: 16px; min-width:\" + w + \"px;min-height: 16px\",\r\n param: param\r\n };\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n isColor: function (color) {\r\n return color && (this.isRGBColor(color) || this.isHexColor(color));\r\n },\r\n\r\n isRGBColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color.substr(0, 3) === \"rgb\";\r\n },\r\n\r\n isHexColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color[0] === \"#\" && color.length === 7;\r\n },\r\n\r\n isDarkColor: function (hex) {\r\n if (!hex || !this.isHexColor(hex)) {\r\n return false;\r\n }\r\n var rgb = this.rgb2json(this.hex2rgb(hex));\r\n var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);\r\n if (grayLevel < 192/** 网上给的是140**/) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n // 获取对比颜色\r\n getContrastColor: function (color) {\r\n if (!color || !this.isColor(color)) {\r\n return \"\";\r\n }\r\n if (this.isDarkColor(color)) {\r\n return \"#ffffff\";\r\n }\r\n return \"#1a1a1a\";\r\n },\r\n\r\n rgb2hex: function (rgbColour) {\r\n if (!rgbColour || rgbColour.substr(0, 3) != \"rgb\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n var red = BI.parseInt(rgbValues[0]);\r\n var green = BI.parseInt(rgbValues[1]);\r\n var blue = BI.parseInt(rgbValues[2]);\r\n\r\n var hexColour = \"#\" + this.int2hex(red) + this.int2hex(green) + this.int2hex(blue);\r\n\r\n return hexColour;\r\n },\r\n\r\n rgb2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n if (!this.isRGBColor(rgbColour)) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2])\r\n };\r\n },\r\n\r\n rgba2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2]),\r\n a: BI.parseFloat(rgbValues[3])\r\n };\r\n },\r\n\r\n json2rgb: function (rgb) {\r\n if (!BI.isKey(rgb.r) || !BI.isKey(rgb.g) || !BI.isKey(rgb.b)) {\r\n return \"\";\r\n }\r\n return \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\r\n },\r\n\r\n json2rgba: function (rgba) {\r\n if (!BI.isKey(rgba.r) || !BI.isKey(rgba.g) || !BI.isKey(rgba.b)) {\r\n return \"\";\r\n }\r\n return \"rgba(\" + rgba.r + \",\" + rgba.g + \",\" + rgba.b + \",\" + rgba.a + \")\";\r\n },\r\n\r\n int2hex: function (strNum) {\r\n var hexdig = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n return hexdig[strNum >>> 4] + \"\" + hexdig[strNum & 15];\r\n },\r\n\r\n hex2rgb: function (color) {\r\n if (!color) {\r\n return \"\";\r\n }\r\n if (!this.isHexColor(color)) {\r\n return color;\r\n }\r\n var tempValue = \"rgb(\", colorArray;\r\n\r\n if (color.length === 7) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 5)),\r\n BI.parseInt(\"0x\" + color.substring(5, 7))];\r\n } else if (color.length === 4) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 2)),\r\n BI.parseInt(\"0x\" + color.substring(2, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 4))];\r\n }\r\n tempValue += colorArray[0] + \",\";\r\n tempValue += colorArray[1] + \",\";\r\n tempValue += colorArray[2] + \")\";\r\n\r\n return tempValue;\r\n },\r\n\r\n rgba2rgb: function (rgbColor, bgColor) {\r\n if (BI.isNull(bgColor)) {\r\n bgColor = 1;\r\n }\r\n if (rgbColor.substr(0, 4) != \"rgba\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColor.match(/\\d+(\\.\\d+)?/g);\r\n if (rgbValues.length < 4) {\r\n return \"\";\r\n }\r\n var R = BI.parseFloat(rgbValues[0]);\r\n var G = BI.parseFloat(rgbValues[1]);\r\n var B = BI.parseFloat(rgbValues[2]);\r\n var A = BI.parseFloat(rgbValues[3]);\r\n\r\n return \"rgb(\" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + G * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + B * A) + \")\";\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n getLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left - popup.element.outerWidth() - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element;\r\n return {\r\n left: el.offset().left + el.outerWidth() + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element, viewBounds = popup.element.bounds();\r\n return {\r\n left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getTopPosition: function (combo, popup, extraHeight) {\r\n return {\r\n top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)\r\n };\r\n },\r\n\r\n getBottomPosition: function (combo, popup, extraHeight) {\r\n var el = combo.element;\r\n return {\r\n top: el.offset().top + el.outerHeight() + (extraHeight || 0)\r\n };\r\n },\r\n\r\n isLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isRightSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isInnerRightSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isTopSpaceEnough: function (combo, popup, extraHeight) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;\r\n },\r\n\r\n isBottomSpaceEnough: function (combo, popup, extraHeight) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;\r\n },\r\n\r\n isRightSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.width - combo.element.offset().left - combo.element.bounds().width >= combo.element.offset().left;\r\n },\r\n\r\n isBottomSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;\r\n },\r\n\r\n getLeftAlignPosition: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left = combo.element.offset().left + extraWidth;\r\n if (left + viewBounds.width > windowBounds.width) {\r\n left = windowBounds.width - viewBounds.width;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getLeftAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: 0\r\n };\r\n },\r\n\r\n getRightAlignPosition: function (combo, popup, extraWidth) {\r\n var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();\r\n var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getRightAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: BI.Widget._renderEngine.createElement(\"body\").bounds().width - popup.element.bounds().width\r\n };\r\n },\r\n\r\n getTopAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = comboOffset.top + extraHeight;\r\n adaptHeight = windowBounds.height - top;\r\n } else {\r\n top = windowBounds.height - popupBounds.height;\r\n if (top < extraHeight) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < extraHeight) {\r\n top = extraHeight;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: 0,\r\n adaptHeight: combo.element.offset().top - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: 0,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: 0\r\n };\r\n },\r\n\r\n getBottomAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = 0;\r\n adaptHeight = comboOffset.top + comboBounds.height - extraHeight;\r\n } else {\r\n top = 0;\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getBottomAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: comboOffset.top + comboBounds.height + extraHeight,\r\n adaptHeight: windowBounds.height - comboOffset.top - comboBounds.height - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: extraHeight,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: windowBounds.height - popupBounds.height - extraHeight\r\n };\r\n },\r\n\r\n getCenterAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left;\r\n if (comboOffset.left + comboBounds.width / 2 + popupBounds.width / 2 > windowBounds.width) {\r\n left = windowBounds.width - popupBounds.width;\r\n } else {\r\n left = comboOffset.left + comboBounds.width / 2 - popupBounds.width / 2;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getMiddleAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top;\r\n if (comboOffset.top + comboBounds.height / 2 + popupBounds.height / 2 > windowBounds.height) {\r\n top = windowBounds.height - popupBounds.height;\r\n } else {\r\n top = comboOffset.top + comboBounds.height / 2 - popupBounds.height / 2;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return {\r\n top: top\r\n };\r\n },\r\n\r\n getComboPositionByDirections: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var i, direct;\r\n var leftRight = [], topBottom = [], innerLeftRight = [];\r\n var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;\r\n var left, top, pos, firstDir = directions[0];\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n leftRight.push(direct);\r\n break;\r\n case \"right\":\r\n leftRight.push(direct);\r\n break;\r\n case \"top\":\r\n topBottom.push(direct);\r\n break;\r\n case \"bottom\":\r\n topBottom.push(direct);\r\n break;\r\n case \"innerLeft\":\r\n innerLeftRight.push(direct);\r\n break;\r\n case \"innerRight\":\r\n innerLeftRight.push(direct);\r\n break;\r\n }\r\n }\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"left\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"right\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"right\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"top\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getTopPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"top,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"top,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"top\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"bottom\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getBottomPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"bottom,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"bottom,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"bottom\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"innerLeft\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerLeft\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"innerRight\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerRight\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n break;\r\n\r\n }\r\n }\r\n\r\n // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为\"bottom,left\",\r\n // 最后发现实际弹出方向可能是\"top,left\",那么此时外界获取popup的方向应该是\"top,left\"\r\n switch (directions[0]) {\r\n case \"left\":\r\n case \"right\":\r\n if (BI.DOM.isRightSpaceLarger(combo)) {\r\n left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"right\";\r\n } else {\r\n left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"left\";\r\n }\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",bottom\";\r\n return pos;\r\n }\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",top\";\r\n return pos;\r\n default :\r\n if (BI.DOM.isBottomSpaceLarger(combo)) {\r\n pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"bottom\";\r\n } else {\r\n pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"top\";\r\n }\r\n if (leftRight[0] === \"right\") {\r\n left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",right\";\r\n return pos;\r\n }\r\n left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",left\";\r\n return pos;\r\n }\r\n },\r\n\r\n\r\n getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").bounds().height - extraHeight;\r\n var maxHeight = Math.min(popup.attr(\"maxHeight\") || bodyHeight, bodyHeight);\r\n popup.resetHeight && popup.resetHeight(maxHeight);\r\n var position = BI.DOM.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || [\"bottom\", \"top\", \"right\", \"left\"]);\r\n switch (offsetStyle) {\r\n case \"center\":\r\n if (position.change) {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n } else {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n }\r\n break;\r\n case \"middle\":\r\n if (position.change) {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n } else {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n }\r\n break;\r\n }\r\n if (needAdaptHeight === true) {\r\n popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));\r\n }\r\n return position;\r\n }\r\n });\r\n})();\r\nBI.EventListener = {\r\n listen: function listen (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, false);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, false);\r\n }\r\n };\r\n } else if (target.attachEvent) {\r\n target.attachEvent(\"on\" + eventType, callback);\r\n return {\r\n remove: function remove () {\r\n target.detachEvent(\"on\" + eventType, callback);\r\n }\r\n };\r\n }\r\n },\r\n\r\n capture: function capture (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, true);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, true);\r\n }\r\n };\r\n }\r\n return {\r\n remove: BI.emptyFn\r\n };\r\n \r\n },\r\n\r\n registerDefault: function registerDefault () {\r\n }\r\n};// 浏览器相关方法\r\n_.extend(BI, {\r\n isIE: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n if (this.__isIE == null) {\r\n this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase());\r\n }\r\n return this.__isIE;\r\n },\r\n\r\n getIEVersion: function () {\r\n if(!_global.navigator) {\r\n return 0;\r\n }\r\n if (this.__IEVersion != null) {\r\n return this.__IEVersion;\r\n }\r\n var version = 0;\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n return this.__IEVersion = version;\r\n },\r\n\r\n isIE9Below: function () {\r\n if (!BI.isIE()) {\r\n return false;\r\n }\r\n return this.getIEVersion() < 9;\r\n },\r\n\r\n isEdge: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /edge/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isChrome: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isFireFox: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /firefox/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isOpera: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /opera/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isSafari: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /safari/i.test(navigator.userAgent.toLowerCase()) && !/chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isKhtml: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n },\r\n\r\n isMac: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /macintosh|mac os x/i.test(navigator.userAgent);\r\n },\r\n\r\n isWindows: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /windows|win32/i.test(navigator.userAgent);\r\n },\r\n\r\n isSupportCss3: function (style) {\r\n if(!_global.document) {\r\n return false;\r\n }\r\n var prefix = [\"webkit\", \"Moz\", \"ms\", \"o\"],\r\n i, len,\r\n humpString = [],\r\n htmlStyle = document.documentElement.style,\r\n _toHumb = function (string) {\r\n if (!BI.isString(string)) {\r\n return \"\";\r\n }\r\n\r\n return string.replace(/-(\\w)/g, function ($0, $1) {\r\n return $1.toUpperCase();\r\n });\r\n };\r\n\r\n for ( i = 0; i < prefix.length; i++) {\r\n humpString.push(_toHumb(prefix[i] + \"-\" + style));\r\n }\r\n humpString.push(_toHumb(style));\r\n\r\n for (i = 0, len = humpString.length; i < len; i++) {\r\n if (humpString[i] in htmlStyle) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n});/*!\r\n * jQuery JavaScript Library v1.9.1\r\n * http://jquery.com/\r\n *\r\n * Includes Sizzle.js\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2013-2-4\r\n */\r\n(function( window, undefined ) {\r\n\r\n// Can't do this because several apps including ASP.NET trace\r\n// the stack via arguments.caller.callee and Firefox dies if\r\n// you try to trace through \"use strict\" call chains. (#13335)\r\n// Support: Firefox 18+\r\n//\"use strict\";\r\nvar\r\n\t// The deferred used on DOM ready\r\n\treadyList,\r\n\r\n\t// A central reference to the root jQuery(document)\r\n\trootjQuery,\r\n\r\n\t// Support: IE<9\r\n\t// For `typeof node.method` instead of `node.method !== undefined`\r\n\tcore_strundefined = typeof undefined,\r\n\r\n\t// Use the correct document accordingly with window argument (sandbox)\r\n\tdocument = window.document,\r\n\tlocation = window.location,\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$,\r\n\r\n\t// [[Class]] -> type pairs\r\n\tclass2type = {},\r\n\r\n\t// List of deleted data cache ids, so we can reuse them\r\n\tcore_deletedIds = [],\r\n\r\n\tcore_version = \"1.12.4\",\r\n\r\n\t// Save a reference to some core methods\r\n\tcore_concat = core_deletedIds.concat,\r\n\tcore_push = core_deletedIds.push,\r\n\tcore_slice = core_deletedIds.slice,\r\n\tcore_indexOf = core_deletedIds.indexOf,\r\n\tcore_toString = class2type.toString,\r\n\tcore_hasOwn = class2type.hasOwnProperty,\r\n\tcore_trim = core_version.trim,\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\r\n\t},\r\n\r\n\t// Used for matching numbers\r\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\r\n\r\n\t// Used for splitting on whitespace\r\n\tcore_rnotwhite = /\\S+/g,\r\n\r\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\r\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with <)\r\n\trquickExpr = /^(?:(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\r\n\r\n\t// Match a standalone tag\r\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\r\n\r\n\t// JSON RegExp\r\n\trvalidchars = /^[\\],:{}\\s]*$/,\r\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\r\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\r\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\r\n\r\n\t// Matches dashed string for camelizing\r\n\trmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([\\da-z])/gi,\r\n\r\n\t// Used by jQuery.camelCase as callback to replace()\r\n\tfcamelCase = function( all, letter ) {\r\n\t\treturn letter.toUpperCase();\r\n\t},\r\n\r\n\t// The ready event handler\r\n\tcompleted = function( event ) {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t},\r\n\t// Clean-up method for dom ready events\r\n\tdetach = function() {\r\n\t\tif ( document.addEventListener ) {\r\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\r\n\t\t\twindow.removeEventListener( \"load\", completed, false );\r\n\r\n\t\t} else {\r\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\r\n\t\t\twindow.detachEvent( \"onload\", completed );\r\n\t\t}\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\t// The current version of jQuery being used\r\n\tjquery: core_version,\r\n\r\n\tconstructor: jQuery,\r\n\tinit: function( selector, context, rootjQuery ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && (match[1] || !context) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[1] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\r\n\r\n\t\t\t\t\t// scripts is true for back-compat\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[1],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[2] );\r\n\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\r\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t\tthis[0] = elem;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.context = document;\r\n\t\t\t\t\tthis.selector = selector;\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis.context = this[0] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( jQuery.isFunction( selector ) ) {\r\n\t\t\treturn rootjQuery.ready( selector );\r\n\t\t}\r\n\r\n\t\tif ( selector.selector !== undefined ) {\r\n\t\t\tthis.selector = selector.selector;\r\n\t\t\tthis.context = selector.context;\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t},\r\n\r\n\t// Start with an empty selector\r\n\tselector: \"\",\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\t// The number of elements contained in the matched element set\r\n\tsize: function() {\r\n\t\treturn this.length;\r\n\t},\r\n\r\n\ttoArray: function() {\r\n\t\treturn core_slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\t\treturn num == null ?\r\n\r\n\t\t\t// Return a 'clean' array\r\n\t\t\tthis.toArray() :\r\n\r\n\t\t\t// Return just the object\r\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\t\tret.context = this.context;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\t// (You can seed the arguments with an array of args, but this is\r\n\t// only used internally.)\r\n\teach: function( callback, args ) {\r\n\t\treturn jQuery.each( this, callback, args );\r\n\t},\r\n\r\n\tready: function( fn ) {\r\n\t\t// Add the callback\r\n\t\tjQuery.ready.promise().done( fn );\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t}));\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor(null);\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: core_push,\r\n\tsort: [].sort,\r\n\tsplice: [].splice\r\n};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\njQuery.fn.init.prototype = jQuery.fn;\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\ttarget = arguments[0] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\t\ttarget = arguments[1] || {};\r\n\t\t// skip the boolean and the target\r\n\t\ti = 2;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// extend jQuery itself if only one argument is passed\r\n\tif ( length === i ) {\r\n\t\ttarget = this;\r\n\t\t--i;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( (options = arguments[ i ]) != null ) {\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tsrc = target[ name ];\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\r\n\t\t\t\t\tif ( copyIsArray ) {\r\n\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend({\r\n\tnoConflict: function( deep ) {\r\n\t\tif ( window.$ === jQuery ) {\r\n\t\t\twindow.$ = _$;\r\n\t\t}\r\n\r\n\t\tif ( deep && window.jQuery === jQuery ) {\r\n\t\t\twindow.jQuery = _jQuery;\r\n\t\t}\r\n\r\n\t\treturn jQuery;\r\n\t},\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See #6781\r\n\treadyWait: 1,\r\n\r\n\t// Hold (or release) the ready event\r\n\tholdReady: function( hold ) {\r\n\t\tif ( hold ) {\r\n\t\t\tjQuery.readyWait++;\r\n\t\t} else {\r\n\t\t\tjQuery.ready( true );\r\n\t\t}\r\n\t},\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\r\n\t\tif ( !document.body ) {\r\n\t\t\treturn setTimeout( jQuery.ready );\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\r\n\t\t// Trigger any bound ready events\r\n\t\tif ( jQuery.fn.trigger ) {\r\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\r\n\t\t}\r\n\t},\r\n\r\n\t// See test/unit/core.js for details concerning isFunction.\r\n\t// Since version 1.3, DOM methods and functions like alert\r\n\t// aren't supported. They return false on IE (#2968).\r\n\tisFunction: function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"function\";\r\n\t},\r\n\r\n\tisArray: Array.isArray || function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"array\";\r\n\t},\r\n\r\n\tisWindow: function( obj ) {\r\n\t\treturn obj != null && obj == obj.window;\r\n\t},\r\n\r\n\tisNumeric: function( obj ) {\r\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\r\n\t},\r\n\r\n\ttype: function( obj ) {\r\n\t\tif ( obj == null ) {\r\n\t\t\treturn String( obj );\r\n\t\t}\r\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\r\n\t\t\ttypeof obj;\r\n\t},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\t// Must be an Object.\r\n\t\t// Because of IE, we also have to check the presence of the constructor property.\r\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\r\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// Not own constructor property must be Object\r\n\t\t\tif ( obj.constructor &&\r\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\r\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Own properties are enumerated firstly, so to speed up,\r\n\t\t// if last one is own, then all properties are own.\r\n\r\n\t\tvar key;\r\n\t\tfor ( key in obj ) {}\r\n\r\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\t// data: string of html\r\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\r\n\t// keepScripts (optional): If true, will include scripts passed in the html string\r\n\tparseHTML: function( data, context, keepScripts ) {\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif ( typeof context === \"boolean\" ) {\r\n\t\t\tkeepScripts = context;\r\n\t\t\tcontext = false;\r\n\t\t}\r\n\t\tcontext = context || document;\r\n\r\n\t\tvar parsed = rsingleTag.exec( data ),\r\n\t\t\tscripts = !keepScripts && [];\r\n\r\n\t\t// Single tag\r\n\t\tif ( parsed ) {\r\n\t\t\treturn [ context.createElement( parsed[1] ) ];\r\n\t\t}\r\n\r\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\r\n\t\tif ( scripts ) {\r\n\t\t\tjQuery( scripts ).remove();\r\n\t\t}\r\n\t\treturn jQuery.merge( [], parsed.childNodes );\r\n\t},\r\n\r\n\tparseJSON: function( data ) {\r\n\t\t// Attempt to parse using the native JSON parser first\r\n\t\tif ( window.JSON && window.JSON.parse ) {\r\n\t\t\treturn window.JSON.parse( data );\r\n\t\t}\r\n\r\n\t\tif ( data === null ) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\r\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\r\n\t\t\tdata = jQuery.trim( data );\r\n\r\n\t\t\tif ( data ) {\r\n\t\t\t\t// Make sure the incoming data is actual JSON\r\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\r\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\r\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\r\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\r\n\r\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tjQuery.error( \"Invalid JSON: \" + data );\r\n\t},\r\n\r\n\t// Cross-browser xml parsing\r\n\tparseXML: function( data ) {\r\n\t\tvar xml, tmp;\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif ( window.DOMParser ) { // Standard\r\n\t\t\t\ttmp = new DOMParser();\r\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\r\n\t\t\t} else { // IE\r\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\r\n\t\t\t\txml.async = \"false\";\r\n\t\t\t\txml.loadXML( data );\r\n\t\t\t}\r\n\t\t} catch( e ) {\r\n\t\t\txml = undefined;\r\n\t\t}\r\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\r\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\r\n\t\t}\r\n\t\treturn xml;\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\t// Evaluates a script in a global context\r\n\t// Workarounds based on findings by Jim Driscoll\r\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\r\n\tglobalEval: function( data ) {\r\n\t\tif ( data && jQuery.trim( data ) ) {\r\n\t\t\t// We use execScript on Internet Explorer\r\n\t\t\t// We use an anonymous function so that context is window\r\n\t\t\t// rather than jQuery in Firefox\r\n\t\t\t( window.execScript || function( data ) {\r\n\t\t\t\twindow[ \"eval\" ].call( window, data );\r\n\t\t\t} )( data );\r\n\t\t}\r\n\t},\r\n\r\n\t// Convert dashed to camelCase; used by the css and data modules\r\n\t// Microsoft forgot to hump their vendor prefix (#9572)\r\n\tcamelCase: function( string ) {\r\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n\t},\r\n\r\n\tnodeName: function( elem, name ) {\r\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\t},\r\n\r\n\t// args is for internal usage only\r\n\teach: function( obj, callback, args ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = obj.length,\r\n\t\t\tisArray = isArraylike( obj );\r\n\r\n\t\tif ( args ) {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// A special, fast, case for the most common use of each\r\n\t\t} else {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\t// Use native String.trim function wherever possible\r\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\tcore_trim.call( text );\r\n\t\t} :\r\n\r\n\t\t// Otherwise use our own trimming functionality\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\r\n\t\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArraylike( Object(arr) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tcore_push.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\tvar len;\r\n\r\n\t\tif ( arr ) {\r\n\t\t\tif ( core_indexOf ) {\r\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\r\n\t\t\t}\r\n\r\n\t\t\tlen = arr.length;\r\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t// Skip accessing in sparse arrays\r\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tmerge: function( first, second ) {\r\n\t\tvar l = second.length,\r\n\t\t\ti = first.length,\r\n\t\t\tj = 0;\r\n\r\n\t\tif ( typeof l === \"number\" ) {\r\n\t\t\tfor ( ; j < l; j++ ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j ];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twhile ( second[j] !== undefined ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, inv ) {\r\n\t\tvar retVal,\r\n\t\t\tret = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length;\r\n\t\tinv = !!inv;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tretVal = !!callback( elems[ i ], i );\r\n\t\t\tif ( inv !== retVal ) {\r\n\t\t\t\tret.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tisArray = isArraylike( elems ),\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their\r\n\t\tif ( isArray ) {\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn core_concat.apply( [], ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// Bind a function to a context, optionally partially applying any\r\n\t// arguments.\r\n\tproxy: function( fn, context ) {\r\n\t\tvar args, proxy, tmp;\r\n\r\n\t\tif ( typeof context === \"string\" ) {\r\n\t\t\ttmp = fn[ context ];\r\n\t\t\tcontext = fn;\r\n\t\t\tfn = tmp;\r\n\t\t}\r\n\r\n\t\t// Quick check to determine if target is callable, in the spec\r\n\t\t// this throws a TypeError, but we will just return undefined.\r\n\t\tif ( !jQuery.isFunction( fn ) ) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\t// Simulated bind\r\n\t\targs = core_slice.call( arguments, 2 );\r\n\t\tproxy = function() {\r\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\r\n\t\t};\r\n\r\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\t\treturn proxy;\r\n\t},\r\n\r\n\t// Multifunctional method to get and set values of a collection\r\n\t// The value/s can optionally be executed if it's a function\r\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\t\tvar i = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tbulk = key == null;\r\n\r\n\t\t// Sets many values\r\n\t\tif ( jQuery.type( key ) === \"object\" ) {\r\n\t\t\tchainable = true;\r\n\t\t\tfor ( i in key ) {\r\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\r\n\t\t\t}\r\n\r\n\t\t// Sets one value\r\n\t\t} else if ( value !== undefined ) {\r\n\t\t\tchainable = true;\r\n\r\n\t\t\tif ( !jQuery.isFunction( value ) ) {\r\n\t\t\t\traw = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( bulk ) {\r\n\t\t\t\t// Bulk operations run against the entire set\r\n\t\t\t\tif ( raw ) {\r\n\t\t\t\t\tfn.call( elems, value );\r\n\t\t\t\t\tfn = null;\r\n\r\n\t\t\t\t// ...except when executing function values\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbulk = fn;\r\n\t\t\t\t\tfn = function( elem, key, value ) {\r\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( fn ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chainable ?\r\n\t\t\telems :\r\n\r\n\t\t\t// Gets\r\n\t\t\tbulk ?\r\n\t\t\t\tfn.call( elems ) :\r\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\r\n\t},\r\n\r\n\tnow: function() {\r\n\t\treturn ( new Date() ).getTime();\r\n\t}\r\n});\r\n\r\njQuery.ready.promise = function( obj ) {\r\n\tif ( !readyList ) {\r\n\r\n\t\treadyList = jQuery.Deferred();\r\n\r\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\r\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\r\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\r\n\t\tif ( document.readyState === \"complete\" ) {\r\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\t\t\tsetTimeout( jQuery.ready );\r\n\r\n\t\t// Standards-based browsers support DOMContentLoaded\r\n\t\t} else if ( document.addEventListener ) {\r\n\t\t\t// Use the handy event callback\r\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.addEventListener( \"load\", completed, false );\r\n\r\n\t\t// If IE event model is used\r\n\t\t} else {\r\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\r\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.attachEvent( \"onload\", completed );\r\n\r\n\t\t\t// If IE and not a frame\r\n\t\t\t// continually check to see if the document is ready\r\n\t\t\tvar top = false;\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\r\n\t\t\t} catch(e) {}\r\n\r\n\t\t\tif ( top && top.doScroll ) {\r\n\t\t\t\t(function doScrollCheck() {\r\n\t\t\t\t\tif ( !jQuery.isReady ) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\r\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\r\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\r\n\t\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// detach all dom ready events\r\n\t\t\t\t\t\tdetach();\r\n\r\n\t\t\t\t\t\t// and execute any waiting functions\r\n\t\t\t\t\t\tjQuery.ready();\r\n\t\t\t\t\t}\r\n\t\t\t\t})();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn readyList.promise( obj );\r\n};\r\n\r\n// Populate the class2type map\r\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\r\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n});\r\n\r\nfunction isArraylike( obj ) {\r\n\tvar length = obj.length,\r\n\t\ttype = jQuery.type( obj );\r\n\r\n\tif ( jQuery.isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( obj.nodeType === 1 && length ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn type === \"array\" || type !== \"function\" &&\r\n\t\t( length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\r\n}\r\n\r\n// All jQuery objects should point back to these\r\nrootjQuery = jQuery(document);\r\n// String to Object options format cache\r\nvar optionsCache = {};\r\n\r\n// Convert String-formatted options into Object-formatted ones and store in cache\r\nfunction createOptions( options ) {\r\n\tvar object = optionsCache[ options ] = {};\r\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t});\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\t\t// Last fire value (for non-forgettable lists)\r\n\t\tmemory,\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\t\t// End of the loop when firing\r\n\t\tfiringLength,\r\n\t\t// Index of currently firing callback (modified by remove if needed)\r\n\t\tfiringIndex,\r\n\t\t// First callback to fire (used internally by add and fireWith)\r\n\t\tfiringStart,\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\t\t// Stack of fire calls for repeatable lists\r\n\t\tstack = !options.once && [],\r\n\t\t// Fire callbacks\r\n\t\tfire = function( data ) {\r\n\t\t\tmemory = options.memory && data;\r\n\t\t\tfired = true;\r\n\t\t\tfiringIndex = firingStart || 0;\r\n\t\t\tfiringStart = 0;\r\n\t\t\tfiringLength = list.length;\r\n\t\t\tfiring = true;\r\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\r\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\r\n\t\t\t\t\tmemory = false; // To prevent further calls using add\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfiring = false;\r\n\t\t\tif ( list ) {\r\n\t\t\t\tif ( stack ) {\r\n\t\t\t\t\tif ( stack.length ) {\r\n\t\t\t\t\t\tfire( stack.shift() );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\t// First, we save the current length\r\n\t\t\t\t\tvar start = list.length;\r\n\t\t\t\t\t(function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\r\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})( arguments );\r\n\t\t\t\t\t// Do we need to add the callbacks to the\r\n\t\t\t\t\t// current firing batch?\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tfiringLength = list.length;\r\n\t\t\t\t\t// With memory, if we're not firing then\r\n\t\t\t\t\t// we should call right away\r\n\t\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\t\tfiringStart = start;\r\n\t\t\t\t\t\tfire( memory );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\t\tvar index;\r\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\t\tlist.splice( index, 1 );\r\n\t\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\r\n\t\t\t\t\t\t\t\t\tfiringLength--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\r\n\t\t\t},\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tlist = [];\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Have the list do nothing anymore\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlist = stack = memory = undefined;\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it disabled?\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\t\t\t// Lock the list in its current state\r\n\t\t\tlock: function() {\r\n\t\t\t\tstack = undefined;\r\n\t\t\t\tif ( !memory ) {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it locked?\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !stack;\r\n\t\t\t},\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\targs = args || [];\r\n\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\tif ( list && ( !fired || stack ) ) {\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tstack.push( args );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfire( args );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\njQuery.extend({\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\t\t\t\t// action, add listener, listener list, final state\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\r\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\r\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\r\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t}).promise();\r\n\t\t\t\t},\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Keep pipe for back-compat\r\n\t\tpromise.pipe = promise.then;\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 3 ];\r\n\r\n\t\t\t// promise[ done | fail | progress ] = list.add\r\n\t\t\tpromise[ tuple[1] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add(function() {\r\n\t\t\t\t\t// state = [ resolved | rejected ]\r\n\t\t\t\t\tstate = stateString;\r\n\r\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\r\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\r\n\t\t\t}\r\n\r\n\t\t\t// deferred[ resolve | reject | notify ]\r\n\t\t\tdeferred[ tuple[0] ] = function() {\r\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\r\n\t\t});\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\r\n\t\tvar i = 0,\r\n\t\t\tresolveValues = core_slice.call( arguments ),\r\n\t\t\tlength = resolveValues.length,\r\n\r\n\t\t\t// the count of uncompleted subordinates\r\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\r\n\r\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\r\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\r\n\r\n\t\t\t// Update function for both resolve and progress values\r\n\t\t\tupdateFunc = function( i, contexts, values ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tcontexts[ i ] = this;\r\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\r\n\t\t\t\t\tif( values === progressValues ) {\r\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\r\n\t\t\t\t\t} else if ( !( --remaining ) ) {\r\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tprogressValues, progressContexts, resolveContexts;\r\n\r\n\t\t// add listeners to Deferred subordinates; treat others as resolved\r\n\t\tif ( length > 1 ) {\r\n\t\t\tprogressValues = new Array( length );\r\n\t\t\tprogressContexts = new Array( length );\r\n\t\t\tresolveContexts = new Array( length );\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\r\n\t\t\t\t\tresolveValues[ i ].promise()\r\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\r\n\t\t\t\t\t\t.fail( deferred.reject )\r\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t--remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if we're not waiting on anything, resolve the master\r\n\t\tif ( !remaining ) {\r\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\r\n\t\t}\r\n\r\n\t\treturn deferred.promise();\r\n\t}\r\n});\r\njQuery.support = (function() {\r\n\r\n\tvar support, all, a,\r\n\t\tinput, select, fragment,\r\n\t\topt, eventName, isSupported, i,\r\n\t\tdiv = document.createElement(\"div\");\r\n\r\n\t// Setup\r\n\tdiv.setAttribute( \"className\", \"t\" );\r\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\r\n\t// Support tests won't run in some limited or non-browser environments\r\n\tall = div.getElementsByTagName(\"*\");\r\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\r\n\tif ( !all || !a || !all.length ) {\r\n\t\treturn {};\r\n\t}\r\n\r\n\t// First batch of tests\r\n\tselect = document.createElement(\"select\");\r\n\topt = select.appendChild( document.createElement(\"option\") );\r\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\r\n\r\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\r\n\tsupport = {\r\n\t\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\r\n\t\tgetSetAttribute: div.className !== \"t\",\r\n\r\n\t\t// IE strips leading whitespace when .innerHTML is used\r\n\t\tleadingWhitespace: div.firstChild.nodeType === 3,\r\n\r\n\t\t// Make sure that tbody elements aren't automatically inserted\r\n\t\t// IE will insert them into empty tables\r\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\r\n\r\n\t\t// Make sure that link elements get serialized correctly by innerHTML\r\n\t\t// This requires a wrapper element in IE\r\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\r\n\r\n\t\t// Get the style information from getAttribute\r\n\t\t// (IE uses .cssText instead)\r\n\t\tstyle: /top/.test( a.getAttribute(\"style\") ),\r\n\r\n\t\t// Make sure that URLs aren't manipulated\r\n\t\t// (IE normalizes it by default)\r\n\t\threfNormalized: a.getAttribute(\"href\") === \"/a\",\r\n\r\n\t\t// Make sure that element opacity exists\r\n\t\t// (IE uses filter instead)\r\n\t\t// Use a regex to work around a WebKit issue. See #5145\r\n\t\topacity: /^0.5/.test( a.style.opacity ),\r\n\r\n\t\t// Verify style float existence\r\n\t\t// (IE uses styleFloat instead of cssFloat)\r\n\t\tcssFloat: !!a.style.cssFloat,\r\n\r\n\t\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\r\n\t\tcheckOn: !!input.value,\r\n\r\n\t\t// Make sure that a selected-by-default option has a working selected property.\r\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\r\n\t\toptSelected: opt.selected,\r\n\r\n\t\t// Tests for enctype support on a form (#6743)\r\n\t\tenctype: !!document.createElement(\"form\").enctype,\r\n\r\n\t\t// Makes sure cloning an html5 element does not cause problems\r\n\t\t// Where outerHTML is undefined, this still works\r\n\t\thtml5Clone: document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\",\r\n\r\n\t\t// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode\r\n\t\tboxModel: document.compatMode === \"CSS1Compat\",\r\n\r\n\t\t// Will be defined later\r\n\t\tdeleteExpando: true,\r\n\t\tnoCloneEvent: true,\r\n\t\tinlineBlockNeedsLayout: false,\r\n\t\tshrinkWrapBlocks: false,\r\n\t\treliableMarginRight: true,\r\n\t\tboxSizingReliable: true,\r\n\t\tpixelPosition: false\r\n\t};\r\n\r\n\t// Make sure checked status is properly cloned\r\n\tinput.checked = true;\r\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\r\n\r\n\t// Make sure that the options inside disabled selects aren't marked as disabled\r\n\t// (WebKit marks them as disabled)\r\n\tselect.disabled = true;\r\n\tsupport.optDisabled = !opt.disabled;\r\n\r\n\t// Support: IE<9\r\n\ttry {\r\n\t\tdelete div.test;\r\n\t} catch( e ) {\r\n\t\tsupport.deleteExpando = false;\r\n\t}\r\n\r\n\t// Check if we can trust getAttribute(\"value\")\r\n\tinput = document.createElement(\"input\");\r\n\tinput.setAttribute( \"value\", \"\" );\r\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\r\n\r\n\t// Check if an input maintains its value after becoming a radio\r\n\tinput.value = \"t\";\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tsupport.radioValue = input.value === \"t\";\r\n\r\n\t// #11217 - WebKit loses check when the name is after the checked attribute\r\n\tinput.setAttribute( \"checked\", \"t\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tfragment = document.createDocumentFragment();\r\n\tfragment.appendChild( input );\r\n\r\n\t// Check if a disconnected checkbox will retain its checked\r\n\t// value of true after appended to the DOM (IE6/7)\r\n\tsupport.appendChecked = input.checked;\r\n\r\n\t// WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE<9\r\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\r\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\r\n\tif ( div.attachEvent ) {\r\n\t\tdiv.attachEvent( \"onclick\", function() {\r\n\t\t\tsupport.noCloneEvent = false;\r\n\t\t});\r\n\r\n\t\tdiv.cloneNode( true ).click();\r\n\t}\r\n\r\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\r\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php\r\n\tfor ( i in { submit: true, change: true, focusin: true }) {\r\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\r\n\r\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\r\n\t}\r\n\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\t// Run tests that need a body at doc ready\r\n\tjQuery(function() {\r\n\t\tvar container, marginDiv, tds,\r\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\r\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\r\n\r\n\t\tif ( !body ) {\r\n\t\t\t// Return for frameset docs that don't have a body\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer = document.createElement(\"div\");\r\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\r\n\r\n\t\tbody.appendChild( container ).appendChild( div );\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if table cells still have offsetWidth/Height when they are set\r\n\t\t// to display:none and there are still other visible table cells in a\r\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\r\n\t\t// determining if an element has been hidden directly using\r\n\t\t// display:none (it is still safe to use offsets if a parent element is\r\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\r\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\r\n\t\ttds = div.getElementsByTagName(\"td\");\r\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\r\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\ttds[ 0 ].style.display = \"\";\r\n\t\ttds[ 1 ].style.display = \"none\";\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if empty table cells still have offsetWidth/Height\r\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\t// Check box-sizing and margin behavior\r\n\t\tdiv.innerHTML = \"\";\r\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\r\n\t\tsupport.boxSizing = ( div.offsetWidth === 4 );\r\n\t\tsupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );\r\n\r\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\r\n\t\tif ( window.getComputedStyle ) {\r\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\r\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\r\n\r\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\r\n\t\t\t// gets computed margin-right based on width of container. (#3333)\r\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\r\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\r\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\r\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\r\n\t\t\tdiv.style.width = \"1px\";\r\n\r\n\t\t\tsupport.reliableMarginRight =\r\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\r\n\t\t}\r\n\r\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\r\n\t\t\t// Support: IE<8\r\n\t\t\t// Check if natively block-level elements act like inline-block\r\n\t\t\t// elements when setting their display to 'inline' and giving\r\n\t\t\t// them layout\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\r\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\r\n\r\n\t\t\t// Support: IE6\r\n\t\t\t// Check if elements with layout shrink-wrap their children\r\n\t\t\tdiv.style.display = \"block\";\r\n\t\t\tdiv.innerHTML = \"<div></div>\";\r\n\t\t\tdiv.firstChild.style.width = \"5px\";\r\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\r\n\r\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\r\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\r\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\r\n\t\t\t\t// Support: IE<8\r\n\t\t\t\tbody.style.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.removeChild( container );\r\n\r\n\t\t// Null elements to avoid leaks in IE\r\n\t\tcontainer = div = tds = marginDiv = null;\r\n\t});\r\n\r\n\t// Null elements to avoid leaks in IE\r\n\tall = select = fragment = opt = a = input = null;\r\n\r\n\treturn support;\r\n})();\r\n\r\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\r\n\trmultiDash = /([A-Z])/g;\r\n\r\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar thisCache, ret,\r\n\t\tinternalKey = jQuery.expando,\r\n\t\tgetByName = typeof name === \"string\",\r\n\r\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\r\n\t\t// can't GC object references properly across the DOM-JS boundary\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\r\n\t\t// attached directly to the object so GC can occur automatically\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\r\n\t\t// Only defining an ID for JS objects if its cache already exists allows\r\n\t\t// the code to shortcut on the same path as a DOM node with no cache\r\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\r\n\r\n\t// Avoid doing any more work than we need to when trying to get data on an\r\n\t// object that has no data at all\r\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( !id ) {\r\n\t\t// Only DOM nodes need a new unique ID for each element since their data\r\n\t\t// ends up in the global cache\r\n\t\tif ( isNode ) {\r\n\t\t\telem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;\r\n\t\t} else {\r\n\t\t\tid = internalKey;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !cache[ id ] ) {\r\n\t\tcache[ id ] = {};\r\n\r\n\t\t// Avoids exposing jQuery metadata on plain JS objects when the object\r\n\t\t// is serialized using JSON.stringify\r\n\t\tif ( !isNode ) {\r\n\t\t\tcache[ id ].toJSON = jQuery.noop;\r\n\t\t}\r\n\t}\r\n\r\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\r\n\t// shallow copied over onto the existing cache\r\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\r\n\t\tif ( pvt ) {\r\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\r\n\t\t} else {\r\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\r\n\t\t}\r\n\t}\r\n\r\n\tthisCache = cache[ id ];\r\n\r\n\t// jQuery data() is stored in a separate object inside the object's internal data\r\n\t// cache in order to avoid key collisions between internal data and user-defined\r\n\t// data.\r\n\tif ( !pvt ) {\r\n\t\tif ( !thisCache.data ) {\r\n\t\t\tthisCache.data = {};\r\n\t\t}\r\n\r\n\t\tthisCache = thisCache.data;\r\n\t}\r\n\r\n\tif ( data !== undefined ) {\r\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\r\n\t}\r\n\r\n\t// Check for both converted-to-camel and non-converted data property names\r\n\t// If a data property was specified\r\n\tif ( getByName ) {\r\n\r\n\t\t// First Try to find as-is property data\r\n\t\tret = thisCache[ name ];\r\n\r\n\t\t// Test for null|undefined property data\r\n\t\tif ( ret == null ) {\r\n\r\n\t\t\t// Try to find the camelCased property\r\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\r\n\t\t}\r\n\t} else {\r\n\t\tret = thisCache;\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nfunction internalRemoveData( elem, name, pvt ) {\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar i, l, thisCache,\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// See jQuery.data for more information\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\r\n\r\n\t// If there is already no cache entry for this object, there is no\r\n\t// purpose in continuing\r\n\tif ( !cache[ id ] ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( name ) {\r\n\r\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\r\n\r\n\t\tif ( thisCache ) {\r\n\r\n\t\t\t// Support array or space separated string names for data keys\r\n\t\t\tif ( !jQuery.isArray( name ) ) {\r\n\r\n\t\t\t\t// try the string as a key before any manipulation\r\n\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\tname = [ name ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\r\n\t\t\t\t\tname = jQuery.camelCase( name );\r\n\t\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\t\tname = [ name ];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tname = name.split(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If \"name\" is an array of keys...\r\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\r\n\t\t\t\t// keys will be converted to camelCase.\r\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\r\n\t\t\t\t// both plain key and camelCase key. #12786\r\n\t\t\t\t// This will only penalize the array argument path.\r\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\r\n\t\t\t}\r\n\r\n\t\t\tfor ( i = 0, l = name.length; i < l; i++ ) {\r\n\t\t\t\tdelete thisCache[ name[i] ];\r\n\t\t\t}\r\n\r\n\t\t\t// If there is no data left in the cache, we want to continue\r\n\t\t\t// and let the cache object itself get destroyed\r\n\t\t\tif ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// See jQuery.data for more information\r\n\tif ( !pvt ) {\r\n\t\tdelete cache[ id ].data;\r\n\r\n\t\t// Don't destroy the parent cache unless the internal data object\r\n\t\t// had been the only thing left in it\r\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// Destroy the cache\r\n\tif ( isNode ) {\r\n\t\tjQuery.cleanData( [ elem ], true );\r\n\r\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\r\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\r\n\t\tdelete cache[ id ];\r\n\r\n\t// When all else fails, null\r\n\t} else {\r\n\t\tcache[ id ] = null;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tcache: {},\r\n\r\n\t// Unique for each copy of jQuery on the page\r\n\t// Non-digits removed to match rinlinejQuery\r\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\t// The following elements throw uncatchable exceptions if you\r\n\t// attempt to add expando properties to them.\r\n\tnoData: {\r\n\t\t\"embed\": true,\r\n\t\t// Ban all objects except for Flash (which handle expandos)\r\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\r\n\t\t\"applet\": true\r\n\t},\r\n\r\n\thasData: function( elem ) {\r\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\r\n\t\treturn !!elem && !isEmptyDataObject( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name );\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data, true );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name, true );\r\n\t},\r\n\r\n\t// A method for determining if a DOM node can handle the data expando\r\n\tacceptData: function( elem ) {\r\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\r\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\r\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tdata: function( key, value ) {\r\n\t\tvar attrs, name,\r\n\t\t\telem = this[0],\r\n\t\t\ti = 0,\r\n\t\t\tdata = null;\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = jQuery.data( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\r\n\t\t\t\t\tattrs = elem.attributes;\r\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\r\n\t\t\t\t\t\tname = attrs[i].name;\r\n\r\n\t\t\t\t\t\tif ( !name.indexOf( \"data-\" ) ) {\r\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\r\n\r\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each(function() {\r\n\t\t\t\tjQuery.data( this, key );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\t// Try to fetch any internally stored data first\r\n\t\t\t\treturn elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\r\n\t\t\t}\r\n\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tjQuery.data( this, key, value );\r\n\t\t\t});\r\n\t\t}, null, value, arguments.length > 1, null, true );\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeData( this, key );\r\n\t\t});\r\n\t}\r\n});\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\r\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\r\n\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = data === \"true\" ? true :\r\n\t\t\t\t\tdata === \"false\" ? false :\r\n\t\t\t\t\tdata === \"null\" ? null :\r\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\r\n\t\t\t\t\t+data + \"\" === data ? +data :\r\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\r\n\t\t\t\t\t\tdata;\r\n\t\t\t} catch( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tjQuery.data( elem, key, data );\r\n\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\n// checks a cache object for emptiness\r\nfunction isEmptyDataObject( obj ) {\r\n\tvar name;\r\n\tfor ( name in obj ) {\r\n\r\n\t\t// if the public data object is empty, the private is still empty\r\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( name !== \"toJSON\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\njQuery.extend({\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = jQuery._data( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\r\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\thooks.cur = fn;\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\r\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\r\n\t\t\t\tjQuery._removeData( elem, key );\r\n\t\t\t})\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[0], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t});\r\n\t},\r\n\t// Based off of the plugin by Clint Helfers, with permission.\r\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\r\n\tdelay: function( time, type ) {\r\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\treturn this.queue( type, function( next, hooks ) {\r\n\t\t\tvar timeout = setTimeout( next, time );\r\n\t\t\thooks.stop = function() {\r\n\t\t\t\tclearTimeout( timeout );\r\n\t\t\t};\r\n\t\t});\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile( i-- ) {\r\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n});\r\nvar nodeHook, boolHook,\r\n\trclass = /[\\t\\r\\n]/g,\r\n\trreturn = /\\r/g,\r\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\r\n\trclickable = /^(?:a|area)$/i,\r\n\trboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,\r\n\truseDefault = /^(?:checked|selected)$/i,\r\n\tgetSetAttribute = jQuery.support.getSetAttribute,\r\n\tgetSetInput = jQuery.support.input;\r\n\r\njQuery.fn.extend({\r\n\tattr: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t});\r\n\t},\r\n\r\n\tprop: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\tname = jQuery.propFix[ name ] || name;\r\n\t\treturn this.each(function() {\r\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\r\n\t\t\ttry {\r\n\t\t\t\tthis[ name ] = undefined;\r\n\t\t\t\tdelete this[ name ];\r\n\t\t\t} catch( e ) {}\r\n\t\t});\r\n\t},\r\n\r\n\taddClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( proceed ) {\r\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\" \"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += clazz + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = jQuery.trim( cur );\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\t\tif ( proceed ) {\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\"\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar type = typeof value,\r\n\t\t\tisBool = typeof stateVal === \"boolean\";\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( type === \"string\" ) {\r\n\t\t\t\t// toggle individual class names\r\n\t\t\t\tvar className,\r\n\t\t\t\t\ti = 0,\r\n\t\t\t\t\tself = jQuery( this ),\r\n\t\t\t\t\tstate = stateVal,\r\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\r\n\r\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\r\n\t\t\t\t\t// check each className given, space separated list\r\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\r\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\r\n\t\t\t\tif ( this.className ) {\r\n\t\t\t\t\t// store className if set\r\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className = \" \" + selector + \" \",\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length;\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\tval: function( value ) {\r\n\t\tvar ret, hooks, isFunction,\r\n\t\t\telem = this[0];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\treturn typeof ret === \"string\" ?\r\n\t\t\t\t\t// handle most common string cases\r\n\t\t\t\t\tret.replace(rreturn, \"\") :\r\n\t\t\t\t\t// handle cases where value is null/undef or number\r\n\t\t\t\t\tret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\treturn this.each(function( i ) {\r\n\t\t\tvar val,\r\n\t\t\t\tself = jQuery(this);\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\tval = value.call( this, i, self.val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\t\t\t} else if ( jQuery.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map(val, function ( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// attributes.value is undefined in Blackberry 4.7 but\r\n\t\t\t\t// uses .value. See #6932\r\n\t\t\t\tvar val = elem.attributes.value;\r\n\t\t\t\treturn !val || val.specified ? elem.value : elem.text;\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length,\r\n\t\t\t\t\ti = index < 0 ?\r\n\t\t\t\t\t\tmax :\r\n\t\t\t\t\t\tone ? index : 0;\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar values = jQuery.makeArray( value );\r\n\r\n\t\t\t\tjQuery(elem).find(\"option\").each(function() {\r\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif ( !values.length ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar hooks, notxml, ret,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\t// All attributes are lowercase\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( notxml ) {\r\n\t\t\tname = name.toLowerCase();\r\n\t\t\thooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\r\n\t\t\t} else if ( hooks && notxml && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\r\n\t\t} else if ( hooks && notxml && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\treturn ret;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// In IE9+, Flash objects don't have .getAttribute (#12945)\r\n\t\t\t// Support: IE9+\r\n\t\t\tif ( typeof elem.getAttribute !== core_strundefined ) {\r\n\t\t\t\tret = elem.getAttribute( name );\r\n\t\t\t}\r\n\r\n\t\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\t\treturn ret == null ?\r\n\t\t\t\tundefined :\r\n\t\t\t\tret;\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name, propName,\r\n\t\t\ti = 0,\r\n\t\t\tattrNames = value && value.match( core_rnotwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( (name = attrNames[i++]) ) {\r\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\r\n\r\n\t\t\t\t// Boolean attributes get special treatment (#10870)\r\n\t\t\t\tif ( rboolean.test( name ) ) {\r\n\t\t\t\t\t// Set corresponding property to false for boolean attributes\r\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate) for IE<8\r\n\t\t\t\t\tif ( !getSetAttribute && ruseDefault.test( name ) ) {\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\r\n\t\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\r\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\r\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\ttabindex: \"tabIndex\",\r\n\t\treadonly: \"readOnly\",\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\",\r\n\t\tmaxlength: \"maxLength\",\r\n\t\tcellspacing: \"cellSpacing\",\r\n\t\tcellpadding: \"cellPadding\",\r\n\t\trowspan: \"rowSpan\",\r\n\t\tcolspan: \"colSpan\",\r\n\t\tusemap: \"useMap\",\r\n\t\tframeborder: \"frameBorder\",\r\n\t\tcontenteditable: \"contentEditable\"\r\n\t},\r\n\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks, notxml,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\tif ( notxml ) {\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn ( elem[ name ] = value );\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn elem[ name ];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\r\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\r\n\t\t\t\tvar attributeNode = elem.getAttributeNode(\"tabindex\");\r\n\r\n\t\t\t\treturn attributeNode && attributeNode.specified ?\r\n\t\t\t\t\tparseInt( attributeNode.value, 10 ) :\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\r\n\t\t\t\t\t\t0 :\r\n\t\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Hook for boolean attributes\r\nboolHook = {\r\n\tget: function( elem, name ) {\r\n\t\tvar\r\n\t\t\t// Use .prop to determine if this attribute is understood as boolean\r\n\t\t\tprop = jQuery.prop( elem, name ),\r\n\r\n\t\t\t// Fetch it accordingly\r\n\t\t\tattr = typeof prop === \"boolean\" && elem.getAttribute( name ),\r\n\t\t\tdetail = typeof prop === \"boolean\" ?\r\n\r\n\t\t\t\tgetSetInput && getSetAttribute ?\r\n\t\t\t\t\tattr != null :\r\n\t\t\t\t\t// oldIE fabricates an empty string for missing boolean attributes\r\n\t\t\t\t\t// and conflates checked/selected into attroperties\r\n\t\t\t\t\truseDefault.test( name ) ?\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] :\r\n\t\t\t\t\t\t!!attr :\r\n\r\n\t\t\t\t// fetch an attribute node for properties not recognized as boolean\r\n\t\t\t\telem.getAttributeNode( name );\r\n\r\n\t\treturn detail && detail.value !== false ?\r\n\t\t\tname.toLowerCase() :\r\n\t\t\tundefined;\r\n\t},\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t// IE<8 needs the *property* name\r\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\r\n\r\n\t\t// Use defaultChecked and defaultSelected for oldIE\r\n\t\t} else {\r\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\r\n\t\t}\r\n\r\n\t\treturn name;\r\n\t}\r\n};\r\n\r\n// fix oldIE value attroperty\r\nif ( !getSetInput || !getSetAttribute ) {\r\n\tjQuery.attrHooks.value = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn jQuery.nodeName( elem, \"input\" ) ?\r\n\r\n\t\t\t\t// Ignore the value *property* by using defaultValue\r\n\t\t\t\telem.defaultValue :\r\n\r\n\t\t\t\tret && ret.specified ? ret.value : undefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\r\n\t\t\t\t// Does not return so that setAttribute is also used\r\n\t\t\t\telem.defaultValue = value;\r\n\t\t\t} else {\r\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\r\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\r\nif ( !getSetAttribute ) {\r\n\r\n\t// Use this for any attribute in IE6/7\r\n\t// This fixes almost every IE6/7 issue\r\n\tnodeHook = jQuery.valHooks.button = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn ret && ( name === \"id\" || name === \"name\" || name === \"coords\" ? ret.value !== \"\" : ret.specified ) ?\r\n\t\t\t\tret.value :\r\n\t\t\t\tundefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\t// Set the existing or create a new attribute node\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( !ret ) {\r\n\t\t\t\telem.setAttributeNode(\r\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tret.value = value += \"\";\r\n\r\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\r\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\r\n\t\t\t\tvalue :\r\n\t\t\t\tundefined;\r\n\t\t}\r\n\t};\r\n\r\n\t// Set contenteditable to false on removals(#10429)\r\n\t// Setting to empty string throws an error as an invalid value\r\n\tjQuery.attrHooks.contenteditable = {\r\n\t\tget: nodeHook.get,\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\r\n\t// This is for removals\r\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n\r\n// Some attributes require a special call on IE\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !jQuery.support.hrefNormalized ) {\r\n\tjQuery.each([ \"href\", \"src\", \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar ret = elem.getAttribute( name, 2 );\r\n\t\t\t\treturn ret == null ? undefined : ret;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t// href/src property should get the full normalized URL (#10299/#12915)\r\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\r\n\t\tjQuery.propHooks[ name ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( name, 4 );\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\nif ( !jQuery.support.style ) {\r\n\tjQuery.attrHooks.style = {\r\n\t\tget: function( elem ) {\r\n\t\t\t// Return undefined in the case of empty string\r\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\r\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\r\n\t\t\treturn elem.style.cssText || undefined;\r\n\t\t},\r\n\t\tset: function( elem, value ) {\r\n\t\t\treturn ( elem.style.cssText = value + \"\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Safari mis-reports the default selected property of an option\r\n// Accessing the parent's selectedIndex property fixes it\r\nif ( !jQuery.support.optSelected ) {\r\n\tjQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {\r\n\t\tget: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// IE6/7 call enctype encoding\r\nif ( !jQuery.support.enctype ) {\r\n\tjQuery.propFix.enctype = \"encoding\";\r\n}\r\n\r\n// Radios and checkboxes getter/setter\r\nif ( !jQuery.support.checkOn ) {\r\n\tjQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\t\tjQuery.valHooks[ this ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\r\n\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\njQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n});\r\nvar rformElems = /^(?:input|select|textarea)$/i,\r\n\trkeyEvent = /^key/,\r\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\r\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\t\tvar tmp, events, t, handleObjIn,\r\n\t\t\tspecial, eventHandle, handleObj,\r\n\t\t\thandlers, type, namespaces, origType,\r\n\t\t\telemData = jQuery._data( elem );\r\n\r\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\r\n\t\tif ( !elemData ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !(events = elemData.events) ) {\r\n\t\t\tevents = elemData.events = {};\r\n\t\t}\r\n\t\tif ( !(eventHandle = elemData.handle) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t};\r\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\r\n\t\t\teventHandle.elem = elem;\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend({\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join(\".\")\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !(handlers = events[ type ]) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\r\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\t\t\t\t\t// Bind the global event handler to the element\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\r\n\r\n\t\t\t\t\t} else if ( elem.attachEvent ) {\r\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t\t// Nullify elem to prevent memory leaks in IE\r\n\t\telem = null;\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\t\tvar j, handleObj, tmp,\r\n\t\t\torigCount, t, events,\r\n\t\t\tspecial, handlers, type,\r\n\t\t\tnamespaces, origType,\r\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\r\n\r\n\t\tif ( !elemData || !(events = elemData.events) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdelete elemData.handle;\r\n\r\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\r\n\t\t\t// so use it instead of delete\r\n\t\t\tjQuery._removeData( elem, \"events\" );\r\n\t\t}\r\n\t},\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\t\tvar handle, ontype, cur,\r\n\t\t\tbubbleType, special, tmp, i,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\r\n\r\n\t\tcur = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf(\".\") >= 0 ) {\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split(\".\");\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\tevent.isTrigger = true;\r\n\t\tevent.namespace = namespaces.join(\".\");\r\n\t\tevent.namespace_re = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\r\n\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&\r\n\t\t\t\t!(type === \"click\" && jQuery.nodeName( elem, \"a\" )) && jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\r\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\r\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\telem[ type ]();\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\r\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\tdispatch: function( event ) {\r\n\r\n\t\t// Make a writable jQuery.Event from the native event object\r\n\t\tevent = jQuery.event.fix( event );\r\n\r\n\t\tvar i, ret, handleObj, matched, j,\r\n\t\t\thandlerQueue = [],\r\n\t\t\targs = core_slice.call( arguments ),\r\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[0] = event;\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// Triggered event must either 1) have no namespace, or\r\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\r\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tvar obj = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler );\r\n\t\t\t\t\tif(obj.apply){\r\n\t\t\t\t\t\tret = obj.apply( matched.elem, args );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar sel, handleObj, matches, i,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Find delegate handlers\r\n\t\t// Black-hole SVG <use> instance trees (#13180)\r\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\r\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\r\n\r\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\r\n\r\n\t\t\t\t// Don't check non-elements (#13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\r\n\t\t\t\t\tmatches = [];\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matches[ sel ] ) {\r\n\t\t\t\t\t\t\tmatches.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matches.length ) {\r\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\tfix: function( event ) {\r\n\t\tif ( event[ jQuery.expando ] ) {\r\n\t\t\treturn event;\r\n\t\t}\r\n\r\n\t\t// Create a writable copy of the event object and normalize some properties\r\n\t\tvar i, prop, copy,\r\n\t\t\ttype = event.type,\r\n\t\t\toriginalEvent = event,\r\n\t\t\tfixHook = this.fixHooks[ type ];\r\n\r\n\t\tif ( !fixHook ) {\r\n\t\t\tthis.fixHooks[ type ] = fixHook =\r\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\r\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\r\n\t\t\t\t{};\r\n\t\t}\r\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\r\n\r\n\t\tevent = new jQuery.Event( originalEvent );\r\n\r\n\t\ti = copy.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tprop = copy[ i ];\r\n\t\t\tevent[ prop ] = originalEvent[ prop ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Fix target property (#1925)\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = originalEvent.srcElement || document;\r\n\t\t}\r\n\r\n\t\t// Support: Chrome 23+, Safari?\r\n\t\t// Target should not be a text node (#504, #13143)\r\n\t\tif ( event.target.nodeType === 3 ) {\r\n\t\t\tevent.target = event.target.parentNode;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\r\n\t\tevent.metaKey = !!event.metaKey;\r\n\r\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\r\n\t},\r\n\r\n\t// Includes some event props shared by KeyEvent and MouseEvent\r\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\r\n\r\n\tfixHooks: {},\r\n\r\n\tkeyHooks: {\r\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\r\n\t\t\t// Add which for key events\r\n\t\t\tif ( event.which == null ) {\r\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tmouseHooks: {\r\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\t\t\tvar body, eventDoc, doc,\r\n\t\t\t\tbutton = original.button,\r\n\t\t\t\tfromElement = original.fromElement;\r\n\r\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\r\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\r\n\t\t\t\teventDoc = event.target.ownerDocument || document;\r\n\t\t\t\tdoc = eventDoc.documentElement;\r\n\t\t\t\tbody = eventDoc.body;\r\n\r\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\r\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );\r\n\t\t\t}\r\n\r\n\t\t\t// Add relatedTarget, if necessary\r\n\t\t\tif ( !event.relatedTarget && fromElement ) {\r\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\r\n\t\t\t}\r\n\r\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\r\n\t\t\t// Note: button is not normalized, so don't use it\r\n\t\t\tif ( !event.which && button !== undefined ) {\r\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tclick: {\r\n\t\t\t// For checkbox, fire native event so checked state will be right\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\r\n\t\t\t\t\tthis.click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this !== document.activeElement && this.focus ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthis.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\r\n\t\t\t\t\t\t// let .trigger() run the handlers\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusin\"\r\n\t\t},\r\n\t\tblur: {\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this === document.activeElement && this.blur ) {\r\n\t\t\t\t\tthis.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusout\"\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\r\n\t\t\t\tif ( event.result !== undefined ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsimulate: function( type, elem, event, bubble ) {\r\n\t\t// Piggyback on a donor event to simulate a different one.\r\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\r\n\t\t// simulated event prevents default then we do the same on the donor.\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{ type: type,\r\n\t\t\t\tisSimulated: true,\r\n\t\t\t\toriginalEvent: {}\r\n\t\t\t}\r\n\t\t);\r\n\t\tif ( bubble ) {\r\n\t\t\tjQuery.event.trigger( e, null, elem );\r\n\t\t} else {\r\n\t\t\tjQuery.event.dispatch.call( elem, e );\r\n\t\t}\r\n\t\tif ( e.isDefaultPrevented() ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.removeEvent = document.removeEventListener ?\r\n\tfunction( elem, type, handle ) {\r\n\t\tif ( elem.removeEventListener ) {\r\n\t\t\telem.removeEventListener( type, handle, false );\r\n\t\t}\r\n\t} :\r\n\tfunction( elem, type, handle ) {\r\n\t\tvar name = \"on\" + type;\r\n\r\n\t\tif ( elem.detachEvent ) {\r\n\r\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\r\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\r\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\r\n\t\t\t\telem[ name ] = null;\r\n\t\t\t}\r\n\r\n\t\t\telem.detachEvent( name, handle );\r\n\t\t}\r\n\t};\r\n\r\njQuery.Event = function( src, props ) {\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !(this instanceof jQuery.Event) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\r\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If preventDefault exists, run it on the original event\r\n\t\tif ( e.preventDefault ) {\r\n\t\t\te.preventDefault();\r\n\r\n\t\t// Support: IE\r\n\t\t// Otherwise set the returnValue property of the original event to false\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// If stopPropagation exists, run it on the original event\r\n\t\tif ( e.stopPropagation ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// Set the cancelBubble property of the original event to true\r\n\t\te.cancelBubble = true;\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\njQuery.each({\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n});\r\n\r\n// IE submit delegation\r\nif ( !jQuery.support.submitBubbles ) {\r\n\r\n\tjQuery.event.special.submit = {\r\n\t\tsetup: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\r\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\r\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\r\n\t\t\t\tvar elem = e.target,\r\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\r\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\r\n\t\t\t\t\t\tevent._submit_bubble = true;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t// return undefined since we don't need an event listener\r\n\t\t},\r\n\r\n\t\tpostDispatch: function( event ) {\r\n\t\t\t// If form was submitted by the user, bubble the event up the tree\r\n\t\t\tif ( event._submit_bubble ) {\r\n\t\t\t\tdelete event._submit_bubble;\r\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\r\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\r\n\t\t\tjQuery.event.remove( this, \"._submit\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE change delegation and checkbox/radio fix\r\nif ( !jQuery.support.changeBubbles ) {\r\n\r\n\tjQuery.event.special.change = {\r\n\r\n\t\tsetup: function() {\r\n\r\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\r\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\r\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\r\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\r\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\r\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\r\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\r\n\t\t\t\t\t\t\tthis._just_changed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tthis._just_changed = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\r\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\r\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\r\n\t\t\t\tvar elem = e.target;\r\n\r\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar elem = event.target;\r\n\r\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\r\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\r\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tjQuery.event.remove( this, \"._change\" );\r\n\r\n\t\t\treturn !rformElems.test( this.nodeName );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Create \"bubbling\" focus and blur events\r\nif ( !jQuery.support.focusinBubbles ) {\r\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\r\n\r\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\r\n\t\tvar attaches = 0,\r\n\t\t\thandler = function( event ) {\r\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\r\n\t\t\t};\r\n\r\n\t\tjQuery.event.special[ fix ] = {\r\n\t\t\tsetup: function() {\r\n\t\t\t\tif ( attaches++ === 0 ) {\r\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tteardown: function() {\r\n\t\t\t\tif ( --attaches === 0 ) {\r\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\njQuery.fn.extend({\r\n\r\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\r\n\t\tvar type, origFn;\r\n\r\n\t\t// Types can be a map of types/handlers\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-Object, selector, data )\r\n\t\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\t\t// ( types-Object, data )\r\n\t\t\t\tdata = data || selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( data == null && fn == null ) {\r\n\t\t\t// ( types, fn )\r\n\t\t\tfn = selector;\r\n\t\t\tdata = selector = undefined;\r\n\t\t} else if ( fn == null ) {\r\n\t\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\t\t// ( types, selector, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = undefined;\r\n\t\t\t} else {\r\n\t\t\t\t// ( types, data, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t} else if ( !fn ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( one === 1 ) {\r\n\t\t\torigFn = fn;\r\n\t\t\tfn = function( event ) {\r\n\t\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\t\tjQuery().off( event );\r\n\t\t\t\treturn origFn.apply( this, arguments );\r\n\t\t\t};\r\n\t\t\t// Use same guid so caller can remove using origFn\r\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t\t});\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\t\t\t// ( event ) dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t});\r\n\t},\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\r\n\t},\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t});\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[0];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n});\r\n/*!\r\n * Sizzle CSS Selector Engine\r\n * Copyright 2012 jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://sizzlejs.com/\r\n */\r\n(function( window, undefined ) {\r\n\r\nvar i,\r\n\tcachedruns,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\tcompile,\r\n\thasDuplicate,\r\n\toutermostContext,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsXML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\tsortOrder,\r\n\r\n\t// Instance-specific data\r\n\texpando = \"sizzle\" + -(new Date()),\r\n\tpreferredDoc = window.document,\r\n\tsupport = {},\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\r\n\t// General-purpose constants\r\n\tstrundefined = typeof undefined,\r\n\tMAX_NEGATIVE = 1 << 31,\r\n\r\n\t// Array methods\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf if we can't use a native one\r\n\tindexOf = arr.indexOf || function( elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = this.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( this[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\r\n\t// Regular expressions\r\n\r\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\r\n\t// http://www.w3.org/TR/css3-syntax/#characters\r\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\r\n\r\n\t// Loosely modeled on CSS identifier characters\r\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\r\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\r\n\r\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\r\n\toperators = \"([*^$|!~]?=)\",\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\r\n\t\t\"*(?:\" + operators + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\r\n\r\n\t// Prefer arguments quoted,\r\n\t// then not containing pseudos/brackets,\r\n\t// then attribute selectors/non-parenthetical expressions,\r\n\t// then anything else\r\n\t// These preferences are here to reduce the number of selectors\r\n\t// needing tokenize in the PSEUDO preFilter\r\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\" + whitespace + \"*\" ),\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\r\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\r\n\t\t\"NAME\": new RegExp( \"^\\\\[name=['\\\"]?(\" + characterEncoding + \")['\\\"]?\\\\]\" ),\r\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\r\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\r\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\r\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\r\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\r\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trsibling = /[\\x20\\t\\r\\n\\f]*[+~]/,\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native code/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trescape = /'|\\\\/g,\r\n\trattributeQuotes = /\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,\r\n\r\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = /\\\\([\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|.)/g,\r\n\tfunescape = function( _, escaped ) {\r\n\t\tvar high = \"0x\" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\treturn high !== high ?\r\n\t\t\tescaped :\r\n\t\t\t// BMP codepoint\r\n\t\t\thigh < 0 ?\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t};\r\n\r\n// Use a stripped-down slice if we can't use a native one\r\ntry {\r\n\tslice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;\r\n} catch ( e ) {\r\n\tslice = function( i ) {\r\n\t\tvar elem,\r\n\t\t\tresults = [];\r\n\t\twhile ( (elem = this[i++]) ) {\r\n\t\t\tresults.push( elem );\r\n\t\t}\r\n\t\treturn results;\r\n\t};\r\n}\r\n\r\n/**\r\n * For feature detection\r\n * @param {Function} fn The function to test for native support\r\n */\r\nfunction isNative( fn ) {\r\n\treturn rnative.test( fn + \"\" );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar cache,\r\n\t\tkeys = [];\r\n\r\n\treturn (cache = function( key, value ) {\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\r\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn (cache[ key ] = value);\r\n\t});\r\n}\r\n\r\n/**\r\n * Mark a function for special use by Sizzle\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created div and expects a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\ttry {\r\n\t\treturn fn( div );\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t} finally {\r\n\t\t// release memory in IE\r\n\t\tdiv = null;\r\n\t}\r\n}\r\n\r\nfunction Sizzle( selector, context, results, seed ) {\r\n\tvar match, elem, m, nodeType,\r\n\t\t// QSA vars\r\n\t\ti, groups, old, nid, newContext, newSelector;\r\n\r\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\r\n\tcontext = context || document;\r\n\tresults = results || [];\r\n\r\n\tif ( !selector || typeof selector !== \"string\" ) {\r\n\t\treturn results;\r\n\t}\r\n\r\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tif ( !documentIsXML && !seed ) {\r\n\r\n\t\t// Shortcuts\r\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\r\n\t\t\t// Speed-up: Sizzle(\"#ID\")\r\n\t\t\tif ( (m = match[1]) ) {\r\n\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\telem = context.getElementById( m );\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Context is not a document\r\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\r\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\r\n\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Speed-up: Sizzle(\"TAG\")\r\n\t\t\t} else if ( match[2] ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\r\n\t\t\t} else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByClassName( m ), 0) );\r\n\t\t\t\treturn results;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// QSA path\r\n\t\tif ( support.qsa && !rbuggyQSA.test(selector) ) {\r\n\t\t\told = true;\r\n\t\t\tnid = expando;\r\n\t\t\tnewContext = context;\r\n\t\t\tnewSelector = nodeType === 9 && selector;\r\n\r\n\t\t\t// qSA works strangely on Element-rooted queries\r\n\t\t\t// We can work around this by specifying an extra ID on the root\r\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\r\n\t\t\t// IE 8 doesn't work on object elements\r\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\r\n\t\t\t\tgroups = tokenize( selector );\r\n\r\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\r\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\r\n\t\t\t\t}\r\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\r\n\r\n\t\t\t\ti = groups.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\r\n\t\t\t\t}\r\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\r\n\t\t\t\tnewSelector = groups.join(\",\");\r\n\t\t\t}\r\n\r\n\t\t\tif ( newSelector ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results, slice.call( newContext.querySelectorAll(\r\n\t\t\t\t\t\tnewSelector\r\n\t\t\t\t\t), 0 ) );\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch(qsaError) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( !old ) {\r\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Detect xml\r\n * @param {Element|Object} elem An element or a document\r\n */\r\nisXML = Sizzle.isXML = function( elem ) {\r\n\t// documentElement is verified for cases where it doesn't yet exist\r\n\t// (such as loading iframes in IE - #4833)\r\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\r\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\r\n};\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [doc] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nsetDocument = Sizzle.setDocument = function( node ) {\r\n\tvar doc = node ? node.ownerDocument || node : preferredDoc;\r\n\r\n\t// If no document and documentElement is available, return\r\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Set our document\r\n\tdocument = doc;\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Support tests\r\n\tdocumentIsXML = isXML( doc );\r\n\r\n\t// Check if getElementsByTagName(\"*\") returns only elements\r\n\tsupport.tagNameNoComments = assert(function( div ) {\r\n\t\tdiv.appendChild( doc.createComment(\"\") );\r\n\t\treturn !div.getElementsByTagName(\"*\").length;\r\n\t});\r\n\r\n\t// Check if attributes should be retrieved by attribute nodes\r\n\tsupport.attributes = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<select></select>\";\r\n\t\tvar type = typeof div.lastChild.getAttribute(\"multiple\");\r\n\t\t// IE8 returns a string for some attributes even when not present\r\n\t\treturn type !== \"boolean\" && type !== \"string\";\r\n\t});\r\n\r\n\t// Check if getElementsByClassName can be trusted\r\n\tsupport.getByClassName = assert(function( div ) {\r\n\t\t// Opera can't find a second classname (in 9.6)\r\n\t\tdiv.innerHTML = \"<div class='hidden e'></div><div class='hidden'></div>\";\r\n\t\tif ( !div.getElementsByClassName || !div.getElementsByClassName(\"e\").length ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Safari 3.2 caches class attributes and doesn't catch changes\r\n\t\tdiv.lastChild.className = \"e\";\r\n\t\treturn div.getElementsByClassName(\"e\").length === 2;\r\n\t});\r\n\r\n\t// Check if getElementById returns elements by name\r\n\t// Check if getElementsByName privileges form controls or returns elements by ID\r\n\tsupport.getByName = assert(function( div ) {\r\n\t\t// Inject content\r\n\t\tdiv.id = expando + 0;\r\n\t\tdiv.innerHTML = \"<a name='\" + expando + \"'></a><div name='\" + expando + \"'></div>\";\r\n\t\tdocElem.insertBefore( div, docElem.firstChild );\r\n\r\n\t\t// Test\r\n\t\tvar pass = doc.getElementsByName &&\r\n\t\t\t// buggy browsers will return fewer than the correct 2\r\n\t\t\tdoc.getElementsByName( expando ).length === 2 +\r\n\t\t\t// buggy browsers will return more than the correct 0\r\n\t\t\tdoc.getElementsByName( expando + 0 ).length;\r\n\t\tsupport.getIdNotName = !doc.getElementById( expando );\r\n\r\n\t\t// Cleanup\r\n\t\tdocElem.removeChild( div );\r\n\r\n\t\treturn pass;\r\n\t});\r\n\r\n\t// IE6/7 return modified attributes\r\n\tExpr.attrHandle = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<a href='#'></a>\";\r\n\t\treturn div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&\r\n\t\t\tdiv.firstChild.getAttribute(\"href\") === \"#\";\r\n\t}) ?\r\n\t\t{} :\r\n\t\t{\r\n\t\t\t\"href\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( \"href\", 2 );\r\n\t\t\t},\r\n\t\t\t\"type\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"type\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t// ID find and filter\r\n\tif ( support.getIdNotName ) {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\treturn m && m.parentNode ? [m] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t} else {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\r\n\t\t\t\treturn m ?\r\n\t\t\t\t\tm.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode(\"id\").value === id ?\r\n\t\t\t\t\t\t[m] :\r\n\t\t\t\t\t\tundefined :\r\n\t\t\t\t\t[];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find[\"TAG\"] = support.tagNameNoComments ?\r\n\t\tfunction( tag, context ) {\r\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\r\n\t\t\t\treturn context.getElementsByTagName( tag );\r\n\t\t\t}\r\n\t\t} :\r\n\t\tfunction( tag, context ) {\r\n\t\t\tvar elem,\r\n\t\t\t\ttmp = [],\r\n\t\t\t\ti = 0,\r\n\t\t\t\tresults = context.getElementsByTagName( tag );\r\n\r\n\t\t\t// Filter out possible comments\r\n\t\t\tif ( tag === \"*\" ) {\r\n\t\t\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\ttmp.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t};\r\n\r\n\t// Name\r\n\tExpr.find[\"NAME\"] = support.getByName && function( tag, context ) {\r\n\t\tif ( typeof context.getElementsByName !== strundefined ) {\r\n\t\t\treturn context.getElementsByName( name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Class\r\n\tExpr.find[\"CLASS\"] = support.getByClassName && function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r\n\trbuggyMatches = [];\r\n\r\n\t// qSa(:focus) reports false when true (Chrome 21),\r\n\t// no need to also add to buggyMatches since matches checks buggyQSA\r\n\t// A support test would require too much code (would include document ready)\r\n\trbuggyQSA = [ \":focus\" ];\r\n\r\n\tif ( (support.qsa = isNative(doc.querySelectorAll)) ) {\r\n\t\t// Build QSA regex\r\n\t\t// Regex strategy adopted from Diego Perini\r\n\t\tassert(function( div ) {\r\n\t\t\t// Select is set to empty string on purpose\r\n\t\t\t// This is to test IE's treatment of not explictly\r\n\t\t\t// setting a boolean content attribute,\r\n\t\t\t// since its presence should be enough\r\n\t\t\t// http://bugs.jquery.com/ticket/12359\r\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\r\n\r\n\t\t\t// IE8 - Some boolean attributes are not treated correctly\r\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Webkit/Opera - :checked should return selected option elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\r\n\t\t\t\trbuggyQSA.push(\":checked\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassert(function( div ) {\r\n\r\n\t\t\t// Opera 10-12/IE8 - ^= $= *= and empty values\r\n\t\t\t// Should not select anything\r\n\t\t\tdiv.innerHTML = \"<input type='hidden' i=''/>\";\r\n\t\t\tif ( div.querySelectorAll(\"[i^='']\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:\\\"\\\"|'')\" );\r\n\t\t\t}\r\n\r\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\r\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\r\n\t\t\tdiv.querySelectorAll(\"*,:x\");\r\n\t\t\trbuggyQSA.push(\",.*:\");\r\n\t\t});\r\n\t}\r\n\r\n\tif ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||\r\n\t\tdocElem.mozMatchesSelector ||\r\n\t\tdocElem.webkitMatchesSelector ||\r\n\t\tdocElem.oMatchesSelector ||\r\n\t\tdocElem.msMatchesSelector) )) ) {\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Check to see if it's possible to do matchesSelector\r\n\t\t\t// on a disconnected node (IE 9)\r\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\r\n\r\n\t\t\t// This should fail with an exception\r\n\t\t\t// Gecko does not error, returns false instead\r\n\t\t\tmatches.call( div, \"[s!='']:x\" );\r\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\r\n\t\t});\r\n\t}\r\n\r\n\trbuggyQSA = new RegExp( rbuggyQSA.join(\"|\") );\r\n\trbuggyMatches = new RegExp( rbuggyMatches.join(\"|\") );\r\n\r\n\t// Element contains another\r\n\t// Purposefully does not implement inclusive descendent\r\n\t// As in, an element does not contain itself\r\n\tcontains = isNative(docElem.contains) || docElem.compareDocumentPosition ?\r\n\t\tfunction( a, b ) {\r\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\r\n\t\t\t\tbup = b && b.parentNode;\r\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\t\t\t\tadown.contains ?\r\n\t\t\t\t\tadown.contains( bup ) :\r\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t\t\t));\r\n\t\t} :\r\n\t\tfunction( a, b ) {\r\n\t\t\tif ( b ) {\r\n\t\t\t\twhile ( (b = b.parentNode) ) {\r\n\t\t\t\t\tif ( b === a ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t// Document order sorting\r\n\tsortOrder = docElem.compareDocumentPosition ?\r\n\tfunction( a, b ) {\r\n\t\tvar compare;\r\n\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {\r\n\t\t\tif ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {\r\n\t\t\t\tif ( a === doc || contains( preferredDoc, a ) ) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( b === doc || contains( preferredDoc, b ) ) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\treturn compare & 4 ? -1 : 1;\r\n\t\t}\r\n\r\n\t\treturn a.compareDocumentPosition ? -1 : 1;\r\n\t} :\r\n\tfunction( a, b ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\taup = a.parentNode,\r\n\t\t\tbup = b.parentNode,\r\n\t\t\tap = [ a ],\r\n\t\t\tbp = [ b ];\r\n\r\n\t\t// Exit early if the nodes are identical\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\r\n\t\t// Parentless nodes are either documents or disconnected\r\n\t\t} else if ( !aup || !bup ) {\r\n\t\t\treturn a === doc ? -1 :\r\n\t\t\t\tb === doc ? 1 :\r\n\t\t\t\taup ? -1 :\r\n\t\t\t\tbup ? 1 :\r\n\t\t\t\t0;\r\n\r\n\t\t// If the nodes are siblings, we can do a quick check\r\n\t\t} else if ( aup === bup ) {\r\n\t\t\treturn siblingCheck( a, b );\r\n\t\t}\r\n\r\n\t\t// Otherwise we need full lists of their ancestors for comparison\r\n\t\tcur = a;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tap.unshift( cur );\r\n\t\t}\r\n\t\tcur = b;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tbp.unshift( cur );\r\n\t\t}\r\n\r\n\t\t// Walk down the tree looking for a discrepancy\r\n\t\twhile ( ap[i] === bp[i] ) {\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn i ?\r\n\t\t\t// Do a sibling check if the nodes have a common ancestor\r\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\r\n\r\n\t\t\t// Otherwise nodes in our document sort first\r\n\t\t\tap[i] === preferredDoc ? -1 :\r\n\t\t\tbp[i] === preferredDoc ? 1 :\r\n\t\t\t0;\r\n\t};\r\n\r\n\t// Always assume the presence of duplicates if sort doesn't\r\n\t// pass them to our comparison function (as in Google Chrome).\r\n\thasDuplicate = false;\r\n\t[0, 0].sort( sortOrder );\r\n\tsupport.detectDuplicates = hasDuplicate;\r\n\r\n\treturn document;\r\n};\r\n\r\nSizzle.matches = function( expr, elements ) {\r\n\treturn Sizzle( expr, null, null, elements );\r\n};\r\n\r\nSizzle.matchesSelector = function( elem, expr ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\t// Make sure that attribute selectors are quoted\r\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\r\n\r\n\t// rbuggyQSA always contains :focus, so no need for an existence check\r\n\tif ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch(e) {}\r\n\t}\r\n\r\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\r\n};\r\n\r\nSizzle.contains = function( context, elem ) {\r\n\t// Set document vars if needed\r\n\tif ( ( context.ownerDocument || context ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn contains( context, elem );\r\n};\r\n\r\nSizzle.attr = function( elem, name ) {\r\n\tvar val;\r\n\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tif ( !documentIsXML ) {\r\n\t\tname = name.toLowerCase();\r\n\t}\r\n\tif ( (val = Expr.attrHandle[ name ]) ) {\r\n\t\treturn val( elem );\r\n\t}\r\n\tif ( documentIsXML || support.attributes ) {\r\n\t\treturn elem.getAttribute( name );\r\n\t}\r\n\treturn ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?\r\n\t\tname :\r\n\t\tval && val.specified ? val.value : null;\r\n};\r\n\r\nSizzle.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n// Document sorting and removing duplicates\r\nSizzle.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\ti = 1,\r\n\t\tj = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\thasDuplicate = !support.detectDuplicates;\r\n\tresults.sort( sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\tfor ( ; (elem = results[i]); i++ ) {\r\n\t\t\tif ( elem === results[ i - 1 ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tresults.splice( duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\treturn results;\r\n};\r\n\r\nfunction siblingCheck( a, b ) {\r\n\tvar cur = b && a,\r\n\t\tdiff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );\r\n\r\n\t// Use IE sourceIndex if available on both nodes\r\n\tif ( diff ) {\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t// Check if b follows a\r\n\tif ( cur ) {\r\n\t\twhile ( (cur = cur.nextSibling) ) {\r\n\t\t\tif ( cur === b ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn a ? 1 : -1;\r\n}\r\n\r\n// Returns a function to use in pseudos for input types\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn name === \"input\" && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for buttons\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for positionals\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction(function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction(function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\r\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Utility function for retrieving the text value of an array of DOM nodes\r\n * @param {Array|Element} elem\r\n */\r\ngetText = Sizzle.getText = function( elem ) {\r\n\tvar node,\r\n\t\tret = \"\",\r\n\t\ti = 0,\r\n\t\tnodeType = elem.nodeType;\r\n\r\n\tif ( !nodeType ) {\r\n\t\t// If no nodeType, this is expected to be an array\r\n\t\tfor ( ; (node = elem[i]); i++ ) {\r\n\t\t\t// Do not traverse comment nodes\r\n\t\t\tret += getText( node );\r\n\t\t}\r\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r\n\t\t// Use textContent for elements\r\n\t\t// innerText usage removed for consistency of new lines (see #11153)\r\n\t\tif ( typeof elem.textContent === \"string\" ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t} else {\r\n\t\t\t// Traverse its children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tret += getText( elem );\r\n\t\t\t}\r\n\t\t}\r\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\r\n\t\treturn elem.nodeValue;\r\n\t}\r\n\t// Do not include comment or processing instruction nodes\r\n\r\n\treturn ret;\r\n};\r\n\r\nExpr = Sizzle.selectors = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\t\"ATTR\": function( match ) {\r\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[2] === \"~=\" ) {\r\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( match ) {\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[1] = match[1].toLowerCase();\r\n\r\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[3] ) {\r\n\t\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\r\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[3] ) {\r\n\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[5] && match[2];\r\n\r\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[4] ) {\r\n\t\t\t\tmatch[2] = match[4];\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\r\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\t\"TAG\": function( nodeName ) {\r\n\t\t\tif ( nodeName === \"*\" ) {\r\n\t\t\t\treturn function() { return true; };\r\n\t\t\t}\r\n\r\n\t\t\tnodeName = nodeName.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CLASS\": function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\")) || \"\" );\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t\t\"ATTR\": function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = Sizzle.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\treturn operator === \"=\" ? result === check :\r\n\t\t\t\t\toperator === \"!=\" ? result !== check :\r\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\r\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\r\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\r\n\t\t\t\t\tfalse;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\r\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\r\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\r\n\t\t\t\t\t\t\tdiff = cache[1];\r\n\r\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\r\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( pseudo, argument ) {\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as Sizzle does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\t\t// Potentially complex pseudos\r\n\t\t\"not\": markFunction(function( selector ) {\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}) :\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tinput[0] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"has\": markFunction(function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"contains\": markFunction(function( text ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\t\"lang\": markFunction( function( lang ) {\r\n\t\t\t// lang value must be a valid identifider\r\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\r\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( (elemLang = documentIsXML ?\r\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\") :\r\n\t\t\t\t\t\telem.lang) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// Miscellaneous\r\n\t\t\"target\": function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\t\"root\": function( elem ) {\r\n\t\t\treturn elem === docElem;\r\n\t\t},\r\n\r\n\t\t\"focus\": function( elem ) {\r\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\t\"enabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === false;\r\n\t\t},\r\n\r\n\t\t\"disabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\r\n\t\t\"checked\": function( elem ) {\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\r\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\r\n\t\t},\r\n\r\n\t\t\"selected\": function( elem ) {\r\n\t\t\t// Accessing this property makes selected-by-default\r\n\t\t\t// options in Safari work properly\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\t\"empty\": function( elem ) {\r\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\r\n\t\t\t// not comment, processing instructions, or others\r\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\r\n\t\t\t// Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t\"parent\": function( elem ) {\r\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\t\"header\": function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"input\": function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"button\": function( elem ) {\r\n\t\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\r\n\t\t},\r\n\r\n\t\t\"text\": function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\r\n\t\t\t// use getAttribute instead to test this case\r\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\r\n\t\t\t\telem.type === \"text\" &&\r\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\t\"first\": createPositionalPseudo(function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t}),\r\n\r\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t}),\r\n\r\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t}),\r\n\r\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t})\r\n\t}\r\n};\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\nfunction tokenize( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\r\n\t\t\tif ( match ) {\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( tokens = [] );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push( {\r\n\t\t\t\tvalue: matched,\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\r\n\t\t\t} );\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push( {\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t} );\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\treturn parseOnly ?\r\n\t\tsoFar.length :\r\n\t\tsoFar ?\r\n\t\t\tSizzle.error( selector ) :\r\n\t\t\t// Cache the tokens\r\n\t\t\ttokenCache( selector, groups ).slice( 0 );\r\n}\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[i].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tcheckNonElements = base && dir === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar data, cache, outerCache,\r\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\r\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\r\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\r\n\t\t\t\t\t\t\t\treturn data === true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\r\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\r\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[0];\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction(function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems,\r\n\r\n\t\t\tmatcherOut = matcher ?\r\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\r\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t\t[] :\r\n\r\n\t\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\t\tresults :\r\n\t\t\t\tmatcherIn;\r\n\r\n\t\t// Find primary matches\r\n\t\tif ( matcher ) {\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( (elem = temp[i]) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\r\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\r\n\t\t\t\t(checkContext = context).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\t// A counter to specify which element is currently being matched\r\n\tvar matcherCachedRuns = 0,\r\n\t\tbySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\toutermost = expandContext != null,\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\t\t\t\t// We must always have either seed elements or context\r\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\r\n\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\toutermostContext = context !== document && context;\r\n\t\t\t\tcachedruns = matcherCachedRuns;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\r\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\tmatchedCount += i;\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tSizzle.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !group ) {\r\n\t\t\tgroup = tokenize( selector );\r\n\t\t}\r\n\t\ti = group.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( group[i] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\t}\r\n\treturn cached;\r\n};\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tSizzle( selector, contexts[i], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction select( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tmatch = tokenize( selector );\r\n\r\n\tif ( !seed ) {\r\n\t\t// Try to minimize operations if there is only one group\r\n\t\tif ( match.length === 1 ) {\r\n\r\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\r\n\t\t\ttokens = match[0] = match[0].slice( 0 );\r\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\r\n\t\t\t\t\tcontext.nodeType === 9 && !documentIsXML &&\r\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\r\n\r\n\t\t\t\tcontext = Expr.find[\"ID\"]( token.matches[0].replace( runescape, funescape ), context )[0];\r\n\t\t\t\tif ( !context ) {\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t\t}\r\n\r\n\t\t\t// Fetch a seed set for right-to-left matching\r\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\ttoken = tokens[i];\r\n\r\n\t\t\t\t// Abort if we hit a combinator\r\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\r\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\t\tif ( (seed = find(\r\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\r\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\r\n\t\t\t\t\t)) ) {\r\n\r\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\t\tpush.apply( results, slice.call( seed, 0 ) );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\tcompile( selector, match )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\tdocumentIsXML,\r\n\t\tresults,\r\n\t\trsibling.test( selector )\r\n\t);\r\n\treturn results;\r\n}\r\n\r\n// Deprecated\r\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nExpr.filters = setFilters.prototype = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\n// Initialize with the default document\r\nsetDocument();\r\n\r\n// Override sizzle attribute retrieval\r\nSizzle.attr = jQuery.attr;\r\njQuery.find = Sizzle;\r\njQuery.expr = Sizzle.selectors;\r\njQuery.expr[\":\"] = jQuery.expr.pseudos;\r\njQuery.unique = Sizzle.uniqueSort;\r\njQuery.text = Sizzle.getText;\r\njQuery.isXMLDoc = Sizzle.isXML;\r\njQuery.contains = Sizzle.contains;\r\n\r\n\r\n})( window );\r\nvar runtil = /Until$/,\r\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\tisSimple = /^.[^:#\\[\\.,]*$/,\r\n\trneedsContext = jQuery.expr.match.needsContext,\r\n\t// methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend({\r\n\tfind: function( selector ) {\r\n\t\tvar i, ret, self,\r\n\t\t\tlen = this.length;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\tself = this;\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}) );\r\n\t\t}\r\n\r\n\t\tret = [];\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, this[ i ], ret );\r\n\t\t}\r\n\r\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\r\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\r\n\t\tret.selector = ( this.selector ? this.selector + \" \" : \"\" ) + selector;\r\n\t\treturn ret;\r\n\t},\r\n\r\n\thas: function( target ) {\r\n\t\tvar i,\r\n\t\t\ttargets = jQuery( target, this ),\r\n\t\t\tlen = targets.length;\r\n\r\n\t\treturn this.filter(function() {\r\n\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, false) );\r\n\t},\r\n\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, true) );\r\n\t},\r\n\r\n\tis: function( selector ) {\r\n\t\treturn !!selector && (\r\n\t\t\ttypeof selector === \"string\" ?\r\n\t\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\t\trneedsContext.test( selector ) ?\r\n\t\t\t\t\tjQuery( selector, this.context ).index( this[0] ) >= 0 :\r\n\t\t\t\t\tjQuery.filter( selector, this ).length > 0 :\r\n\t\t\t\tthis.filter( selector ).length > 0 );\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tret = [],\r\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\r\n\t\t\t\tjQuery( selectors, context || this.context ) :\r\n\t\t\t\t0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tcur = this[i];\r\n\r\n\t\t\twhile ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {\r\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\r\n\t\t\t\t\tret.push( cur );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\r\n\t},\r\n\r\n\t// Determine the position of an element within\r\n\t// the matched set of elements\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn jQuery.inArray(\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[0] : elem, this );\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\tvar set = typeof selector === \"string\" ?\r\n\t\t\t\tjQuery( selector, context ) :\r\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\r\n\t\t\tall = jQuery.merge( this.get(), set );\r\n\r\n\t\treturn this.pushStack( jQuery.unique(all) );\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\r\n\t\t);\r\n\t}\r\n});\r\n\r\njQuery.fn.andSelf = jQuery.fn.addBack;\r\n\r\nfunction sibling( cur, dir ) {\r\n\tdo {\r\n\t\tcur = cur[ dir ];\r\n\t} while ( cur && cur.nodeType !== 1 );\r\n\r\n\treturn cur;\r\n}\r\n\r\njQuery.each({\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn jQuery.sibling( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\r\n\t\t\telem.contentDocument || elem.contentWindow.document :\r\n\t\t\tjQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar ret = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( !runtil.test( name ) ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tret = jQuery.filter( selector, ret );\r\n\t\t}\r\n\r\n\t\tret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\r\n\r\n\t\tif ( this.length > 1 && rparentsprev.test( name ) ) {\r\n\t\t\tret = ret.reverse();\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\tfilter: function( expr, elems, not ) {\r\n\t\tif ( not ) {\r\n\t\t\texpr = \":not(\" + expr + \")\";\r\n\t\t}\r\n\r\n\t\treturn elems.length === 1 ?\r\n\t\t\tjQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\r\n\t\t\tjQuery.find.matches(expr, elems);\r\n\t},\r\n\r\n\tdir: function( elem, dir, until ) {\r\n\t\tvar matched = [],\r\n\t\t\tcur = elem[ dir ];\r\n\r\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\r\n\t\t\tif ( cur.nodeType === 1 ) {\r\n\t\t\t\tmatched.push( cur );\r\n\t\t\t}\r\n\t\t\tcur = cur[dir];\r\n\t\t}\r\n\t\treturn matched;\r\n\t},\r\n\r\n\tsibling: function( n, elem ) {\r\n\t\tvar r = [];\r\n\r\n\t\tfor ( ; n; n = n.nextSibling ) {\r\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\t\tr.push( n );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n});\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, keep ) {\r\n\r\n\t// Can't pass null or undefined to indexOf in Firefox 4\r\n\t// Set to 0 to skip string check\r\n\tqualifier = qualifier || 0;\r\n\r\n\tif ( jQuery.isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep(elements, function( elem, i ) {\r\n\t\t\tvar retVal = !!qualifier.call( elem, i, elem );\r\n\t\t\treturn retVal === keep;\r\n\t\t});\r\n\r\n\t} else if ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) === keep;\r\n\t\t});\r\n\r\n\t} else if ( typeof qualifier === \"string\" ) {\r\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn elem.nodeType === 1;\r\n\t\t});\r\n\r\n\t\tif ( isSimple.test( qualifier ) ) {\r\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\r\n\t\t} else {\r\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\r\n\t\t}\r\n\t}\r\n\r\n\treturn jQuery.grep(elements, function( elem ) {\r\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;\r\n\t});\r\n}\r\nfunction createSafeFragment( document ) {\r\n\tvar list = nodeNames.split( \"|\" ),\r\n\t\tsafeFrag = document.createDocumentFragment();\r\n\r\n\tif ( safeFrag.createElement ) {\r\n\t\twhile ( list.length ) {\r\n\t\t\tsafeFrag.createElement(\r\n\t\t\t\tlist.pop()\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\treturn safeFrag;\r\n}\r\n\r\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\r\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\r\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\r\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\r\n\trleadingWhitespace = /^\\s+/,\r\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\r\n\trtagName = /<([\\w:]+)/,\r\n\trtbody = /<tbody/i,\r\n\trhtml = /<|&#?\\w+;/,\r\n\trnoInnerhtml = /<(?:script|style|link)/i,\r\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\r\n\trscriptTypeMasked = /^true\\/(.*)/,\r\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\r\n\r\n\t// We have to close these tags to support XHTML (#13200)\r\n\twrapMap = {\r\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\r\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\r\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\r\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\r\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\r\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\r\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\r\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\r\n\t},\r\n\tsafeFragment = createSafeFragment( document ),\r\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\r\n\r\nwrapMap.optgroup = wrapMap.option;\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\njQuery.fn.extend({\r\n\ttext: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\twrapAll: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( this[0] ) {\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\r\n\r\n\t\t\tif ( this[0].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[0] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map(function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\r\n\t\t\t\t\telem = elem.firstChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t}).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar isFunction = jQuery.isFunction( html );\r\n\r\n\t\treturn this.each(function(i) {\r\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\r\n\t\t});\r\n\t},\r\n\r\n\tunwrap: function() {\r\n\t\treturn this.parent().each(function() {\r\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\r\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t\t}\r\n\t\t}).end();\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.appendChild( elem );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t// keepData is for internal use only--do not document\r\n\tremove: function( selector, keepData ) {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\tif ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {\r\n\t\t\t\tif ( !keepData && elem.nodeType === 1 ) {\r\n\t\t\t\t\tjQuery.cleanData( getAll( elem ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.parentNode.removeChild( elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Remove any remaining nodes\r\n\t\t\twhile ( elem.firstChild ) {\r\n\t\t\t\telem.removeChild( elem.firstChild );\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\r\n\t\t\t// Support: IE<9\r\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\r\n\t\t\t\telem.options.length = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function () {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t});\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\tvar elem = this[0] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn elem.nodeType === 1 ?\r\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&\r\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (; i < l; i++ ) {\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\telem = this[i] || {};\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function( value ) {\r\n\t\tvar isFunc = jQuery.isFunction( value );\r\n\r\n\t\t// Make sure that the elements are removed from the DOM before they are inserted\r\n\t\t// this can help fix replacing a parent with child elements\r\n\t\tif ( !isFunc && typeof value !== \"string\" ) {\r\n\t\t\tvalue = jQuery( value ).not( this ).detach();\r\n\t\t}\r\n\r\n\t\treturn this.domManip( [ value ], true, function( elem ) {\r\n\t\t\tvar next = this.nextSibling,\r\n\t\t\t\tparent = this.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tjQuery( this ).remove();\r\n\t\t\t\tparent.insertBefore( elem, next );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tdetach: function( selector ) {\r\n\t\treturn this.remove( selector, true );\r\n\t},\r\n\r\n\tdomManip: function( args, table, callback ) {\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\targs = core_concat.apply( [], args );\r\n\r\n\t\tvar first, node, hasScripts,\r\n\t\t\tscripts, doc, fragment,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tset = this,\r\n\t\t\tiNoClone = l - 1,\r\n\t\t\tvalue = args[0],\r\n\t\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\r\n\t\t\treturn this.each(function( index ) {\r\n\t\t\t\tvar self = set.eq( index );\r\n\t\t\t\tif ( isFunction ) {\r\n\t\t\t\t\targs[0] = value.call( this, index, table ? self.html() : undefined );\r\n\t\t\t\t}\r\n\t\t\t\tself.domManip( args, table, callback );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( l ) {\r\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );\r\n\t\t\tfirst = fragment.firstChild;\r\n\r\n\t\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\t\tfragment = first;\r\n\t\t\t}\r\n\r\n\t\t\tif ( first ) {\r\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\r\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\r\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\r\n\t\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcallback.call(\r\n\t\t\t\t\t\ttable && jQuery.nodeName( this[i], \"table\" ) ?\r\n\t\t\t\t\t\t\tfindOrAppend( this[i], \"tbody\" ) :\r\n\t\t\t\t\t\t\tthis[i],\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t\t// Reenable scripts\r\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\t\tif ( node.src ) {\r\n\t\t\t\t\t\t\t\t// Hope ajax is available...\r\n\t\t\t\t\t\t\t\tjQuery.ajax({\r\n\t\t\t\t\t\t\t\t\turl: node.src,\r\n\t\t\t\t\t\t\t\t\ttype: \"GET\",\r\n\t\t\t\t\t\t\t\t\tdataType: \"script\",\r\n\t\t\t\t\t\t\t\t\tasync: false,\r\n\t\t\t\t\t\t\t\t\tglobal: false,\r\n\t\t\t\t\t\t\t\t\t\"throws\": true\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix #11809: Avoid leaking memory\r\n\t\t\t\tfragment = first = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\nfunction findOrAppend( elem, tag ) {\r\n\treturn elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tvar match = rscriptTypeMasked.exec( elem.type );\r\n\tif ( match ) {\r\n\t\telem.type = match[1];\r\n\t} else {\r\n\t\telem.removeAttribute(\"type\");\r\n\t}\r\n\treturn elem;\r\n}\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\r\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar type, i, l,\r\n\t\toldData = jQuery._data( src ),\r\n\t\tcurData = jQuery._data( dest, oldData ),\r\n\t\tevents = oldData.events;\r\n\r\n\tif ( events ) {\r\n\t\tdelete curData.handle;\r\n\t\tcurData.events = {};\r\n\r\n\t\tfor ( type in events ) {\r\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// make the cloned public data object a copy from the original\r\n\tif ( curData.data ) {\r\n\t\tcurData.data = jQuery.extend( {}, curData.data );\r\n\t}\r\n}\r\n\r\nfunction fixCloneNodeIssues( src, dest ) {\r\n\tvar nodeName, e, data;\r\n\r\n\t// We do not need to do anything for non-Elements\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tnodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\r\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\r\n\t\tdata = jQuery._data( dest );\r\n\r\n\t\tfor ( e in data.events ) {\r\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\r\n\t\t}\r\n\r\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\r\n\t\tdest.removeAttribute( jQuery.expando );\r\n\t}\r\n\r\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\r\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\r\n\t\tdisableScript( dest ).text = src.text;\r\n\t\trestoreScript( dest );\r\n\r\n\t// IE6-10 improperly clones children of object elements using classid.\r\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\r\n\t} else if ( nodeName === \"object\" ) {\r\n\t\tif ( dest.parentNode ) {\r\n\t\t\tdest.outerHTML = src.outerHTML;\r\n\t\t}\r\n\r\n\t\t// This path appears unavoidable for IE9. When cloning an object\r\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\r\n\t\t// If the src has innerHTML and the destination does not,\r\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\r\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\r\n\t\t\tdest.innerHTML = src.innerHTML;\r\n\t\t}\r\n\r\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\r\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\r\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\r\n\t\t// a checked appearance if the defaultChecked value isn't also set\r\n\r\n\t\tdest.defaultChecked = dest.checked = src.checked;\r\n\r\n\t\t// IE6-7 get confused and end up setting the value of a cloned\r\n\t\t// checkbox/radio button to an empty string instead of \"on\"\r\n\t\tif ( dest.value !== src.value ) {\r\n\t\t\tdest.value = src.value;\r\n\t\t}\r\n\r\n\t// IE6-8 fails to return the selected option to the default selected\r\n\t// state when cloning options\r\n\t} else if ( nodeName === \"option\" ) {\r\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\r\n\r\n\t// IE6-8 fails to set the defaultValue to the correct value when\r\n\t// cloning other types of input fields\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\njQuery.each({\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\ti = 0,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone(true);\r\n\t\t\tjQuery( insert[i] )[ original ]( elems );\r\n\r\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\r\n\t\t\tcore_push.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\nfunction getAll( context, tag ) {\r\n\tvar elems, elem,\r\n\t\ti = 0,\r\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\r\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\r\n\t\t\tundefined;\r\n\r\n\tif ( !found ) {\r\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\r\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\r\n\t\t\t\tfound.push( elem );\r\n\t\t\t} else {\r\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\r\n\t\tjQuery.merge( [ context ], found ) :\r\n\t\tfound;\r\n}\r\n\r\n// Used in buildFragment, fixes the defaultChecked property\r\nfunction fixDefaultChecked( elem ) {\r\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\r\n\t\telem.defaultChecked = elem.checked;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar destElements, node, clone, i, srcElements,\r\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\r\n\t\t\tclone = elem.cloneNode( true );\r\n\r\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\r\n\t\t} else {\r\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\r\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\r\n\t\t}\r\n\r\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\r\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\r\n\r\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\t// Fix all IE cloning issues\r\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\r\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\r\n\t\t\t\tif ( destElements[i] ) {\r\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\tdestElements = srcElements = node = null;\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tbuildFragment: function( elems, context, scripts, selection ) {\r\n\t\tvar j, elem, contains,\r\n\t\t\ttmp, tag, tbody, wrap,\r\n\t\t\tl = elems.length,\r\n\r\n\t\t\t// Ensure a safe fragment\r\n\t\t\tsafe = createSafeFragment( context ),\r\n\r\n\t\t\tnodes = [],\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\telem = elems[ i ];\r\n\r\n\t\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t\t// Add nodes directly\r\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\r\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t\t// Convert non-html into a text node\r\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t\t// Convert html into DOM nodes\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\r\n\r\n\t\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\r\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\r\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\r\n\r\n\t\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\t\tj = wrap[0];\r\n\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Manually add leading whitespace removed by IE\r\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\r\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\r\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\r\n\r\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\r\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\ttmp.firstChild :\r\n\r\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\r\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\t\ttmp :\r\n\t\t\t\t\t\t\t\t0;\r\n\r\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\r\n\t\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\r\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\r\n\t\t\t\t\ttmp.textContent = \"\";\r\n\r\n\t\t\t\t\t// Fix #12392 for oldIE\r\n\t\t\t\t\twhile ( tmp.firstChild ) {\r\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remember the top-level container for proper cleanup\r\n\t\t\t\t\ttmp = safe.lastChild;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fix #11356: Clear elements from fragment\r\n\t\tif ( tmp ) {\r\n\t\t\tsafe.removeChild( tmp );\r\n\t\t}\r\n\r\n\t\t// Reset defaultChecked for any radios and checkboxes\r\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\r\n\t\tif ( !jQuery.support.appendChecked ) {\r\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\r\n\t\t}\r\n\r\n\t\ti = 0;\r\n\t\twhile ( (elem = nodes[ i++ ]) ) {\r\n\r\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\r\n\t\t\t// that element, do not do anything\r\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\t\t// Append to fragment\r\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\r\n\r\n\t\t\t// Preserve script evaluation history\r\n\t\t\tif ( contains ) {\r\n\t\t\t\tsetGlobalEval( tmp );\r\n\t\t\t}\r\n\r\n\t\t\t// Capture executables\r\n\t\t\tif ( scripts ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\r\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttmp = null;\r\n\r\n\t\treturn safe;\r\n\t},\r\n\r\n\tcleanData: function( elems, /* internal */ acceptData ) {\r\n\t\tvar elem, type, id, data,\r\n\t\t\ti = 0,\r\n\t\t\tinternalKey = jQuery.expando,\r\n\t\t\tcache = jQuery.cache,\r\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\r\n\t\t\tspecial = jQuery.event.special;\r\n\r\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\r\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\tid = elem[ internalKey ];\r\n\t\t\t\tdata = id && cache[ id ];\r\n\r\n\t\t\t\tif ( data ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\r\n\t\t\t\t\tif ( cache[ id ] ) {\r\n\r\n\t\t\t\t\t\tdelete cache[ id ];\r\n\r\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\r\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\r\n\t\t\t\t\t\t// we must handle all of these cases\r\n\t\t\t\t\t\tif ( deleteExpando ) {\r\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\r\n\r\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\r\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telem[ internalKey ] = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcore_deletedIds.push( id );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\nvar iframe, getStyles, curCSS,\r\n\tralpha = /alpha\\([^)]*\\)/i,\r\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\r\n\trposition = /^(top|right|bottom|left)$/,\r\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\trmargin = /^margin/,\r\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\r\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\r\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\r\n\telemdisplay = { BODY: \"block\" },\r\n\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: 0,\r\n\t\tfontWeight: 400\r\n\t},\r\n\r\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\r\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\r\n\r\n// return a css property mapped to a potentially vendor prefixed property\r\nfunction vendorPropName( style, name ) {\r\n\r\n\t// shortcut for names that are not vendor prefixed\r\n\tif ( name in style ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// check for vendor prefixed names\r\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\r\n\t\torigName = name,\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in style ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n\r\n\treturn origName;\r\n}\r\n\r\nfunction isHidden( elem, el ) {\r\n\t// isHidden might be called from jQuery#filter function;\r\n\t// in that case, element will be second argument\r\n\telem = el || elem;\r\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem, hidden,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\t\t\t// Reset the inline display of this element to learn if it is\r\n\t\t\t// being hidden by cascaded rules or not\r\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\r\n\t\t\t\telem.style.display = \"\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set elements which have been overridden with display: none\r\n\t\t\t// in a stylesheet to whatever the default browser style is\r\n\t\t\t// for such an element\r\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\r\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\thidden = isHidden( elem );\r\n\r\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\r\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of most of the elements in a second loop\r\n\t// to avoid the constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\r\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend({\r\n\tcss: function( name, value ) {\r\n\t\treturn jQuery.access( this, function( elem, name, value ) {\r\n\t\t\tvar len, styles,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( jQuery.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t},\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tvar bool = typeof state === \"boolean\";\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( bool ? state : isHidden( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Exclude the following css properties to add px\r\n\tcssNumber: {\r\n\t\t\"columnCount\": true,\r\n\t\t\"fillOpacity\": true,\r\n\t\t\"fontWeight\": true,\r\n\t\t\"lineHeight\": true,\r\n\t\t\"opacity\": true,\r\n\t\t\"orphans\": true,\r\n\t\t\"widows\": true,\r\n\t\t\"zIndex\": true,\r\n\t\t\"zoom\": true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {\r\n\t\t// normalize float css property\r\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\r\n\t},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = jQuery.camelCase( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\r\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\r\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\r\n\t\t\t\t// Fixes bug #9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\r\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\r\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\r\n\t\t\t\tvalue += \"px\";\r\n\t\t\t}\r\n\r\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\r\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\r\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\r\n\r\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\r\n\t\t\t\t// Fixes bug #5509\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar num, val, hooks,\r\n\t\t\torigName = jQuery.camelCase( name );\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t//convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\r\n\t\t}\r\n\t\treturn val;\r\n\t},\r\n\r\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\r\n\tswap: function( elem, options, callback, args ) {\r\n\t\tvar ret, name,\r\n\t\t\told = {};\r\n\r\n\t\t// Remember the old values, and insert the new ones\r\n\t\tfor ( name in options ) {\r\n\t\t\told[ name ] = elem.style[ name ];\r\n\t\t\telem.style[ name ] = options[ name ];\r\n\t\t}\r\n\r\n\t\tret = callback.apply( elem, args || [] );\r\n\r\n\t\t// Revert the old values\r\n\t\tfor ( name in options ) {\r\n\t\t\telem.style[ name ] = old[ name ];\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}\r\n});\r\n\r\n// NOTE: we've included the \"window\" in window.getComputedStyle\r\n// because jsdom on node.js will break without it.\r\nif ( window.getComputedStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn window.getComputedStyle( elem, null );\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar width, minWidth, maxWidth,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\r\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\r\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tif ( computed ) {\r\n\r\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\tret = jQuery.style( elem, name );\r\n\t\t\t}\r\n\r\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\r\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\r\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\r\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\r\n\r\n\t\t\t\t// Remember the original values\r\n\t\t\t\twidth = style.width;\r\n\t\t\t\tminWidth = style.minWidth;\r\n\t\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t\t// Put in the new values to get a computed value out\r\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\t\tret = computed.width;\r\n\r\n\t\t\t\t// Revert the changed values\r\n\t\t\t\tstyle.width = width;\r\n\t\t\t\tstyle.minWidth = minWidth;\r\n\t\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t};\r\n} else if ( document.documentElement.currentStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn elem.currentStyle;\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar left, rs, rsLeft,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\t\t\tret = computed ? computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Avoid setting ret to empty string here\r\n\t\t// so we don't default to auto\r\n\t\tif ( ret == null && style && style[ name ] ) {\r\n\t\t\tret = style[ name ];\r\n\t\t}\r\n\r\n\t\t// From the awesome hack by Dean Edwards\r\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\r\n\r\n\t\t// If we're not dealing with a regular pixel number\r\n\t\t// but a number that has a weird ending, we need to convert it to pixels\r\n\t\t// but not position css attributes, as those are proportional to the parent element instead\r\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\r\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\tleft = style.left;\r\n\t\t\trs = elem.runtimeStyle;\r\n\t\t\trsLeft = rs && rs.left;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = elem.currentStyle.left;\r\n\t\t\t}\r\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\r\n\t\t\tret = style.pixelLeft + \"px\";\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.left = left;\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = rsLeft;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret === \"\" ? \"auto\" : ret;\r\n\t};\r\n}\r\n\r\nfunction setPositiveNumber( elem, value, subtract ) {\r\n\tvar matches = rnumsplit.exec( value );\r\n\treturn matches ?\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\r\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\r\n\t\t// If we already have the right measurement, avoid augmentation\r\n\t\t4 :\r\n\t\t// Otherwise initialize for horizontal or vertical properties\r\n\t\tname === \"width\" ? 1 : 0,\r\n\r\n\t\tval = 0;\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\t\t// both box models exclude margin, so add it if we want it\r\n\t\tif ( extra === \"margin\" ) {\r\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\tif ( isBorderBox ) {\r\n\t\t\t// border-box includes padding, so remove it if we want content\r\n\t\t\tif ( extra === \"content\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// at this point, extra isn't border nor margin, so remove border\r\n\t\t\tif ( extra !== \"margin\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// at this point, extra isn't content, so add padding\r\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// at this point, extra isn't content nor padding, so add border\r\n\t\t\tif ( extra !== \"padding\" ) {\r\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn val;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, name, extra ) {\r\n\r\n\t// Start with offset property, which is equivalent to the border-box value\r\n\tvar valueIsBorderBox = true,\r\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\r\n\t\tstyles = getStyles( elem ),\r\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\r\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\r\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\r\n\tif ( val <= 0 || val == null ) {\r\n\t\t// Fall back to computed then uncomputed css if necessary\r\n\t\tval = curCSS( elem, name, styles );\r\n\t\tif ( val < 0 || val == null ) {\r\n\t\t\tval = elem.style[ name ];\r\n\t\t}\r\n\r\n\t\t// Computed unit is not pixels. Stop here and return.\r\n\t\tif ( rnumnonpx.test(val) ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\r\n\t\t// we need the check for style in case a browser which returns unreliable values\r\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\r\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\r\n\r\n\t\t// Normalize \"\", auto, and prepare for extra\r\n\t\tval = parseFloat( val ) || 0;\r\n\t}\r\n\r\n\t// use the active box-sizing model to add/subtract irrelevant styles\r\n\treturn ( val +\r\n\t\taugmentWidthOrHeight(\r\n\t\t\telem,\r\n\t\t\tname,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\n// Try to determine the default display value of an element\r\nfunction css_defaultDisplay( nodeName ) {\r\n\tvar doc = document,\r\n\t\tdisplay = elemdisplay[ nodeName ];\r\n\r\n\tif ( !display ) {\r\n\t\tdisplay = actualDisplay( nodeName, doc );\r\n\r\n\t\t// If the simple way fails, read from inside an iframe\r\n\t\tif ( display === \"none\" || !display ) {\r\n\t\t\t// Use the already-created iframe if possible\r\n\t\t\tiframe = ( iframe ||\r\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\r\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\r\n\t\t\t).appendTo( doc.documentElement );\r\n\r\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\r\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\r\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\r\n\t\t\tdoc.close();\r\n\r\n\t\t\tdisplay = actualDisplay( nodeName, doc );\r\n\t\t\tiframe.detach();\r\n\t\t}\r\n\r\n\t\t// Store the correct default display\r\n\t\telemdisplay[ nodeName ] = display;\r\n\t}\r\n\r\n\treturn display;\r\n}\r\n\r\n// Called ONLY from within css_defaultDisplay\r\nfunction actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\r\n\telem.remove();\r\n\treturn display;\r\n}\r\n\r\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\r\n\tjQuery.cssHooks[ name ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// however, it must have a current display style that would benefit from this\r\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\r\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar styles = extra && getStyles( elem );\r\n\t\t\treturn setPositiveNumber( elem, value, extra ?\r\n\t\t\t\taugmentWidthOrHeight(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tname,\r\n\t\t\t\t\textra,\r\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\t\tstyles\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n});\r\n\r\nif ( !jQuery.support.opacity ) {\r\n\tjQuery.cssHooks.opacity = {\r\n\t\tget: function( elem, computed ) {\r\n\t\t\t// IE uses filters for opacity\r\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\r\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\r\n\t\t\t\tcomputed ? \"1\" : \"\";\r\n\t\t},\r\n\r\n\t\tset: function( elem, value ) {\r\n\t\t\tvar style = elem.style,\r\n\t\t\t\tcurrentStyle = elem.currentStyle,\r\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\r\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\r\n\r\n\t\t\t// IE has trouble with opacity if it does not have layout\r\n\t\t\t// Force it by setting the zoom level\r\n\t\t\tstyle.zoom = 1;\r\n\r\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\r\n\t\t\t// if value === \"\", then remove inline opacity #12685\r\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\r\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\r\n\t\t\t\t\tstyle.removeAttribute ) {\r\n\r\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\r\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\r\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\r\n\t\t\t\tstyle.removeAttribute( \"filter\" );\r\n\r\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\r\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// otherwise, set new filter values\r\n\t\t\tstyle.filter = ralpha.test( filter ) ?\r\n\t\t\t\tfilter.replace( ralpha, opacity ) :\r\n\t\t\t\tfilter + \" \" + opacity;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// These hooks cannot be added until DOM ready because the support test\r\n// for it is not run until after DOM ready\r\njQuery(function() {\r\n\tif ( !jQuery.support.reliableMarginRight ) {\r\n\t\tjQuery.cssHooks.marginRight = {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\r\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\r\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\r\n\t// rather than make the css module depend on the offset module, we just check for it here\r\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\r\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\r\n\t\t\tjQuery.cssHooks[ prop ] = {\r\n\t\t\t\tget: function( elem, computed ) {\r\n\t\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\r\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\r\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\t\t\tcomputed;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.hidden = function( elem ) {\r\n\t\t// Support: Opera <= 12.12\r\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\r\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\r\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\r\n\t};\r\n\r\n\tjQuery.expr.filters.visible = function( elem ) {\r\n\t\treturn !jQuery.expr.filters.hidden( elem );\r\n\t};\r\n}\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each({\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( !rmargin.test( prefix ) ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n});\r\nvar r20 = /%20/g,\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\njQuery.fn.extend({\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map(function(){\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t})\r\n\t\t.filter(function(){\r\n\t\t\tvar type = this.type;\r\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\r\n\t\t})\r\n\t\t.map(function( i, elem ){\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\treturn val == null ?\r\n\t\t\t\tnull :\r\n\t\t\t\tjQuery.isArray( val ) ?\r\n\t\t\t\t\tjQuery.map( val, function( val ){\r\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t}).get();\r\n\t}\r\n});\r\n\r\n//Serialize an array of form elements or a set of\r\n//key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, value ) {\r\n\t\t\t// If value is a function, invoke it and return its value\r\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\r\n\t\t};\r\n\r\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\r\n\tif ( traditional === undefined ) {\r\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t});\r\n\r\n\t} else {\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\r\n};\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( jQuery.isArray( obj ) ) {\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\r\n\r\n\t// Handle event binding\r\n\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\treturn arguments.length > 0 ?\r\n\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\tthis.trigger( name );\r\n\t};\r\n});\r\n\r\njQuery.fn.hover = function( fnOver, fnOut ) {\r\n\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\r\n};\r\nvar\r\n\t// Document location\r\n\tajaxLocParts,\r\n\tajaxLocation,\r\n\tajax_nonce = jQuery.now(),\r\n\r\n\tajax_rquery = /\\?/,\r\n\trhash = /#.*$/,\r\n\trts = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\r\n\t// #7653, #8125, #8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\r\n\r\n\t// Keep a copy of the old load method\r\n\t_load = jQuery.fn.load,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t * - BEFORE asking for a transport\r\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat(\"*\");\r\n\r\n// #8138, IE may throw an exception when accessing\r\n// a field from window.location if document.domain has been set\r\ntry {\r\n\tajaxLocation = location.href;\r\n} catch( e ) {\r\n\t// Use the href attribute of an A element\r\n\t// since IE will modify it given document.location\r\n\tajaxLocation = document.createElement( \"a\" );\r\n\tajaxLocation.href = \"\";\r\n\tajaxLocation = ajaxLocation.href;\r\n}\r\n\r\n// Segment location into parts\r\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\r\n\r\n\t\tif ( jQuery.isFunction( func ) ) {\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType[0] === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes #9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tif ( typeof url !== \"string\" && _load ) {\r\n\t\treturn _load.apply( this, arguments );\r\n\t}\r\n\r\n\tvar selector, response, type,\r\n\t\tself = this,\r\n\t\toff = url.indexOf(\" \");\r\n\r\n\tif ( off >= 0 ) {\r\n\t\tselector = url.slice( off, url.length );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( jQuery.isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax({\r\n\t\t\turl: url,\r\n\r\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\r\n\t\t\ttype: type,\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t}).done(function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t}).complete( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t});\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n// Attach a bunch of functions for handling common AJAX events\r\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\r\n\tjQuery.fn[ type ] = function( fn ){\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n});\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\t\t// shift arguments if data argument was omitted\r\n\t\tif ( jQuery.isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\treturn jQuery.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t});\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: ajaxLocation,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /xml/,\r\n\t\t\thtml: /html/,\r\n\t\t\tjson: /json/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": window.String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": jQuery.parseJSON,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar // Cross-domain detection vars\r\n\t\t\tparts,\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\t\t\t// Response headers as string\r\n\t\t\tresponseHeadersString,\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\ttransport,\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeaders,\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\tjQuery.event,\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\t\t\t// The jqXHR state\r\n\t\t\tstate = 0,\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( state === 2 ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tvar lname = name.toLowerCase();\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\r\n\t\tjqXHR.success = jqXHR.done;\r\n\t\tjqXHR.error = jqXHR.fail;\r\n\r\n\t\t// Remove hash character (#7531: and string promotion)\r\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\r\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket #12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\r\n\r\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\r\n\t\t\ts.crossDomain = !!( parts &&\r\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\r\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\r\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( state === 2 ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\tfireGlobals = s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\tcacheURL = s.url;\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// If data is available, append data to url\r\n\t\t\tif ( s.data ) {\r\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\r\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add anti-cache in url if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\ts.url = rts.test( cacheURL ) ?\r\n\r\n\t\t\t\t\t// If there is already a '_' parameter, set its value\r\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\r\n\r\n\t\t\t\t\t// Otherwise add one to the end\r\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\r\n\t\t\tjqXHR[ i ]( s[ i ] );\r\n\t\t}\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = setTimeout(function() {\r\n\t\t\t\t\tjqXHR.abort(\"timeout\");\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstate = 1;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\t// Propagate exception as error if not done\r\n\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\tdone( -1, e );\r\n\t\t\t\t// Simply rethrow otherwise\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Called once\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// State is \"done\" now\r\n\t\t\tstate = 2;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\tclearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisSuccess = ajaxConvert( s, response );\r\n\t\t\t\t\tstatusText = isSuccess.state;\r\n\t\t\t\t\tsuccess = isSuccess.data;\r\n\t\t\t\t\terror = isSuccess.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// We extract error from statusText\r\n\t\t\t\t// then normalize statusText and status for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t}\r\n});\r\n\r\n/* Handles responses to an ajax request:\r\n * - sets all responseXXX fields accordingly\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes,\r\n\t\tresponseFields = s.responseFields;\r\n\r\n\t// Fill responseXXX fields\r\n\tfor ( type in responseFields ) {\r\n\t\tif ( type in responses ) {\r\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n// Chain conversions given the request and the original response\r\nfunction ajaxConvert( s, response ) {\r\n\tvar conv2, current, conv, tmp,\r\n\t\tconverters = {},\r\n\t\ti = 0,\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice(),\r\n\t\tprev = dataTypes[ 0 ];\r\n\r\n\t// Apply the dataFilter if provided\r\n\tif ( s.dataFilter ) {\r\n\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t}\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Convert to each sequential dataType, tolerating list modification\r\n\tfor ( ; (current = dataTypes[++i]); ) {\r\n\r\n\t\t// There's only work to do if current dataType is non-auto\r\n\t\tif ( current !== \"*\" ) {\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\tif ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split(\" \");\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.splice( i--, 0, current );\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s[\"throws\"] ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Update prev for next iteration\r\n\t\t\tprev = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n// Install script dataType\r\njQuery.ajaxSetup({\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /(?:java|ecma)script/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Handle cache's special case and global\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t\ts.global = false;\r\n\t}\r\n});\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function(s) {\r\n\r\n\t// This transport only deals with cross domain requests\r\n\tif ( s.crossDomain ) {\r\n\r\n\t\tvar script,\r\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\r\n\r\n\t\treturn {\r\n\r\n\t\t\tsend: function( _, callback ) {\r\n\r\n\t\t\t\tscript = document.createElement(\"script\");\r\n\r\n\t\t\t\tscript.async = true;\r\n\r\n\t\t\t\tif ( s.scriptCharset ) {\r\n\t\t\t\t\tscript.charset = s.scriptCharset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscript.src = s.url;\r\n\r\n\t\t\t\t// Attach handlers for all browsers\r\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\r\n\r\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t\t\t// Handle memory leak in IE\r\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t// Remove the script\r\n\t\t\t\t\t\tif ( script.parentNode ) {\r\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Dereference the script\r\n\t\t\t\t\t\tscript = null;\r\n\r\n\t\t\t\t\t\t// Callback if not abort\r\n\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\thead.insertBefore( script, head.firstChild );\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( script ) {\r\n\t\t\t\t\tscript.onload( undefined, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n});\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup({\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n});\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[\"script json\"] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always(function() {\r\n\t\t\t// Restore preexisting value\r\n\t\t\twindow[ callbackName ] = overwritten;\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\t\t\t\t// make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t});\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n});\r\nvar xhrCallbacks, xhrSupported,\r\n\txhrId = 0,\r\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\r\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\r\n\t\t// Abort all pending requests\r\n\t\tvar key;\r\n\t\tfor ( key in xhrCallbacks ) {\r\n\t\t\txhrCallbacks[ key ]( undefined, true );\r\n\t\t}\r\n\t};\r\n\r\n// Functions to create xhrs\r\nfunction createStandardXHR() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch( e ) {}\r\n}\r\n\r\nfunction createActiveXHR() {\r\n\ttry {\r\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t} catch( e ) {}\r\n}\r\n\r\n// Create the request object\r\n// (This is still attached to ajaxSettings for backward compatibility)\r\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\r\n\t/* Microsoft failed to properly\r\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\r\n\t * so we use the ActiveXObject when it is available\r\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\r\n\t * we need a fallback.\r\n\t */\r\n\tfunction() {\r\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\r\n\t} :\r\n\t// For all other browsers, use the standard XMLHttpRequest object\r\n\tcreateStandardXHR;\r\n\r\n// Determine support properties\r\nxhrSupported = jQuery.ajaxSettings.xhr();\r\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\r\n\r\n// Create transport if the browser can provide an xhr\r\nif ( xhrSupported ) {\r\n\r\n\tjQuery.ajaxTransport(function( s ) {\r\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\r\n\r\n\t\t\tvar callback;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsend: function( headers, complete ) {\r\n\r\n\t\t\t\t\t// Get a new xhr\r\n\t\t\t\t\tvar handle, i,\r\n\t\t\t\t\t\txhr = s.xhr();\r\n\r\n\t\t\t\t\t// Open the socket\r\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\r\n\t\t\t\t\tif ( s.username ) {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\t\tif ( s.xhrFields ) {\r\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\r\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Override mime type if needed\r\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// X-Requested-With header\r\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\r\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch( err ) {}\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// This may raise an exception which is actually\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\r\n\r\n\t\t\t\t\t// Listener\r\n\t\t\t\t\tcallback = function( _, isAbort ) {\r\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\r\n\r\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\r\n\t\t\t\t\t\t// of an xhr when a network error occurred\r\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\r\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\r\n\r\n\t\t\t\t\t\t\t\t// Only called once\r\n\t\t\t\t\t\t\t\tcallback = undefined;\r\n\r\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\r\n\t\t\t\t\t\t\t\tif ( handle ) {\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\r\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// If it's an abort\r\n\t\t\t\t\t\t\t\tif ( isAbort ) {\r\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\r\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\r\n\t\t\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tresponses = {};\r\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\r\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\r\n\r\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\r\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\r\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\r\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\r\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\r\n\t\t\t\t\t\t\t\t\t} catch( e ) {\r\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\r\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\r\n\r\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\r\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\r\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\r\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\r\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\r\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\r\n\t\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call complete if needed\r\n\t\t\t\t\t\tif ( responses ) {\r\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif ( !s.async ) {\r\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\r\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\r\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\r\n\t\t\t\t\t\tsetTimeout( callback );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thandle = ++xhrId;\r\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\r\n\t\t\t\t\t\t\t// and attach the unload handler\r\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\r\n\t\t\t\t\t\t\t\txhrCallbacks = {};\r\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\r\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\txhr.onreadystatechange = callback;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tabort: function() {\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback( undefined, true );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n}\r\nvar fxNow, timerId,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\r\n\trrun = /queueHooks$/,\r\n\tanimationPrefilters = [ defaultPrefilter ],\r\n\ttweeners = {\r\n\t\t\"*\": [function( prop, value ) {\r\n\t\t\tvar end, unit,\r\n\t\t\t\ttween = this.createTween( prop, value ),\r\n\t\t\t\tparts = rfxnum.exec( value ),\r\n\t\t\t\ttarget = tween.cur(),\r\n\t\t\t\tstart = +target || 0,\r\n\t\t\t\tscale = 1,\r\n\t\t\t\tmaxIterations = 20;\r\n\r\n\t\t\tif ( parts ) {\r\n\t\t\t\tend = +parts[2];\r\n\t\t\t\tunit = parts[3] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\r\n\t\t\t\t// We need to compute starting value\r\n\t\t\t\tif ( unit !== \"px\" && start ) {\r\n\t\t\t\t\t// Iteratively approximate from a nonzero starting point\r\n\t\t\t\t\t// Prefer the current property, because this process will be trivial if it uses the same units\r\n\t\t\t\t\t// Fallback to end or a simple constant\r\n\t\t\t\t\tstart = jQuery.css( tween.elem, prop, true ) || end || 1;\r\n\r\n\t\t\t\t\tdo {\r\n\t\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\r\n\t\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\r\n\t\t\t\t\t\tscale = scale || \".5\";\r\n\r\n\t\t\t\t\t\t// Adjust and apply\r\n\t\t\t\t\t\tstart = start / scale;\r\n\t\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\r\n\r\n\t\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\r\n\t\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\r\n\t\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttween.unit = unit;\r\n\t\t\t\ttween.start = start;\r\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\r\n\t\t\t\ttween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;\r\n\t\t\t}\r\n\t\t\treturn tween;\r\n\t\t}]\r\n\t};\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\tsetTimeout(function() {\r\n\t\tfxNow = undefined;\r\n\t});\r\n\treturn ( fxNow = jQuery.now() );\r\n}\r\n\r\nfunction createTweens( animation, props ) {\r\n\tjQuery.each( props, function( prop, value ) {\r\n\t\tvar collection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\r\n\t\t\tindex = 0,\r\n\t\t\tlength = collection.length;\r\n\t\tfor ( ; index < length; index++ ) {\r\n\t\t\tif ( collection[ index ].call( animation, prop, value ) ) {\r\n\r\n\t\t\t\t// we're done with this property\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = animationPrefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\t\t\t// don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t}),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\r\n\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tanimation = deferred.promise({\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// resolve when we played the last frame\r\n\t\t\t\t// otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length ; index++ ) {\r\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tcreateTweens( animation, props );\r\n\r\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t})\r\n\t);\r\n\r\n\t// attach callbacks from options\r\n\treturn animation.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar value, name, index, easing, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = jQuery.camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\r\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( jQuery.isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.split(\" \");\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\r\n\t\t\ttweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tanimationPrefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tanimationPrefilters.push( callback );\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\t/*jshint validthis:true */\r\n\tvar prop, index, length,\r\n\t\tvalue, dataShow, toggle,\r\n\t\ttween, hooks, oldfire,\r\n\t\tanim = this,\r\n\t\tstyle = elem.style,\r\n\t\torig = {},\r\n\t\thandled = [],\r\n\t\thidden = elem.nodeType && isHidden( elem );\r\n\r\n\t// handle queue: false promises\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always(function() {\r\n\t\t\t// doing this makes sure that the complete handler will be called\r\n\t\t\t// before this completes\r\n\t\t\tanim.always(function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t// height/width overflow pass\r\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\r\n\t\t// Make sure that nothing sneaks out\r\n\t\t// Record all 3 overflow attributes because IE does not\r\n\t\t// change the overflow attribute when overflowX and\r\n\t\t// overflowY are set to the same value\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Set display property to inline-block for height/width\r\n\t\t// animations on inline elements that are having width/height animated\r\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\r\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t// inline-level elements accept inline-block;\r\n\t\t\t// block-level elements need to be inline with layout\r\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tstyle.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\r\n\t\t\tanim.always(function() {\r\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// show/hide pass\r\n\tfor ( index in props ) {\r\n\t\tvalue = props[ index ];\r\n\t\tif ( rfxtypes.exec( value ) ) {\r\n\t\t\tdelete props[ index ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\thandled.push( index );\r\n\t\t}\r\n\t}\r\n\r\n\tlength = handled.length;\r\n\tif ( length ) {\r\n\t\tdataShow = jQuery._data( elem, \"fxshow\" ) || jQuery._data( elem, \"fxshow\", {} );\r\n\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\thidden = dataShow.hidden;\r\n\t\t}\r\n\r\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\r\n\t\tif ( toggle ) {\r\n\t\t\tdataShow.hidden = !hidden;\r\n\t\t}\r\n\t\tif ( hidden ) {\r\n\t\t\tjQuery( elem ).show();\r\n\t\t} else {\r\n\t\t\tanim.done(function() {\r\n\t\t\t\tjQuery( elem ).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tanim.done(function() {\r\n\t\t\tvar prop;\r\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor ( index = 0 ; index < length ; index++ ) {\r\n\t\t\tprop = handled[ index ];\r\n\t\t\ttween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );\r\n\t\t\torig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );\r\n\r\n\t\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\t\tdataShow[ prop ] = tween.start;\r\n\t\t\t\tif ( hidden ) {\r\n\t\t\t\t\ttween.end = tween.start;\r\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || \"swing\";\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\r\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\r\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\r\n\t\t\t// available and use plain properties where available\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Remove in 2.0 - this supports IE8's panic based approach\r\n// to setting things on disconnected nodes\r\n\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.fn.extend({\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// animate to the value specified\r\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\t\t\t\tdoAnimation.finish = function() {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t};\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue && type !== false ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = jQuery._data( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// start the next in the queue if the last step wasn't forced\r\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\r\n\t\t\t// but only if they were gotoEnd\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = jQuery._data( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.cur && hooks.cur.finish ) {\r\n\t\t\t\thooks.cur.finish.call( this );\r\n\t\t\t}\r\n\r\n\t\t\t// look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\tattrs = { height: type },\r\n\t\ti = 0;\r\n\r\n\t// if we include width, step value is 1 to do all cssExpand values,\r\n\t// if we don't include width, step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth? 1 : 0;\r\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each({\r\n\tslideDown: genFx(\"show\"),\r\n\tslideUp: genFx(\"hide\"),\r\n\tslideToggle: genFx(\"toggle\"),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tjQuery.isFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\r\n\t};\r\n\r\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\r\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\r\n\r\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( jQuery.isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\r\n\t}\r\n};\r\n\r\njQuery.timers = [];\r\njQuery.fx = Tween.prototype.init;\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ttimers = jQuery.timers,\r\n\t\ti = 0;\r\n\r\n\tfxNow = jQuery.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\t\t// Checks the timer has not already been removed\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tif ( timer() && jQuery.timers.push( timer ) ) {\r\n\t\tjQuery.fx.start();\r\n\t}\r\n};\r\n\r\njQuery.fx.interval = 13;\r\n\r\njQuery.fx.start = function() {\r\n\tif ( !timerId ) {\r\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\r\n\t}\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tclearInterval( timerId );\r\n\ttimerId = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n// Back Compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.animated = function( elem ) {\r\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\r\n\t\t\treturn elem === fn.elem;\r\n\t\t}).length;\r\n\t};\r\n}\r\njQuery.fn.offset = function( options ) {\r\n\tif ( arguments.length ) {\r\n\t\treturn options === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function( i ) {\r\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t});\r\n\t}\r\n\r\n\tvar docElem, win,\r\n\t\tbox = { top: 0, left: 0 },\r\n\t\telem = this[ 0 ],\r\n\t\tdoc = elem && elem.ownerDocument;\r\n\r\n\tif ( !doc ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Make sure it's not a disconnected DOM node\r\n\tif ( !jQuery.contains( docElem, elem ) ) {\r\n\t\treturn box;\r\n\t}\r\n\r\n\t// If we don't have gBCR, just use 0,0 rather than error\r\n\t// BlackBerry 5, iOS 3 (original iPhone)\r\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\r\n\t\tbox = elem.getBoundingClientRect();\r\n\t}\r\n\t// 解决transform下的offset问题(先恢复)\r\n\t// var el = elem,\r\n\t// offsetLeft = 0,\r\n\t// offsetTop = 0;\r\n\r\n\t// do{\r\n\t// \toffsetLeft += el.offsetLeft;\r\n\t// \toffsetTop += el.offsetTop;\r\n\t// \tel = el.offsetParent;\r\n\t// } while( el );\r\n\r\n\t// var elm = elem;\r\n\t// do{\r\n\t// \toffsetLeft -= elm.scrollLeft || 0;\r\n\t// \toffsetTop -= elm.scrollTop || 0;\r\n\t// \telm = elm.parentNode;\r\n\t// } while( elm );\r\n\twin = getWindow( doc );\r\n\treturn {\r\n\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\r\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\r\n\t};\r\n};\r\n\r\njQuery.offset = {\r\n\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar position = jQuery.css( elem, \"position\" );\r\n\r\n\t\t// set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tvar curElem = jQuery( elem ),\r\n\t\t\tcurOffset = curElem.offset(),\r\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\r\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\r\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\r\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\r\n\r\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\t\t\toptions = options.call( elem, i, curOffset );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\njQuery.fn.extend({\r\n\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset,\r\n\t\t\tparentOffset = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\t\t} else {\r\n\t\t\t// Get *real* offsetParent\r\n\t\t\toffsetParent = this.offsetParent();\r\n\r\n\t\t\t// Get correct offsets\r\n\t\t\toffset = this.offset();\r\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\r\n\t\t\t\tparentOffset = offsetParent.offset();\r\n\t\t\t}\r\n\r\n\t\t\t// Add offsetParent borders\r\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\r\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\r\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\r\n\t\treturn {\r\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\r\n\t\t};\r\n\t},\r\n\r\n\toffsetParent: function() {\r\n\t\treturn this.map(function() {\r\n\t\t\tvar offsetParent = this.offsetParent || document.documentElement;\r\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\t\t\treturn offsetParent || document.documentElement;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\r\n\tvar top = /Y/.test( prop );\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn jQuery.access( this, function( elem, method, val ) {\r\n\t\t\tvar win = getWindow( elem );\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\r\n\t\t\t\t\twin.document.documentElement[ method ] :\r\n\t\t\t\t\telem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\r\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length, null );\r\n\t};\r\n});\r\n\r\nfunction getWindow( elem ) {\r\n\treturn jQuery.isWindow( elem ) ?\r\n\t\telem :\r\n\t\telem.nodeType === 9 ?\r\n\t\t\telem.defaultView || elem.parentWindow :\r\n\t\t\tfalse;\r\n}\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\r\n\t\t// margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\r\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\r\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\r\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\r\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\r\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\r\n\t\t};\r\n\t});\r\n});\r\n// Limit scope pollution from any deprecated API\r\n// (function() {\r\n\r\n// })();\r\n// Expose jQuery to the global object\r\nBI.jQuery = BI.$ = jQuery;\r\nwindow.$ = window.$ || jQuery;\r\nwindow.jQuery = window.jQuery || jQuery;\r\n\r\n// Expose jQuery as an AMD module, but only for AMD loaders that\r\n// understand the issues with loading multiple versions of jQuery\r\n// in a page that all might call define(). The loader will indicate\r\n// they have special allowances for multiple jQuery versions by\r\n// specifying define.amd.jQuery = true. Register as a named module,\r\n// since jQuery can be concatenated with other files that may use define,\r\n// but not use a proper concatenation script that understands anonymous\r\n// AMD modules. A named AMD is safest and most robust way to register.\r\n// Lowercase jquery is used because AMD module names are derived from\r\n// file names, and jQuery is normally delivered in a lowercase file name.\r\n// Do this after creating the global so that if an AMD module wants to call\r\n// noConflict to hide this version of jQuery, it will work.\r\nif ( typeof define === \"function\" && define.amd && define.amd.jQuery ) {\r\n\tdefine( \"jquery\", [], function () { return jQuery; } );\r\n}\r\n\r\n})( window );/*\r\n * 给jQuery.Event对象添加的工具方法\r\n */\r\nBI.$.extend(BI.$.Event.prototype, {\r\n // event.stopEvent\r\n stopEvent: function () {\r\n this.stopPropagation();\r\n this.preventDefault();\r\n }\r\n});if (BI.jQuery) {\r\n (function ($) {\r\n // richer:容器在其各个边缘留出的空间\r\n if (!$.fn.insets) {\r\n $.fn.insets = function () {\r\n var p = this.padding(),\r\n b = this.border();\r\n return {\r\n top: p.top,\r\n bottom: p.bottom + b.bottom + b.top,\r\n left: p.left,\r\n right: p.right + b.right + b.left\r\n };\r\n };\r\n }\r\n\r\n // richer:获取 && 设置jQuery元素的边界\r\n if (!$.fn.bounds) {\r\n $.fn.bounds = function (value) {\r\n var tmp = {hasIgnoredBounds: true};\r\n\r\n if (value) {\r\n if (!isNaN(value.x)) {\r\n tmp.left = value.x;\r\n }\r\n if (!isNaN(value.y)) {\r\n tmp.top = value.y;\r\n }\r\n if (value.width != null) {\r\n tmp.width = (value.width - (this.outerWidth(true) - this.width()));\r\n tmp.width = (tmp.width >= 0) ? tmp.width : value.width;\r\n // fix chrome\r\n // tmp.width = (tmp.width >= 0) ? tmp.width : 0;\r\n }\r\n if (value.height != null) {\r\n tmp.height = value.height - (this.outerHeight(true) - this.height());\r\n tmp.height = (tmp.height >= 0) ? tmp.height : value.height;\r\n // fix chrome\r\n // tmp.height = (tmp.height >= 0) ? tmp.height : value.0;\r\n }\r\n this.css(tmp);\r\n return this;\r\n }\r\n\r\n // richer:注意此方法只对可见元素有效\r\n tmp = this.position();\r\n return {\r\n x: tmp.left,\r\n y: tmp.top,\r\n // richer:这里计算外部宽度和高度的时候,都不包括边框\r\n width: this.outerWidth(),\r\n height: this.outerHeight()\r\n };\r\n\r\n };\r\n }\r\n })(BI.jQuery);\r\n\r\n BI.extend(BI.jQuery.fn, {\r\n\r\n destroy: function () {\r\n this.remove();\r\n if (BI.isIE() === true) {\r\n this[0].outerHTML = \"\";\r\n }\r\n },\r\n /**\r\n * 高亮显示\r\n * @param text 必需\r\n * @param keyword\r\n * @param py\r\n * @returns {*}\r\n * @private\r\n * 原理:\r\n * 1、得到text的拼音py, 分别看是否匹配关键字keyword, 得到匹配索引tidx和pidx\r\n * 2、比较tidx和pidx, 取大于-1且较小的索引,标红[索引,索引 + keyword.length - 1]的文本\r\n * 3、text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为\"\"\r\n */\r\n __textKeywordMarked__: function (text, keyword, py) {\r\n if (!BI.isKey(keyword) || (text + \"\").length > 100) {\r\n return this.html(BI.htmlEncode(text));\r\n }\r\n keyword = keyword + \"\";\r\n keyword = BI.toUpperCase(keyword);\r\n var textLeft = (text || \"\") + \"\";\r\n py = (py || BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n })) + \"\";\r\n py = BI.toUpperCase(py);\r\n this.empty();\r\n // BI-48487 性能: makeFirstPY出来的py中包含多音字是必要的,但虽然此方法中做了限制。但是对于一个长度为60,包含14个多音字的字符串\r\n // 获取的的py长度将达到1966080, 远超过text的长度,到后面都是在做\"\".substring的无用功,所以此循环应保证py和textLeft长度不为0\r\n while (py.length > 0 && textLeft.length > 0) {\r\n var tidx = BI.toUpperCase(textLeft).indexOf(keyword);\r\n var pidx = py.indexOf(keyword);\r\n if (pidx >= 0) {\r\n pidx = (pidx - Math.floor(pidx / (textLeft.length + 1))) % textLeft.length;\r\n }\r\n\r\n // BI-56945 场景: 对'啊a'标红, a为keyword, 此时tidx为1, pidx为0, 此时使用tidx显然'啊'就无法标红了\r\n if (tidx >= 0 && (pidx > tidx || pidx === -1)) {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, tidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));\r\n\r\n textLeft = textLeft.substr(tidx + keyword.length);\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(tidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n } else if (pidx >= 0) {\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, pidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(pidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n textLeft = textLeft.substr(pidx + keyword.length);\r\n } else {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n getDomHeight: function (parent) {\r\n var clone = BI.$(this).clone();\r\n clone.appendTo(BI.$(parent || \"body\"));\r\n var height = clone.height();\r\n clone.remove();\r\n return height;\r\n },\r\n\r\n // 是否有竖直滚动条\r\n hasVerticalScroll: function () {\r\n return this.height() > 0 && this[0].clientWidth < this[0].offsetWidth;\r\n },\r\n\r\n // 是否有水平滚动条\r\n hasHorizonScroll: function () {\r\n return this.width() > 0 && this[0].clientHeight < this[0].offsetHeight;\r\n },\r\n\r\n // 获取计算后的样式\r\n getStyle: function (name) {\r\n var node = this[0];\r\n var computedStyle = void 0;\r\n\r\n // W3C Standard\r\n if (_global.getComputedStyle) {\r\n // In certain cases such as within an iframe in FF3, this returns null.\r\n computedStyle = _global.getComputedStyle(node, null);\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n }\r\n // Safari\r\n if (document.defaultView && document.defaultView.getComputedStyle) {\r\n computedStyle = document.defaultView.getComputedStyle(node, null);\r\n // A Safari bug causes this to return null for `display: none` elements.\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n if (name === \"display\") {\r\n return \"none\";\r\n }\r\n }\r\n // Internet Explorer\r\n if (node.currentStyle) {\r\n if (name === \"float\") {\r\n return node.currentStyle.cssFloat || node.currentStyle.styleFloat;\r\n }\r\n return node.currentStyle[BI.camelize(name)];\r\n }\r\n return node.style && node.style[BI.camelize(name)];\r\n },\r\n\r\n __isMouseInBounds__: function (e) {\r\n var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset();\r\n var width = offset2Body.width || this.outerWidth();\r\n var height = offset2Body.height || this.outerHeight();\r\n // offset2Body.left的值可能会有小数,导致某点出现false\r\n return !(e.pageX < Math.floor(offset2Body.left) || e.pageX > offset2Body.left + width\r\n || e.pageY < Math.floor(offset2Body.top) || e.pageY > offset2Body.top + height);\r\n },\r\n\r\n __hasZIndexMask__: function (zindex) {\r\n return zindex && this.zIndexMask[zindex] != null;\r\n },\r\n\r\n __buildZIndexMask__: function (zindex, domArray) {\r\n this.zIndexMask = this.zIndexMask || {};// 存储z-index的mask\r\n this.indexMask = this.indexMask || [];// 存储mask\r\n var mask = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-z-index-mask\",\r\n items: domArray\r\n });\r\n\r\n mask.element.css({\"z-index\": zindex});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.indexMask.push(mask);\r\n zindex && (this.zIndexMask[zindex] = mask);\r\n return mask.element;\r\n },\r\n\r\n __releaseZIndexMask__: function (zindex) {\r\n if (zindex && this.zIndexMask[zindex]) {\r\n BI.remove(this.indexMask, this.zIndexMask[zindex]);\r\n this.zIndexMask[zindex].destroy();\r\n return;\r\n }\r\n this.indexMask = this.indexMask || [];\r\n var indexMask = this.indexMask.pop();\r\n indexMask && indexMask.destroy();\r\n }\r\n });\r\n}\r\n_.extend(BI, {\r\n $import: function () {\r\n var _LOADED = {}; // alex:保存加载过的\r\n function loadReady (src, must) {\r\n var $scripts = BI.$(\"head script, body script\");\r\n BI.$.each($scripts, function (i, item) {\r\n if (item.src.indexOf(src) != -1) {\r\n _LOADED[src] = true;\r\n }\r\n });\r\n var $links = BI.$(\"head link\");\r\n BI.$.each($links, function (i, item) {\r\n if (item.href.indexOf(src) != -1 && must) {\r\n _LOADED[src] = false;\r\n BI.$(item).remove();\r\n }\r\n });\r\n }\r\n\r\n // must=true 强行加载\r\n return function (src, ext, must) {\r\n loadReady(src, must);\r\n // alex:如果已经加载过了的,直接return\r\n if (_LOADED[src] === true) {\r\n return;\r\n }\r\n if (ext === \"css\") {\r\n var link = document.createElement(\"link\");\r\n link.rel = \"stylesheet\";\r\n link.type = \"text/css\";\r\n link.href = src;\r\n var head = document.getElementsByTagName(\"head\")[0];\r\n head.appendChild(link);\r\n _LOADED[src] = true;\r\n } else {\r\n // alex:这里用同步调用的方式,必须等待ajax完成\r\n BI.$.ajax({\r\n url: src,\r\n dataType: \"script\", // alex:指定dataType为script,jquery会帮忙做globalEval的事情\r\n async: false,\r\n cache: true,\r\n complete: function (res, status) {\r\n /*\r\n * alex:发现jquery会很智能地判断一下返回的数据类型是不是script,然后做一个globalEval\r\n * 所以当status为success时就不需要再把其中的内容加到script里面去了\r\n */\r\n if (status == \"success\") {\r\n _LOADED[src] = true;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n }()\r\n});if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== \"0.000\" ||\r\n (0.9).toFixed(0) === \"0\" || (1.255).toFixed(2) !== \"1.25\" ||\r\n (1000000000000000128).toFixed(0) !== \"1000000000000000128\") {\r\n (function () {\r\n var base, size, data, i;\r\n base = 1e7;\r\n size = 6;\r\n data = [0, 0, 0, 0, 0, 0];\r\n function multiply (n, c) {\r\n var i = -1;\r\n while (++i < size) {\r\n c += n * data[i];\r\n data[i] = c % base;\r\n c = Math.floor(c / base);\r\n }\r\n }\r\n\r\n function divide (n) {\r\n var i = size, c = 0;\r\n while (--i >= 0) {\r\n c += data[i];\r\n data[i] = Math.floor(c / n);\r\n c = (c % n) * base;\r\n }\r\n }\r\n\r\n function toString () {\r\n var i = size;\r\n var s = \"\";\r\n while (--i >= 0) {\r\n if (s !== \"\" || i === 0 || data[i] !== 0) {\r\n var t = String(data[i]);\r\n if (s === \"\") {\r\n s = t;\r\n } else {\r\n s += \"0000000\".slice(0, 7 - t.length) + t;\r\n }\r\n }\r\n }\r\n return s;\r\n }\r\n\r\n function pow (x, n, acc) {\r\n return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x)\r\n : pow(x * x, n / 2, acc)));\r\n }\r\n\r\n function log (x) {\r\n var n = 0;\r\n while (x >= 4096) {\r\n n += 12;\r\n x /= 4096;\r\n }\r\n while (x >= 2) {\r\n n += 1;\r\n x /= 2;\r\n }\r\n return n;\r\n }\r\n\r\n Number.prototype.toFixed = function (fractionDigits) {\r\n var f, x, s, m, e, z, j, k;\r\n f = Number(fractionDigits);\r\n f = f !== f ? 0 : Math.floor(f);\r\n\r\n if (f < 0 || f > 20) {\r\n throw new RangeError(\"Number.toFixed called with invalid number of decimals\");\r\n }\r\n\r\n x = Number(this);\r\n\r\n if (x !== x) {\r\n return \"NaN\";\r\n }\r\n\r\n if (x <= -1e21 || x > 1e21) {\r\n return String(x);\r\n }\r\n\r\n s = \"\";\r\n\r\n if (x < 0) {\r\n s = \"-\";\r\n x = -x;\r\n }\r\n\r\n m = \"0\";\r\n\r\n if (x > 1e-21) {\r\n // 1e-21<x<1e21\r\n // -70<log2(x)<70\r\n e = log(x * pow(2, 69, 1)) - 69;\r\n z = (e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1));\r\n z *= 0x10000000000000;// Math.pow(2,52);\r\n e = 52 - e;\r\n\r\n // -18<e<122\r\n // x=z/2^e\r\n if (e > 0) {\r\n multiply(0, z);\r\n j = f;\r\n\r\n while (j >= 7) {\r\n multiply(1e7, 0);\r\n j -= 7;\r\n }\r\n\r\n multiply(pow(10, j, 1), 0);\r\n j = e - 1;\r\n\r\n while (j >= 23) {\r\n divide(1 << 23);\r\n j -= 23;\r\n }\r\n divide(1 << j);\r\n multiply(1, 1);\r\n divide(2);\r\n m = toString();\r\n } else {\r\n multiply(0, z);\r\n multiply(1 << (-e), 0);\r\n m = toString() + \"0.00000000000000000000\".slice(2, 2 + f);\r\n }\r\n }\r\n\r\n if (f > 0) {\r\n k = m.length;\r\n\r\n if (k <= f) {\r\n m = s + \"0.0000000000000000000\".slice(0, f - k + 2) + m;\r\n } else {\r\n m = s + m.slice(0, k - f) + \".\" + m.slice(k - f);\r\n }\r\n } else {\r\n m = s + m;\r\n }\r\n\r\n return m;\r\n };\r\n\r\n })();\r\n}/**\r\n * 常量\r\n */\r\n\r\n_.extend(BI, {\r\n MAX: 0xfffffffffffffff,\r\n MIN: -0xfffffffffffffff,\r\n EVENT_RESPONSE_TIME: 200,\r\n zIndex_layer: 1e5,\r\n zIndex_popover: 1e6,\r\n zIndex_popup: 1e7,\r\n zIndex_masker: 1e8,\r\n zIndex_tip: 1e9,\r\n emptyStr: \"\",\r\n emptyFn: function () {\r\n },\r\n empty: null,\r\n Key: {\r\n 48: \"0\",\r\n 49: \"1\",\r\n 50: \"2\",\r\n 51: \"3\",\r\n 52: \"4\",\r\n 53: \"5\",\r\n 54: \"6\",\r\n 55: \"7\",\r\n 56: \"8\",\r\n 57: \"9\",\r\n 65: \"a\",\r\n 66: \"b\",\r\n 67: \"c\",\r\n 68: \"d\",\r\n 69: \"e\",\r\n 70: \"f\",\r\n 71: \"g\",\r\n 72: \"h\",\r\n 73: \"i\",\r\n 74: \"j\",\r\n 75: \"k\",\r\n 76: \"l\",\r\n 77: \"m\",\r\n 78: \"n\",\r\n 79: \"o\",\r\n 80: \"p\",\r\n 81: \"q\",\r\n 82: \"r\",\r\n 83: \"s\",\r\n 84: \"t\",\r\n 85: \"u\",\r\n 86: \"v\",\r\n 87: \"w\",\r\n 88: \"x\",\r\n 89: \"y\",\r\n 90: \"z\",\r\n 96: \"0\",\r\n 97: \"1\",\r\n 98: \"2\",\r\n 99: \"3\",\r\n 100: \"4\",\r\n 101: \"5\",\r\n 102: \"6\",\r\n 103: \"7\",\r\n 104: \"8\",\r\n 105: \"9\",\r\n 106: \"*\",\r\n 107: \"+\",\r\n 109: \"-\",\r\n 110: \".\",\r\n 111: \"/\"\r\n },\r\n KeyCode: {\r\n BACKSPACE: 8,\r\n COMMA: 188,\r\n DELETE: 46,\r\n DOWN: 40,\r\n END: 35,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n HOME: 36,\r\n LEFT: 37,\r\n NUMPAD_ADD: 107,\r\n NUMPAD_DECIMAL: 110,\r\n NUMPAD_DIVIDE: 111,\r\n NUMPAD_ENTER: 108,\r\n NUMPAD_MULTIPLY: 106,\r\n NUMPAD_SUBTRACT: 109,\r\n PAGE_DOWN: 34,\r\n PAGE_UP: 33,\r\n PERIOD: 190,\r\n RIGHT: 39,\r\n SPACE: 32,\r\n TAB: 9,\r\n UP: 38\r\n },\r\n Status: {\r\n SUCCESS: 1,\r\n WRONG: 2,\r\n START: 3,\r\n END: 4,\r\n WAITING: 5,\r\n READY: 6,\r\n RUNNING: 7,\r\n OUTOFBOUNDS: 8,\r\n NULL: -1\r\n },\r\n Direction: {\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Left: \"left\",\r\n Right: \"right\",\r\n Custom: \"custom\"\r\n },\r\n Axis: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\"\r\n },\r\n Selection: {\r\n Default: -2,\r\n None: -1,\r\n Single: 0,\r\n Multi: 1,\r\n All: 2\r\n },\r\n HorizontalAlign: {\r\n Left: \"left\",\r\n Right: \"right\",\r\n Center: \"center\",\r\n Stretch: \"stretch\"\r\n },\r\n VerticalAlign: {\r\n Middle: \"middle\",\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Stretch: \"stretch\"\r\n },\r\n StartOfWeek: 1\r\n});BI.version = \"2.0\";/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-center-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_center_adapt\", BI.AbsoluteCenterLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-horizontal-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {\r\n w.element.css(\"top\", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));\r\n }\r\n if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {\r\n w.element.css(\"bottom\", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_horizontal_adapt\", BI.AbsoluteHorizontalLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-vertical-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: item.lgap,\r\n right: item.rgap,\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {\r\n w.element.css(\"left\", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));\r\n }\r\n if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {\r\n w.element.css(\"right\", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_vertical_adapt\", BI.AbsoluteVerticalLayout);/**\r\n * 自适应水平和垂直方向都居中容器\r\n * @class BI.CenterAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.CenterAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center_adapt\", BI.CenterAdaptLayout);/**\r\n * 水平方向居中容器\r\n * @class BI.HorizontalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_adapt\", BI.HorizontalAdaptLayout);/**\r\n * 左右分离,垂直方向居中容器\r\n * items:{\r\n left: [{el:{type:\"bi.button\"}}],\r\n right:[{el:{type:\"bi.button\"}}]\r\n }\r\n * @class BI.LeftRightVerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-right-vertical-adapt-layout\",\r\n items: {},\r\n llgap: 0,\r\n lrgap: 0,\r\n lhgap: 0,\r\n rlgap: 0,\r\n rrgap: 0,\r\n rhgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var layoutArray = [];\r\n if (\"left\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.left,\r\n hgap: o.lhgap,\r\n lgap: o.llgap,\r\n rgap: o.lrgap\r\n }\r\n }]\r\n });\r\n }\r\n if (\"right\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.right,\r\n textAlign: \"right\",\r\n hgap: o.rhgap,\r\n lgap: o.rlgap,\r\n rgap: o.rrgap\r\n }\r\n }]\r\n });\r\n }\r\n return layoutArray;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_right_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left_right_vertical_adapt\", BI.LeftRightVerticalAdaptLayout);\r\n\r\n\r\nBI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.left_vertical_adapt\", BI.LeftVerticalAdaptLayout);\r\n\r\nBI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-right-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.RightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.right\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n textAlign: \"right\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.right_vertical_adapt\", BI.RightVerticalAdaptLayout);/**\r\n * 使用display:table和display:table-cell实现的horizontal布局\r\n * @class BI.TableAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-center-adapt-layout\",\r\n columnSize: [],\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.TableAdaptLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<div>\").css({\r\n position: \"relative\",\r\n display: \"table\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: o.horizontalAlign === BI.HorizontalAlign.Center ? \"100%\" : \"auto\",\r\n \"white-space\": \"nowrap\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n width: width,\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.width(width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n display: \"table-cell\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n height: \"100%\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table_adapt\", BI.TableAdaptLayout);/**\r\n * 垂直方向居中容器\r\n * @class BI.VerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: {\r\n baseCls: \"bi-vertical-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_adapt\", BI.VerticalAdaptLayout);/**\r\n * 水平方向居中自适应容器\r\n * @class BI.HorizontalAutoLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAutoLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizon-auto-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.HorizontalAutoLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalAutoLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n margin: \"0px auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_auto\", BI.HorizontalAutoLayout);/**\r\n * 浮动的水平居中布局\r\n */\r\nBI.FloatHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-horizontal-adapt-layout\",\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"float_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var width = this.left.element.width(),\r\n height = this.left.element.height();\r\n this.left.element.width(width).height(height).css(\"float\", \"none\");\r\n BI.remove(this._children, function (i, wi) {\r\n if (wi === self.container) {\r\n delete self._children[i];\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var self = this, o = this.options;\r\n this.left = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [item],\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap\r\n });\r\n\r\n this.container = BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n\r\n return this.left;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_float\", BI.FloatHorizontalLayout);/**\r\n * 内联布局\r\n * @class BI.InlineCenterAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments);\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"center\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item, length) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-center-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n throw new Error(\"不能添加元素\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item, items.length);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineCenterAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_center_adapt\", BI.InlineCenterAdaptLayout);/**\r\n * 内联布局\r\n * @class BI.InlineVerticalAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-vertical-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: o.textAlign\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-vertical-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_vertical_adapt\", BI.InlineVerticalAdaptLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_center_adapt\", BI.FlexCenterLayout);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-center-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal_adapt\", BI.FlexHorizontalCenter);\r\nBI.shortcut(\"bi.flex_horizontal_center_adapt\", BI.FlexHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal\", BI.FlexHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n hgap: o.hgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical_adapt\", BI.FlexVerticalCenter);\r\nBI.shortcut(\"bi.flex_vertical_center_adapt\", BI.FlexVerticalCenter);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);\r\n var o = this.options;\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical\", BI.FlexVerticalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-center-adapt-layout clearfix\",\r\n scrollable: true\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperCenterLayout.superclass.render.apply(this, arguments);\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-center-adapt-layout-wrapper\");\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_center_adapt\", BI.FlexWrapperCenterLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: true,\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_adapt\", BI.FlexWrapperHorizontalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_center_adapt\", BI.FlexWrapperHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-horizontal-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollable: null,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-horizontal-layout-wrapper v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal\", BI.FlexWrapperHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical_adapt\", BI.FlexWrapperVerticalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_vertical_center_adapt\", BI.FlexWrapperVerticalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: null,\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-vertical-layout-wrapper h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical\", BI.FlexWrapperVerticalLayout);/**\r\n * 固定子组件上下左右的布局容器\r\n * @class BI.AbsoluteLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AbsoluteLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteLayout.superclass._addElement.apply(this, arguments);\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n left += item.left;\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n right += item.right;\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n top += item.top;\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n bottom += item.bottom;\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({left: left});\r\n right += o.hgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({top: top});\r\n bottom += o.vgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({left: left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({top: top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n w.element.css({position: \"absolute\"});\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n stroke: function (items) {\r\n this.options.items = items || [];\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!BI.isWidget(item) && !item.el) {\r\n throw new Error(\"el must be exist\");\r\n }\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute\", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-adaptive-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AdaptiveLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AdaptiveLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\"});\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({\r\n left: item.left\r\n });\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({\r\n right: item.right\r\n });\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({\r\n top: item.top\r\n });\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({\r\n bottom: item.bottom\r\n });\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({\"margin-left\": left});\r\n right += o.hgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({\"margin-top\": top});\r\n bottom += o.vgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({\"margin-left\": left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({\"margin-top\": top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.adaptive\", BI.AdaptiveLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.BorderLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-border-layout\",\r\n items: {}\r\n });\r\n },\r\n render: function () {\r\n BI.BorderLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (regions) {\r\n var item;\r\n var top = 0;\r\n var bottom = 0;\r\n var left = 0;\r\n var right = 0;\r\n if (\"north\" in regions) {\r\n item = regions[\"north\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"north\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"north\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"north\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n top: (item.top || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n bottom: \"initial\"\r\n });\r\n }\r\n top = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"south\" in regions) {\r\n item = regions[\"south\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"south\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"south\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"south\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n bottom: (item.bottom || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n top: \"initial\"\r\n });\r\n }\r\n bottom = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"west\" in regions) {\r\n item = regions[\"west\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"west\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"west\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"west\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n left: (item.left || 0),\r\n top: top,\r\n bottom: bottom,\r\n right: \"initial\"\r\n });\r\n }\r\n left = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"east\" in regions) {\r\n item = regions[\"east\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"east\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"east\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"east\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n right: (item.right || 0),\r\n top: top,\r\n bottom: bottom,\r\n left: \"initial\"\r\n });\r\n }\r\n right = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"center\" in regions) {\r\n item = regions[\"center\"];\r\n if (item != null) {\r\n if (!this.hasWidget(this.getName() + \"center\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"center\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"center\").element\r\n .css({position: \"absolute\", top: top, bottom: bottom, left: left, right: right});\r\n }\r\n }\r\n },\r\n\r\n update: function (opt) {\r\n },\r\n\r\n populate: function (items) {\r\n BI.BorderLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.border\", BI.BorderLayout);/**\r\n * 卡片布局,可以做到当前只显示一个组件,其他的都隐藏\r\n * @class BI.CardLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {String} options.defaultShowName 默认展示的子组件名\r\n */\r\nBI.CardLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CardLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-card-layout\",\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.CardLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n this.showIndex = void 0;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!self.hasWidget(item.cardName)) {\r\n var w = BI.createWidget(item);\r\n w.on(BI.Events.DESTROY, function () {\r\n var index = BI.findIndex(o.items, function (i, tItem) {\r\n return tItem.cardName == item.cardName;\r\n });\r\n if (index > -1) {\r\n o.items.splice(index, 1);\r\n }\r\n });\r\n self.addWidget(item.cardName, w);\r\n } else {\r\n var w = self.getWidgetByName(item.cardName);\r\n }\r\n w.element.css({position: \"absolute\", top: \"0\", right: \"0\", bottom: \"0\", left: \"0\"});\r\n w.setVisible(false);\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n empty: function () {\r\n BI.CardLayout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.CardLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n this.options.defaultShowName && this.showCardByName(this.options.defaultShowName);\r\n },\r\n\r\n isCardExisted: function (cardName) {\r\n return BI.some(this.options.items, function (i, item) {\r\n return item.cardName == cardName && item.el;\r\n });\r\n },\r\n\r\n getCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n return this._children[cardName];\r\n },\r\n\r\n _deleteCardByName: function (cardName) {\r\n delete this._children[cardName];\r\n var index = BI.findIndex(this.options.items, function (i, item) {\r\n return item.cardName == cardName;\r\n });\r\n if (index > -1) {\r\n this.options.items.splice(index, 1);\r\n }\r\n },\r\n\r\n deleteCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n\r\n var child = this._children[cardName];\r\n this._deleteCardByName(cardName);\r\n child && child._destroy();\r\n },\r\n\r\n addCardByName: function (cardName, cardItem) {\r\n if (this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is already exist\");\r\n }\r\n var widget = BI.createWidget(cardItem, this);\r\n widget.element.css({\r\n position: \"relative\",\r\n top: \"0\",\r\n left: \"0\",\r\n width: \"100%\",\r\n height: \"100%\"\r\n }).appendTo(this.element);\r\n widget.invisible();\r\n this.addWidget(cardName, widget);\r\n this.options.items.push({el: cardItem, cardName: cardName});\r\n return widget;\r\n },\r\n\r\n showCardByName: function (name, action, callback) {\r\n var self = this;\r\n // name不存在的时候全部隐藏\r\n var exist = this.isCardExisted(name);\r\n if (this.showIndex != null) {\r\n this.lastShowIndex = this.showIndex;\r\n }\r\n this.showIndex = name;\r\n var flag = false;\r\n BI.each(this.options.items, function (i, item) {\r\n var el = self._children[item.cardName];\r\n if (el) {\r\n if (name != item.cardName) {\r\n // 动画效果只有在全部都隐藏的时候才有意义,且只要执行一次动画操作就够了\r\n !flag && !exist && (BI.Action && action instanceof BI.Action) ? (action.actionBack(el), flag = true) : el.invisible();\r\n } else {\r\n (BI.Action && action instanceof BI.Action) ? action.actionPerformed(void 0, el, callback) : (el.visible(), callback && callback());\r\n }\r\n }\r\n });\r\n },\r\n\r\n showLastCard: function () {\r\n var self = this;\r\n this.showIndex = this.lastShowIndex;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].setVisible(self.showIndex == i);\r\n });\r\n },\r\n\r\n setDefaultShowName: function (name) {\r\n this.options.defaultShowName = name;\r\n return this;\r\n },\r\n\r\n getDefaultShowName: function () {\r\n return this.options.defaultShowName;\r\n },\r\n\r\n getAllCardNames: function () {\r\n return BI.map(this.options.items, function (i, item) {\r\n return item.cardName;\r\n });\r\n },\r\n\r\n getShowingCard: function () {\r\n if (!BI.isKey(this.showIndex)) {\r\n return void 0;\r\n }\r\n return this.getWidgetByName(this.showIndex);\r\n },\r\n\r\n deleteAllCard: function () {\r\n var self = this;\r\n BI.each(this.getAllCardNames(), function (i, name) {\r\n self.deleteCardByName(name);\r\n });\r\n },\r\n\r\n hideAllCard: function () {\r\n var self = this;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].invisible();\r\n });\r\n },\r\n\r\n isAllCardHide: function () {\r\n var self = this;\r\n var flag = true;\r\n BI.some(this.options.items, function (i, item) {\r\n if (self._children[item.cardName].isVisible()) {\r\n flag = false;\r\n return false;\r\n }\r\n });\r\n return flag;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeName;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeName = name;\r\n }\r\n });\r\n } else {\r\n removeName = nameOrWidget;\r\n }\r\n if (removeName) {\r\n this._deleteCardByName(removeName);\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.card\", BI.CardLayout);/**\r\n * 默认的布局方式\r\n *\r\n * @class BI.DefaultLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DefaultLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DefaultLayout.superclass.props.apply(this, arguments), {\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.DefaultLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.DefaultLayout.superclass._addElement.apply(this, arguments);\r\n if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\")\r\n },\r\n\r\n populate: function (items) {\r\n BI.DefaultLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.default\", BI.DefaultLayout);/**\r\n * 分隔容器的控件,按照宽度和高度所占比平分整个容器\r\n *\r\n * @class BI.DivisionLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DivisionLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DivisionLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-division-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n // [\r\n // {\r\n // column: 0,\r\n // row: 0,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button1'}\r\n // },\r\n // {\r\n // column: 1,\r\n // row: 1,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button2'}\r\n // },\r\n // {\r\n // column: 3,\r\n // row: 2,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button3'}\r\n // }\r\n // ]\r\n });\r\n },\r\n render: function () {\r\n BI.DivisionLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.opitons.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var map = BI.makeArray(rows), widths = {}, heights = {};\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(map, function (i) {\r\n map[i] = BI.makeArray(columns);\r\n });\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n widths[i] = (widths[i] || 0) + item.width;\r\n heights[j] = (heights[j] || 0) + item.height;\r\n map[i][j] = el;\r\n });\r\n return;\r\n }\r\n widths[item.row] = (widths[item.row] || 0) + item.width;\r\n heights[item.column] = (heights[item.column] || 0) + item.height;\r\n map[item.row][item.column] = item;\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n var totalW = 0;\r\n for (var j = 0; j < columns; j++) {\r\n if (!map[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(map[i][j]);\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n } else {\r\n w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n }\r\n var left = totalW * 100 / widths[i];\r\n w.element.css({position: \"absolute\", left: left + \"%\"});\r\n if (j > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + i + \"_\" + (j - 1));\r\n lastW.element.css({right: (100 - left) + \"%\"});\r\n }\r\n if (j == o.columns - 1) {\r\n w.element.css({right: \"0%\"});\r\n }\r\n first(w, i, j);\r\n totalW += map[i][j].width;\r\n }\r\n }\r\n for (var j = 0; j < o.columns; j++) {\r\n var totalH = 0;\r\n for (var i = 0; i < o.rows; i++) {\r\n var w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n var top = totalH * 100 / heights[j];\r\n w.element.css({top: top + \"%\"});\r\n if (i > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + (i - 1) + \"_\" + j);\r\n lastW.element.css({bottom: (100 - top) + \"%\"});\r\n }\r\n if (i == o.rows - 1) {\r\n w.element.css({bottom: \"0%\"});\r\n }\r\n totalH += map[i][j].height;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.DivisionLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.division\", BI.DivisionLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.FloatLeftLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatLeftLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-left-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatLeftLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatLeftLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"left\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatLeftLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left\", BI.FloatLeftLayout);\r\n\r\n/**\r\n * 靠右对齐的自由浮动布局\r\n * @class BI.FloatRightLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatRightLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-right-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatRightLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatRightLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"right\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatRightLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.right\", BI.FloatRightLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.GridLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.GridLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-grid-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n /* [\r\n {\r\n column: 0,\r\n row: 0,\r\n el: {type: 'bi.button', text: 'button1'}\r\n },\r\n {\r\n column: 1,\r\n row: 1,\r\n el: {type: 'bi.button', text: 'button2'}\r\n },\r\n {\r\n column: 3,\r\n row: 2,\r\n el: {type: 'bi.button', text: 'button3'}\r\n }\r\n ]*/\r\n });\r\n },\r\n render: function () {\r\n BI.GridLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"grid布局不需要resize\")\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var width = 100 / columns, height = 100 / rows;\r\n var els = [];\r\n for (var i = 0; i < rows; i++) {\r\n els[i] = [];\r\n }\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n els[i][j] = BI.createWidget(el);\r\n });\r\n return;\r\n }\r\n els[item.row][item.column] = BI.createWidget(item);\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n for (var j = 0; j < columns; j++) {\r\n if (!els[i][j]) {\r\n els[i][j] = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n first(els[i][j], i, j);\r\n els[i][j].element.css({\r\n position: \"absolute\",\r\n top: height * i + \"%\",\r\n left: width * j + \"%\",\r\n right: (100 - (width * (j + 1))) + \"%\",\r\n bottom: (100 - (height * (i + 1))) + \"%\"\r\n });\r\n this.addWidget(els[i][j]);\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.GridLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.grid\", BI.GridLayout);/**\r\n * 水平布局\r\n * @class BI.HorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.HorizontalLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n \"white-space\": \"nowrap\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: (o.horizontalAlign === BI.HorizontalAlign.Center || o.horizontalAlign === BI.HorizontalAlign.Stretch) ? \"100%\" : \"auto\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.$tr = BI.Widget._renderEngine.createElement(\"<tr>\");\r\n this.$tr.appendTo(this.$table);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"td\",\r\n attributes: {\r\n width: width\r\n },\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.attr(\"width\", width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$tr.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal layout do not need to resize\");\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$tr;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal\", BI.HorizontalLayout);\r\n\r\n/**\r\n * 水平布局\r\n * @class BI.HorizontalCellLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCellLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-cell-layout\",\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCellLayout.superclass.render.apply(this, arguments);\r\n this.element.css({display: \"table\", \"vertical-align\": \"top\"});\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalCellLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", display: \"table-cell\", \"vertical-align\": \"middle\"});\r\n if (o.hgap + o.lgap > 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal do not need to resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalCellLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_cell\", BI.HorizontalCellLayout);/**\r\n * 内联布局\r\n * @class BI.InlineLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\"position\": \"relative\", display: \"inline-block\", \"*display\": \"inline\", \"*zoom\": 1});\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline\", BI.InlineLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.LatticeLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.LatticeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LatticeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-lattice-layout clearfix\"\r\n // columnSize: [0.2, 0.2, 0.6],\r\n });\r\n },\r\n render: function () {\r\n BI.LatticeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.LatticeLayout.superclass._addElement.apply(this, arguments);\r\n if (o.columnSize && o.columnSize[i]) {\r\n var width = o.columnSize[i] / BI.sum(o.columnSize) * 100 + \"%\";\r\n } else {\r\n var width = 1 / this.options.items.length * 100 + \"%\";\r\n }\r\n w.element.css({position: \"relative\", float: \"left\", width: width});\r\n return w;\r\n },\r\n\r\n addItem: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItem.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n addItemAt: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItemAt.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.LatticeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.lattice\", BI.LatticeLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.TableLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-layout\",\r\n scrolly: true,\r\n columnSize: [200, 200, \"fill\"],\r\n rowSize: 30, // or [30,30,30]\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TableLayout.superclass.render.apply(this, arguments);\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n var abs = [], left = 0, right = 0, i, j;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (i = 0; i < arr.length; i++) {\r\n if (BI.isNumber(o.columnSize[i])) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: o.columnSize[i] <= 1 ? left * 100 + \"%\" : left,\r\n width: o.columnSize[i] <= 1 ? o.columnSize[i] * 100 + \"%\" : o.columnSize[i]\r\n }, arr[i]));\r\n left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap);\r\n } else {\r\n break;\r\n }\r\n }\r\n for (j = arr.length - 1; j > i; j--) {\r\n if (BI.isNumber(o.columnSize[j])) {\r\n first(arr[j], this.rows, j);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n right: o.columnSize[j] <= 1 ? right * 100 + \"%\" : right,\r\n width: o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j]\r\n }, arr[j]));\r\n right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap);\r\n } else {\r\n throw new Error(\"item with fill can only be one\");\r\n }\r\n }\r\n if (i >= 0 && i < arr.length) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: left <= 1 ? left * 100 + \"%\" : left,\r\n right: right <= 1 ? right * 100 + \"%\" : right\r\n }, arr[i]));\r\n }\r\n var w = BI.createWidget({\r\n type: \"bi.absolute\",\r\n height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,\r\n items: abs\r\n });\r\n if (this.rows > 0) {\r\n this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({\r\n \"margin-bottom\": o.vgap\r\n });\r\n }\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n this.addWidget(this.getName() + (this.rows++), w);\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"table布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TableLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table\", BI.TableLayout);/**\r\n * 水平tape布局\r\n * @class BI.HTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-h-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n width: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n width: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n width: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.HTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n w.element.css({position: \"absolute\", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + \"px\", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + \"px\"});\r\n });\r\n\r\n var left = {}, right = {};\r\n left[0] = 0;\r\n right[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(left[i])) {\r\n left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({left: left[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(right[i])) {\r\n right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({right: right[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n var updated;\r\n BI.each(this._children, function (i, child) {\r\n updated = child.update() || updated;\r\n });\r\n return updated;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.htape\", BI.HTapeLayout);\r\n\r\n/**\r\n * 垂直tape布局\r\n * @class BI.VTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-v-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n height: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n height: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n height: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.VTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n w.element.css({position: \"absolute\", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + \"px\"});\r\n });\r\n\r\n var top = {}, bottom = {};\r\n top[0] = 0;\r\n bottom[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({top: top[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({bottom: bottom[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.VTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vtape\", BI.VTapeLayout);/**\r\n * td布局\r\n * @class BI.TdLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TdLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-td-layout\",\r\n columnSize: [200, 200, 200],\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TdLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n var tr = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"tr\"\r\n });\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n var w = BI.createWidget(arr[i]);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n if (arr[i].lgap) {\r\n w.element.css({\"margin-left\": arr[i].lgap + \"px\"});\r\n }\r\n if (arr[i].rgap) {\r\n w.element.css({\"margin-right\": arr[i].rgap + \"px\"});\r\n }\r\n if (arr[i].tgap) {\r\n w.element.css({\"margin-top\": arr[i].tgap + \"px\"});\r\n }\r\n if (arr[i].bgap) {\r\n w.element.css({\"margin-bottom\": arr[i].bgap + \"px\"});\r\n }\r\n first(w, this.rows++, i);\r\n var td = BI.createWidget({\r\n type: \"bi.default\",\r\n attributes: {\r\n width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i]\r\n },\r\n tagName: \"td\",\r\n items: [w]\r\n });\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\",\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n tr.addItem(td);\r\n }\r\n this.addWidget(this.getName() + idx, tr);\r\n return tr;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"td布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TdLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TdLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.td\", BI.TdLayout);/**\r\n * 垂直布局\r\n * @class BI.VerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n scrolly: true\r\n });\r\n },\r\n render: function () {\r\n BI.VerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.VerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.VerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical\", BI.VerticalLayout);/**\r\n *\r\n * @class BI.WindowLayout\r\n * @extends BI.Layout\r\n */\r\nBI.WindowLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.WindowLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-window-layout\",\r\n columns: 3,\r\n rows: 2,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n columnSize: [100, \"fill\", 200],\r\n rowSize: [100, \"fill\"],\r\n items: [[\r\n {\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.WindowLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n if (BI.isNumber(o.rowSize)) {\r\n o.rowSize = BI.makeArray(o.items.length, 1 / o.items.length);\r\n }\r\n if (BI.isNumber(o.columnSize)) {\r\n o.columnSize = BI.makeArray(o.items[0].length, 1 / o.items[0].length);\r\n }\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n if (!o.items[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(o.items[i][j]);\r\n w.element.css({position: \"absolute\"});\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n }\r\n }\r\n }\r\n var left = {}, right = {}, top = {}, bottom = {};\r\n left[0] = 0;\r\n top[0] = 0;\r\n right[o.columns - 1] = 0;\r\n bottom[o.rows - 1] = 0;\r\n // 从上到下\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + (o.rowSize[i - 1] < 1 ? o.rowSize[i - 1] : o.rowSize[i - 1] + o.vgap + o.bgap);\r\n }\r\n var t = top[i] <= 1 ? top[i] * 100 + \"%\" : top[i] + o.vgap + o.tgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({top: t, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从下到上\r\n for (var i = o.rows - 1; i >= 0; i--) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + (o.rowSize[i + 1] < 1 ? o.rowSize[i + 1] : o.rowSize[i + 1] + o.vgap + o.tgap);\r\n }\r\n var b = bottom[i] <= 1 ? bottom[i] * 100 + \"%\" : bottom[i] + o.vgap + o.bgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({bottom: b, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从左到右\r\n for (var j = 0; j < o.columns; j++) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(left[j])) {\r\n left[j] = left[j - 1] + (o.columnSize[j - 1] < 1 ? o.columnSize[j - 1] : o.columnSize[j - 1] + o.hgap + o.rgap);\r\n }\r\n var l = left[j] <= 1 ? left[j] * 100 + \"%\" : left[j] + o.hgap + o.lgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({left: l, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n // 从右到左\r\n for (var j = o.columns - 1; j >= 0; j--) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(right[j])) {\r\n right[j] = right[j + 1] + (o.columnSize[j + 1] < 1 ? o.columnSize[j + 1] : o.columnSize[j + 1] + o.hgap + o.lgap);\r\n }\r\n var r = right[j] <= 1 ? right[j] * 100 + \"%\" : right[j] + o.hgap + o.rgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({right: r, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.WindowLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.window\", BI.WindowLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.CenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.CenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var list = [], items = o.items;\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center\", BI.CenterLayout);/**\r\n * 浮动布局实现的居中容器\r\n * @class BI.FloatCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FloatCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [], width = 100 / items.length;\r\n BI.each(items, function (i) {\r\n var widget = BI.createWidget({\r\n type: \"bi.default\"\r\n });\r\n widget.element.addClass(\"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")).css({\r\n width: width + \"%\",\r\n height: \"100%\"\r\n });\r\n list.push({\r\n el: widget\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"floatcenter布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.float_center\", BI.FloatCenterLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.HorizontalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_center\", BI.HorizontalCenterLayout);/**\r\n * 垂直方向都居中容器, 非自适应,用于高度不固定的面板\r\n * @class BI.VerticalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.VerticalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: 0,\r\n row: i,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: 1,\r\n rows: list.length,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_center\", BI.VerticalCenterLayout);/**\r\n * 缓冲池\r\n * @type {{Buffer: {}}}\r\n */\r\n\r\n(function () {\r\n var Buffer = {};\r\n var MODE = false;// 设置缓存模式为关闭\r\n\r\n BI.BufferPool = {\r\n put: function (name, cache) {\r\n if (BI.isNotNull(Buffer[name])) {\r\n throw new Error(\"Buffer Pool has the key already!\");\r\n }\r\n Buffer[name] = cache;\r\n },\r\n\r\n get: function (name) {\r\n return Buffer[name];\r\n }\r\n };\r\n})();/**\r\n * 共享池\r\n * @type {{Shared: {}}}\r\n */\r\n\r\n(function () {\r\n var _Shared = {};\r\n BI.SharingPool = {\r\n _Shared: _Shared,\r\n put: function (name, shared) {\r\n _Shared[name] = shared;\r\n },\r\n\r\n cat: function () {\r\n var args = Array.prototype.slice.call(arguments, 0),\r\n copy = _Shared;\r\n for (var i = 0; i < args.length; i++) {\r\n copy = copy && copy[args[i]];\r\n }\r\n return copy;\r\n },\r\n\r\n get: function () {\r\n return BI.deepClone(this.cat.apply(this, arguments));\r\n },\r\n\r\n remove: function (key) {\r\n delete _Shared[key];\r\n }\r\n };\r\n})();BI.Req = {\r\n\r\n};\r\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('underscore')) : typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'underscore'], factory) : factory(global.Fix = global.Fix || {}, global._, global._);\r\n})(this, function (exports, lodash, _$1) {\r\n 'use strict';\r\n\r\n _$1 = 'default' in _$1 ? _$1['default'] : _$1;\r\n\r\n var falsy = void 0;\r\n var $$skipArray = {\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy,\r\n $vm: falsy\r\n };\r\n\r\n var $$skips = ['$accessors', '$vbthis', '$vbsetter', '$vm'];\r\n\r\n var originalMethods = [];\r\n _$1.each(['slice', 'splice'], function (method) {\r\n originalMethods[method] = Array.prototype[method];\r\n });\r\n\r\n // Array.prototype.slice = function (...args) {\r\n // let array = originalMethods[\"slice\"].apply(this, args);\r\n // // let result = [];\r\n // // for (let i = 0; i < array.length; i++) {\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Array]\") result[i] = [...array[i]];\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Object]\") result[i] = _.extend({}, array[i]);\r\n // // result[i] = array[i];\r\n // // }\r\n // this.__ref__ = makeHashCode();\r\n // return array;\r\n // }\r\n\r\n Array.prototype.splice = function () {\r\n // for (let i = 0; i < this.length; i++) {\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Array]\") this[i] = [...this[i]];\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Object]\") this[i] = _.extend({}, this[i]);\r\n // }\r\n this.__ref__ = makeHashCode();\r\n\r\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\r\n args[_key] = arguments[_key];\r\n }\r\n\r\n return originalMethods[\"splice\"].apply(this, args);\r\n };\r\n\r\n function noop(a, b, c) {}\r\n\r\n function isNative(Ctor) {\r\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\r\n }\r\n\r\n var rhashcode = /\\d\\.\\d{4}/;\r\n\r\n // 生成UUID http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript\r\n function makeHashCode() {\r\n var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bi';\r\n\r\n /* istanbul ignore next*/\r\n return String(Math.random() + Math.random()).replace(rhashcode, prefix);\r\n }\r\n\r\n function isIE() {\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n\r\n return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase())\r\n );\r\n }\r\n\r\n function getIEVersion() {\r\n var version = 0;\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n\r\n return version;\r\n }\r\n var isIE9Below = isIE() && getIEVersion() < 9;\r\n\r\n var _toString = Object.prototype.toString;\r\n\r\n function isPlainObject(obj) {\r\n return _toString.call(obj) === '[object Object]';\r\n }\r\n\r\n var bailRE = /[^\\w.$]/;\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function parsePath(path) {\r\n if (bailRE.test(path)) {\r\n return;\r\n }\r\n var segments = path.split('.');\r\n\r\n return function (obj) {\r\n for (var i = 0; i < segments.length; i++) {\r\n if (!obj) return;\r\n obj = obj[segments[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n function toJSON(model) {\r\n var result = void 0;\r\n if (_$1.isArray(model)) {\r\n result = [];\r\n for (var i = 0, len = model.length; i < len; i++) {\r\n result[i] = toJSON(model[i]);\r\n }\r\n } else if (model && isPlainObject(model)) {\r\n result = {};\r\n for (var key in model) {\r\n if ($$skips.indexOf(key) === -1) {\r\n result[key] = toJSON(model[key]);\r\n }\r\n }\r\n } else {\r\n result = model;\r\n }\r\n return result;\r\n }\r\n\r\n function cloneShadow(obj) {\r\n if (obj === null) return null;\r\n\r\n if (Array.isArray(obj)) {\r\n var result = [].concat(obj);\r\n if (obj.__ref__ !== undefined) result.__ref__ = obj.__ref__;\r\n return result;\r\n }\r\n\r\n return toJSON(obj);\r\n }\r\n\r\n var nextTick = function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n // An asynchronous deferring mechanism.\r\n // In pre 2.4, we used to use microtasks (Promise/MutationObserver)\r\n // but microtasks actually has too high a priority and fires in between\r\n // supposedly sequential events (e.g. #4521, #6690) or even between\r\n // bubbling of the same event (#6566). Technically setImmediate should be\r\n // the ideal choice, but it's not available everywhere; and the only polyfill\r\n // that consistently queues the callback after all DOM events triggered in the\r\n // same loop is by using MessageChannel.\r\n /* istanbul ignore if */\r\n if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||\r\n // PhantomJS\r\n MessageChannel.toString() === '[object MessageChannelConstructor]')) {\r\n var channel = new MessageChannel();\r\n var port = channel.port2;\r\n channel.port1.onmessage = nextTickHandler;\r\n timerFunc = function timerFunc() {\r\n port.postMessage(1);\r\n };\r\n /* istanbul ignore next */\r\n } else if (typeof Promise !== 'undefined' && isNative(Promise)) {\r\n // use microtask in non-DOM environments, e.g. Weex\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else {\r\n // fallback to setTimeout\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb, ctx) {\r\n var _resolve = void 0;\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.call(ctx);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve(ctx);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n }();\r\n\r\n function inherit(sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function temp() {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function F() {},\r\n spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _$1.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n }\r\n\r\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\r\n var ObjProto = Object.prototype;\r\n var toString = ObjProto.toString;\r\n\r\n // Internal recursive comparison function for `isEqual`.\r\n /* eslint no-param-reassign: ['off'] */\r\n /* eslint no-use-before-define: [\"off\"] */\r\n var deepEq = function deepEq(a, b, aStack, bStack) {\r\n // Unwrap any wrapped objects.\r\n if (a instanceof _$1) a = a._wrapped;\r\n if (b instanceof _$1) b = b._wrapped;\r\n // Compare `[[Class]]` names.\r\n var className = toString.call(a);\r\n if (className !== toString.call(b)) return false;\r\n switch (className) {\r\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\r\n case '[object RegExp]':\r\n case '[object String]':\r\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\r\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\r\n // equivalent to `new String(\"5\")`.\r\n return '' + a === '' + b;\r\n case '[object Number]':\r\n // `NaN`s are equivalent, but non-reflexive.\r\n // Object(NaN) is equivalent to NaN.\r\n if (+a !== +a) return +b !== +b;\r\n // An `egal` comparison is performed for other numeric values.\r\n\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case '[object Date]':\r\n case '[object Boolean]':\r\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\r\n // millisecond representations. Note that invalid dates with millisecond representations\r\n // of `NaN` are not equivalent.\r\n return +a === +b;\r\n case '[object Symbol]':\r\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\r\n default:\r\n }\r\n\r\n var areArrays = className === '[object Array]';\r\n\r\n if (!areArrays) {\r\n if (typeof a != 'object' || typeof b != 'object') return false;\r\n\r\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\r\n // from different frames are.\r\n var aCtor = a.constructor,\r\n bCtor = b.constructor;\r\n if (aCtor !== bCtor && !(_$1.isFunction(aCtor) && aCtor instanceof aCtor && _$1.isFunction(bCtor) && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b) {\r\n return false;\r\n }\r\n }\r\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\r\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\r\n\r\n // Initializing stack of traversed objects.\r\n // It's done here since we only need them for objects and arrays comparison.\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n // Linear search. Performance is inversely proportional to the number of\r\n // unique nested structures.\r\n if (aStack[length] === a) return bStack[length] === b;\r\n }\r\n\r\n // Add the first object to the stack of traversed objects.\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n // Recursively compare objects and arrays.\r\n if (areArrays) {\r\n // Compare array lengths to determine if a deep comparison is necessary.\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n // Deep compare the contents, ignoring non-numeric properties.\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) return false;\r\n }\r\n } else {\r\n // Deep compare objects.\r\n var keys = _$1.keys(a);var key = void 0;\r\n length = keys.length;\r\n // Ensure that both objects contain the same number of properties before comparing deep equality.\r\n if (_$1.keys(b).length !== length) return false;\r\n while (length--) {\r\n // Deep compare each member\r\n key = keys[length];\r\n if ($$skips.indexOf(key) !== -1) {\r\n return true;\r\n }\r\n\r\n if (!(Object.keys(b).indexOf(key) !== -1 && eq(a[key], b[key], aStack, bStack))) return false;\r\n }\r\n }\r\n // Remove the first object from the stack of traversed objects.\r\n aStack.pop();\r\n bStack.pop();\r\n\r\n return true;\r\n };\r\n\r\n var eq = function eq(a, b, aStack, bStack) {\r\n // Identical objects are equal. `0 === -0`, but they aren't identical.\r\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\r\n if (a === b) return a !== 0 || 1 / a === 1 / b;\r\n // `null` or `undefined` only equal to itself (strict comparison).\r\n if (a == null || b == null) return false;\r\n // `NaN`s are equivalent, but non-reflexive.\r\n if (a !== a) return b !== b;\r\n // Exhaust primitive checks\r\n var type = typeof a;\r\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\r\n\r\n // skip function\r\n if (type === 'function') return true;\r\n\r\n return deepEq(a, b, aStack, bStack);\r\n };\r\n\r\n // export function isShadowEqual(a, b) {\r\n // return shadowEq(a, b);\r\n // }\r\n\r\n function isShadowEqual(a, b) {\r\n if (a === b) return true;\r\n\r\n if (a && b && typeof a == 'object' && typeof b == 'object') {\r\n if (a.constructor !== b.constructor) return false;\r\n\r\n var length = void 0,\r\n i = void 0,\r\n key = void 0,\r\n keys = void 0;\r\n if (Array.isArray(a)) {\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n for (i = length; i-- !== 0;) {\r\n if (!isShadowEqual(a[i], b[i])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n if (a.constructor === RegExp) return true;\r\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\r\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\r\n\r\n keys = Object.keys(a);\r\n length = keys.length;\r\n if (length !== Object.keys(b).length) return false;\r\n\r\n for (i = length; i-- !== 0;) {\r\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\r\n }\r\n\r\n for (i = length; i-- !== 0;) {\r\n key = keys[i];\r\n if ($$skips.indexOf(key) !== -1) continue;\r\n if (!isShadowEqual(a[key], b[key])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // skip function\r\n if (typeof a === 'function') return true;\r\n\r\n // true if both NaN, false otherwise\r\n return a !== a && b !== b;\r\n }\r\n\r\n var mixinInjection = {};\r\n\r\n function getMixins(type) {\r\n return mixinInjection[type];\r\n }\r\n\r\n function mixin(xtype, cls) {\r\n mixinInjection[xtype] = _.cloneDeep(cls);\r\n }\r\n\r\n var falsy$1 = void 0;\r\n var operators = {\r\n '||': falsy$1,\r\n '&&': falsy$1,\r\n '(': falsy$1,\r\n ')': falsy$1\r\n };\r\n\r\n function runBinaryFunction(binarys) {\r\n var expr = '';\r\n for (var i = 0, len = binarys.length; i < len; i++) {\r\n if (_$1.isBoolean(binarys[i]) || _$1.has(operators, binarys[i])) {\r\n expr += binarys[i];\r\n } else {\r\n expr += 'false';\r\n }\r\n }\r\n\r\n return new Function('return ' + expr)();\r\n }\r\n\r\n function watch(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n var model = vm;\r\n if (!model.$watch && model.$vm) {\r\n model = model.$vm;\r\n }\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = model[cb];\r\n }\r\n options = options || {};\r\n options.user = true;\r\n var exps = void 0;\r\n if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\\*/.test(expOrFn)) {\r\n model.$watch(expOrFn, cb, options);\r\n\r\n return [];\r\n }\r\n var watchers = [];\r\n var fns = exps.slice();\r\n var complete = false,\r\n running = false;\r\n var callback = function callback(index, newValue, oldValue, attrs) {\r\n if (complete === true) {\r\n return;\r\n }\r\n fns[index] = true;\r\n if (runBinaryFunction(fns)) {\r\n complete = true;\r\n cb.call(vm, newValue, oldValue, attrs);\r\n }\r\n if (options && options.sync) {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n } else {\r\n if (!running) {\r\n running = true;\r\n nextTick(function () {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n });\r\n }\r\n }\r\n };\r\n _$1.each(exps, function (exp, i) {\r\n if (_$1.has(operators, exp)) {\r\n return;\r\n }\r\n // a.**或a.*形式\r\n if (/^[1-9a-zA-Z.]+(\\*\\*$|\\*$)/.test(exp) || exp === '**') {\r\n var isGlobal = /\\*\\*$/.test(exp);\r\n if (isGlobal) {\r\n // a.**的形式\r\n exp = exp.replace('.**', '');\r\n } else {\r\n // a.*的形式\r\n exp = exp.replace('.*', '');\r\n }\r\n var getter = isGlobal ? exp : function () {\r\n var result = {};\r\n _$1.each(model.model, function (v, key) {\r\n if (key in $$skipArray) return;\r\n result[key] = v;\r\n });\r\n\r\n return result;\r\n };\r\n model.$watch(getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, _$1.extend(options, {\r\n deep: isGlobal\r\n }));\r\n\r\n return;\r\n }\r\n if (/\\*\\*$|\\*$/.test(exp)) {\r\n throw new Error('not support');\r\n }\r\n // 其他含有*的情况,如*.a,*.*.a,a.*.a\r\n if (/\\*/.test(exp)) {\r\n // 先获取到能获取到的对象\r\n var paths = exp.split('.');\r\n var _getter = function _getter() {\r\n var currentModels = {\r\n root: model.model\r\n };\r\n\r\n var _loop = function _loop(len, _i) {\r\n var models = {};\r\n if (paths[_i] === '*') {\r\n _$1.each(currentModels, function (model, key) {\r\n _$1.each(model, function (v, k) {\r\n if (key + k in $$skipArray) return;\r\n models[key + k] = v;\r\n });\r\n });\r\n } else {\r\n _$1.each(currentModels, function (model, key) {\r\n if (key + paths[_i] in $$skipArray) return;\r\n models[key + paths[_i]] = model[paths[_i]];\r\n });\r\n }\r\n currentModels = models;\r\n };\r\n\r\n for (var _i = 0, len = paths.length; _i < len; _i++) {\r\n _loop(len, _i);\r\n }\r\n\r\n return currentModels;\r\n };\r\n model.$watch(_getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n\r\n return;\r\n }\r\n model.$watch(exp, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n });\r\n\r\n return watchers;\r\n }\r\n\r\n var allModelInstances = {};\r\n var allDefineModelInstances = {};\r\n var emptyFn = function emptyFn() {};\r\n var TTL = 10;\r\n\r\n var Watcher = function () {\r\n function Watcher(_ref) {\r\n var get = _ref.get,\r\n last = _ref.last,\r\n listener = _ref.listener,\r\n sync = _ref.sync,\r\n deep = _ref.deep,\r\n id = _ref.id;\r\n\r\n _classCallCheck(this, Watcher);\r\n\r\n this.id = id;\r\n this.get = get;\r\n this.last = cloneShadow(last);\r\n this.listener = listener || emptyFn;\r\n this.sync = sync || false;\r\n\r\n return {\r\n id: this.id,\r\n get: this.get,\r\n last: this.last,\r\n listener: this.listener\r\n };\r\n }\r\n\r\n // 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错\r\n\r\n\r\n Watcher.prototype.getInstance = function getInstance() {\r\n return this;\r\n };\r\n\r\n return Watcher;\r\n }();\r\n\r\n function initState(vm, state) {\r\n var watchers = vm._stateWatchers = {};\r\n for (var key in state) {\r\n vm.model[key] = state[key];\r\n }\r\n // state暂不支持func和context\r\n\r\n var _loop2 = function _loop2(_key2) {\r\n var userDef = state[_key2];\r\n\r\n watchers[_key2] = new Watcher({\r\n id: vm._modelHashId + '-' + _key2,\r\n get: function get() {\r\n return vm.model[_key2];\r\n },\r\n last: userDef,\r\n listener: vm.options.defaultCallback || emptyFn\r\n });\r\n };\r\n\r\n for (var _key2 in state) {\r\n _loop2(_key2);\r\n }\r\n }\r\n\r\n function initComputed(vm, computed) {\r\n var watchers = vm._computedWatchers = {};\r\n var order = vm._computedOrder = [];\r\n\r\n for (var key in computed) {\r\n var userDef = computed[key],\r\n context = vm;\r\n\r\n order.push(key);\r\n\r\n watchers[key] = new Watcher({\r\n id: vm._modelHashId + '-' + key,\r\n get: _$1.bind(userDef, context),\r\n last: undefined,\r\n listener: emptyFn\r\n });\r\n }\r\n }\r\n\r\n function initWatch(vm, watchObj) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var expOrFn in watchObj) {\r\n var handler = watchObj[expOrFn];\r\n if (_$1.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n watch(vm, expOrFn, handler[i]);\r\n }\r\n } else {\r\n watch(vm, expOrFn, handler);\r\n }\r\n }\r\n }\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function createWatcher(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = vm[cb];\r\n }\r\n var getter = _$1.isFunction(expOrFn) ? _$1.bind(expOrFn, vm) : _$1.bind(function () {\r\n return parsePath('model.' + expOrFn)(vm);\r\n }, vm);\r\n\r\n return new Watcher({\r\n get: getter,\r\n listener: _$1.bind(cb, vm),\r\n last: getter(),\r\n sync: options.sync,\r\n deep: options.deep,\r\n id: options.id\r\n });\r\n }\r\n\r\n function injectMethod(method, vm) {\r\n return function () {\r\n var result = method.apply(vm, [].concat(Array.prototype.slice.call(arguments)));\r\n // 有回调的函数不作处理,拦截ajax请求\r\n vm.$digest();\r\n\r\n return result;\r\n };\r\n }\r\n\r\n function initMethods(vm, methods) {\r\n for (var key in methods) {\r\n vm[key] = methods[key] == null ? noop : injectMethod(methods[key], vm);\r\n }\r\n }\r\n\r\n function initMixins(vm) {\r\n var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\r\n\r\n _$1.each(mixins.reverse(), function (mixinType) {\r\n var mixin$$1 = getMixins(mixinType);\r\n\r\n for (var key in mixin$$1) {\r\n if (typeof mixin$$1[key] !== 'function') continue;\r\n\r\n if (_$1.has(vm, key)) continue;\r\n\r\n vm[key] = injectMethod(mixin$$1[key], vm);\r\n }\r\n });\r\n }\r\n\r\n function defineContext(vm, keys) {\r\n var watchers = vm._contextWatchers = {};\r\n\r\n // 相关context挂上别的model中的修改监听\r\n function getSingleContext(key) {\r\n var p = vm._parent;\r\n while (p) {\r\n if (p.childContext && p.childContext.indexOf(key) > -1) {\r\n p.$watch(key, function (cur, last, p) {\r\n if (!vm._contextWatchers[key]) return;\r\n vm.model[key] = cur;\r\n vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)\r\n vm.$digest();\r\n }, {\r\n id: vm._modelHashId + '-' + key\r\n });\r\n\r\n return {\r\n p: p,\r\n value: p.model[key]\r\n };\r\n }\r\n p = p._parent;\r\n }\r\n }\r\n\r\n _$1.each(keys, function (key) {\r\n var context = getSingleContext(key);\r\n if (!context) return;\r\n vm.model[key] = context.p ? context.p.model[key] : undefined;\r\n watchers[key] = new Watcher({\r\n id: context.p._modelHashId + '-' + key,\r\n get: function get() {\r\n return vm.model[key];\r\n },\r\n last: vm.model[key],\r\n listener: _$1.bind(function (c) {\r\n context.p.model[key] = c;\r\n // context.p.model[key] = vm.model[key];\r\n context.p.$digest();\r\n }, context.p)\r\n });\r\n });\r\n }\r\n\r\n function digestState(vm) {\r\n var dirty = false;\r\n _$1.each(vm._stateWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digestComputed(vm) {\r\n var dirty = false;\r\n var dirtyQueue = [],\r\n cleanQueue = [];\r\n\r\n _$1.each(vm._computedOrder, function (key) {\r\n var watcher = vm._computedWatchers[key];\r\n\r\n try {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n watcher.last = cloneShadow(cur);\r\n } else {\r\n cleanQueue.push(key);\r\n }\r\n } catch (err) {\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n }\r\n });\r\n\r\n vm._computedOrder = [].concat(cleanQueue, dirtyQueue);\r\n\r\n return dirty;\r\n }\r\n\r\n function digestContext(vm) {\r\n var dirty = false;\r\n _$1.each(vm._contextWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n var listener = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n vm.contextListeners.push(listener);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digest(vm) {\r\n var stateDirty = true,\r\n contextDirty = true,\r\n computedDirty = true;\r\n for (var ttl = TTL; stateDirty && ttl > 0; ttl--) {\r\n stateDirty = digestState(vm);\r\n }\r\n for (var _ttl = TTL; contextDirty && _ttl > 0; _ttl--) {\r\n contextDirty = digestContext(vm);\r\n }\r\n for (var _ttl2 = TTL; computedDirty && _ttl2 > 0; _ttl2--) {\r\n computedDirty = digestComputed(vm);\r\n }\r\n }\r\n\r\n var nextListener = function () {\r\n var callbackMap = {};\r\n\r\n return function queueNextListener(listener, ctx) {\r\n var id = listener.id;\r\n var cb = listener.cb;\r\n if (id && callbackMap[id]) {\r\n return;\r\n }\r\n nextTick(function () {\r\n cb();\r\n callbackMap[id] = false;\r\n }, ctx);\r\n callbackMap[id] = true;\r\n };\r\n }();\r\n\r\n function executeWatchListeners(vm) {\r\n var syncListeners = [].concat(vm.syncListeners || []);\r\n var asyncListeners = [].concat(vm.asyncListeners || []);\r\n var contextListeners = [].concat(vm.contextListeners || []);\r\n\r\n vm.asyncListeners = [];\r\n vm.syncListeners = [];\r\n\r\n var watchers = [].concat(vm._watchers);\r\n\r\n _$1.each(watchers, function (watcher) {\r\n if (!watcher) return;\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n\r\n if (isShadowEqual(cur, last)) return;\r\n\r\n var listner = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n\r\n watcher.sync === true ? syncListeners.push(listner) : asyncListeners.push(listner);\r\n\r\n watcher.last = cloneShadow(cur);\r\n });\r\n\r\n _$1.each(syncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n if (contextListeners.length !== 0 || asyncListeners.length !== 0) {\r\n nextTick(function () {\r\n _$1.each(BI.uniqBy(contextListeners.reverse(), \"id\").reverse(), function (listener) {\r\n listener.cb();\r\n });\r\n _$1.each(asyncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n });\r\n }\r\n }\r\n\r\n function refreshAllDefineModel() {\r\n _$1.each(allDefineModelInstances, function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n var Model = function () {\r\n function Model() {\r\n _classCallCheck(this, Model);\r\n }\r\n\r\n Model.prototype._constructor = function _constructor(model) {\r\n this.alive = true;\r\n this.options = model || {};\r\n this.model = {\r\n $vm: this\r\n };\r\n this._modelHashId = makeHashCode('model');\r\n this.syncListeners = [];\r\n this.asyncListeners = [];\r\n this.contextListeners = [];\r\n\r\n this._parent = Model.target;\r\n var state = _$1.isFunction(this.state) ? this.state() : this.state;\r\n var computed = this.computed;\r\n // Todo\r\n var context = this.context;\r\n var childContext = this.childContext;\r\n var watch$$1 = this.watch;\r\n var actions = this.actions;\r\n var mixins = this.mixins;\r\n\r\n context && defineContext(this, context);\r\n\r\n initMixins(this, mixins);\r\n this.init();\r\n initState(this, state);\r\n initComputed(this, computed);\r\n digest(this);\r\n initWatch(this, watch$$1);\r\n initMethods(this, actions);\r\n this.created && this.created();\r\n allModelInstances[this._modelHashId] = this;\r\n };\r\n\r\n Model.prototype._init = function _init() {};\r\n\r\n Model.prototype.init = function init() {\r\n this._init();\r\n };\r\n\r\n Model.prototype.destroy = function destroy() {\r\n this.alive = false;\r\n allModelInstances[this._modelHashId] = null;\r\n this._watchers && (this._watchers = []);\r\n this._computedWatchers && (this._computedWatchers = []);\r\n this._stateWatchers && (this._stateWatchers = []);\r\n this._contextWatchers && (this._contextWatchers = []);\r\n this.destroyed && this.destroyed();\r\n };\r\n\r\n Model.prototype.$watch = function $watch(expOrFn, cb, options) {\r\n var watcher = createWatcher(this, expOrFn, cb, options);\r\n this._watchers.push(watcher);\r\n };\r\n\r\n Model.prototype.$digest = function $digest() {\r\n digest(this);\r\n\r\n executeWatchListeners(this);\r\n\r\n // 非define创建的model$digest触发所有define定义的model的$digest(未来需要平台去除这些写法))\r\n if (!this.options.define) {\r\n refreshAllDefineModel();\r\n }\r\n };\r\n\r\n Model.prototype.getModelID = function getModelID() {\r\n return this._modelHashId;\r\n };\r\n\r\n return Model;\r\n }();\r\n\r\n function getAllModelInstances() {\r\n return allModelInstances;\r\n }\r\n\r\n function refreshAll() {\r\n _$1.each(getAllModelInstances(), function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n function define(model) {\r\n var OB = inherit(Model, {\r\n state: function state() {\r\n return model;\r\n }\r\n });\r\n var ob = new OB();\r\n ob._constructor({\r\n define: true\r\n });\r\n allDefineModelInstances[ob.getModelID()] = ob;\r\n\r\n return ob.model;\r\n }\r\n\r\n var version = '2.0';\r\n\r\n exports.version = version;\r\n exports.$$skipArray = $$skipArray;\r\n exports.mixin = mixin;\r\n exports.toJSON = toJSON;\r\n exports.nextListener = nextListener;\r\n exports.Model = Model;\r\n exports.getAllModelInstances = getAllModelInstances;\r\n exports.refreshAll = refreshAll;\r\n exports.define = define;\r\n exports.inherit = inherit;\r\n exports.watch = watch;\r\n\r\n exports.__esModule = true;\r\n});/* !\r\n * jQuery Mousewheel 3.1.13\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n */\r\n\r\n(function (factory) {\r\n if ( typeof define === \"function\" && define.amd ) {\r\n // AMD. Register as an anonymous module.\r\n define([\"../core/jquery\"], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS style for Browserify\r\n module.exports = factory;\r\n } else {\r\n // Browser globals\r\n factory(BI.jQuery);\r\n }\r\n}(function ($) {\r\n\r\n var toFix = [\"wheel\", \"mousewheel\", \"DOMMouseScroll\", \"MozMousePixelScroll\"],\r\n toBind = ( \"onwheel\" in document || document.documentMode >= 9 ) ?\r\n [\"wheel\"] : [\"mousewheel\", \"DomMouseScroll\", \"MozMousePixelScroll\"],\r\n slice = Array.prototype.slice,\r\n nullLowestDeltaTimeout, lowestDelta;\r\n\r\n if ( $.event.fixHooks ) {\r\n for ( var i = toFix.length; i; ) {\r\n $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\r\n }\r\n }\r\n\r\n var special = $.event.special.mousewheel = {\r\n version: \"3.1.12\",\r\n\r\n setup: function () {\r\n if ( this.addEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.addEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = handler;\r\n }\r\n },\r\n\r\n teardown: function () {\r\n if ( this.removeEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.removeEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = null;\r\n }\r\n },\r\n\r\n settings: {\r\n adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\r\n normalizeOffset: true // calls getBoundingClientRect for each event\r\n }\r\n };\r\n\r\n $.fn.extend({\r\n mousewheel: function (fn) {\r\n return fn ? this.bind(\"mousewheel\", fn) : this.trigger(\"mousewheel\");\r\n },\r\n\r\n unmousewheel: function (fn) {\r\n return this.unbind(\"mousewheel\", fn);\r\n }\r\n });\r\n\r\n\r\n function handler (event) {\r\n var orgEvent = event || _global.event,\r\n args = slice.call(arguments, 1),\r\n delta = 0,\r\n deltaX = 0,\r\n deltaY = 0,\r\n absDelta = 0,\r\n offsetX = 0,\r\n offsetY = 0;\r\n event = $.event.fix(orgEvent);\r\n event.type = \"mousewheel\";\r\n\r\n // Old school scrollwheel delta\r\n if ( \"detail\" in orgEvent ) { deltaY = orgEvent.detail * -1; }\r\n if ( \"wheelDelta\" in orgEvent ) { deltaY = orgEvent.wheelDelta; }\r\n if ( \"wheelDeltaY\" in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }\r\n if ( \"wheelDeltaX\" in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\r\n\r\n // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\r\n if ( \"axis\" in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\r\n deltaX = deltaY * -1;\r\n deltaY = 0;\r\n }\r\n\r\n // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\r\n delta = deltaY === 0 ? deltaX : deltaY;\r\n\r\n // New school wheel delta (wheel event)\r\n if ( \"deltaY\" in orgEvent ) {\r\n deltaY = orgEvent.deltaY * -1;\r\n delta = deltaY;\r\n }\r\n if ( \"deltaX\" in orgEvent ) {\r\n deltaX = orgEvent.deltaX;\r\n if ( deltaY === 0 ) { delta = deltaX * -1; }\r\n }\r\n\r\n // No change actually happened, no reason to go any further\r\n if ( deltaY === 0 && deltaX === 0 ) { return; }\r\n\r\n // Need to convert lines and pages to pixels if we aren't already in pixels\r\n // There are three delta modes:\r\n // * deltaMode 0 is by pixels, nothing to do\r\n // * deltaMode 1 is by lines\r\n // * deltaMode 2 is by pages\r\n if ( orgEvent.deltaMode === 1 ) {\r\n var lineHeight = 40;\r\n delta *= lineHeight;\r\n deltaY *= lineHeight;\r\n deltaX *= lineHeight;\r\n } else if ( orgEvent.deltaMode === 2 ) {\r\n var pageHeight = 800;\r\n delta *= pageHeight;\r\n deltaY *= pageHeight;\r\n deltaX *= pageHeight;\r\n }\r\n\r\n // Store lowest absolute delta to normalize the delta values\r\n absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\r\n\r\n if ( !lowestDelta || absDelta < lowestDelta ) {\r\n lowestDelta = absDelta;\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n lowestDelta /= 40;\r\n }\r\n }\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n // Divide all the things by 40!\r\n delta /= 40;\r\n deltaX /= 40;\r\n deltaY /= 40;\r\n }\r\n\r\n // Get a whole, normalized value for the deltas\r\n delta = Math[ delta >= 1 ? \"floor\" : \"ceil\" ](delta / lowestDelta);\r\n deltaX = Math[ deltaX >= 1 ? \"floor\" : \"ceil\" ](deltaX / lowestDelta);\r\n deltaY = Math[ deltaY >= 1 ? \"floor\" : \"ceil\" ](deltaY / lowestDelta);\r\n\r\n // Normalise offsetX and offsetY properties\r\n if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\r\n var boundingRect = this.getBoundingClientRect();\r\n offsetX = event.clientX - boundingRect.left;\r\n offsetY = event.clientY - boundingRect.top;\r\n }\r\n\r\n // Add information to the event object\r\n event.deltaX = deltaX;\r\n event.deltaY = deltaY;\r\n event.deltaFactor = lowestDelta;\r\n event.offsetX = offsetX;\r\n event.offsetY = offsetY;\r\n // Go ahead and set deltaMode to 0 since we converted to pixels\r\n // Although this is a little odd since we overwrite the deltaX/Y\r\n // properties with normalized deltas.\r\n event.deltaMode = 0;\r\n\r\n // Add event and delta to the front of the arguments\r\n args.unshift(event, delta, deltaX, deltaY);\r\n\r\n // Clearout lowestDelta after sometime to better\r\n // handle multiple device types that give different\r\n // a different lowestDelta\r\n // Ex: trackpad = 3 and mouse wheel = 120\r\n if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\r\n nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\r\n\r\n return ($.event.dispatch || $.event.handle).apply(this, args);\r\n }\r\n\r\n function nullLowestDelta () {\r\n lowestDelta = null;\r\n }\r\n\r\n function shouldAdjustOldDeltas (orgEvent, absDelta) {\r\n // If this is an older event and the delta is divisable by 120,\r\n // then we are assuming that the browser is treating this as an\r\n // older mouse wheel event and that we should divide the deltas\r\n // by 40 to try and get a more usable deltaFactor.\r\n // Side note, this actually impacts the reported scroll distance\r\n // in older browsers and can cause scrolling to be slower than native.\r\n // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\r\n return special.settings.adjustOldDeltas && orgEvent.type === \"mousewheel\" && absDelta % 120 === 0;\r\n }\r\n\r\n}));/**\r\n * 当没有元素时有提示信息的view\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.Pane\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Pane = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-pane\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n overlap: true,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _assertTip: function () {\r\n var o = this.options;\r\n if (!this._tipText) {\r\n this._tipText = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-tips\",\r\n text: o.tipText,\r\n height: 25\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n items: [this._tipText]\r\n });\r\n }\r\n },\r\n\r\n loading: function () {\r\n var self = this, o = this.options;\r\n var isIE = BI.isIE();\r\n var loadingAnimation = BI.createWidget({\r\n type: \"bi.horizontal\",\r\n cls: \"bi-loading-widget\" + (isIE ? \" wave-loading hack\" : \"\"),\r\n height: 30,\r\n width: 30,\r\n hgap: 5,\r\n vgap: 2.5,\r\n items: isIE ? [] : [{\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect1\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect2\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect3\",\r\n height: 25,\r\n width: 3\r\n }]\r\n });\r\n // pane在同步方式下由items决定tipText的显示与否\r\n // loading的异步情况下由loaded后对面板的populate的时机决定\r\n this.setTipVisible(false);\r\n if (o.overlap === true) {\r\n if (!BI.Layers.has(this.getName())) {\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n cls: \"loading-container\",\r\n items: [{\r\n el: loadingAnimation\r\n }],\r\n element: BI.Layers.make(this.getName(), this)\r\n });\r\n }\r\n BI.Layers.show(self.getName());\r\n } else if (BI.isNull(this._loading)) {\r\n this._loading = loadingAnimation;\r\n this._loading.element.css(\"zIndex\", 1);\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n cls: \"loading-container\",\r\n items: [{\r\n el: this._loading,\r\n left: 0,\r\n right: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n this.element.addClass(\"loading-status\");\r\n },\r\n\r\n loaded: function () {\r\n var self = this, o = this.options;\r\n BI.Layers.remove(self.getName());\r\n this._loading && this._loading.destroy();\r\n this._loading && (this._loading = null);\r\n o.onLoaded();\r\n self.fireEvent(BI.Pane.EVENT_LOADED);\r\n this.element.removeClass(\"loading-status\");\r\n },\r\n\r\n check: function () {\r\n this.setTipVisible(BI.isEmpty(this.options.items));\r\n },\r\n\r\n setTipVisible: function (b) {\r\n if (b === true) {\r\n this._assertTip();\r\n this._tipText.setVisible(true);\r\n } else {\r\n this._tipText && this._tipText.setVisible(false);\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items || [];\r\n this.check();\r\n },\r\n\r\n empty: function () {\r\n\r\n }\r\n});\r\nBI.Pane.EVENT_LOADED = \"EVENT_LOADED\";/**\r\n * guy\r\n * 这仅仅只是一个超类, 所有简单控件的基类\r\n * 1、类的控制,\r\n * 2、title的控制\r\n * 3、文字超过边界显示3个点\r\n * 4、cursor默认pointor\r\n * @class BI.Single\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Single = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-single\",\r\n readonly: false,\r\n title: null,\r\n warningTitle: null,\r\n tipType: null, // success或warning\r\n value: null,\r\n belowMouse: false // title是否跟随鼠标\r\n });\r\n },\r\n\r\n _showToolTip: function (e, opt) {\r\n opt || (opt = {});\r\n var self = this, o = this.options;\r\n var type = this.getTipType() || (this.isEnabled() ? \"success\" : \"warning\");\r\n var title = type === \"success\" ? this.getTitle() : (this.getWarningTitle() || this.getTitle());\r\n if (BI.isKey(title)) {\r\n BI.Tooltips.show(e, this.getName(), title, type, this, opt);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"hover\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"hover\", o, this);\r\n }\r\n },\r\n\r\n _hideTooltip: function () {\r\n var self = this;\r\n var tooltip = BI.Tooltips.get(this.getName());\r\n if (BI.isNotNull(tooltip)) {\r\n tooltip.element.fadeOut(200, function () {\r\n BI.Tooltips.remove(self.getName());\r\n });\r\n }\r\n },\r\n\r\n _init: function () {\r\n BI.Single.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isKey(o.title) || BI.isKey(o.warningTitle)\r\n || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {\r\n this.enableHover({\r\n belowMouse: o.belowMouse,\r\n container: o.container\r\n });\r\n }\r\n },\r\n\r\n _clearTimeOut: function () {\r\n if (BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n if (BI.isNotNull(this.hideTimeout)) {\r\n clearTimeout(this.hideTimeout);\r\n this.hideTimeout = null;\r\n }\r\n },\r\n\r\n enableHover: function (opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n if (!this._hoverBinded) {\r\n this.element.on(\"mouseenter.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (self.getTipType() === \"warning\" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 200);\r\n } else if (self.getTipType() === \"success\" || self.isEnabled()) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 500);\r\n }\r\n });\r\n this.element.on(\"mousemove.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (BI.isNotNull(self.showTimeout)) {\r\n clearTimeout(self.showTimeout);\r\n self.showTimeout = null;\r\n }\r\n if(BI.isNull(self.hideTimeout)) {\r\n self.hideTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n self._hideTooltip();\r\n }\r\n }, 500);\r\n }\r\n\r\n self.showTimeout = BI.delay(function () {\r\n // DEC-5321 IE下如果回调已经进入事件队列,clearTimeout将不会起作用\r\n if (BI.isNotNull(self.showTimeout)) {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n clearTimeout(self.hideTimeout);\r\n self.hideTimeout = null;\r\n }\r\n // CHART-10611 在拖拽的情况下, 鼠标拖拽着元素离开了拖拽元素的容器,但是子元素在dom结构上仍然属于容器\r\n // 这样会认为鼠标仍然在容器中, 500ms内放开的话,会在容器之外显示鼠标停留处显示容器的title\r\n if (self.element.__isMouseInBounds__(self._e || e)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }\r\n }, 500);\r\n\r\n });\r\n this.element.on(\"mouseleave.title\" + this.getName(), function (e) {\r\n self._e = null;\r\n self._clearTimeOut();\r\n self._hideTooltip();\r\n });\r\n this._hoverBinded = true;\r\n }\r\n },\r\n\r\n disabledHover: function () {\r\n // 取消hover事件\r\n this._clearTimeOut();\r\n this._hideTooltip();\r\n this.element.unbind(\"mouseenter.title\" + this.getName())\r\n .unbind(\"mousemove.title\" + this.getName())\r\n .unbind(\"mouseleave.title\" + this.getName());\r\n this._hoverBinded = false;\r\n },\r\n\r\n populate: function (items) {\r\n this.items = items || [];\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n setTitle: function (title, opt) {\r\n this.options.title = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n setWarningTitle: function (title, opt) {\r\n this.options.warningTitle = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n getTipType: function () {\r\n return this.options.tipType;\r\n },\r\n\r\n isReadOnly: function () {\r\n return !!this.options.readonly;\r\n },\r\n\r\n getTitle: function () {\r\n var title = this.options.title;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n getWarningTitle: function () {\r\n var title = this.options.warningTitle;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n setValue: function (val) {\r\n if (!this.options.readonly) {\r\n this.options.value = val;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n _unMount: function () {\r\n BI.Single.superclass._unMount.apply(this, arguments);\r\n if(BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n BI.Tooltips.remove(this.getName());\r\n }\r\n});/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Text\r\n * @extends BI.Single\r\n */\r\nBI.Text = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n py: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: this._getTextWrap(),\r\n textOverflow: o.whiteSpace === \"nowrap\" ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : (BI.isWidthOrHeight(o.height) ? \"auto\" : \"\")\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n var text = this._getShowText();\r\n if (BI.isKey(text)) {\r\n this.setText(text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (BI.isKey(o.keyword)) {\r\n this.doRedMark(o.keyword);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n _getTextWrap: function () {\r\n var o = this.options;\r\n switch (o.whiteSpace) {\r\n case \"nowrap\":\r\n return \"pre\";\r\n case \"normal\":\r\n default:\r\n return \"pre-wrap\";\r\n }\r\n },\r\n\r\n _getShowText: function () {\r\n var o = this.options;\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n },\r\n\r\n\r\n doRedMark: function (keyword) {\r\n var o = this.options;\r\n // render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword\r\n o.keyword = keyword;\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, keyword, o.py);\r\n },\r\n\r\n unRedMark: function () {\r\n var o = this.options;\r\n o.keyword = \"\";\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, \"\", o.py);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Text.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Text.superclass.setText.apply(this, arguments);\r\n // 为textContext赋值为undefined时在ie和edge下会真的显示undefined\r\n this.options.text = BI.isNotNull(text) ? text : \"\";\r\n if (BI.isIE9Below()) {\r\n this.text.element.html(BI.htmlEncode(this._getShowText()));\r\n return;\r\n }\r\n // textContent性能更好,并且原生防xss\r\n this.text.element[0].textContent = this._getShowText();\r\n BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.text\", BI.Text);\r\n/**\r\n * guy\r\n * @class BI.BasicButton\r\n * @extends BI.Single\r\n *\r\n * 一般的button父级\r\n */\r\nBI.BasicButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-basic-button\" + (conf.invalid ? \"\" : \" cursor-pointer\") + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n value: \"\",\r\n text: \"\",\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn,\r\n bubble: null\r\n });\r\n },\r\n _init: function () {\r\n BI.BasicButton.superclass._init.apply(this, arguments);\r\n var opts = this.options;\r\n if (opts.selected === true) {\r\n BI.nextTick(BI.bind(function () {\r\n this.setSelected(opts.selected);\r\n }, this));\r\n }\r\n BI.nextTick(BI.bind(this.bindEvent, this));\r\n\r\n if (opts.shadow) {\r\n this._createShadow();\r\n }\r\n if (opts.level) {\r\n this.element.addClass(\"button-\" + opts.level);\r\n }\r\n },\r\n\r\n _createShadow: function () {\r\n var self = this, o = this.options;\r\n\r\n var assertMask = function () {\r\n if (!self.$mask) {\r\n self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, {\r\n type: \"bi.layout\",\r\n cls: \"bi-button-mask\"\r\n });\r\n self.$mask.invisible();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: self.$mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n }\r\n };\r\n\r\n this.element.mouseup(function () {\r\n if (!self._hover && !o.isShadowShowingOnSelected) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n this.element.on(\"mouseenter.\" + this.getName(), function (e) {\r\n if (self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {\r\n assertMask();\r\n self.$mask.visible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mousemove.\" + this.getName(), function (e) {\r\n if (!self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mouseleave.\" + this.getName(), function () {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n },\r\n\r\n bindEvent: function () {\r\n var self = this;\r\n var o = this.options, hand = this.handle();\r\n if (!hand) {\r\n return;\r\n }\r\n hand = hand.element;\r\n var triggerArr = (o.trigger || \"\").split(\",\");\r\n BI.each(triggerArr, function (idx, trigger) {\r\n switch (trigger) {\r\n case \"mouseup\":\r\n var mouseDown = false;\r\n hand.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n hand.mouseup(function (e) {\r\n if (mouseDown === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n ev(e);\r\n });\r\n break;\r\n case \"mousedown\":\r\n var mouseDown = false;\r\n var selected = false;\r\n hand.mousedown(function (e) {\r\n // if (e.button === 0) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {\r\n // self.setSelected(!self.isSelected());\r\n self._trigger();\r\n }\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (self.isSelected()) {\r\n selected = true;\r\n } else {\r\n clk(e);\r\n }\r\n mouseDown = true;\r\n ev(e);\r\n // }\r\n });\r\n hand.mouseup(function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && mouseDown === true && selected === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n selected = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n break;\r\n case \"dblclick\":\r\n hand.dblclick(clk);\r\n break;\r\n case \"lclick\":\r\n var mouseDown = false;\r\n var interval;\r\n hand.mousedown(function (e) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n interval && clearInterval(interval);\r\n interval = null;\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n interval = setInterval(function () {\r\n if (self.isEnabled()) {\r\n self.doClick();\r\n }\r\n }, 180);\r\n mouseDown = true;\r\n ev(e);\r\n });\r\n break;\r\n default:\r\n if (o.stopEvent || o.stopPropagation) {\r\n hand.mousedown(function (e) {\r\n ev(e);\r\n });\r\n }\r\n hand.click(clk);\r\n break;\r\n }\r\n });\r\n\r\n // 之后的300ms点击无效\r\n var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n\r\n function ev (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n function clk (e) {\r\n ev(e);\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n if (BI.isKey(o.bubble) || BI.isFunction(o.bubble)) {\r\n if (BI.isNull(self.combo)) {\r\n var popup;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: {\r\n type: \"bi.bubble_combo\",\r\n trigger: \"\",\r\n // bubble的提示不需要一直存在在界面上\r\n destroyWhenHide: true,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.layout\",\r\n height: \"100%\"\r\n },\r\n popup: {\r\n type: \"bi.text_bubble_bar_popup_view\",\r\n text: getBubble(),\r\n ref: function () {\r\n popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,\r\n action: function (v) {\r\n self.combo.hideView();\r\n if (v) {\r\n onClick.apply(self, arguments);\r\n }\r\n }\r\n }]\r\n },\r\n listeners: [{\r\n eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n popup.populate(getBubble());\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n return;\r\n }\r\n onClick.apply(self, arguments);\r\n }\r\n\r\n function getBubble () {\r\n var bubble = self.options.bubble;\r\n if (BI.isFunction(bubble)) {\r\n return bubble();\r\n }\r\n return bubble;\r\n }\r\n },\r\n\r\n _trigger: function (e) {\r\n var o = this.options;\r\n if (!this.isEnabled()) {\r\n return;\r\n }\r\n if (!this.isDisableSelected()) {\r\n this.isForceSelected() ? this.setSelected(true) :\r\n (this.isForceNotSelected() ? this.setSelected(false) :\r\n this.setSelected(!this.isSelected()));\r\n }\r\n if (this.isValid()) {\r\n o.handler.call(this, this.getValue(), this, e);\r\n var v = this.getValue();\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);\r\n this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"click\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"click\", o, this);\r\n }\r\n },\r\n\r\n _doClick: function (e) {\r\n if (this.isValid()) {\r\n this.beforeClick(e);\r\n }\r\n this._trigger(e);\r\n if (this.isValid()) {\r\n this.doClick(e);\r\n }\r\n },\r\n\r\n beforeClick: function () {\r\n\r\n },\r\n\r\n doClick: function () {\r\n\r\n },\r\n\r\n handle: function () {\r\n return this;\r\n },\r\n\r\n hover: function () {\r\n this._hover = true;\r\n this.handle().element.addClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(true);\r\n }\r\n },\r\n\r\n dishover: function () {\r\n this._hover = false;\r\n this.handle().element.removeClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n var o = this.options;\r\n o.selected = b;\r\n if (b) {\r\n this.handle().element.addClass(\"active\");\r\n } else {\r\n this.handle().element.removeClass(\"active\");\r\n }\r\n if (o.shadow && !o.isShadowShowingOnSelected) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n isSelected: function () {\r\n return this.options.selected;\r\n },\r\n\r\n isOnce: function () {\r\n return this.options.once;\r\n },\r\n\r\n isForceSelected: function () {\r\n return this.options.forceSelected;\r\n },\r\n\r\n isForceNotSelected: function () {\r\n return this.options.forceNotSelected;\r\n },\r\n\r\n isDisableSelected: function () {\r\n return this.options.disableSelected;\r\n },\r\n\r\n setText: function (text) {\r\n this.options.text = text;\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.BasicButton.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n if (!enable) {\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + this.getName());\r\n BI.BasicButton.superclass.empty.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.BasicButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.BasicButton.EVENT_CHANGE = \"BasicButton.EVENT_CHANGE\";/**\r\n * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.NodeButton\r\n * @extends BI.BasicButton\r\n * @abstract\r\n */\r\nBI.NodeButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-node\",\r\n open: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NodeButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n BI.nextTick(function () {\r\n self.setOpened(self.isOpened());\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.setOpened(!this.isOpened());\r\n },\r\n\r\n isOnce: function () {\r\n return false;\r\n },\r\n\r\n isOpened: function () {\r\n return !!this.options.open;\r\n },\r\n\r\n setOpened: function (b) {\r\n this.options.open = !!b;\r\n },\r\n\r\n triggerCollapse: function () {\r\n if(this.isOpened()) {\r\n this.setOpened(false);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this);\r\n }\r\n },\r\n\r\n triggerExpand: function () {\r\n if(!this.isOpened()) {\r\n this.setOpened(true);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this);\r\n }\r\n }\r\n});/**\r\n * guy\r\n * tip提示\r\n * zIndex在10亿级别\r\n * @class BI.Tip\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Tip = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Tip.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-tip\",\r\n zIndex: BI.zIndex_tip\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Tip.superclass._init.apply(this, arguments);\r\n this.element.css({zIndex: this.options.zIndex});\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n * @class BI.ButtonGroup\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.ButtonGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-group\",\r\n behaviors: {},\r\n items: [],\r\n value: \"\",\r\n chooseType: BI.Selection.Single,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonGroup.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var behaviors = {};\r\n BI.each(o.behaviors, function (key, rule) {\r\n behaviors[key] = BI.BehaviorFactory.createBehavior(key, {\r\n rule: rule\r\n });\r\n });\r\n this.behaviors = behaviors;\r\n this.populate(o.items);\r\n if(BI.isKey(o.value) || BI.isNotEmptyArray(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _createBtns: function (items) {\r\n var o = this.options;\r\n return BI.createWidgets(BI.createItems(items, {\r\n type: \"bi.text_button\"\r\n }));\r\n },\r\n\r\n _btnsCreator: function (items) {\r\n var self = this, args = Array.prototype.slice.call(arguments), o = this.options;\r\n var buttons = this._createBtns(items);\r\n args[0] = buttons;\r\n\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n BI.each(buttons, function (i, btn) {\r\n btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n self.setValue(btn.getValue());\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_NONE:\r\n self.setValue([]);\r\n break;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n btn.on(BI.Events.DESTROY, function () {\r\n BI.remove(self.buttons, btn);\r\n });\r\n });\r\n\r\n return buttons;\r\n },\r\n\r\n _packageBtns: function (btns) {\r\n var o = this.options;\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n btns = BI.map(btns, function (k, it) {\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return btns;\r\n },\r\n\r\n _packageSimpleItems: function (btns) {\r\n var o = this.options;\r\n return BI.map(o.items, function (i, item) {\r\n if (BI.stripEL(item) === item) {\r\n return btns[i];\r\n }\r\n return BI.extend({}, item, {\r\n el: btns[i]\r\n });\r\n });\r\n },\r\n\r\n _packageItems: function (items, packBtns) {\r\n return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n // 如果是一个简单的layout\r\n _isSimpleLayout: function () {\r\n var o = this.options;\r\n return o.layouts.length === 1 && !BI.isArray(o.items[0]);\r\n },\r\n\r\n doBehavior: function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n args.unshift(this.buttons);\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n },\r\n\r\n prependItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(btns, this.buttons);\r\n\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {\r\n this.layouts.prependItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.prependItems(this._packageLayout(items).items);\r\n },\r\n\r\n addItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(this.buttons, btns);\r\n\r\n // 如果是一个简单的layout\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {\r\n this.layouts.addItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.addItems(this._packageLayout(items).items);\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n BI.removeAt(this.buttons, indexes);\r\n this.layouts.removeItemAt(indexes);\r\n },\r\n\r\n removeItems: function (values) {\r\n values = BI.isArray(values) ? values : [values];\r\n var deleted = [];\r\n BI.each(this.buttons, function (i, button) {\r\n if (BI.deepContains(values, button.getValue())) {\r\n deleted.push(i);\r\n }\r\n });\r\n BI.removeAt(this.buttons, deleted);\r\n this.layouts.removeItemAt(deleted);\r\n },\r\n\r\n populate: function (items) {\r\n items = items || [];\r\n this.empty();\r\n this.options.items = items;\r\n\r\n this.buttons = this._btnsCreator.apply(this, arguments);\r\n if (this._isSimpleLayout()) {\r\n items = this._packageSimpleItems(this.buttons);\r\n } else {\r\n items = this._packageItems(items, this._packageBtns(this.buttons));\r\n }\r\n\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(false);\r\n } else {\r\n item.setSelected && item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.buttons;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.buttons;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.options.id === id) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n empty: function () {\r\n BI.ButtonGroup.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.ButtonGroup.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n }\r\n});\r\nBI.extend(BI.ButtonGroup, {\r\n CHOOSE_TYPE_SINGLE: BI.Selection.Single,\r\n CHOOSE_TYPE_MULTI: BI.Selection.Multi,\r\n CHOOSE_TYPE_ALL: BI.Selection.All,\r\n CHOOSE_TYPE_NONE: BI.Selection.None,\r\n CHOOSE_TYPE_DEFAULT: BI.Selection.Default\r\n});\r\nBI.ButtonGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_group\", BI.ButtonGroup);/**\r\n * Created by GUY on 2015/8/10.\r\n * @class BI.ButtonTree\r\n * @extends BI.ButtonGroup\r\n */\r\n\r\nBI.ButtonTree = BI.inherit(BI.ButtonGroup, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-tree\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setNotSelectedValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(false);\r\n } else {\r\n item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.isFunction(item.setEnabledValue)) {\r\n item.setEnabledValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(true);\r\n } else {\r\n item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getNotSelectedValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && !item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getNotSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n // 获取所有的叶子节点\r\n getAllLeaves: function () {\r\n var leaves = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n leaves = leaves.concat(item.getAllLeaves());\r\n return;\r\n }\r\n if (item.isEnabled()) {\r\n leaves.push(item);\r\n }\r\n });\r\n return leaves;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n var vs = item.getValue();\r\n if (item.isEnabled() && (vs === value || BI.contains(vs, value))) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (item.attr(\"id\") === id) {\r\n node = item;\r\n return true;\r\n } else if (BI.isFunction(item.getNodeById)) {\r\n if (node = item.getNodeById(id)) {\r\n return true;\r\n }\r\n }\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (BI.isFunction(item.getNodeByValue)) {\r\n if (node = item.getNodeByValue(value)) {\r\n return true;\r\n }\r\n } else if (item.attr(\"value\") === value) {\r\n node = item;\r\n return true;\r\n }\r\n }\r\n });\r\n return node;\r\n }\r\n});\r\nBI.ButtonTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_tree\", BI.ButtonTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.TreeView\r\n * @extends BI.Pane\r\n */\r\nBI.TreeView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-tree\",\r\n paras: {\r\n selectedValues: {}\r\n },\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this._stop = false;\r\n\r\n this._createTree();\r\n this.tip = BI.createWidget({\r\n type: \"bi.loading_bar\",\r\n invisible: true,\r\n handler: BI.bind(this._loadMore, this)\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrollable: true,\r\n scrolly: false,\r\n element: this,\r\n items: [this.tip]\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setSelectedValue(o.value);\r\n }\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n },\r\n\r\n _createTree: function () {\r\n this.id = \"bi-tree\" + BI.UUID();\r\n if (this.nodes) {\r\n this.nodes.destroy();\r\n }\r\n if (this.tree) {\r\n this.tree.destroy();\r\n }\r\n this.tree = BI.createWidget({\r\n type: \"bi.layout\",\r\n element: \"<ul id='\" + this.id + \"' class='ztree'></ul>\"\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this.element,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n // 选择节点触发方法\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this);\r\n this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: true,\r\n url: getUrl,\r\n autoParam: [\"id\", \"name\"], // 节点展开异步请求自动提交id和name\r\n otherParam: BI.cjkEncodeDO(paras) // 静态参数\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\" // 节点的name属性替换成text\r\n },\r\n simpleData: {\r\n enable: true // 可以穿id,pid属性的对象数组\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true, // 节点可以用html标签代替\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeExpand: beforeExpand,\r\n onAsyncSuccess: onAsyncSuccess,\r\n onAsyncError: onAsyncError,\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n var className = \"dark\", perTime = 100;\r\n\r\n function onClick (event, treeId, treeNode) {\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if(status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n // 更新此node的check状态, 影响父子关联,并调用beforeCheck和onCheck回调\r\n self.nodes.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function getUrl (treeId, treeNode) {\r\n var parentNode = self._getParentValues(treeNode);\r\n treeNode.times = treeNode.times || 1;\r\n var param = \"id=\" + treeNode.id\r\n + \"×=\" + (treeNode.times++)\r\n + \"&parentValues= \" + _global.encodeURIComponent(BI.jsonEncode(parentNode))\r\n + \"&checkState=\" + _global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus()));\r\n\r\n return \"&\" + param;\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n if (!treeNode.isAjaxing) {\r\n if (!treeNode.children) {\r\n treeNode.times = 1;\r\n ajaxGetNodes(treeNode, \"refresh\");\r\n }\r\n return true;\r\n }\r\n BI.Msg.toast(\"Please Wait。\", \"warning\"); // 不展开节点,也不触发onExpand事件\r\n return false;\r\n\r\n }\r\n\r\n function onAsyncSuccess (event, treeId, treeNode, msg) {\r\n treeNode.halfCheck = false;\r\n if (!msg || msg.length === 0 || /^<html>[\\s,\\S]*<\\/html>$/gi.test(msg) || self._stop) {\r\n return;\r\n }\r\n var zTree = self.nodes;\r\n var totalCount = treeNode.count || 0;\r\n\r\n // 尝试去获取下一组节点,若获取值为空数组,表示获取完成\r\n // TODO by GUY\r\n if (treeNode.children.length > totalCount) {\r\n treeNode.count = treeNode.children.length;\r\n BI.delay(function () {\r\n ajaxGetNodes(treeNode);\r\n }, perTime);\r\n } else {\r\n // treeNode.icon = \"\";\r\n zTree.updateNode(treeNode);\r\n zTree.selectNode(treeNode.children[0]);\r\n // className = (className === \"dark\" ? \"\":\"dark\");\r\n }\r\n }\r\n\r\n function onAsyncError (event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {\r\n var zTree = self.nodes;\r\n BI.Msg.toast(\"Error!\", \"warning\");\r\n // treeNode.icon = \"\";\r\n // zTree.updateNode(treeNode);\r\n }\r\n\r\n function ajaxGetNodes (treeNode, reloadType) {\r\n var zTree = self.nodes;\r\n if (reloadType == \"refresh\") {\r\n zTree.updateNode(treeNode); // 刷新一下当前节点,如果treeNode.xxx被改了的话\r\n }\r\n zTree.reAsyncChildNodes(treeNode, reloadType, true); // 强制加载子节点,reloadType === refresh为先清空再加载,否则为追加到现有子节点之后\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n if (ch.halfCheck === true) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n }\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n var treeObj = self.nodes;\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.$.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if(status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _getParentValues: function (treeNode) {\r\n if (!treeNode.getParentNode()) {\r\n return [];\r\n }\r\n var parentNode = treeNode.getParentNode();\r\n var result = this._getParentValues(parentNode);\r\n result = result.concat([this._getNodeValue(parentNode)]);\r\n return result;\r\n },\r\n\r\n _getNodeValue: function (node) {\r\n // 去除标红\r\n return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, \"\"), \" \", \" \") : node.value;\r\n },\r\n\r\n // 获取半选框值\r\n _getHalfSelectedValues: function (map, node) {\r\n var self = this;\r\n var checkState = node.getCheckStatus();\r\n // 将未选的去掉\r\n if (checkState.checked === false && checkState.half === false) {\r\n return;\r\n }\r\n // 如果节点已展开,并且是半选\r\n if (BI.isNotEmptyArray(node.children) && checkState.half === true) {\r\n var children = node.children;\r\n BI.each(children, function (i, ch) {\r\n self._getHalfSelectedValues(map, ch);\r\n });\r\n return;\r\n }\r\n var parent = node.parentValues || self._getParentValues(node);\r\n var path = parent.concat(this._getNodeValue(node));\r\n // 当前节点是全选的,因为上面的判断已经排除了不选和半选\r\n if (BI.isNotEmptyArray(node.children) || checkState.half === false) {\r\n this._buildTree(map, path);\r\n return;\r\n }\r\n // 剩下的就是半选不展开的节点,因为不知道里面是什么情况,所以借助selectedValues(这个是完整的选中情况)\r\n var storeValues = BI.deepClone(this.options.paras.selectedValues);\r\n var treeNode = this._getTree(storeValues, path);\r\n this._addTreeNode(map, parent, this._getNodeValue(node), treeNode);\r\n },\r\n\r\n // 获取的是以values最后一个节点为根的子树\r\n _getTree: function (map, values) {\r\n var cur = map;\r\n BI.any(values, function (i, value) {\r\n if (cur[value] == null) {\r\n return true;\r\n }\r\n cur = cur[value];\r\n });\r\n return cur;\r\n },\r\n\r\n // 以values为path一路向里补充map, 并在末尾节点添加key: value节点\r\n _addTreeNode: function (map, values, key, value) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n cur[key] = value;\r\n },\r\n\r\n // 构造树节点\r\n _buildTree: function (map, values) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n },\r\n\r\n // 获取选中的值\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots); // 可以看到这个方法没有递归调用,所以在_getHalfSelectedValues中需要关心全选的节点\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === true || checkState.half === true) {\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n } else {\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n }\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n // 处理节点\r\n _dealWidthNodes: function (nodes) {\r\n var self = this, o = this.options;\r\n var ns = BI.Tree.arrayFormat(nodes);\r\n BI.each(ns, function (i, n) {\r\n n.title = n.title || n.text || n.value;\r\n n.isParent = n.isParent || n.parent;\r\n // 处理标红\r\n if (BI.isKey(o.paras.keyword)) {\r\n n.text = BI.$(\"<div>\").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();\r\n } else {\r\n n.text = BI.htmlEncode(n.text + \"\");\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n this.tip.setLoading();\r\n var op = BI.extend({}, o.paras, {\r\n times: ++this.times\r\n });\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n // 生成树内部方法\r\n _initTree: function (setting) {\r\n var self = this, o = this.options;\r\n self.fireEvent(BI.Events.INIT);\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n this.loading();\r\n this.tip.setVisible(false);\r\n var callback = function (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n };\r\n var op = BI.extend({}, o.paras, {\r\n times: 1\r\n });\r\n\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes));\r\n }\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n op.times === 1 && self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes, setting) {\r\n var setting = setting || {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true\r\n },\r\n callback: {}\r\n };\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n start: function () {\r\n this._stop = false;\r\n },\r\n\r\n stop: function () {\r\n this._stop = true;\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._createTree();\r\n this.start();\r\n this._initTree(setting);\r\n },\r\n\r\n populate: function () {\r\n this.stroke.apply(this, arguments);\r\n },\r\n\r\n hasChecked: function () {\r\n var treeObj = this.nodes;\r\n return treeObj.getCheckedNodes(true).length > 0;\r\n },\r\n\r\n checkAll: function (checked) {\r\n function setNode (children) {\r\n BI.each(children, function (i, child) {\r\n child.halfCheck = false;\r\n setNode(child.children);\r\n });\r\n }\r\n\r\n if (!this.nodes) {\r\n return;\r\n }\r\n\r\n BI.each(this.nodes.getNodes(), function (i, node) {\r\n node.halfCheck = false;\r\n setNode(node.children);\r\n });\r\n this.nodes.checkAllNodes(checked);\r\n },\r\n\r\n expandAll: function (flag) {\r\n this.nodes && this.nodes.expandAll(flag);\r\n },\r\n\r\n // 设置树节点的状态\r\n setValue: function (value, param) {\r\n this.checkAll(false);\r\n this.updateValue(value, param);\r\n this.refresh();\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = BI.deepClone(value || {});\r\n },\r\n\r\n updateValue: function (values, param) {\r\n if (!this.nodes) {\r\n return;\r\n }\r\n param || (param = \"value\");\r\n var treeObj = this.nodes;\r\n BI.each(values, function (v, op) {\r\n var nodes = treeObj.getNodesByParam(param, v, null);\r\n BI.each(nodes, function (j, node) {\r\n BI.extend(node, {checked: true}, op);\r\n treeObj.updateNode(node);\r\n });\r\n });\r\n },\r\n\r\n refresh: function () {\r\n this.nodes && this.nodes.refresh();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.nodes) {\r\n return null;\r\n }\r\n return this._getSelectedValues();\r\n },\r\n\r\n destroyed: function () {\r\n this.stop();\r\n this.nodes && this.nodes.destroy();\r\n }\r\n});\r\nBI.extend(BI.TreeView, {\r\n REQ_TYPE_INIT_DATA: 1,\r\n REQ_TYPE_ADJUST_DATA: 2,\r\n REQ_TYPE_SELECT_DATA: 3,\r\n REQ_TYPE_GET_SELECTED_DATA: 4\r\n});\r\n\r\nBI.TreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TreeView.EVENT_INIT = BI.Events.INIT;\r\nBI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT;\r\n\r\nBI.shortcut(\"bi.tree_view\", BI.TreeView);/**\r\n * guy\r\n * 同步树\r\n * @class BI.AsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.AsyncTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.AsyncTree.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.service = new BI.TreeRenderPageService({\r\n subNodeListGetter: function (tId) {\r\n // 获取待检测的子节点列表, ztree并没有获取节点列表dom的API, 此处使用BI.$获取\r\n return BI.$(\"#\" + self.id + \" #\" + tId + \"_ul\");\r\n }\r\n });\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if (status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n\r\n var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if (status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 用来更新this.options.paras.selectedValues, 和ztree内部无关\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n // var values = parentValues.concat([name]);\r\n if (treeNode.checked === true) {\r\n this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});\r\n } else {\r\n var tNode = treeNode;\r\n var pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n if (BI.isNotNull(pNode[name])) {\r\n delete pNode[name];\r\n }\r\n while (tNode != null && BI.isEmpty(pNode)) {\r\n parentValues = parentValues.slice(0, parentValues.length - 1);\r\n tNode = tNode.getParentNode();\r\n if (tNode != null) {\r\n pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n name = this._getNodeValue(tNode);\r\n delete pNode[name];\r\n }\r\n }\r\n this.options.paras.selectedValues = this._getJoinValue();\r\n }\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n\r\n function callback(nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n if (hasNext) {\r\n self.service.pushNodeList(treeNode.tId, getNodes);\r\n } else {\r\n self.service.removeNodeList(treeNode.tId);\r\n }\r\n\r\n }\r\n\r\n function getNodes(options) {\r\n // console.log(times);\r\n options = options || {};\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: options.times,\r\n parentValues: parentValues.concat(self._getNodeValue(treeNode)),\r\n checkState: treeNode.getCheckStatus()\r\n }, options);\r\n o.itemsCreator(op, complete);\r\n }\r\n\r\n // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置\r\n var checkState = treeNode.getCheckStatus();\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n getNodes({\r\n times: 1,\r\n checkState: checkState\r\n });\r\n }, 17);\r\n }\r\n },\r\n\r\n // a,b 两棵树\r\n // a->b b->a 做两次校验, 构造一个校验后的map\r\n // e.g. 以a为基准,如果b没有此节点,则在map中添加。 如b有,且是全选的, 则在map中构造全选(为什么不添加a的值呢? 因为这次是取并集), 如果b中也有和a一样的存值,就递归\r\n _join: function (valueA, valueB) {\r\n var self = this;\r\n var map = {};\r\n track([], valueA, valueB);\r\n track([], valueB, valueA);\r\n\r\n function track (parent, node, compare) {\r\n BI.each(node, function (n, item) {\r\n if (BI.isNull(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else if (BI.isEmpty(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else {\r\n track(parent.concat([n]), node[n], compare[n]);\r\n }\r\n });\r\n }\r\n\r\n return map;\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n _getJoinValue: function () {\r\n if (!this.nodes) {\r\n return {};\r\n }\r\n var checkedValues = this._getSelectedValues();\r\n if (BI.isEmpty(checkedValues)) {\r\n return BI.deepClone(this.options.paras.selectedValues);\r\n }\r\n if (BI.isEmpty(this.options.paras.selectedValues)) {\r\n return checkedValues;\r\n }\r\n return this._join(checkedValues, this.options.paras.selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this._getJoinValue();\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n this.service.clear();\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.async_tree\", BI.AsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.PartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.PartTree = BI.inherit(BI.AsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.PartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n if (treeNode.checked === true) {\r\n this.options.paras.selectedValues = this._getUnionValue();\r\n // this._buildTree(self.options.paras.selectedValues, BI.concat(parentValues, name));\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_ADJUST_DATA,\r\n curSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (res) {\r\n self.options.paras.selectedValues = res;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n } else {\r\n // 如果选中的值中不存在该值不处理\r\n // 因为反正是不选中,没必要管\r\n var t = this.options.paras.selectedValues;\r\n var p = parentValues.concat(name);\r\n for (var i = 0, len = p.length; i < len; i++) {\r\n t = t[p[i]];\r\n if (t == null) {\r\n return;\r\n }\r\n // 选中中国-江苏, 搜索南京,取消勾选\r\n if (BI.isEmpty(t)) {\r\n break;\r\n }\r\n }\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_SELECT_DATA,\r\n notSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (new_values) {\r\n self.options.paras.selectedValues = new_values;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n }\r\n },\r\n\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots);\r\n\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === false) {\r\n return true;\r\n }\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n // 把文字中的html去掉,其实就是把文字颜色去掉\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n // if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){\r\n // continue;\r\n // }\r\n if (BI.isNotEmptyArray(node.children)) {\r\n track(node.children);\r\n return true;\r\n }\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.options.paras.selectedValues || {});\r\n },\r\n\r\n _getUnionValue: function () {\r\n if (!this.nodes) {\r\n return {};\r\n }\r\n var checkedValues = this._getSelectedValues();\r\n if (BI.isEmpty(checkedValues)) {\r\n return BI.deepClone(this.options.paras.selectedValues);\r\n }\r\n if (BI.isEmpty(this.options.paras.selectedValues)) {\r\n return checkedValues;\r\n }\r\n return this._union(checkedValues, this.options.paras.selectedValues);\r\n },\r\n\r\n _union: function (valueA, valueB) {\r\n var self = this;\r\n var map = {};\r\n track([], valueA, valueB);\r\n track([], valueB, valueA);\r\n\r\n function track (parent, node, compare) {\r\n BI.each(node, function (n, item) {\r\n if (BI.isNull(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else if (BI.isEmpty(compare[n])) {\r\n self._addTreeNode(map, parent, n, {});\r\n } else {\r\n track(parent.concat([n]), node[n], compare[n]);\r\n }\r\n });\r\n }\r\n\r\n return map;\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.part_tree\", BI.PartTree);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[[\"A\"], [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListTreeView\r\n * @extends BI.TreeView\r\n */\r\nBI.ListTreeView = BI.inherit(BI.TreeView, {\r\n\r\n _constants: {\r\n SPLIT: \"<|>\"\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this, arguments), {\r\n value: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.ListTreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n if(BI.isNotNull(o.value)) {\r\n this.setSelectedValue(o.value);\r\n }\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this._checkValue(treeNode, treeNode.checked);\r\n BI.ListTreeView.superclass._selectTreeNode.apply(this, arguments);\r\n },\r\n\r\n _transArrayToMap: function (treeArrays) {\r\n var self = this;\r\n var map = {};\r\n BI.each(treeArrays, function (idx, array) {\r\n var key = array.join(self._constants.SPLIT);\r\n map[key] = true;\r\n });\r\n return map;\r\n },\r\n\r\n _transMapToArray: function (treeMap) {\r\n var self = this;\r\n var array = [];\r\n BI.each(treeMap, function (key) {\r\n var item = key.split(self._constants.SPLIT);\r\n array.push(item);\r\n });\r\n return array;\r\n },\r\n\r\n _checkValue: function (treeNode, checked) {\r\n var key = BI.concat(this._getParentValues(treeNode), this._getNodeValue(treeNode)).join(this._constants.SPLIT);\r\n if(checked) {\r\n this.storeValue[key] = true;\r\n } else {\r\n delete this.storeValue[key];\r\n }\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = value || [];\r\n this.storeValue = this._transArrayToMap(value);\r\n },\r\n\r\n getValue: function () {\r\n return this._transMapToArray(this.storeValue);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_tree_view\", BI.ListTreeView);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[\"A\", [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListListAsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListAsyncTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListAsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.ListAsyncTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n beforeCheck: beforeCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.half = false;\r\n }\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: 1,\r\n parentValues: parentValues.concat(this._getNodeValue(treeNode))\r\n });\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n var times = 1;\r\n\r\n function callback (nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n // 展开节点是没有分页的\r\n if (hasNext === true) {\r\n BI.delay(function () {\r\n times++;\r\n op.times = times;\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n }\r\n }\r\n\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n o.itemsCreator(op, complete);\r\n }, 17);\r\n }\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.ListAsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_async_tree\", BI.ListAsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.ListPartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.ListPartTree = BI.inherit(BI.ListAsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListPartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ListPartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_part_tree\", BI.ListPartTree);BI.prepares.push(function () {\r\n BI.Resizers = new BI.ResizeController();\r\n BI.Layers = new BI.LayerController();\r\n BI.Maskers = new BI.MaskersController();\r\n BI.Bubbles = new BI.BubblesController();\r\n BI.Tooltips = new BI.TooltipsController();\r\n BI.Popovers = new BI.PopoverController();\r\n BI.Broadcasts = new BI.BroadcastController();\r\n BI.StyleLoaders = new BI.StyleLoaderManager();\r\n});\r\n/**\r\n * CollectionView\r\n *\r\n * Created by GUY on 2016/1/15.\r\n * @class BI.CollectionView\r\n * @extends BI.Widget\r\n */\r\nBI.CollectionView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-collection\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n cellSizeAndPositionGetter: BI.emptyFn,\r\n horizontalOverscanSize: 0,\r\n verticalOverscanSize: 0,\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CollectionView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.CollectionView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._calculateSizeAndPositionData();\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _calculateSizeAndPositionData: function () {\r\n var o = this.options;\r\n var cellMetadata = [];\r\n var sectionManager = new BI.SectionManager();\r\n var height = 0;\r\n var width = 0;\r\n\r\n for (var index = 0, len = o.items.length; index < len; index++) {\r\n var cellMetadatum = o.cellSizeAndPositionGetter(index);\r\n\r\n if (cellMetadatum.height == null || isNaN(cellMetadatum.height) ||\r\n cellMetadatum.width == null || isNaN(cellMetadatum.width) ||\r\n cellMetadatum.x == null || isNaN(cellMetadatum.x) ||\r\n cellMetadatum.y == null || isNaN(cellMetadatum.y)) {\r\n throw Error();\r\n }\r\n\r\n height = Math.max(height, cellMetadatum.y + cellMetadatum.height);\r\n width = Math.max(width, cellMetadatum.x + cellMetadatum.width);\r\n\r\n cellMetadatum.index = index;\r\n cellMetadata[index] = cellMetadatum;\r\n sectionManager.registerCell(cellMetadatum, index);\r\n }\r\n\r\n this._cellMetadata = cellMetadata;\r\n this._sectionManager = sectionManager;\r\n this._height = height;\r\n this._width = width;\r\n },\r\n\r\n _cellRenderers: function (height, width, x, y) {\r\n this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y);\r\n return this._cellGroupRenderer();\r\n },\r\n\r\n _cellGroupRenderer: function () {\r\n var self = this, o = this.options;\r\n var rendered = [];\r\n BI.each(this._lastRenderedCellIndices, function (i, index) {\r\n var cellMetadata = self._sectionManager.getCellMetadata(index);\r\n rendered.push(cellMetadata);\r\n });\r\n return rendered;\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft());\r\n var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop());\r\n var left = Math.max(0, scrollLeft - o.horizontalOverscanSize);\r\n var top = Math.max(0, scrollTop - o.verticalOverscanSize);\r\n var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize);\r\n var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize);\r\n if (right > 0 && bottom > 0) {\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top);\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n // 存储所有的left和top\r\n var lefts = {}, tops = {};\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n lefts[datum.x] = datum.x;\r\n lefts[datum.x + datum.width] = datum.x + datum.width;\r\n tops[datum.y] = datum.y;\r\n tops[datum.y + datum.height] = datum.y + datum.height;\r\n }\r\n lefts = BI.toArray(lefts);\r\n tops = BI.toArray(tops);\r\n var leftMap = BI.invert(lefts);\r\n var topMap = BI.invert(tops);\r\n // 存储上下左右四个边界\r\n var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {};\r\n var assertMinBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = Number.MAX_VALUE;\r\n }\r\n };\r\n var assertMaxBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = 0;\r\n }\r\n };\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1];\r\n var child;\r\n if (index >= 0) {\r\n if (datum.width !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = datum.width;\r\n this.renderedCells[index].el.setWidth(datum.width);\r\n }\r\n if (datum.height !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = datum.height;\r\n this.renderedCells[index].el.setHeight(datum.height);\r\n }\r\n if (this.renderedCells[index]._left !== datum.x) {\r\n this.renderedCells[index].el.element.css(\"left\", datum.x + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== datum.y) {\r\n this.renderedCells[index].el.element.css(\"top\", datum.y + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: datum.width,\r\n height: datum.height\r\n }, o.items[datum.index], {\r\n cls: (o.items[datum.index].cls || \"\") + \" container-cell\" + (datum.y === 0 ? \" first-row\" : \"\") + (datum.x === 0 ? \" first-col\" : \"\"),\r\n _left: datum.x,\r\n _top: datum.y\r\n }));\r\n renderedCells.push({\r\n el: child,\r\n left: datum.x,\r\n top: datum.y,\r\n _left: datum.x,\r\n _top: datum.y,\r\n _width: datum.width,\r\n _height: datum.height\r\n });\r\n }\r\n var startTopIndex = topMap[datum.y] | 0;\r\n var endTopIndex = topMap[datum.y + datum.height] | 0;\r\n for (var k = startTopIndex; k <= endTopIndex; k++) {\r\n var t = tops[k];\r\n assertMinBorder(leftBorder, t);\r\n assertMaxBorder(rightBorder, t);\r\n leftBorder[t] = Math.min(leftBorder[t], datum.x);\r\n rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width);\r\n }\r\n var startLeftIndex = leftMap[datum.x] | 0;\r\n var endLeftIndex = leftMap[datum.x + datum.width] | 0;\r\n for (var k = startLeftIndex; k <= endLeftIndex; k++) {\r\n var l = lefts[k];\r\n assertMinBorder(topBorder, l);\r\n assertMaxBorder(bottomBorder, l);\r\n topBorder[l] = Math.min(topBorder[l], datum.y);\r\n bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height);\r\n }\r\n\r\n renderedKeys[datum.index] = [datum.index, i];\r\n renderedWidgets[i] = child;\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[1]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[1]]);\r\n });\r\n this.container.addItems(addedItems);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n\r\n // Todo 左右比较特殊\r\n var minX = BI.min(leftBorder);\r\n var maxX = BI.max(rightBorder);\r\n\r\n var minY = BI.max(topBorder);\r\n var maxY = BI.min(bottomBorder);\r\n\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n this._reRange();\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n this._calculateSizeAndPositionData();\r\n }\r\n if (o.items.length > 0) {\r\n this.container.setWidth(this._width);\r\n this.container.setHeight(this._height);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.CollectionView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.collection_view\", BI.CollectionView);/**\r\n * @class BI.Combo\r\n * @extends BI.Widget\r\n */\r\nBI.Combo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft\r\n logic: {\r\n dynamic: true\r\n },\r\n container: null, // popupview放置的容器,默认为this.element\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopEvent: false,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {},\r\n comboClass: \"bi-combo-popup\",\r\n hoverClass: \"bi-combo-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Combo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initCombo();\r\n this._initPullDownAction();\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj);\r\n }\r\n }\r\n });\r\n\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: [\r\n { el: this.combo }\r\n ]\r\n }))));\r\n o.isDefaultInit && (this._assertPopupView());\r\n BI.Resizers.add(this.getName(), BI.bind(function () {\r\n if (this.isViewVisible()) {\r\n this._hideView();\r\n }\r\n }, this));\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = (this.options.trigger || \"\").split(\",\");\r\n var st = function (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n };\r\n\r\n var enterPopup = false;\r\n\r\n function hide () {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n self.popupView && self.popupView.element.off(\"mouseenter.\" + self.getName()).off(\"mouseleave.\" + self.getName());\r\n enterPopup = false;\r\n }\r\n\r\n BI.each(evs, function (i, ev) {\r\n switch (ev) {\r\n case \"hover\":\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (!o.toggle && self.isViewVisible()) {\r\n // return;\r\n // }\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(ev + \".\" + self.getName()).on(ev + \".\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n break;\r\n case \"click-hover\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (self.isViewVisible()) {\r\n // return;\r\n // }\r\n self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(\"click.\" + self.getName()).on(\"click.\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initCombo: function () {\r\n this.combo = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.popup_view\",\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.combo.setValue(self.getValue());\r\n self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.popupView.setVisible(false);\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Combo.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this.options.container || this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideIf: function (e) {\r\n // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {\r\n // return;\r\n // }\r\n // BI-10290 公式combo双击公式内容会收起\r\n if ((this.element.find(e.target).length > 0)\r\n || (this.popupView && this.popupView.element.find(e.target).length > 0)\r\n || e.target.className === \"CodeMirror-cursor\" || BI.Widget._renderEngine.createElement(e.target).closest(\".CodeMirror-hints\").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下\r\n var directions = this.options.direction.split(\",\");\r\n if (BI.contains(directions, \"innerLeft\") || BI.contains(directions, \"innerRight\")) {\r\n // popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置\r\n this.adjustWidth();\r\n this.adjustHeight();\r\n }\r\n return;\r\n }\r\n var isHide = this.options.hideChecker.apply(this, [e]);\r\n if (isHide === false) {\r\n return;\r\n }\r\n this._hideView();\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);\r\n if (this.options.destroyWhenHide === true) {\r\n this.popupView && this.popupView.destroy();\r\n this.popupView = null;\r\n this._rendered = false;\r\n } else {\r\n this.popupView && this.popupView.invisible();\r\n }\r\n this.element.removeClass(this.options.comboClass);\r\n\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function (e) {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);\r\n\r\n this.popupView.visible();\r\n this.adjustWidth(e);\r\n this.adjustHeight(e);\r\n\r\n this.element.addClass(this.options.comboClass);\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + this.getName(), BI.bind(this._hideIf, this)).bind(\"mousewheel.\" + this.getName(), BI.bind(this._hideIf, this));\r\n this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n adjustWidth: function (e) {\r\n var o = this.options;\r\n if (!this.popupView) {\r\n return;\r\n }\r\n if (o.isNeedAdjustWidth === true) {\r\n this.resetListWidth(\"\");\r\n var width = this.popupView.element.outerWidth();\r\n var maxW = this.element.outerWidth() || o.width;\r\n if (width > maxW + 80) {\r\n maxW = maxW + 80;\r\n } else if (width > maxW) {\r\n maxW = width;\r\n }\r\n this.resetListWidth(maxW < 100 ? 100 : maxW);\r\n }\r\n },\r\n\r\n adjustHeight: function (e) {\r\n var o = this.options, p = {};\r\n if (!this.popupView) {\r\n return;\r\n }\r\n var isVisible = this.popupView.isVisible();\r\n this.popupView.visible();\r\n var combo = BI.isNotNull(e) ? {\r\n element: {\r\n offset: function () {\r\n return {\r\n left: e.pageX,\r\n top: e.pageY\r\n };\r\n },\r\n bounds: function () {\r\n // offset为其相对于父定位元素的偏移\r\n return {\r\n x: e.offsetX,\r\n y: e.offsetY,\r\n width: 0,\r\n height: 24\r\n };\r\n },\r\n outerWidth: function () {\r\n return 0;\r\n },\r\n outerHeight: function () {\r\n return 24;\r\n }\r\n }\r\n } : this.combo;\r\n switch (o.direction) {\r\n case \"bottom\":\r\n case \"bottom,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"top\":\r\n case \"top,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"left\":\r\n case \"left,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right\":\r\n case \"right,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"bottom,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"left,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerRight\", \"innerLeft\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right,innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerLeft\", \"innerRight\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerRight\", \"innerLeft\", \"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerLeft\", \"innerRight\", \"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,custom\":\r\n case \"custom,top\":\r\n p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"custom,bottom\":\r\n case \"bottom,custom\":\r\n p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"left,custom\":\r\n case \"custom,left\":\r\n p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n case \"custom,right\":\r\n case \"right,custom\":\r\n p = BI.DOM.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n }\r\n\r\n if (\"adaptHeight\" in p) {\r\n this.resetListHeight(p[\"adaptHeight\"]);\r\n }\r\n if (\"left\" in p) {\r\n this.popupView.element.css({\r\n left: p.left\r\n });\r\n }\r\n if (\"top\" in p) {\r\n this.popupView.element.css({\r\n top: p.top\r\n });\r\n }\r\n this.position = p;\r\n this.popupView.setVisible(isVisible);\r\n },\r\n\r\n resetListHeight: function (h) {\r\n this._assertPopupView();\r\n this.popupView.resetHeight && this.popupView.resetHeight(h);\r\n },\r\n\r\n resetListWidth: function (w) {\r\n this._assertPopupView();\r\n this.popupView.resetWidth && this.popupView.resetWidth(w);\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Combo.superclass._setEnable.apply(this, arguments);\r\n if (arg === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (arg === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n showView: function (e) {\r\n // 减少popup 调整宽高的次数\r\n if (this.isEnabled() && this.combo.isEnabled() && !this.isViewVisible()) {\r\n this._popupView(e);\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getPopupPosition: function () {\r\n return this.position;\r\n },\r\n\r\n toggle: function () {\r\n this._toggle();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName())\r\n .unbind(\"mousewheel.\" + this.getName())\r\n .unbind(\"mouseenter.\" + this.getName())\r\n .unbind(\"mousemove.\" + this.getName())\r\n .unbind(\"mouseleave.\" + this.getName());\r\n BI.Resizers.remove(this.getName());\r\n this.popupView && this.popupView._destroy();\r\n }\r\n});\r\nBI.Combo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Combo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Combo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Combo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Combo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Combo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Combo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Combo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Combo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.combo\", BI.Combo);/**\r\n *\r\n * 某个可以展开的节点\r\n *\r\n * Created by GUY on 2015/9/10.\r\n * @class BI.Expander\r\n * @extends BI.Widget\r\n */\r\nBI.Expander = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-expander\",\r\n trigger: \"click\",\r\n toggle: true,\r\n // direction: \"bottom\", //top,bottom四个方向\r\n isDefaultInit: false, // 是否默认初始化子节点\r\n el: {},\r\n popup: {},\r\n expanderClass: \"bi-expander-popup\",\r\n hoverClass: \"bi-expander-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Expander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._expanded = !!o.el.open;\r\n this._initExpander();\r\n this._initPullDownAction();\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.expander}\r\n ]\r\n });\r\n o.isDefaultInit && this._assertPopupView();\r\n if (this.expander.isOpened() === true) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.expander.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initExpander: function () {\r\n this.expander = BI.createWidget(this.options.el);\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.button_group\",\r\n cls: \"expander-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n // self.setValue(self.getValue());\r\n self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.popupView.setVisible(this.isExpanded());\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Expander.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW);\r\n this._expanded = false;\r\n this.expander.setOpened(false);\r\n this.popupView && this.popupView.invisible();\r\n this.element.removeClass(this.options.expanderClass);\r\n\r\n this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function () {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW);\r\n this._expanded = true;\r\n this.expander.setOpened(true);\r\n this.popupView.visible();\r\n this.element.addClass(this.options.expanderClass);\r\n this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n populate: function (items) {\r\n // this._assertPopupView();\r\n this.popupView && this.popupView.populate.apply(this.popupView, arguments);\r\n this.expander.populate.apply(this.expander, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Expander.superclass._setEnable.apply(this, arguments);\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.expander.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n isExpanded: function () {\r\n return this._expanded;\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.expander.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.expander.options.id === id) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.expander.getValue() === value) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n destroy: function () {\r\n BI.Expander.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Expander.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Expander.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Expander.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Expander.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Expander.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Expander.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Expander.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Expander.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Expander.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.expander\", BI.Expander);/**\r\n * Created by GUY on 2015/8/10.\r\n */\r\n\r\nBI.ComboGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-combo-group bi-list-item\",\r\n\r\n // 以下这些属性对每一个combo都是公用的\r\n trigger: \"click,hover\",\r\n direction: \"right\",\r\n adjustLength: 0,\r\n isDefaultInit: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n\r\n el: {type: \"bi.text_button\", text: \"\", value: \"\"},\r\n children: [],\r\n\r\n popup: {\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ComboGroup.superclass._init.apply(this, arguments);\r\n this._populate(this.options.el);\r\n },\r\n\r\n _populate: function (item) {\r\n var self = this, o = this.options;\r\n var children = o.children;\r\n if (BI.isEmpty(children)) {\r\n throw new Error(\"ComboGroup构造错误\");\r\n }\r\n BI.each(children, function (i, ch) {\r\n var son = BI.formatEL(ch).el.children;\r\n ch = BI.formatEL(ch).el;\r\n if (!BI.isEmpty(son)) {\r\n ch.el = BI.clone(ch);\r\n ch.children = son;\r\n ch.type = \"bi.combo_group\";\r\n ch.action = o.action;\r\n ch.height = o.height;\r\n ch.direction = o.direction;\r\n ch.isDefaultInit = o.isDefaultInit;\r\n ch.isNeedAdjustHeight = o.isNeedAdjustHeight;\r\n ch.isNeedAdjustWidth = o.isNeedAdjustWidth;\r\n ch.adjustLength = o.adjustLength;\r\n ch.popup = o.popup;\r\n }\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n height: o.height,\r\n trigger: o.trigger,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n adjustLength: o.adjustLength,\r\n el: item,\r\n popup: BI.extend({}, o.popup, {\r\n el: BI.extend({\r\n items: children\r\n }, o.popup.el)\r\n })\r\n });\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n }\r\n});\r\nBI.ComboGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.combo_group\", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-virtual-group\",\r\n items: [],\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n render: function () {\r\n var o = this.options;\r\n this.populate(o.items);\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _packageBtns: function (items) {\r\n var o = this.options;\r\n var map = this.buttonMap = {};\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n var el = BI.stripEL(it);\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n if (BI.isKey(map[el.value])) {\r\n map[el.value] = _ref;\r\n }\r\n }\r\n }, el)\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n addItems: function (items) {\r\n this.layouts.addItems(items);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.layouts.prependItems(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttonMap, function (key, item) {\r\n if (item) {\r\n if (v.deepContains(key)) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n populate: function (items) {\r\n var self = this;\r\n items = items || [];\r\n this.options.items = items;\r\n items = this._packageBtns(items);\r\n if (!this.layouts) {\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n } else {\r\n this.layouts.populate(items);\r\n }\r\n }\r\n});\r\nBI.VirtualGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.virtual_group\", BI.VirtualGroup);/**\r\n * 加载控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Loader\r\n * @extends BI.Widget\r\n */\r\nBI.Loader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-loader\",\r\n\r\n direction: \"top\",\r\n isDefaultInit: true, // 是否默认初始化数据\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n prev: false,\r\n next: {},\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _prevLoad: function () {\r\n var self = this, o = this.options;\r\n this.prev.setLoading();\r\n o.itemsCreator.apply(this, [{times: --this.times}, function () {\r\n self.prev.setLoaded();\r\n self.prependItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.Loader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.prev = false;\r\n o.next = false;\r\n }\r\n if (o.prev !== false) {\r\n this.prev = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.prev));\r\n this.prev.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._prevLoad();\r\n }\r\n });\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Loader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next)\r\n }))));\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n o.isDefaultInit && BI.isEmpty(o.items) && this._populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this._populate(o.items);\r\n }\r\n },\r\n\r\n hasPrev: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasPrev.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.count += items.length;\r\n if (this.next !== false) {\r\n if (this.hasPrev()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.setEnd();\r\n }\r\n }\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n },\r\n\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"arguments can not be null!!!\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return false;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n if (BI.isObject(this.prev)) {\r\n if (this.hasPrev()) {\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.invisible();\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments) && this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n BI.each([this.prev, this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n destroy: function () {\r\n BI.Loader.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Loader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.loader\", BI.Loader);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Navigation = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), {\r\n direction: \"bottom\", // top, bottom, left, right, custom\r\n logic: {\r\n dynamic: false\r\n },\r\n single: false,\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n },\r\n\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.cardMap = {};\r\n this.showIndex = 0;\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n\r\n new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardNameCreator: function (v) {\r\n return self.showIndex + v;\r\n },\r\n cardCreator: function (v) {\r\n var card = o.cardCreator(v);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardCreated: BI.bind(this.afterCardCreated, this),\r\n afterCardShow: BI.bind(this.afterCardShow, this)\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n afterCardCreated: function (v) {\r\n var self = this;\r\n this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Navigation.EVENT_CHANGE, obj);\r\n }\r\n });\r\n this.options.afterCardCreated.apply(this, arguments);\r\n },\r\n\r\n afterCardShow: function (v) {\r\n this.showIndex = v;\r\n this._deleteOtherCards(v);\r\n this.options.afterCardShow.apply(this, arguments);\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n this.afterCardCreated(v);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.showIndex !== v) {\r\n this.showIndex = v;\r\n BI.nextTick(BI.bind(this.afterCardShow, this, v));\r\n }\r\n },\r\n\r\n getSelect: function () {\r\n return this.showIndex;\r\n },\r\n\r\n getSelectedCard: function () {\r\n if (BI.isKey(this.showIndex)) {\r\n return this.cardMap[this.showIndex];\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n BI.Navigation.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Navigation.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.navigation\", BI.Navigation);/**\r\n * 搜索逻辑控件\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.Searcher\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.Searcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-searcher\",\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n\r\n isDefaultInit: false,\r\n isAutoSearch: true, // 是否自动搜索\r\n isAutoSync: true, // 是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n allowSearchBlank: true, // 是否能够搜索包含空格的字符串\r\n\r\n // isAutoSearch为false时启用\r\n onSearch: function (op, callback) {\r\n callback([]);\r\n },\r\n\r\n el: {\r\n type: \"bi.search_editor\"\r\n },\r\n\r\n popup: {\r\n type: \"bi.searcher_view\"\r\n },\r\n\r\n adapter: null,\r\n masker: { // masker层\r\n offset: {}\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Searcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.search_editor\"\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: [this.editor]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n\r\n var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n switch (type) {\r\n case BI.Events.STARTEDIT:\r\n self._startSearch();\r\n break;\r\n case BI.Events.EMPTY:\r\n self._stopSearch();\r\n break;\r\n case BI.Events.CHANGE:\r\n search();\r\n break;\r\n case BI.Events.PAUSE:\r\n self._pauseSearch();\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.searcher_view\",\r\n chooseType: o.chooseType\r\n });\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n if (o.isAutoSync) {\r\n var values = o.adapter && o.adapter.getValue();\r\n if (!obj.isSelected()) {\r\n o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue()));\r\n } else {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n o.adapter && o.adapter.setValue([obj.getValue()]);\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_MULTI:\r\n values.push(obj.getValue());\r\n o.adapter && o.adapter.setValue(values);\r\n break;\r\n }\r\n }\r\n }\r\n self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Searcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n if (o.masker && !BI.Maskers.has(this.getName())) {\r\n BI.Maskers.create(this.getName(), o.adapter, BI.extend({\r\n container: this,\r\n render: this.popupView\r\n }, o.masker), this);\r\n }\r\n },\r\n\r\n _startSearch: function () {\r\n this._assertPopupView();\r\n this._stop = false;\r\n this._isSearching = true;\r\n this.fireEvent(BI.Searcher.EVENT_START);\r\n this.popupView.startSearch && this.popupView.startSearch();\r\n // 搜索前先清空dom\r\n // BI.Maskers.get(this.getName()).empty();\r\n BI.nextTick(function (name) {\r\n BI.Maskers.show(name);\r\n }, this.getName());\r\n },\r\n\r\n _pauseSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.nextTick(function (name) {\r\n BI.Maskers.hide(name);\r\n }, this.getName());\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch();\r\n this.fireEvent(BI.Searcher.EVENT_PAUSE);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _stopSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.Maskers.hide(name);\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.stopSearch && this.popupView.stopSearch();\r\n this.fireEvent(BI.Searcher.EVENT_STOP);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _search: function () {\r\n var self = this, o = this.options, keyword = o.allowSearchBlank ? this.editor.getValue() : this._getLastSearchKeyword();\r\n if (keyword === \"\" || this._stop) {\r\n return;\r\n }\r\n if (o.isAutoSearch) {\r\n var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr(\"items\"))) || [];\r\n var finding = BI.Func.getSearchResult(items, keyword);\r\n var match = finding.match, find = finding.find;\r\n this.popupView.populate(find, match, keyword);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n return;\r\n }\r\n this.popupView.loading && this.popupView.loading();\r\n o.onSearch({\r\n times: 1,\r\n keyword: keyword,\r\n selectedValues: o.adapter && o.adapter.getValue()\r\n }, function (searchResult, matchResult) {\r\n if (!self._stop) {\r\n var args = [].slice.call(arguments);\r\n if (args.length > 0) {\r\n args.push(keyword);\r\n }\r\n BI.Maskers.show(self.getName());\r\n self.popupView.populate.apply(self.popupView, args);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue());\r\n self.popupView.loaded && self.popupView.loaded();\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n }\r\n });\r\n },\r\n\r\n _getLastSearchKeyword: function () {\r\n if (this.isValid()) {\r\n var res = this.editor.getValue().match(/[\\S]+/g);\r\n return BI.isNull(res) ? \"\" : res[res.length - 1];\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n doSearch: function () {\r\n if (this.isSearching()) {\r\n this._search();\r\n }\r\n },\r\n\r\n stopSearch: function () {\r\n this._stopSearch();// 先停止搜索,然后再去设置editor为空\r\n // important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常)\r\n try {\r\n this.editor.blur();\r\n } catch (e) {\r\n if (!this.editor.blur) {\r\n throw new Error(\"editor没有实现blur方法\");\r\n }\r\n } finally {\r\n this.editor.setValue(\"\");\r\n }\r\n },\r\n\r\n isSearching: function () {\r\n return this._isSearching;\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName());\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n hasMatched: function () {\r\n this._assertPopupView();\r\n return this.popupView.hasMatched();\r\n },\r\n\r\n adjustHeight: function () {\r\n if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) {\r\n BI.Maskers.show(this.getName());\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getKeyword: function () {\r\n return this._getLastSearchKeyword();\r\n },\r\n\r\n getKeywords: function () {\r\n return this.editor.getKeywords();\r\n },\r\n\r\n getValue: function () {\r\n var o = this.options;\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (this.isSearching()) {\r\n return this.popupView.getValue();\r\n } else if (o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (BI.isNull(this.popupView)) {\r\n return o.popup.value;\r\n }\r\n return this.popupView.getValue();\r\n\r\n },\r\n\r\n populate: function (result, searchResult, keyword) {\r\n var o = this.options;\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n this.popupView.setValue(o.adapter.getValue());\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Maskers.remove(this.getName());\r\n }\r\n});\r\nBI.Searcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Searcher.EVENT_START = \"EVENT_START\";\r\nBI.Searcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Searcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Searcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.Searcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\nBI.shortcut(\"bi.searcher\", BI.Searcher);/**\r\n *\r\n * 切换显示或隐藏面板\r\n *\r\n * Created by GUY on 2015/11/2.\r\n * @class BI.Switcher\r\n * @extends BI.Widget\r\n */\r\nBI.Switcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-switcher\",\r\n direction: BI.Direction.Top,\r\n trigger: \"click\",\r\n toggle: true,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {},\r\n switcherClass: \"bi-switcher-popup\",\r\n hoverClass: \"bi-switcher-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Switcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initSwitcher();\r\n this._initPullDownAction();\r\n this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.switcher}\r\n ]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupView();\r\n if (this.isExpanded()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n default :\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.switcher.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initSwitcher: function () {\r\n this.switcher = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (!this._created) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.button_group\",\r\n element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)),\r\n cls: \"switcher-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n if (o.direction !== BI.Direction.Custom && !o.adapter) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n }\r\n this._created = true;\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);\r\n var self = this, o = this.options;\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n BI.nextTick(function () {\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n self.element.removeClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW);\r\n });\r\n },\r\n\r\n _popupView: function () {\r\n var self = this, o = this.options;\r\n this._assertPopupView();\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW);\r\n o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true);\r\n BI.nextTick(function (name) {\r\n o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true);\r\n self.element.addClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW);\r\n }, this.getName());\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Switcher.superclass._setEnable.apply(this, arguments);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.switcher.isEnabled() &&\r\n (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible()));\r\n },\r\n\r\n isExpanded: function () {\r\n return this.isViewVisible();\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.switcher.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.switcher.attr(\"id\") === id) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.switcher.getValue() === value) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n }\r\n});\r\nBI.Switcher.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Switcher.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Switcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Switcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Switcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Switcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Switcher.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Switcher.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Switcher.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.switcher\", BI.Switcher);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Tab = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tab\",\r\n direction: \"top\", // top, bottom, left, right, custom\r\n single: false, // 是不是单页面\r\n logic: {\r\n dynamic: false\r\n },\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n }\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (BI.isObject(o.tab)) {\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n }\r\n this.cardMap = {};\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n var listener = new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardCreator: function (v) {\r\n var card = o.cardCreator.apply(self, arguments);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardShow: function (v) {\r\n self._deleteOtherCards(v);\r\n self.curr = v;\r\n }\r\n });\r\n listener.on(BI.ShowListener.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.Tab.EVENT_CHANGE, value, self);\r\n });\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this.tab && this.tab.setValue(v);\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.curr !== v) {\r\n this.curr = v;\r\n }\r\n },\r\n\r\n removeTab: function (cardname) {\r\n var self = this, o = this.options;\r\n BI.any(this.cardMap, function (name, card) {\r\n if (BI.isEqual(name, (cardname + \"\"))) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n getSelect: function () {\r\n return this.curr;\r\n },\r\n\r\n getSelectedTab: function () {\r\n return this.layout.getShowingCard();\r\n },\r\n\r\n getTab: function (v) {\r\n this._assertCard(v);\r\n return this.layout.getCardByName(v);\r\n },\r\n\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate && card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n this.cardMap = {};\r\n BI.Tab.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Tab.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.tab\", BI.Tab);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.EL\r\n * @extends BI.Widget\r\n */\r\nBI.EL = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-el\",\r\n el: {},\r\n layout: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.EL.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.ele = BI.createWidget(o.el);\r\n BI.createWidget(o.layout, {\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.ele]\r\n });\r\n this.ele.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.ele.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.ele.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.ele.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.el\", BI.EL);/**\r\n * z-index在1亿层级\r\n * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现)\r\n * @class BI.Msg\r\n */\r\nBI.Msg = function () {\r\n\r\n var $mask, $pop;\r\n\r\n var messageShows = [];\r\n\r\n var toastStack = [];\r\n\r\n return {\r\n alert: function (title, message, callback) {\r\n this._show(false, title, message, callback);\r\n },\r\n confirm: function (title, message, callback) {\r\n this._show(true, title, message, callback);\r\n },\r\n prompt: function (title, message, value, callback, min_width) {\r\n // BI.Msg.prompt(title, message, value, callback, min_width);\r\n },\r\n toast: function (message, options, context) {\r\n options = options || {};\r\n context = context || BI.Widget._renderEngine.createElement(\"body\");\r\n var level = options.level || \"normal\";\r\n var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose;\r\n var callback = BI.isFunction(options.callback) ? options.callback : BI.emptyFn;\r\n var toast = BI.createWidget({\r\n type: \"bi.toast\",\r\n cls: \"bi-message-animate bi-message-leave\",\r\n level: level,\r\n autoClose: autoClose,\r\n text: message,\r\n listeners: [{\r\n eventName: BI.Toast.EVENT_DESTORY,\r\n action: function () {\r\n BI.remove(toastStack, toast.element);\r\n var _height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n element.css({\"top\": _height});\r\n _height += element.outerHeight() + 10;\r\n });\r\n callback();\r\n }\r\n }]\r\n });\r\n var height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n height += element.outerHeight() + 10;\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context,\r\n items: [{\r\n el: toast,\r\n left: \"50%\",\r\n top: height\r\n }]\r\n });\r\n toastStack.push(toast.element);\r\n toast.element.css({\"margin-left\": -1 * toast.element.outerWidth() / 2});\r\n toast.element.removeClass(\"bi-message-leave\").addClass(\"bi-message-enter\");\r\n\r\n autoClose && BI.delay(function () {\r\n toast.element.removeClass(\"bi-message-enter\").addClass(\"bi-message-leave\");\r\n toast.destroy();\r\n }, 5000);\r\n },\r\n _show: function (hasCancel, title, message, callback) {\r\n BI.isNull($mask) && ($mask = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-z-index-mask\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 2,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n opacity: 0.5\r\n }).appendTo(\"body\"));\r\n $pop = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-message-depend\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 1,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }).appendTo(\"body\");\r\n var close = function () {\r\n messageShows[messageShows.length - 1].destroy();\r\n messageShows.pop();\r\n if (messageShows.length === 0) {\r\n $mask.remove();\r\n $mask = null;\r\n }\r\n };\r\n var controlItems = [];\r\n if (hasCancel === true) {\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n level: \"ignore\",\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [true]);\r\n }\r\n }\r\n }\r\n });\r\n var conf = {\r\n element: $pop,\r\n type: \"bi.center_adapt\",\r\n items: [\r\n {\r\n type: \"bi.border\",\r\n cls: \"bi-card\",\r\n items: {\r\n north: {\r\n el: {\r\n type: \"bi.border\",\r\n cls: \"bi-message-title bi-background\",\r\n items: {\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n text: title || BI.i18nText(\"BI-Basic_Prompt\"),\r\n textAlign: \"left\",\r\n hgap: 20,\r\n height: 40\r\n }\r\n },\r\n east: {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n // height: 50,\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n },\r\n width: 60\r\n }\r\n }\r\n },\r\n height: 40\r\n },\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n vgap: 10,\r\n hgap: 20,\r\n whiteSpace: \"normal\",\r\n text: message\r\n }\r\n },\r\n south: {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: controlItems\r\n },\r\n top: 0,\r\n left: 20,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n\r\n },\r\n height: 44\r\n }\r\n },\r\n width: 450,\r\n height: 200\r\n }\r\n ]\r\n };\r\n\r\n messageShows[messageShows.length] = BI.createWidget(conf);\r\n }\r\n };\r\n}();/**\r\n * GridView\r\n *\r\n * Created by GUY on 2016/1/11.\r\n * @class BI.GridView\r\n * @extends BI.Widget\r\n */\r\nBI.GridView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-grid-view\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n overscanColumnCount: 0,\r\n overscanRowCount: 0,\r\n rowHeightGetter: BI.emptyFn, // number类型或function类型\r\n columnWidthGetter: BI.emptyFn, // number类型或function类型\r\n // estimatedColumnSize: 100, //columnWidthGetter为function时必设\r\n // estimatedRowSize: 30, //rowHeightGetter为function时必设\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.GridView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.GridView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) {\r\n return {\r\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\r\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\r\n };\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n\r\n var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()),\r\n scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()),\r\n overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount;\r\n\r\n if (height > 0 && width > 0) {\r\n var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft);\r\n var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop);\r\n\r\n if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) {\r\n return;\r\n }\r\n var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft);\r\n var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop);\r\n\r\n this._renderedColumnStartIndex = visibleColumnIndices.start;\r\n this._renderedColumnStopIndex = visibleColumnIndices.stop;\r\n this._renderedRowStartIndex = visibleRowIndices.start;\r\n this._renderedRowStopIndex = visibleRowIndices.stop;\r\n\r\n var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex);\r\n\r\n var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex);\r\n\r\n var columnStartIndex = overscanColumnIndices.overscanStartIndex;\r\n var columnStopIndex = overscanColumnIndices.overscanStopIndex;\r\n var rowStartIndex = overscanRowIndices.overscanStartIndex;\r\n var rowStopIndex = overscanRowIndices.overscanStopIndex;\r\n\r\n // 算区间size\r\n var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex);\r\n var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex);\r\n var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex);\r\n var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex);\r\n var top = minRowDatum.offset + verticalOffsetAdjustment;\r\n var left = minColumnDatum.offset + horizontalOffsetAdjustment;\r\n var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size;\r\n var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size;\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0;\r\n var count = 0;\r\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\r\n var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\r\n\r\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\r\n var key = rowIndex + \"-\" + columnIndex;\r\n var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\r\n\r\n var index = this.renderedKeys[key] && this.renderedKeys[key][2];\r\n var child;\r\n if (index >= 0) {\r\n if (columnDatum.size !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = columnDatum.size;\r\n this.renderedCells[index].el.setWidth(columnDatum.size);\r\n }\r\n if (rowDatum.size !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = rowDatum.size;\r\n this.renderedCells[index].el.setHeight(rowDatum.size);\r\n }\r\n if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"left\", (columnDatum.offset + horizontalOffsetAdjustment) + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"top\", (rowDatum.offset + verticalOffsetAdjustment) + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: columnDatum.size,\r\n height: rowDatum.size\r\n }, o.items[rowIndex][columnIndex], {\r\n cls: (o.items[rowIndex][columnIndex].cls || \"\") + \" grid-cell\" + (rowIndex === 0 ? \" first-row\" : \"\") + (columnIndex === 0 ? \" first-col\" : \"\"),\r\n _rowIndex: rowIndex,\r\n _columnIndex: columnIndex,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment\r\n }), this);\r\n renderedCells.push({\r\n el: child,\r\n left: columnDatum.offset + horizontalOffsetAdjustment,\r\n top: rowDatum.offset + verticalOffsetAdjustment,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment,\r\n _width: columnDatum.size,\r\n _height: rowDatum.size\r\n });\r\n }\r\n minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment);\r\n maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size);\r\n minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);\r\n maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);\r\n renderedKeys[key] = [rowIndex, columnIndex, count];\r\n renderedWidgets[count] = child;\r\n count++;\r\n }\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[2]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[2]]);\r\n });\r\n // 与listview一样, 给上下文\r\n this.container.addItems(addedItems, this);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n /**\r\n * 获取真实的可滚动的最大宽度\r\n * 对于grid_view如果没有全部渲染过,this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的\r\n * 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)\r\n */\r\n _getRealMaxScrollLeft: function () {\r\n var o = this.options;\r\n var totalWidth = 0;\r\n BI.count(0, this.columnCount, function (index) {\r\n totalWidth += o.columnWidthGetter(index);\r\n });\r\n return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n this._reRange();\r\n this.columnCount = 0;\r\n this.rowCount = 0;\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n }\r\n if (BI.isNumber(o.columnCount)) {\r\n this.columnCount = o.columnCount;\r\n } else if (o.items.length > 0) {\r\n this.columnCount = o.items[0].length;\r\n }\r\n if (BI.isNumber(o.rowCount)) {\r\n this.rowCount = o.rowCount;\r\n } else {\r\n this.rowCount = o.items.length;\r\n }\r\n this.container.setWidth(this.columnCount * o.estimatedColumnSize);\r\n this.container.setHeight(this.rowCount * o.estimatedRowSize);\r\n\r\n this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize);\r\n this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setColumnCount: function (columnCount) {\r\n this.options.columnCount = columnCount;\r\n },\r\n\r\n setRowCount: function (rowCount) {\r\n this.options.rowCount = rowCount;\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n setEstimatedColumnSize: function (width) {\r\n this.options.estimatedColumnSize = width;\r\n },\r\n\r\n setEstimatedRowSize: function (height) {\r\n this.options.estimatedRowSize = height;\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.GridView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.grid_view\", BI.GridView);\r\n/**\r\n * Popover弹出层,\r\n * @class BI.Popover\r\n * @extends BI.Widget\r\n */\r\nBI.Popover = BI.inherit(BI.Widget, {\r\n _constant: {\r\n SIZE: {\r\n SMALL: \"small\",\r\n NORMAL: \"normal\",\r\n BIG: \"big\"\r\n },\r\n HEADER_HEIGHT: 40\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-popover bi-card bi-border-radius\",\r\n // width: 600,\r\n // height: 500,\r\n size: \"normal\", // small, normal, big\r\n logic: {\r\n dynamic: false\r\n },\r\n header: null,\r\n body: null,\r\n footer: null,\r\n closable: true // BI-40839 是否显示右上角的关闭按钮\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.startX = 0;\r\n this.startY = 0;\r\n this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {\r\n var size = self._calculateSize();\r\n var W = BI.Widget._renderEngine.createElement(\"body\").width(), H = BI.Widget._renderEngine.createElement(\"body\").height();\r\n self.startX += deltaX;\r\n self.startY += deltaY;\r\n self.element.css({\r\n left: BI.clamp(self.startX, 0, W - self.element.width()) + \"px\",\r\n top: BI.clamp(self.startY, 0, H - self.element.height()) + \"px\"\r\n });\r\n // BI-12134 没有什么特别好的方法\r\n BI.Resizers._resize();\r\n }, function () {\r\n self.tracker.releaseMouseMoves();\r\n }, _global);\r\n var items = [{\r\n el: {\r\n type: \"bi.htape\",\r\n cls: \"bi-message-title bi-header-background\",\r\n ref: function (_ref) {\r\n self.dragger = _ref;\r\n },\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, {\r\n extraCls: \"bi-font-bold\"\r\n }) : {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n height: this._constant.HEADER_HEIGHT,\r\n text: o.header,\r\n title: o.header,\r\n textAlign: \"left\"\r\n },\r\n left: 20,\r\n top: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n el: o.closable ? {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n height: this._constant.HEADER_HEIGHT,\r\n handler: function () {\r\n self.close();\r\n }\r\n } : {\r\n type: \"bi.layout\"\r\n },\r\n width: 56\r\n }],\r\n height: this._constant.HEADER_HEIGHT\r\n },\r\n height: this._constant.HEADER_HEIGHT\r\n }, {\r\n el: o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n cls: \"popover-body\",\r\n ref: function () {\r\n self.body = this;\r\n },\r\n hgap: 20,\r\n tgap: 10,\r\n items: [{\r\n el: BI.createWidget(o.body)\r\n }]\r\n } : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.body),\r\n left: 20,\r\n top: 10,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n }\r\n }];\r\n if (o.footer) {\r\n items.push({\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.footer),\r\n left: 20,\r\n top: 0,\r\n right: 20,\r\n bottom: 0\r\n }],\r\n height: 44\r\n },\r\n height: 44\r\n });\r\n }\r\n\r\n var size = this._calculateSize();\r\n\r\n return BI.extend({\r\n type: o.logic.dynamic ? \"bi.vertical\" : \"bi.vtape\",\r\n items: items,\r\n width: size.width\r\n }, o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false\r\n } : {\r\n type: \"bi.vtape\",\r\n height: size.height\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this.dragger.element.mousedown(function (e) {\r\n var pos = self.element.offset();\r\n self.startX = pos.left;\r\n self.startY = pos.top;\r\n self.tracker.captureMouseMoves(e);\r\n });\r\n if (o.logic.dynamic) {\r\n var size = this._calculateSize();\r\n var height = this.element.height();\r\n var compareHeight = BI.clamp(height, size.height, 600) - (o.footer ? 84 : 44);\r\n this.body.element.height(compareHeight);\r\n }\r\n },\r\n\r\n _calculateSize: function () {\r\n var o = this.options;\r\n var size = {};\r\n if (BI.isNotNull(o.size)) {\r\n switch (o.size) {\r\n case this._constant.SIZE.SMALL:\r\n size.width = 450;\r\n size.height = 200;\r\n break;\r\n case this._constant.SIZE.BIG:\r\n size.width = 900;\r\n size.height = 500;\r\n break;\r\n default:\r\n size.width = 550;\r\n size.height = 500;\r\n }\r\n }\r\n return {\r\n width: o.width || size.width,\r\n height: o.height || size.height\r\n };\r\n },\r\n\r\n hide: function () {\r\n\r\n },\r\n\r\n open: function () {\r\n this.show();\r\n this.fireEvent(BI.Popover.EVENT_OPEN, arguments);\r\n },\r\n\r\n close: function () {\r\n this.hide();\r\n this.fireEvent(BI.Popover.EVENT_CLOSE, arguments);\r\n },\r\n\r\n setZindex: function (zindex) {\r\n this.element.css({\"z-index\": zindex});\r\n },\r\n\r\n destroyed: function () {\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.popover\", BI.Popover);\r\n\r\nBI.BarPopover = BI.inherit(BI.Popover, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this, arguments), {\r\n btns: [BI.i18nText(\"BI-Basic_Sure\"), BI.i18nText(\"BI-Basic_Cancel\")]\r\n });\r\n },\r\n\r\n beforeCreate: function () {\r\n var self = this, o = this.options;\r\n o.footer || (o.footer = {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: [{\r\n type: \"bi.button\",\r\n text: this.options.btns[1],\r\n value: 1,\r\n level: \"ignore\",\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CANCEL, v);\r\n self.close(v);\r\n }\r\n }, {\r\n type: \"bi.button\",\r\n text: this.options.btns[0],\r\n warningTitle: o.warningTitle,\r\n value: 0,\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CONFIRM, v);\r\n self.close(v);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bar_popover\", BI.BarPopover);\r\n\r\nBI.Popover.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.Popover.EVENT_OPEN = \"EVENT_OPEN\";\r\nBI.Popover.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.Popover.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n/**\r\n * 下拉框弹出层, zIndex在1000w\r\n * @class BI.PopupView\r\n * @extends BI.Widget\r\n */\r\nBI.PopupView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 100,\r\n // maxHeight: 200,\r\n minHeight: 24,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n innerVGap: 0,\r\n direction: BI.Direction.Top, // 工具栏的方向\r\n stopEvent: false, // 是否停止mousedown、mouseup事件\r\n stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡\r\n logic: {\r\n dynamic: true\r\n },\r\n\r\n tool: false, // 自定义工具栏\r\n tabs: [], // 导航栏\r\n buttons: [], // toolbar栏\r\n\r\n el: {\r\n type: \"bi.button_group\",\r\n items: [],\r\n chooseType: 0,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n }, stop = function (e) {\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.css({\r\n \"z-index\": BI.zIndex_popup,\r\n \"min-width\": o.minWidth + \"px\",\r\n \"max-width\": o.maxWidth + \"px\"\r\n }).bind({click: fn});\r\n\r\n this.element.bind(\"mousewheel\", fn);\r\n\r\n o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});\r\n o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});\r\n this.tool = this._createTool();\r\n this.tab = this._createTab();\r\n this.view = this._createView();\r\n this.toolbar = this._createToolBar();\r\n\r\n this.view.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.PopupView.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n scrolly: false,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction,\r\n BI.extend({\r\n cls: \"list-view-outer bi-card list-view-shadow\"\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar)\r\n })))\r\n )\r\n }))));\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n this.button_group = BI.createWidget(o.el, {type: \"bi.button_group\", value: o.value});\r\n this.button_group.element.css({\"min-height\": o.minHeight + \"px\", \"padding-top\": o.innerVGap + \"px\", \"padding-bottom\": o.innerVGap + \"px\"});\r\n return this.button_group;\r\n },\r\n\r\n _createTool: function () {\r\n var o = this.options;\r\n if (false === o.tool) {\r\n return;\r\n }\r\n return BI.createWidget(o.tool);\r\n },\r\n\r\n _createTab: function () {\r\n var o = this.options;\r\n if (o.tabs.length === 0) {\r\n return;\r\n }\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-tab\",\r\n height: 25,\r\n items: o.tabs,\r\n value: o.value\r\n });\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(o.buttons, {\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n })\r\n });\r\n },\r\n\r\n getView: function () {\r\n return this.view;\r\n },\r\n\r\n populate: function (items) {\r\n this.view.populate.apply(this.view, arguments);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.options.width = w;\r\n this.element.width(w);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var tbHeight = this.toolbar ? (this.toolbar.attr(\"height\") || 24) : 0,\r\n tabHeight = this.tab ? (this.tab.attr(\"height\") || 24) : 0,\r\n toolHeight = ((this.tool && this.tool.attr(\"height\")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0);\r\n var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap;\r\n this.view.resetHeight ? this.view.resetHeight(resetHeight) :\r\n this.view.element.css({\"max-height\": resetHeight + \"px\"});\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n this.tab && this.tab.setValue(selectedValues);\r\n this.view.setValue(selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this.view.getValue();\r\n }\r\n});\r\nBI.PopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.popup_view\", BI.PopupView);/**\r\n * 搜索面板\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.SearcherView\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SearcherView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-searcher-view bi-card\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n chooseType: BI.Selection.Single,\r\n\r\n matcher: {// 完全匹配的构造器\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n searcher: {\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearcherView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.matcher = BI.createWidget(o.matcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n this.spliter = BI.createWidget({\r\n type: \"bi.vertical\",\r\n height: 1,\r\n hgap: 10,\r\n items: [{\r\n type: \"bi.layout\",\r\n height: 1,\r\n cls: \"searcher-view-spliter bi-background\"\r\n }]\r\n });\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.matcher, this.spliter, this.searcher]\r\n });\r\n },\r\n\r\n startSearch: function () {\r\n\r\n },\r\n\r\n stopSearch: function () {\r\n\r\n },\r\n\r\n setValue: function (v) {\r\n this.matcher.setValue(v);\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.matcher.getValue().concat(this.searcher.getValue());\r\n },\r\n\r\n populate: function (searchResult, matchResult, keyword) {\r\n searchResult || (searchResult = []);\r\n matchResult || (matchResult = []);\r\n this.setTipVisible(searchResult.length + matchResult.length === 0);\r\n this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult));\r\n this.matcher.populate(matchResult, keyword);\r\n this.searcher.populate(searchResult, keyword);\r\n },\r\n\r\n empty: function () {\r\n this.searcher.empty();\r\n this.matcher.empty();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.matcher.getAllButtons().length > 0;\r\n }\r\n});\r\nBI.SearcherView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.searcher_view\", BI.SearcherView);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/23.\r\n * @class BI.ListView\r\n * @extends BI.Widget\r\n */\r\nBI.ListView = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-list-view\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n el: {},\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [BI.extend({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, o.el)],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n var lastWidth = this.element.width(),\r\n lastHeight = this.element.height();\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n var width = self.element.width(),\r\n height = self.element.height();\r\n if (width !== lastWidth || height !== lastHeight) {\r\n lastWidth = width;\r\n lastHeight = height;\r\n self._calculateBlocksToRender();\r\n }\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this.container.empty();\r\n this.cache = {};\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.list_view\", BI.ListView);\r\n\r\n/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/22.\r\n * @class BI.VirtualList\r\n * @extends BI.Widget\r\n */\r\nBI.VirtualList = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-virtual-list\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.topBlank = this;\r\n }\r\n }, {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, {\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.bottomBlank = this;\r\n }\r\n }],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n self._calculateBlocksToRender();\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.tree.set(cnt, addedHeight);\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n var height = this.element.height();\r\n var minContentHeightFrom = o.scrollTop - o.overscanHeight;\r\n var minContentHeightTo = o.scrollTop + height + o.overscanHeight;\r\n var start = this.tree.greatestLowerBound(minContentHeightFrom);\r\n var end = this.tree.leastUpperBound(minContentHeightTo);\r\n var needDestroyed = [];\r\n for (var i = 0; i < start; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n for (var i = end + 1; i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n var firstFragment = BI.Widget._renderEngine.createFragment(), lastFragment = BI.Widget._renderEngine.createFragment();\r\n var currentFragment = firstFragment;\r\n for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n currentFragment = lastFragment;\r\n }\r\n if (this.cache[i].destroyed === true) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j])), this);\r\n currentFragment.appendChild(w.element[0]);\r\n }\r\n this.cache[i].destroyed = false;\r\n }\r\n }\r\n this.container.element.prepend(firstFragment);\r\n this.container.element.append(lastFragment);\r\n this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop);\r\n var lastCache = this.cache[Math.min(end, this.renderedIndex)];\r\n this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height);\r\n BI.each(needDestroyed, function (i, child) {\r\n child && child._destroy();\r\n });\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize));\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n _clearChildren: function () {\r\n BI.each(this.container._children, function (i, cell) {\r\n cell && cell._destroy();\r\n });\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this._clearChildren();\r\n this.cache = {};\r\n this.options.scrollTop = 0;\r\n // 依赖于cache的占位元素也要初始化\r\n this.topBlank.setHeight(0);\r\n this.bottomBlank.setHeight(0);\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.virtual_list\", BI.VirtualList);\r\n\r\n/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Pager\r\n * @extends BI.Widget\r\n */\r\nBI.Pager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.Pager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n // this._lock = false;\r\n // this._debouce = BI.debounce(function () {\r\n // self._lock = false;\r\n // }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n\r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"bi-list-item-select bi-border-radius\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n // if (self._lock === true) {\r\n // return;\r\n // }\r\n // self._lock = true;\r\n // self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.Pager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v || 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.Pager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.Pager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Pager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.pager\", BI.Pager);/**\r\n * 超链接\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.A\r\n * @extends BI.Text\r\n * @abstract\r\n */\r\nBI.A = BI.inherit(BI.Text, {\r\n _defaultConfig: function () {\r\n var conf = BI.A.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-a display-block\",\r\n href: \"\",\r\n target: \"_blank\",\r\n el: null,\r\n tagName: \"a\"\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.A.superclass._init.apply(this, arguments);\r\n this.element.attr({href: o.href, target: o.target});\r\n if (o.el) {\r\n BI.createWidget(o.el, {\r\n element: this\r\n });\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.a\", BI.A);/**\r\n * guy\r\n * 加载条\r\n * @type {*|void|Object}\r\n */\r\nBI.LoadingBar = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-loading-bar bi-tips\",\r\n height: 30,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.LoadingBar.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.loaded = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"loading-text bi-list-item-simple\",\r\n text: BI.i18nText(\"BI-Load_More\"),\r\n width: 120,\r\n handler: this.options.handler\r\n });\r\n this.loaded.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.loading = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: this.options.height,\r\n height: this.options.height,\r\n cls: \"loading-background cursor-default\"\r\n });\r\n var loaded = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loaded]\r\n });\r\n var loading = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loading]\r\n });\r\n this.cardLayout = BI.createWidget({\r\n type: \"bi.card\",\r\n element: this,\r\n items: [{\r\n el: loaded,\r\n cardName: \"loaded\"\r\n }, {\r\n el: loading,\r\n cardName: \"loading\"\r\n }]\r\n });\r\n this.invisible();\r\n },\r\n\r\n _reset: function () {\r\n this.visible();\r\n this.loaded.setText(BI.i18nText(\"BI-Load_More\"));\r\n this.loaded.enable();\r\n },\r\n\r\n setLoaded: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loaded\");\r\n },\r\n\r\n setEnd: function () {\r\n this.setLoaded();\r\n this.loaded.setText(BI.i18nText(\"BI-No_More_Data\"));\r\n this.loaded.disable();\r\n },\r\n\r\n setLoading: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loading\");\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.loading_bar\", BI.LoadingBar);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标的button\r\n */\r\nBI.IconButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-icon-button horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.IconButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.IconButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_button\", BI.IconButton);/**\r\n * 图片的button\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.ImageButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ImageButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-button\",\r\n src: \"\",\r\n iconWidth: \"100%\",\r\n iconHeight: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.image = BI.createWidget({\r\n type: \"bi.img\",\r\n width: o.iconWidth,\r\n height: o.iconHeight,\r\n src: o.src\r\n });\r\n if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) {\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.image]\r\n });\r\n } else {\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.image],\r\n scrollable: false\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (w) {\r\n BI.ImageButton.superclass.setWidth.apply(this, arguments);\r\n this.options.width = w;\r\n },\r\n\r\n setHeight: function (h) {\r\n BI.ImageButton.superclass.setHeight.apply(this, arguments);\r\n this.options.height = h;\r\n },\r\n\r\n setImageWidth: function (w) {\r\n this.image.setWidth(w);\r\n },\r\n\r\n setImageHeight: function (h) {\r\n this.image.setHeight(h);\r\n },\r\n\r\n getImageWidth: function () {\r\n return this.image.element.width();\r\n },\r\n\r\n getImageHeight: function () {\r\n return this.image.element.height();\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.image.setSrc(src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.image.getSrc();\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.ImageButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.ImageButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.image_button\", BI.ImageButton);\r\n/**\r\n * 文字类型的按钮\r\n * @class BI.Button\r\n * @extends BI.BasicButton\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景\r\n */\r\nBI.Button = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.Button.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-button\" + ((BI.isIE() && BI.isIE9Below()) ? \" hack\" : \"\"),\r\n minWidth: (props.block === true || props.clear === true) ? 0 : 80,\r\n height: 24,\r\n shadow: props.clear !== true,\r\n isShadowShowingOnSelected: true,\r\n readonly: true,\r\n iconCls: \"\",\r\n level: \"common\",\r\n block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制\r\n clear: false, // 是否去掉边框和背景\r\n ghost: false, // 是否幽灵显示, 即正常状态无背景\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: props.clear ? 0 : 10,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Button.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n if (BI.isNumber(o.height) && !o.clear && !o.block) {\r\n this.element.css({height: o.height + \"px\", lineHeight: (o.height - 2) + \"px\"});\r\n } else if (o.clear || o.block) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n } else {\r\n this.element.css({lineHeight: (o.height - 2) + \"px\"});\r\n }\r\n if (BI.isKey(o.iconCls)) {\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls,\r\n width: 18,\r\n height: o.height - 2,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.text,\r\n value: o.value,\r\n height: o.height - 2\r\n });\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: [{\r\n type: \"bi.horizontal\",\r\n items: [this.icon, this.text]\r\n }]\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n element: this,\r\n text: o.text,\r\n value: o.value\r\n });\r\n }\r\n if (o.block === true) {\r\n this.element.addClass(\"block\");\r\n }\r\n if (o.clear === true) {\r\n this.element.addClass(\"clear\");\r\n }\r\n if (o.ghost === true) {\r\n this.element.addClass(\"ghost\");\r\n }\r\n if (o.minWidth > 0) {\r\n this.element.css({\"min-width\": o.minWidth + \"px\"});\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Button.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.Button.EVENT_CHANGE, this);\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n BI.Button.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Button.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(text);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.Button.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.button\", BI.Button);\r\nBI.Button.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n/**\r\n * guy\r\n * 可以点击的一行文字\r\n * @class BI.TextButton\r\n * @extends BI.BasicButton\r\n * 文字button\r\n */\r\nBI.TextButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-button\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n text: \"\",\r\n py: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n width: o.width,\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.TextButton.superclass.setText.apply(this, arguments);\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setText(text);\r\n },\r\n\r\n setStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.TextButton.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setValue(text);\r\n }\r\n }\r\n});\r\nBI.TextButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_button\", BI.TextButton);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth,\r\n height: o.height\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon1, this.icon2, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments);\r\n this.icon1.setSelected(b);\r\n this.icon2.setSelected(b);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_icon_text_item\", BI.BlankIconIconTextItem);/**\r\n * guy\r\n * 一个占位符和两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.BlankIconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n }, icon1, this.text, {\r\n type: \"bi.layout\",\r\n width: o.height\r\n })\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.BlankIconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_icon_item\", BI.BlankIconTextIconItem);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_item\", BI.BlankIconTextItem);/**\r\n * guy\r\n * 两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.leftIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.rightIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_item\", BI.IconTextIconItem);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-item\",\r\n direction: BI.Direction.Left,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: null,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.iconWrapperWidth || o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_item\", BI.IconTextItem);/**\r\n *\r\n * 图标的button\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_item\", BI.TextIconItem);/**\r\n * guy\r\n * 一个button和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-item\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_item\", BI.TextItem);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height,\r\n height: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_node\", BI.IconTextIconNode);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_node\", BI.IconTextNode);/**\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_node\", BI.TextIconNode);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-node\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextNode.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_node\", BI.TextNode);/**\r\n * Created by GUY on 2015/4/15.\r\n * @class BI.Editor\r\n * @extends BI.Single\r\n */\r\nBI.Editor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-editor bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n // title,warningTitle这两个属性没用\r\n tipType: \"warning\",\r\n inputType: \"text\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Editor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = this.addWidget(BI.createWidget({\r\n type: \"bi.input\",\r\n element: \"<input type='\" + o.inputType + \"'/>\",\r\n root: true,\r\n value: o.value,\r\n watermark: o.watermark,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank\r\n }));\r\n this.editor.element.css({\r\n width: \"100%\",\r\n height: \"100%\",\r\n border: \"none\",\r\n outline: \"none\",\r\n padding: \"0\",\r\n margin: \"0\"\r\n });\r\n if (BI.isKey(this.options.watermark)) {\r\n this._assertWaterMark();\r\n }\r\n\r\n var _items = [];\r\n if (this.watermark) {\r\n _items.push({\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n });\r\n }\r\n _items.push({\r\n el: this.editor,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n });\r\n\r\n var items = [{\r\n el: {\r\n type: \"bi.absolute\",\r\n ref: function(_ref) {\r\n self.contentWrapper = _ref;\r\n },\r\n items: _items\r\n },\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap\r\n }];\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: items\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_FOCUS, function () {\r\n self._checkError();\r\n self.element.addClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BLUR, function () {\r\n self._setErrorVisible(false);\r\n self.element.removeClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CLICK, function () {\r\n self.fireEvent(BI.Editor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) {\r\n // tab键就不要隐藏了\r\n if (e.keyCode !== BI.KeyCode.TAB && self.watermark) {\r\n self.watermark.invisible();\r\n }\r\n });\r\n\r\n this.editor.on(BI.Input.EVENT_VALID, function () {\r\n self._checkWaterMark();\r\n self._setErrorVisible(false);\r\n self.fireEvent(BI.Editor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ERROR, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_ERROR, arguments);\r\n self._setErrorVisible(self.isEditing());\r\n });\r\n this.editor.on(BI.Input.EVENT_RESTRICT, function () {\r\n self._checkWaterMark();\r\n var tip = self._setErrorVisible(true);\r\n tip && tip.element.fadeOut(100, function () {\r\n tip.element.fadeIn(100);\r\n });\r\n self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_EMPTY, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ENTER, function () {\r\n self.fireEvent(BI.Editor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_SPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.Editor.EVENT_REMOVE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_START, function () {\r\n self.fireEvent(BI.Editor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.Editor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_STOP, function () {\r\n self.fireEvent(BI.Editor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.element.click(function (e) {\r\n e.stopPropagation();\r\n return false;\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this._checkError();\r\n this._checkWaterMark();\r\n } else {\r\n this._checkWaterMark();\r\n }\r\n },\r\n\r\n _checkToolTip: function () {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(this.editor.getValue());\r\n }\r\n if (BI.isKey(errorText)) {\r\n if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) {\r\n this.setTitle(\"\");\r\n } else {\r\n this.setTitle(errorText);\r\n }\r\n }\r\n },\r\n\r\n _assertWaterMark: function() {\r\n var self = this, o = this.options;\r\n if(BI.isNull(this.watermark)) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-water-mark\",\r\n text: this.options.watermark,\r\n height: o.height - 2 * (o.vgap + o.tgap),\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"left\"\r\n });\r\n this.watermark.element.bind({\r\n mousedown: function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n }\r\n });\r\n this.watermark.element.bind(\"click\", function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n });\r\n }\r\n },\r\n\r\n _checkError: function () {\r\n this._setErrorVisible(this.isEnabled() && !this.isValid());\r\n this._checkToolTip();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var o = this.options;\r\n if (!this.disabledWaterMark && this.editor.getValue() === \"\" && BI.isKey(o.watermark)) {\r\n this.watermark && this.watermark.visible();\r\n } else {\r\n this.watermark && this.watermark.invisible();\r\n }\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.options.errorText = text;\r\n },\r\n\r\n getErrorText: function () {\r\n return this.options.errorText;\r\n },\r\n\r\n setWaterMark: function(v) {\r\n this.options.watermark = v;\r\n if(BI.isNull(this.watermark)) {\r\n this._assertWaterMark();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.contentWrapper,\r\n items: [{\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n })\r\n }\r\n BI.isKey(v) && this.watermark.setText(v);\r\n },\r\n\r\n _setErrorVisible: function (b) {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(BI.trim(this.editor.getValue()));\r\n }\r\n if (!this.disabledError && BI.isKey(errorText)) {\r\n BI.Bubbles[b ? \"show\" : \"hide\"](this.getName(), errorText, this, {\r\n adjustYOffset: 2\r\n });\r\n this._checkToolTip();\r\n return BI.Bubbles.get(this.getName());\r\n }\r\n },\r\n\r\n disableError: function () {\r\n this.disabledError = true;\r\n this._checkError();\r\n },\r\n\r\n enableError: function () {\r\n this.disabledError = false;\r\n this._checkError();\r\n },\r\n\r\n disableWaterMark: function () {\r\n this.disabledWaterMark = true;\r\n this._checkWaterMark();\r\n },\r\n\r\n enableWaterMark: function () {\r\n this.disabledWaterMark = false;\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this.element.addClass(\"text-editor-focus\");\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.element.removeClass(\"text-editor-focus\");\r\n this.editor.blur();\r\n },\r\n\r\n selectAll: function () {\r\n this.editor.selectAll();\r\n },\r\n\r\n onKeyDown: function (k) {\r\n this.editor.onKeyDown(k);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.Editor.superclass.setValue.apply(this, arguments);\r\n this.editor.setValue(v);\r\n this._checkError();\r\n this._checkWaterMark();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.isValid()) {\r\n return BI.trim(this.editor.getLastValidValue());\r\n }\r\n return BI.trim(this.editor.getValue());\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Bubbles.remove(this.getName());\r\n }\r\n});\r\nBI.Editor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Editor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Editor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Editor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Editor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Editor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Editor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Editor.EVENT_START = \"EVENT_START\";\r\nBI.Editor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Editor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Editor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Editor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Editor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Editor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Editor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Editor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.Editor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Editor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.editor\", BI.Editor);/**\r\n * 多文件\r\n *\r\n * Created by GUY on 2016/4/13.\r\n * @class BI.MultifileEditor\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.MultifileEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-multifile-editor\",\r\n multiple: false,\r\n maxSize: -1, // 1024 * 1024\r\n accept: \"\",\r\n url: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.MultifileEditor.superclass._init.apply(this, arguments);\r\n this.file = BI.createWidget({\r\n type: \"bi.file\",\r\n cls: \"multifile-editor\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n name: o.name,\r\n url: o.url,\r\n multiple: o.multiple,\r\n accept: o.accept,\r\n maxSize: o.maxSize,\r\n title: o.title\r\n });\r\n this.file.on(BI.File.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADSTART, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_ERROR, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_PROGRESS, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADED, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n scrollable: false,\r\n items: [this.file]\r\n },\r\n top: 0,\r\n right: 0,\r\n left: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n select: function () {\r\n this.file.select();\r\n },\r\n\r\n getValue: function () {\r\n return this.file.getValue();\r\n },\r\n\r\n upload: function () {\r\n this.file.upload();\r\n },\r\n\r\n reset: function () {\r\n this.file.reset();\r\n }\r\n});\r\nBI.MultifileEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultifileEditor.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\nBI.MultifileEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.MultifileEditor.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\nBI.MultifileEditor.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\nBI.shortcut(\"bi.multifile_editor\", BI.MultifileEditor);/**\r\n *\r\n * Created by GUY on 2016/1/18.\r\n * @class BI.TextAreaEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextAreaEditor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), {\r\n baseCls: \"bi-textarea-editor\",\r\n value: \"\"\r\n });\r\n },\r\n\r\n render: function() {\r\n var o = this.options, self = this;\r\n this.content = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"textarea\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n cls: \"bi-textarea textarea-editor-content display-block\"\r\n });\r\n this.content.element.css({resize: \"none\"});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n items: [this.content]\r\n },\r\n left: 4,\r\n right: 4,\r\n top: 4,\r\n bottom: 4\r\n }]\r\n });\r\n\r\n this.content.element.on(\"input propertychange\", function (e) {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE);\r\n });\r\n\r\n this.content.element.focus(function () {\r\n if (self.isValid()) {\r\n self._focus();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);\r\n }\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + self.getName(), function (e) {\r\n if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n self.content.element.blur();\r\n }\r\n });\r\n });\r\n this.content.element.blur(function () {\r\n if (self.isValid()) {\r\n self._blur();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_BLUR);\r\n }\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n if (BI.isNotNull(o.style)) {\r\n this.setStyle(o.style);\r\n }\r\n this._checkWaterMark();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var self = this, o = this.options;\r\n var val = this.getValue();\r\n if (BI.isNotEmptyString(val)) {\r\n this.watermark && this.watermark.destroy();\r\n this.watermark = null;\r\n } else {\r\n if (BI.isNotEmptyString(o.watermark)) {\r\n if (!this.watermark) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark cursor-default textarea-watermark\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.watermark,\r\n invalid: o.invalid,\r\n disabled: o.disabled,\r\n hgap: 4,\r\n vgap: 4\r\n });\r\n this.watermark.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.focus();\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.watermark,\r\n left: 0,\r\n top: 0,\r\n right: 0\r\n }]\r\n });\r\n } else {\r\n this.watermark.setText(o.watermark);\r\n this.watermark.setValid(!o.invalid);\r\n this.watermark.setEnable(!o.disabled);\r\n }\r\n }\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.content.element.addClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n _blur: function () {\r\n this.content.element.removeClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this._focus();\r\n this.content.element.focus();\r\n },\r\n\r\n blur: function () {\r\n this._blur();\r\n this.content.element.blur();\r\n },\r\n\r\n getValue: function () {\r\n return this.content.element.val();\r\n },\r\n\r\n setValue: function (value) {\r\n this.content.element.val(value);\r\n this._checkWaterMark();\r\n },\r\n\r\n setStyle: function (style) {\r\n this.style = style;\r\n this.element.css(style);\r\n this.content.element.css(BI.extend({}, style, {\r\n color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor)\r\n }));\r\n },\r\n\r\n getStyle: function () {\r\n return this.style;\r\n },\r\n\r\n _setValid: function (b) {\r\n BI.TextAreaEditor.superclass._setValid.apply(this, arguments);\r\n // this.content.setValid(b);\r\n // this.watermark && this.watermark.setValid(b);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.TextAreaEditor.superclass._setEnable.apply(this, [b]);\r\n this.content && (this.content.element[0].disabled = !b);\r\n }\r\n});\r\nBI.TextAreaEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextAreaEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextAreaEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.shortcut(\"bi.textarea_editor\", BI.TextAreaEditor);/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Html\r\n * @extends BI.Single\r\n */\r\nBI.Html = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-html\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textOverflow: o.whiteSpace === 'nowrap' ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : \"auto\"\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n if (BI.isKey(o.text)) {\r\n this.setText(o.text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Html.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Html.superclass.setText.apply(this, arguments);\r\n this.options.text = text;\r\n this.text.element.html(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html\", BI.Html);/**\r\n * guy 图标\r\n * @class BI.Icon\r\n * @extends BI.Single\r\n */\r\nBI.Icon = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"i\",\r\n baseCls: (conf.baseCls || \"\") + \" x-icon b-font horizon-center display-block\"\r\n });\r\n },\r\n _init: function () {\r\n BI.Icon.superclass._init.apply(this, arguments);\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon\", BI.Icon);/**\r\n * @class BI.Iframe\r\n * @extends BI.Single\r\n * @abstract\r\n * Created by GameJian on 2016/3/2.\r\n */\r\nBI.Iframe = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"iframe\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-iframe\",\r\n src: \"\",\r\n name: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.frameborder = \"0\";\r\n o.attributes.src = o.src;\r\n o.attributes.name = o.name;\r\n BI.Iframe.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n },\r\n\r\n setName: function (name) {\r\n this.options.name = name;\r\n this.element.attr(\"name\", name);\r\n },\r\n\r\n getName: function () {\r\n return this.options.name;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.iframe\", BI.Iframe);/**\r\n * ͼƬ\r\n *\r\n * Created by GUY on 2016/1/26.\r\n * @class BI.Img\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Img = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Img.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"img\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-img display-block\",\r\n src: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.src = o.src;\r\n BI.Img.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.img\", BI.Img);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageCheckbox.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-checkbox check-box-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n }\r\n});\r\nBI.ImageCheckbox.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_checkbox\", BI.ImageCheckbox);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Checkbox = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-checkbox\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.default\",\r\n ref: function (_ref) {\r\n self.checkbox = _ref;\r\n },\r\n cls: \"checkbox-content\",\r\n width: o.iconWidth - 2,\r\n height: o.iconHeight - 2\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Checkbox.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.checkbox.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.checkbox.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Checkbox.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Checkbox.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Checkbox.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.checkbox.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.checkbox.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Checkbox.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.checkbox\", BI.Checkbox);/**\r\n * 文件\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.File\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\n(function (document) {\r\n\r\n /**\r\n * @description normalize input.files. create if not present, add item method if not present\r\n * @param Object generated wrap object\r\n * @return Object the wrap object itself\r\n */\r\n var F = (function (item) {\r\n return function (input) {\r\n var files = input.files || [input];\r\n if (!files.item) {\r\n files.item = item;\r\n }\r\n return files;\r\n };\r\n })(function (i) {\r\n return this[i];\r\n });\r\n\r\n var event = {\r\n\r\n /**\r\n * @description add an event via addEventListener or attachEvent\r\n * @param DOMElement the element to add event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback to associate as event\r\n * @return Object noswfupload.event\r\n */\r\n add: document.addEventListener ?\r\n function (node, name, callback) {\r\n node.addEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.attachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description remove an event via removeEventListener or detachEvent\r\n * @param DOMElement the element to remove event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback associated as event\r\n * @return Object noswfupload.event\r\n */\r\n del: document.removeEventListener ?\r\n function (node, name, callback) {\r\n node.removeEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.detachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description to block event propagation and prevent event default\r\n * @param void generated event or undefined\r\n * @return Boolean false\r\n */\r\n stop: function (e) {\r\n if (!e) {\r\n if (self.event) {\r\n event.returnValue = !(event.cancelBubble = true);\r\n }\r\n } else {\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n e.preventDefault ? e.preventDefault() : e.returnValue = false;\r\n }\r\n\r\n return false;\r\n }\r\n };\r\n\r\n var sendFile = (function (toString) {\r\n var multipart = function (boundary, name, file) {\r\n return \"--\".concat(\r\n boundary, CRLF,\r\n \"Content-Disposition: form-data; name=\\\"\", name, \"\\\"; filename=\\\"\", _global.encodeURIComponent(file.fileName), \"\\\"\", CRLF,\r\n \"Content-Type: application/octet-stream\", CRLF,\r\n CRLF,\r\n file.getAsBinary(), CRLF,\r\n \"--\", boundary, \"--\", CRLF\r\n );\r\n },\r\n isFunction = function (Function) {\r\n return toString.call(Function) === \"[object Function]\";\r\n },\r\n split = \"onabort.onerror.onloadstart.onprogress\".split(\".\"),\r\n length = split.length,\r\n CRLF = \"\\r\\n\",\r\n xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject(\"Microsoft.XMLHTTP\"),\r\n sendFile;\r\n\r\n // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work)\r\n if (xhr.upload || xhr.sendAsBinary) {\r\n sendFile = function (handler, maxSize, width, height) {\r\n if (-1 < maxSize && maxSize < handler.file.fileSize) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror();\r\n }\r\n return;\r\n }\r\n for (var\r\n xhr = new XMLHttpRequest,\r\n upload = xhr.upload || {\r\n addEventListener: function (event, callback) {\r\n this[\"on\" + event] = callback;\r\n }\r\n },\r\n i = 0;\r\n i < length;\r\n i++\r\n ) {\r\n upload.addEventListener(\r\n split[i].substring(2),\r\n (function (event) {\r\n return function (rpe) {\r\n if (isFunction(handler[event])) {\r\n handler[event](rpe, xhr);\r\n }\r\n };\r\n })(split[i]),\r\n false\r\n );\r\n }\r\n upload.addEventListener(\r\n \"load\",\r\n function (rpe) {\r\n if (handler.onreadystatechange === false) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(function () {\r\n if (xhr.readyState === 4) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(arguments.callee, 15);\r\n }\r\n }, 15);\r\n }\r\n },\r\n false\r\n );\r\n xhr.open(\"post\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName), true);\r\n if (!xhr.upload) {\r\n var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};\r\n rpe.interval = setInterval(function () {\r\n rpe.loaded += 1024 / 4;\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n }, 100);\r\n xhr.onabort = function () {\r\n upload.onabort({});\r\n };\r\n xhr.onerror = function () {\r\n upload.onerror({});\r\n };\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 2:\r\n case 3:\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n break;\r\n case 4:\r\n clearInterval(rpe.interval);\r\n rpe.interval = 0;\r\n rpe.loaded = rpe.total;\r\n upload.onprogress(rpe);\r\n if (199 < xhr.status && xhr.status < 400) {\r\n upload[\"onload\"]({});\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n attachO.filename = handler.file.fileName;\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n handler.attach_array.push(attachO);\r\n } else {\r\n upload[\"onerror\"]({});\r\n }\r\n break;\r\n }\r\n };\r\n upload.onloadstart(rpe);\r\n } else {\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 4:\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n attachO.filename = handler.file.fileName;\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n // handler.attach_array.push(attachO);\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n break;\r\n }\r\n };\r\n if (isFunction(upload.onloadstart)) {\r\n upload.onloadstart();\r\n }\r\n }\r\n var boundary = \"AjaxUploadBoundary\" + (new Date).getTime();\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data; boundary=\" + boundary);\r\n if (handler.file.getAsBinary) {\r\n xhr[xhr.sendAsBinary ? \"sendAsBinary\" : \"send\"](multipart(boundary, handler.name, handler.file));\r\n } else {\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data\");\r\n // xhr.setRequestHeader(\"X-Name\", handler.name);\r\n // xhr.setRequestHeader(\"X-File-Name\", handler.file.fileName);\r\n var form = new FormData();\r\n form.append(\"FileData\", handler.file);\r\n xhr.send(form);\r\n }\r\n return handler;\r\n };\r\n }\r\n // Internet Explorer, Opera, others\r\n else {\r\n sendFile = function (handler, maxSize, width, height) {\r\n var url = handler.url.concat(-1 === handler.url.indexOf(\"?\") ? \"?\" : \"&\", \"AjaxUploadFrame=true\"),\r\n rpe = {\r\n loaded: 1, total: 100, simulation: true, interval: setInterval(function () {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n if (isFunction(handler.onprogress)) {\r\n handler.onprogress(rpe, {});\r\n }\r\n }, 100)\r\n },\r\n onload = function () {\r\n iframe.onreadystatechange = iframe.onload = iframe.onerror = null;\r\n form.parentNode.removeChild(form);\r\n form = null;\r\n clearInterval(rpe.interval);\r\n // rpe.loaded = rpe.total;\r\n try {\r\n var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML;\r\n var attachO = BI.jsonDecode(responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n\r\n // attachO.fileSize = responseText.length;\r\n try {\r\n // decodeURIComponent特殊字符可能有问题, catch一下,保证能正常上传\r\n attachO.filename = _global.decodeURIComponent(handler.file.fileName);\r\n } catch (e) {\r\n attachO.filename = handler.file.fileName;\r\n }\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n } catch (e) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n }\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, {responseText: responseText});\r\n }\r\n },\r\n target = [\"AjaxUpload\", (new Date).getTime(), String(Math.random()).substring(2)].join(\"_\");\r\n try { // IE < 8 does not accept enctype attribute ...\r\n var form = document.createElement(\"<form enctype=\\\"multipart/form-data\\\"></form>\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"<iframe id=\\\"\" + target + \"\\\" name=\\\"\" + target + \"\\\" src=\\\"\" + url + \"\\\"></iframe>\"));\r\n } catch (e) {\r\n var form = document.createElement(\"form\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"iframe\"));\r\n form.setAttribute(\"enctype\", \"multipart/form-data\");\r\n iframe.setAttribute(\"name\", iframe.id = target);\r\n iframe.setAttribute(\"src\", url);\r\n }\r\n iframe.style.position = \"absolute\";\r\n iframe.style.left = iframe.style.top = \"-10000px\";\r\n iframe.onload = onload;\r\n iframe.onerror = function (event) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n };\r\n iframe.onreadystatechange = function () {\r\n if (/loaded|complete/i.test(iframe.readyState)) {\r\n onload();\r\n\r\n // wei : todo,将附件信息放到handler.attach\r\n } else if (isFunction(handler.onloadprogress)) {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n handler.onloadprogress(rpe, {\r\n readyState: {\r\n loading: 2,\r\n interactive: 3,\r\n loaded: 4,\r\n complete: 4\r\n }[iframe.readyState] || 1\r\n });\r\n }\r\n };\r\n form.setAttribute(\"action\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName));\r\n form.setAttribute(\"target\", iframe.id);\r\n form.setAttribute(\"method\", \"post\");\r\n form.appendChild(handler.file);\r\n form.style.display = \"none\";\r\n if (isFunction(handler.onloadstart)) {\r\n handler.onloadstart(rpe, {});\r\n }\r\n with (document.body || document.documentElement) {\r\n appendChild(iframe);\r\n appendChild(form);\r\n form.submit();\r\n }\r\n\r\n return handler;\r\n };\r\n }\r\n xhr = null;\r\n return sendFile;\r\n })(Object.prototype.toString);\r\n\r\n var sendFiles = function (handler, maxSize, width, height) {\r\n\r\n var length = handler.files.length,\r\n i = 0,\r\n onload = handler.onload,\r\n onloadstart = handler.onloadstart;\r\n handler.current = 0;\r\n handler.total = 0;\r\n handler.sent = 0;\r\n while (handler.current < length) {\r\n handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n handler.current++;\r\n }\r\n handler.current = 0;\r\n if (length && handler.files[0].fileSize !== -1) {\r\n handler.file = handler.files[handler.current];\r\n\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n handler.onloadstart = null;\r\n handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n if (++handler.current < length) {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = arguments.callee;\r\n } else if (onload) {\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }\r\n };\r\n } else if (length) {\r\n handler.total = length * 100;\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n var callee = arguments.callee;\r\n handler.onloadstart = null;\r\n handler.sent += 100;\r\n if (++handler.current < length) {\r\n if (/\\b(chrome|safari)\\b/i.test(navigator.userAgent)) {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n }\r\n setTimeout(function () {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = callee;\r\n }, 15);\r\n } else if (onload) {\r\n setTimeout(function () {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }, 15);\r\n }\r\n };\r\n }\r\n return handler;\r\n };\r\n\r\n BI.File = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.File.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-file display-block\",\r\n tagName: \"input\",\r\n attributes: {\r\n type: \"file\"\r\n },\r\n name: \"\",\r\n url: \"\",\r\n multiple: true,\r\n accept: \"\", /** '*.jpg; *.zip'**/\r\n maxSize: -1 // 1024 * 1024\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.File.superclass._init.apply(this, arguments);\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n this.element.attr(\"name\", o.name || this.getName());\r\n this.element.attr(\"title\", o.title || \"\");\r\n },\r\n\r\n created: function () {\r\n var self = this, o = this.options;\r\n // create the noswfupload.wrap Object\r\n // wrap.maxSize 文件大小限制\r\n // wrap.maxlength 文件个数限制\r\n var _wrap = this.wrap = this._wrap(this.element[0], o.maxSize);\r\n // fileType could contain whatever text but filter checks *.{extension}\r\n // if present\r\n\r\n // handlers\r\n\r\n _wrap.onloadstart = function (rpe, xhr) {\r\n // BI.Msg.toast(\"loadstart\");\r\n self.fireEvent(BI.File.EVENT_UPLOADSTART, arguments);\r\n };\r\n\r\n _wrap.onprogress = function (rpe, xhr) {\r\n // BI.Msg.toast(\"onprogress\");\r\n // percent for each bar\r\n\r\n // fileSize is -1 only if browser does not support file info access\r\n // this if splits recent browsers from others\r\n if (this.file.fileSize !== -1) {\r\n // simulation property indicates when the progress event is fake\r\n if (rpe.simulation) {\r\n\r\n } else {\r\n\r\n }\r\n } else {\r\n // if fileSIze is -1 browser is using an iframe because it does\r\n // not support\r\n // files sent via Ajax (XMLHttpRequest)\r\n // We can still show some information\r\n }\r\n self.fireEvent(BI.File.EVENT_PROGRESS, {\r\n file: this.file,\r\n total: rpe.total,\r\n loaded: rpe.loaded,\r\n simulation: rpe.simulation\r\n });\r\n };\r\n\r\n // generated if there is something wrong during upload\r\n _wrap.onerror = function () {\r\n // just inform the user something was wrong\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n };\r\n\r\n // generated when every file has been sent (one or more, it does not\r\n // matter)\r\n _wrap.onload = function (rpe, xhr) {\r\n var self_ = this;\r\n // just show everything is fine ...\r\n // ... and after a second reset the component\r\n setTimeout(function () {\r\n self_.clean(); // remove files from list\r\n self_.hide(); // hide progress bars and enable input file\r\n\r\n if (200 > xhr.status || xhr.status > 399) {\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n return;\r\n }\r\n var error = BI.some(_wrap.attach_array, function (index, attach) {\r\n if (attach.errorCode) {\r\n BI.Msg.toast(attach.errorMsg, {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, attach);\r\n return true;\r\n }\r\n });\r\n !error && self.fireEvent(BI.File.EVENT_UPLOADED);\r\n // enable again the submit button/element\r\n }, 1000);\r\n };\r\n _wrap.url = o.url;\r\n _wrap.fileType = o.accept; // 文件类型限制\r\n _wrap.attach_array = [];\r\n _wrap.attach_names = [];\r\n _wrap.attachNum = 0;\r\n },\r\n\r\n _events: function (wrap) {\r\n var self = this;\r\n event.add(wrap.dom.input, \"change\", function () {\r\n event.del(wrap.dom.input, \"change\", arguments.callee);\r\n for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) {\r\n var item = files.item(i);\r\n var tempFile = item.value || item.name;\r\n var value = item.fileName || (item.fileName = tempFile.split(\"\\\\\").pop()),\r\n ext = -1 !== value.indexOf(\".\") ? value.split(\".\").pop().toLowerCase() : \"unknown\",\r\n size = item.fileSize || item.size;\r\n if (wrap.fileType && -1 === wrap.fileType.indexOf(\"*.\" + ext)) {\r\n // 文件类型不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Type_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 0,\r\n file: item\r\n });\r\n } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {\r\n // 文件大小不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Size_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 1,\r\n file: item\r\n });\r\n } else {\r\n wrap.files.unshift(item);\r\n // BI.Msg.toast(value);\r\n }\r\n }\r\n wrap.files.length > 0 && self.fireEvent(BI.File.EVENT_CHANGE, {\r\n files: wrap.files\r\n });\r\n input.value = \"\";\r\n wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input);\r\n wrap.dom.input = input;\r\n event.add(wrap.dom.input, \"change\", arguments.callee);\r\n });\r\n return wrap;\r\n },\r\n\r\n _wrap: function () {\r\n var self = this, o = this.options;\r\n // be sure input accept multiple files\r\n var input = this.element[0];\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n input.value = \"\";\r\n\r\n // wrap Object\r\n return this._events({\r\n\r\n // DOM namespace\r\n dom: {\r\n input: input, // input file\r\n disabled: false // internal use, checks input file state\r\n },\r\n name: input.name, // name to send for each file ($_FILES[{name}] in the server)\r\n // maxSize is the maximum amount of bytes for each file\r\n maxSize: o.maxSize ? o.maxSize >> 0 : -1,\r\n files: [], // file list\r\n\r\n // remove every file from the noswfupload component\r\n clean: function () {\r\n this.files = [];\r\n },\r\n\r\n // upload one file a time (which make progress possible rather than all files in one shot)\r\n // the handler is an object injected into the wrap one, could be the wrap itself or\r\n // something like {onload:function(){alert(\"OK\")},onerror:function(){alert(\"Error\")}, etc ...}\r\n upload: function (handler) {\r\n if (handler) {\r\n for (var key in handler) {\r\n this[key] = handler[key];\r\n }\r\n }\r\n sendFiles(this, this.maxSize);\r\n return this;\r\n },\r\n\r\n // hide progress bar (total + current) and enable files selection\r\n hide: function () {\r\n if (this.dom.disabled) {\r\n this.dom.disabled = false;\r\n this.dom.input.removeAttribute(\"disabled\");\r\n }\r\n },\r\n\r\n // show progress bar and disable file selection (used during upload)\r\n // total and current are pixels used to style bars\r\n // totalProp and currentProp are properties to change, \"height\" by default\r\n show: function (total, current, totalProp, currentProp) {\r\n if (!this.dom.disabled) {\r\n this.dom.disabled = true;\r\n this.dom.input.setAttribute(\"disabled\", \"disabled\");\r\n }\r\n }\r\n });\r\n },\r\n\r\n select: function () {\r\n this.wrap && BI.Widget._renderEngine.createElement(this.wrap.dom.input).click();\r\n },\r\n\r\n upload: function (handler) {\r\n this.wrap && this.wrap.upload(handler);\r\n },\r\n\r\n getValue: function () {\r\n return this.wrap ? this.wrap.attach_array : [];\r\n },\r\n\r\n reset: function () {\r\n if (this.wrap) {\r\n this.wrap.attach_array = [];\r\n this.wrap.attach_names = [];\r\n this.wrap.attachNum = 0;\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.File.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.attr(\"disabled\", \"disabled\");\r\n } else {\r\n this.element.removeAttr(\"disabled\");\r\n }\r\n }\r\n });\r\n BI.File.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.File.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\n BI.File.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.File.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\n BI.File.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\n BI.shortcut(\"bi.file\", BI.File);\r\n})(_global.document || {});/**\r\n * guy\r\n * @class BI.Input 一个button和一行数 组成的一行listitem\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Input = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Input.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-input display-block overflow-dot\",\r\n tagName: \"input\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn, // 按确定键能否退出编辑\r\n allowBlank: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Input.superclass._init.apply(this, arguments);\r\n var self = this;\r\n var ctrlKey = false;\r\n var keyCode = null;\r\n var inputEventValid = false;\r\n var _keydown = BI.debounce(function (keyCode) {\r\n self.onKeyDown(keyCode, ctrlKey);\r\n self._keydown_ = false;\r\n }, 300);\r\n var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._focusDebounce = BI.debounce(BI.bind(this._focus, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.element\r\n .keydown(function (e) {\r\n inputEventValid = false;\r\n ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下\r\n keyCode = e.keyCode;\r\n self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);\r\n })\r\n .keyup(function (e) {\r\n keyCode = null;\r\n if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) {\r\n self._keydown_ = true;\r\n _keydown(e.keyCode);\r\n }\r\n })\r\n .on(\"input propertychange\", function (e) {\r\n // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了\r\n // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8\r\n // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓)\r\n var originalEvent = e.originalEvent;\r\n if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === \"value\") {\r\n inputEventValid = true;\r\n self._keydown_ = true;\r\n _keydown(keyCode);\r\n keyCode = null;\r\n }\r\n })\r\n .click(function (e) {\r\n e.stopPropagation();\r\n _clk();\r\n })\r\n .mousedown(function (e) {\r\n self.element.val(self.element.val());\r\n })\r\n .focus(function (e) { // 可以不用冒泡\r\n self._focusDebounce();\r\n })\r\n .focusout(function (e) {\r\n self._blurDebounce();\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.element.addClass(\"bi-input-focus\");\r\n this._checkValidationOnValueChange();\r\n this._isEditing = true;\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this.fireEvent(BI.Input.EVENT_FOCUS);\r\n },\r\n\r\n _blur: function () {\r\n var self = this;\r\n if (self._keydown_ === true) {\r\n BI.delay(blur, 300);\r\n } else {\r\n blur();\r\n }\r\n\r\n function blur () {\r\n if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) {\r\n self.element.val(self._lastValidValue ? self._lastValidValue : \"\");\r\n self._checkValidationOnValueChange();\r\n self._defaultState();\r\n }\r\n self.element.removeClass(\"bi-input-focus\");\r\n self._isEditing = false;\r\n self._start = false;\r\n if (self.isValid()) {\r\n var lastValidValue = self._lastValidValue;\r\n self._lastValidValue = self.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);\r\n self.fireEvent(BI.Input.EVENT_CONFIRM);\r\n if (self._lastValidValue !== lastValidValue) {\r\n self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);\r\n }\r\n }\r\n self.fireEvent(BI.Input.EVENT_BLUR);\r\n }\r\n },\r\n\r\n _click: function () {\r\n if (this._isEditing !== true) {\r\n this.selectAll();\r\n this.fireEvent(BI.Input.EVENT_CLICK);\r\n }\r\n },\r\n\r\n onClick: function () {\r\n this._click();\r\n },\r\n\r\n onKeyDown: function (keyCode, ctrlKey) {\r\n if (!this.isValid() || BI.trim(this._lastChangedValue) !== BI.trim(this.getValue())) {\r\n this._checkValidationOnValueChange();\r\n }\r\n if (this.isValid() && BI.trim(this.getValue()) !== \"\") {\r\n if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === \"\")\r\n || (this._pause === true && !/(\\s|\\u00A0)$/.test(this.getValue()))) {\r\n this._start = true;\r\n this._pause = false;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_START);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.ENTER) {\r\n if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {\r\n this.blur();\r\n this.fireEvent(BI.Input.EVENT_ENTER);\r\n } else {\r\n this.fireEvent(BI.Input.EVENT_RESTRICT);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.SPACE) {\r\n this.fireEvent(BI.Input.EVENT_SPACE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == \"\") {\r\n this.fireEvent(BI.Input.EVENT_REMOVE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {\r\n this.fireEvent(BI.Input.EVENT_BACKSPACE);\r\n }\r\n this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);\r\n\r\n // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务\r\n var lastValue = this._lastValue;\r\n if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || \"\")){\r\n this._valueChange();\r\n }\r\n if (BI.isEndWithBlank(this.getValue())) {\r\n this._pause = true;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, \"\", this);\r\n this.fireEvent(BI.Input.EVENT_PAUSE);\r\n this._defaultState();\r\n } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&\r\n BI.trim(this.getValue()) === \"\" && (lastValue !== null && BI.trim(lastValue) !== \"\")) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_STOP);\r\n }\r\n },\r\n\r\n // 初始状态\r\n _defaultState: function () {\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n this._lastSubmitValue = null;\r\n },\r\n\r\n _valueChange: function () {\r\n if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_CHANGE);\r\n this._lastSubmitValue = BI.trim(this.getValue());\r\n }\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n },\r\n\r\n _checkValidationOnValueChange: function () {\r\n var o = this.options;\r\n var v = this.getValue();\r\n this.setValid(\r\n (o.allowBlank === true && BI.trim(v) == \"\") || (\r\n BI.isNotEmptyString(BI.trim(v)) && o.validationChecker.apply(this, [BI.trim(v)]) !== false\r\n )\r\n );\r\n },\r\n\r\n focus: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能focus\");\r\n }\r\n if (!this._isEditing === true) {\r\n this.element.focus();\r\n this.selectAll();\r\n }\r\n },\r\n\r\n blur: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能blur\");\r\n }\r\n if (this._isEditing === true) {\r\n this.element.blur();\r\n this._blurDebounce();\r\n }\r\n },\r\n\r\n selectAll: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能select\");\r\n }\r\n this.element.select();\r\n this._isEditing = true;\r\n },\r\n\r\n setValue: function (textValue) {\r\n this.element.val(textValue);\r\n BI.nextTick(BI.bind(function () {\r\n this._checkValidationOnValueChange();\r\n this._defaultState();\r\n if (this.isValid()) {\r\n this._lastValidValue = this._lastSubmitValue = this.getValue();\r\n }\r\n }, this));\r\n },\r\n\r\n getValue: function () {\r\n return this.element.val() || \"\";\r\n },\r\n\r\n isEditing: function () {\r\n return this._isEditing;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this._lastValidValue;\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this._lastChangedValue;\r\n },\r\n\r\n _setValid: function () {\r\n BI.Input.superclass._setValid.apply(this, arguments);\r\n if (this.isValid()) {\r\n this._lastChangedValue = this.getValue();\r\n this.element.removeClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);\r\n } else {\r\n if (this._lastChangedValue === this.getValue()) {\r\n this._lastChangedValue = null;\r\n }\r\n this.element.addClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this);\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.Input.superclass._setEnable.apply(this, [b]);\r\n this.element[0].disabled = !b;\r\n }\r\n});\r\nBI.Input.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.Input.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Input.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Input.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Input.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Input.EVENT_QUICK_DOWN = \"EVENT_QUICK_DOWN\";\r\nBI.Input.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Input.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Input.EVENT_START = \"EVENT_START\";\r\nBI.Input.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Input.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Input.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Input.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Input.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Input.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.Input.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Input.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Input.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Input.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.shortcut(\"bi.input\", BI.Input);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageRadio = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageRadio.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-radio radio-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageRadio.superclass._init.apply(this, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageRadio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.ImageRadio.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.ImageRadio.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_radio\", BI.ImageRadio);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Radio = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-radio\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 14,\r\n iconHeight: 14\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"radio-content\",\r\n ref: function (_ref) {\r\n self.radio = _ref;\r\n },\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Radio.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.radio.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.radio.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Radio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Radio.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Radio.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.radio.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.radio.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Radio.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.radio\", BI.Radio);/**\r\n * Created by dailer on 2019/6/19.\r\n */\r\n\r\nBI.AbstractLabel = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.AbstractLabel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\", // normal or nowrap\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.AbstractLabel.superclass._init.apply(this, arguments);\r\n\r\n if (this.options.textAlign === \"center\") {\r\n this._createCenterEl();\r\n } else {\r\n this._createNotCenterEl();\r\n }\r\n },\r\n\r\n _createCenterEl: function () {\r\n var o = this.options;\r\n var json = this._createJson();\r\n json.textAlign = \"left\";\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.maxWidth = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.1\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 1.2\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.3\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.4\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, { // 1.5\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n maxWidth: \"100%\"\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6\r\n json.maxWidth = o.textWidth;\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.7\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: true,\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.8\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n },\r\n\r\n _createNotCenterEl: function () {\r\n var o = this.options;\r\n var adaptLayout = o.textAlign === \"right\" ? \"bi.right_vertical_adapt\" : \"bi.vertical_adapt\";\r\n var json = this._createJson();\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.1\r\n BI.createWidget({\r\n type: adaptLayout,\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 2.2\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.3\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n return;\r\n }\r\n json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;\r\n BI.createWidget({ // 2.4\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [{\r\n el: (this.text = BI.createWidget(json))\r\n }]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n BI.createWidget({ // 2.5\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) {\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n this.text = BI.createWidget(BI.extend(json, { // 2.6\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: adaptLayout,\r\n element: this,\r\n scrollable: o.whiteSpace === \"normal\",\r\n items: [this.text]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (v) {\r\n this.options.text = v;\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.setStyle(css);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.AbstractLabel.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(v);\r\n }\r\n },\r\n\r\n populate: function () {\r\n BI.AbstractLabel.superclass.populate.apply(this, arguments);\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.HtmlLabel = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-html-label\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.html\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html_label\", BI.HtmlLabel);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标标签\r\n */\r\nBI.IconLabel = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-icon-label horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n },\r\n\r\n _init: function () {\r\n BI.IconLabel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_label\", BI.IconLabel);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Label = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-label\",\r\n py: \"\",\r\n keyword: \"\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.label\", BI.Label);/**\r\n * guy a元素\r\n * @class BI.Link\r\n * @extends BI.Text\r\n */\r\nBI.Link = BI.inherit(BI.Label, {\r\n _defaultConfig: function () {\r\n var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-link display-block\",\r\n tagName: \"a\",\r\n href: \"\",\r\n target: \"_blank\"\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.a\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py,\r\n href: o.href,\r\n target: o.target\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.Link.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.link\", BI.Link);/**\r\n * guy\r\n * 气泡提示\r\n * @class BI.Bubble\r\n * @extends BI.Tip\r\n * @type {*|void|Object}\r\n */\r\nBI.Bubble = BI.inherit(BI.Tip, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble\",\r\n direction: \"top\",\r\n text: \"\",\r\n level: \"error\",\r\n height: 18\r\n });\r\n },\r\n _init: function () {\r\n BI.Bubble.superclass._init.apply(this, arguments);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this[\"_\" + this.options.direction]()]\r\n });\r\n },\r\n\r\n _createBubbleText: function () {\r\n var o = this.options;\r\n return (this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bubble-text\" + (\" bubble-\" + o.level),\r\n text: o.text,\r\n hgap: 5,\r\n height: 18\r\n }));\r\n },\r\n\r\n _top: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: this._createBubbleText(),\r\n height: 18\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }]\r\n });\r\n },\r\n\r\n _bottom: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }, {\r\n el: this._createBubbleText(),\r\n height: 18\r\n }]\r\n });\r\n },\r\n\r\n _left: function () {\r\n return BI.createWidget({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n _right: function () {\r\n return BI.createWidget({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble\", BI.Bubble);/**\r\n * toast提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Toast\r\n * @extends BI.Tip\r\n */\r\nBI.Toast = BI.inherit(BI.Tip, {\r\n _const: {\r\n minWidth: 200,\r\n hgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-toast\",\r\n text: \"\",\r\n level: \"success\" // success或warning\r\n });\r\n },\r\n _init: function () {\r\n BI.Toast.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.css({\r\n minWidth: this._const.minWidth + \"px\"\r\n });\r\n this.element.addClass(\"toast-\" + o.level);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n var cls = \"close-font\";\r\n switch(o.level) {\r\n case \"success\":\r\n cls = \"toast-success-font\";\r\n break;\r\n case \"error\":\r\n cls = \"toast-error-font\";\r\n break;\r\n case \"warning\":\r\n cls = \"toast-warning-font\";\r\n break;\r\n case \"normal\":\r\n default:\r\n cls = \"toast-message-font\";\r\n break;\r\n }\r\n\r\n var items = [{\r\n type: \"bi.icon_label\",\r\n cls: cls + \" toast-icon\",\r\n width: 36\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 16,\r\n textAlign: \"left\"\r\n },\r\n rgap: o.autoClose ? this._const.hgap : 0\r\n }];\r\n\r\n var columnSize = [36, \"\"];\r\n\r\n if(o.autoClose === false) {\r\n items.push({\r\n type: \"bi.icon_button\",\r\n cls: \"close-font toast-icon\",\r\n handler: function () {\r\n self.destroy();\r\n },\r\n width: 36\r\n });\r\n columnSize.push(36);\r\n }\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.horizontal_adapt\",\r\n element: this,\r\n items: items,\r\n vgap: 7,\r\n columnSize: columnSize\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n beforeDestroy: function () {\r\n this.fireEvent(BI.Toast.EVENT_DESTORY);\r\n }\r\n});\r\nBI.Toast.EVENT_DESTORY = \"EVENT_DESTORY\";\r\nBI.shortcut(\"bi.toast\", BI.Toast);/**\r\n * title提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Tooltip\r\n * @extends BI.Tip\r\n */\r\nBI.Tooltip = BI.inherit(BI.Tip, {\r\n _const: {\r\n hgap: 5,\r\n vgap: 3\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tooltip\",\r\n text: \"\",\r\n level: \"success\", // success或warning\r\n stopEvent: false,\r\n stopPropagation: false\r\n });\r\n },\r\n _init: function () {\r\n BI.Tooltip.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.addClass(\"tooltip-\" + o.level);\r\n var fn = function (e) {\r\n o.stopPropagation && e.stopPropagation();\r\n o.stopEvent && e.stopEvent();\r\n };\r\n this.element.bind({\r\n click: fn,\r\n mousedown: fn,\r\n mouseup: fn,\r\n mouseover: fn,\r\n mouseenter: fn,\r\n mouseleave: fn,\r\n mousemove: fn\r\n });\r\n\r\n var texts = (o.text + \"\").split(\"\\n\");\r\n if (texts.length > 1) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n hgap: this._const.hgap,\r\n items: BI.map(texts, function (i, text) {\r\n return {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: text,\r\n textHeight: 18\r\n };\r\n })\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 18,\r\n hgap: this._const.hgap\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (width) {\r\n this.element.width(width - 2 * this._const.hgap);\r\n },\r\n\r\n setText: function (text) {\r\n this.text && this.text.setText(text);\r\n },\r\n\r\n setLevel: function (level) {\r\n this.element.removeClass(\"tooltip-success\").removeClass(\"tooltip-warning\");\r\n this.element.addClass(\"tooltip-\" + level);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tooltip\", BI.Tooltip);/**\r\n * 下拉\r\n * @class BI.Trigger\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Trigger = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-trigger cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Trigger.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setKey: function () {\r\n\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});/**\r\n *\r\n * 自定义树\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.CustomTree\r\n * @extends BI.Single\r\n */\r\nBI.CustomTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-tree\",\r\n expander: {\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomTree.superclass._init.apply(this, arguments);\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes) {\r\n var self = this, o = this.options;\r\n nodes = BI.Tree.transformToTreeFormat(nodes);\r\n\r\n var items = [];\r\n BI.each(nodes, function (i, node) {\r\n if (BI.isNotEmptyArray(node.children) || node.isParent === true) {\r\n var item = BI.extend({\r\n type: \"bi.expander\",\r\n el: {\r\n value: node.value\r\n },\r\n popup: {type: \"bi.custom_tree\"}\r\n }, BI.deepClone(o.expander), {\r\n id: node.id,\r\n pId: node.pId\r\n });\r\n var el = BI.stripEL(node);\r\n if (!BI.isWidget(el)) {\r\n el = BI.clone(el);\r\n delete el.children;\r\n BI.extend(item.el, el);\r\n } else {\r\n item.el = el;\r\n }\r\n item.popup.expander = BI.deepClone(o.expander);\r\n item.items = item.popup.items = node.children;\r\n item.itemsCreator = item.popup.itemsCreator = function (op) {\r\n if (BI.isNotNull(op.node)) {// 从子节点传过来的itemsCreator直接向上传递\r\n return o.itemsCreator.apply(self, arguments);\r\n }\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0].node = node;\r\n return o.itemsCreator.apply(self, args);\r\n };\r\n BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el));\r\n items.push(item);\r\n } else {\r\n items.push(node);\r\n }\r\n });\r\n return items;\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget(o.el, {\r\n element: this,\r\n items: this._formatItems(nodes),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(this, [op, function (items) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0] = self._formatItems(items);\r\n callback.apply(null, args);\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n if (arguments.length > 0) {\r\n args[0] = this._formatItems(nodes);\r\n }\r\n this.tree.populate.apply(this.tree, args);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree && this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree ? this.tree.getValue() : [];\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.tree ? this.tree.getAllButtons() : [];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree ? this.tree.getAllLeaves() : [];\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree && this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree && this.tree.getNodeByValue(id);\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n }\r\n});\r\nBI.CustomTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.custom_tree\", BI.CustomTree);/*\r\n * JQuery zTree core v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\tvar settings = {}, roots = {}, caches = {},\r\n\t//default consts of core\r\n\t_consts = {\r\n\t\tclassName: {\r\n\t\t\tBUTTON: \"button\",\r\n\t\t\tLEVEL: \"level\",\r\n\t\t\tICO_LOADING: \"ico_loading\",\r\n\t\t\tSWITCH: \"switch\"\r\n\t\t},\r\n\t\tevent: {\r\n\t\t\tNODECREATED: \"ztree_nodeCreated\",\r\n\t\t\tCLICK: \"ztree_click\",\r\n\t\t\tEXPAND: \"ztree_expand\",\r\n\t\t\tCOLLAPSE: \"ztree_collapse\",\r\n\t\t\tASYNC_SUCCESS: \"ztree_async_success\",\r\n\t\t\tASYNC_ERROR: \"ztree_async_error\",\r\n\t\t\tREMOVE: \"ztree_remove\",\r\n\t\t\tSELECTED: \"ztree_selected\",\r\n\t\t\tUNSELECTED: \"ztree_unselected\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tA: \"_a\",\r\n\t\t\tICON: \"_ico\",\r\n\t\t\tSPAN: \"_span\",\r\n\t\t\tSWITCH: \"_switch\",\r\n\t\t\tUL: \"_ul\"\r\n\t\t},\r\n\t\tline: {\r\n\t\t\tROOT: \"root\",\r\n\t\t\tROOTS: \"roots\",\r\n\t\t\tCENTER: \"center\",\r\n\t\t\tBOTTOM: \"bottom\",\r\n\t\t\tNOLINE: \"noline\",\r\n\t\t\tLINE: \"line\"\r\n\t\t},\r\n\t\tfolder: {\r\n\t\t\tOPEN: \"open\",\r\n\t\t\tCLOSE: \"close\",\r\n\t\t\tDOCU: \"docu\"\r\n\t\t},\r\n\t\tnode: {\r\n\t\t\tCURSELECTED: \"curSelectedNode\"\r\n\t\t}\r\n\t},\r\n\t//default setting of core\r\n\t_setting = {\r\n\t\ttreeId: \"\",\r\n\t\ttreeObj: null,\r\n\t\tview: {\r\n\t\t\taddDiyDom: null,\r\n\t\t\tautoCancelSelected: true,\r\n\t\t\tdblClickExpand: true,\r\n\t\t\texpandSpeed: \"fast\",\r\n\t\t\tfontCss: {},\r\n\t\t\tnameIsHTML: false,\r\n\t\t\tselectedMulti: true,\r\n\t\t\tshowIcon: true,\r\n\t\t\tshowLine: true,\r\n\t\t\tshowTitle: true,\r\n\t\t\ttxtSelectedEnable: false\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchildren: \"children\",\r\n\t\t\t\tname: \"name\",\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\turl: \"url\"\r\n\t\t\t},\r\n\t\t\tsimpleData: {\r\n\t\t\t\tenable: false,\r\n\t\t\t\tidKey: \"id\",\r\n\t\t\t\tpIdKey: \"pId\",\r\n\t\t\t\trootPId: null\r\n\t\t\t},\r\n\t\t\tkeep: {\r\n\t\t\t\tparent: false,\r\n\t\t\t\tleaf: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tasync: {\r\n\t\t\tenable: false,\r\n\t\t\tcontentType: \"application/x-www-form-urlencoded\",\r\n\t\t\ttype: \"post\",\r\n\t\t\tdataType: \"text\",\r\n\t\t\turl: \"\",\r\n\t\t\tautoParam: [],\r\n\t\t\totherParam: [],\r\n\t\t\tdataFilter: null\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeAsync:null,\r\n\t\t\tbeforeClick:null,\r\n\t\t\tbeforeDblClick:null,\r\n\t\t\tbeforeRightClick:null,\r\n\t\t\tbeforeMouseDown:null,\r\n\t\t\tbeforeMouseUp:null,\r\n\t\t\tbeforeExpand:null,\r\n\t\t\tbeforeCollapse:null,\r\n\t\t\tbeforeRemove:null,\r\n\r\n\t\t\tonAsyncError:null,\r\n\t\t\tonAsyncSuccess:null,\r\n\t\t\tonNodeCreated:null,\r\n\t\t\tonClick:null,\r\n\t\t\tonDblClick:null,\r\n\t\t\tonRightClick:null,\r\n\t\t\tonMouseDown:null,\r\n\t\t\tonMouseUp:null,\r\n\t\t\tonExpand:null,\r\n\t\t\tonCollapse:null,\r\n\t\t\tonRemove:null\r\n\t\t}\r\n\t},\r\n\t//default root of core\r\n\t//zTree use root to save full data\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tif (!r) {\r\n\t\t\tr = {};\r\n\t\t\tdata.setRoot(setting, r);\r\n\t\t}\r\n\t\tr[setting.data.key.children] = [];\r\n\t\tr.expandTriggerFlag = false;\r\n\t\tr.curSelectedList = [];\r\n\t\tr.noSelection = true;\r\n\t\tr.createdNodes = [];\r\n\t\tr.zId = 0;\r\n\t\tr._ver = (new Date()).getTime();\r\n\t},\r\n\t//default cache of core\r\n\t_initCache = function(setting) {\r\n\t\tvar c = data.getCache(setting);\r\n\t\tif (!c) {\r\n\t\t\tc = {};\r\n\t\t\tdata.setCache(setting, c);\r\n\t\t}\r\n\t\tc.nodes = [];\r\n\t\tc.doms = [];\r\n\t},\r\n\t//default bindEvent of core\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.NODECREATED, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onNodeCreated, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {\r\n\t\t\ttools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);\r\n\t\t});\r\n\r\n\t\to.bind(c.EXPAND, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onExpand, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.COLLAPSE, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onCollapse, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {\r\n\t\t\ttools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\ttools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t});\r\n\r\n\t\to.bind(c.REMOVE, function (event, treeId, treeNode) {\r\n\t\t\ttools.apply(setting.callback.onRemove, [event, treeId, treeNode]);\r\n\t\t});\r\n\r\n\t\to.bind(c.SELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t\to.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.NODECREATED)\r\n\t\t.unbind(c.CLICK)\r\n\t\t.unbind(c.EXPAND)\r\n\t\t.unbind(c.COLLAPSE)\r\n\t\t.unbind(c.ASYNC_SUCCESS)\r\n\t\t.unbind(c.ASYNC_ERROR)\r\n\t\t.unbind(c.REMOVE)\r\n\t\t.unbind(c.SELECTED)\r\n\t\t.unbind(c.UNSELECTED);\r\n\t},\r\n\t//default event proxy of core\r\n\t_eventProxy = function(event) {\r\n\t\tvar target = event.target,\r\n\t\tsetting = data.getSetting(event.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null,\r\n\t\ttmp = null;\r\n\r\n\t\tif (tools.eqs(event.type, \"mousedown\")) {\r\n\t\t\ttreeEventType = \"mousedown\";\r\n\t\t} else if (tools.eqs(event.type, \"mouseup\")) {\r\n\t\t\ttreeEventType = \"mouseup\";\r\n\t\t} else if (tools.eqs(event.type, \"contextmenu\")) {\r\n\t\t\ttreeEventType = \"contextmenu\";\r\n\t\t} else if (tools.eqs(event.type, \"click\")) {\r\n\t\t\tif (tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.SWITCH) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t} else {\r\n\t\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\t\tif (tmp) {\r\n\t\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\t\tnodeEventType = \"clickNode\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(event.type, \"dblclick\")) {\r\n\t\t\ttreeEventType = \"dblclick\";\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {\r\n\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (treeEventType.length > 0 && tId.length == 0) {\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {tId = tools.getNodeMainDom(tmp).id;}\r\n\t\t}\r\n\t\t// event to node\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"switchNode\" :\r\n\t\t\t\t\tif (!node.isParent) {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t} else if (tools.eqs(event.type, \"click\")\r\n\t\t\t\t\t\t|| (tools.eqs(event.type, \"dblclick\") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {\r\n\t\t\t\t\t\tnodeEventCallback = handler.onSwitchNode;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"clickNode\" :\r\n\t\t\t\t\tnodeEventCallback = handler.onClickNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// event to zTree\r\n\t\tswitch (treeEventType) {\r\n\t\t\tcase \"mousedown\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMousedown;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mouseup\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMouseup;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"dblclick\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeDblclick;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"contextmenu\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeContextmenu;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: false,\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of core\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar r = data.getRoot(setting),\r\n\t\tchildKey = setting.data.key.children;\r\n\t\tn.level = level;\r\n\t\tn.tId = setting.treeId + \"_\" + (++r.zId);\r\n\t\tn.parentTId = parentNode ? parentNode.tId : null;\r\n\t\tn.open = (typeof n.open == \"string\") ? tools.eqs(n.open, \"true\") : !!n.open;\r\n\t\tif (n[childKey] && n[childKey].length > 0) {\r\n\t\t\tn.isParent = true;\r\n\t\t\tn.zAsync = true;\r\n\t\t} else {\r\n\t\t\tn.isParent = (typeof n.isParent == \"string\") ? tools.eqs(n.isParent, \"true\") : !!n.isParent;\r\n\t\t\tn.open = (n.isParent && !setting.async.enable) ? n.open : false;\r\n\t\t\tn.zAsync = !n.isParent;\r\n\t\t}\r\n\t\tn.isFirstNode = isFirstNode;\r\n\t\tn.isLastNode = isLastNode;\r\n\t\tn.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};\r\n\t\tn.getPreNode = function() {return data.getPreNode(setting, n);};\r\n\t\tn.getNextNode = function() {return data.getNextNode(setting, n);};\r\n\t\tn.isAjaxing = false;\r\n\t\tdata.fixPIdKeyValue(setting, n);\r\n\t},\r\n\t_init = {\r\n\t\tbind: [_bindEvent],\r\n\t\tunbind: [_unbindEvent],\r\n\t\tcaches: [_initCache],\r\n\t\tnodes: [_initNode],\r\n\t\tproxys: [_eventProxy],\r\n\t\troots: [_initRoot],\r\n\t\tbeforeA: [],\r\n\t\tafterA: [],\r\n\t\tinnerBeforeA: [],\r\n\t\tinnerAfterA: [],\r\n\t\tzTreeTools: []\r\n\t},\r\n\t//method of operate data\r\n\tdata = {\r\n\t\taddNodeCache: function(setting, node) {\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;\r\n\t\t},\r\n\t\tgetNodeCacheId: function(tId) {\r\n\t\t\treturn tId.substring(tId.lastIndexOf(\"_\")+1);\r\n\t\t},\r\n\t\taddAfterA: function(afterA) {\r\n\t\t\t_init.afterA.push(afterA);\r\n\t\t},\r\n\t\taddBeforeA: function(beforeA) {\r\n\t\t\t_init.beforeA.push(beforeA);\r\n\t\t},\r\n\t\taddInnerAfterA: function(innerAfterA) {\r\n\t\t\t_init.innerAfterA.push(innerAfterA);\r\n\t\t},\r\n\t\taddInnerBeforeA: function(innerBeforeA) {\r\n\t\t\t_init.innerBeforeA.push(innerBeforeA);\r\n\t\t},\r\n\t\taddInitBind: function(bindEvent) {\r\n\t\t\t_init.bind.push(bindEvent);\r\n\t\t},\r\n\t\taddInitUnBind: function(unbindEvent) {\r\n\t\t\t_init.unbind.push(unbindEvent);\r\n\t\t},\r\n\t\taddInitCache: function(initCache) {\r\n\t\t\t_init.caches.push(initCache);\r\n\t\t},\r\n\t\taddInitNode: function(initNode) {\r\n\t\t\t_init.nodes.push(initNode);\r\n\t\t},\r\n\t\taddInitProxy: function(initProxy, isFirst) {\r\n\t\t\tif (!!isFirst) {\r\n\t\t\t\t_init.proxys.splice(0,0,initProxy);\r\n\t\t\t} else {\r\n\t\t\t\t_init.proxys.push(initProxy);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddInitRoot: function(initRoot) {\r\n\t\t\t_init.roots.push(initRoot);\r\n\t\t},\r\n\t\taddNodesData: function(setting, parentNode, nodes) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (!parentNode[childKey]) parentNode[childKey] = [];\r\n\t\t\tif (parentNode[childKey].length > 0) {\r\n\t\t\t\tparentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;\r\n\t\t\t\tview.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);\r\n\t\t\t}\r\n\t\t\tparentNode.isParent = true;\r\n\t\t\tparentNode[childKey] = parentNode[childKey].concat(nodes);\r\n\t\t},\r\n\t\taddSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tif (!data.isSelectedNode(setting, node)) {\r\n\t\t\t\troot.curSelectedList.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddCreatedNode: function(setting, node) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\troot.createdNodes.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddZTreeTools: function(zTreeTools) {\r\n\t\t\t_init.zTreeTools.push(zTreeTools);\r\n\t\t},\r\n\t\texSetting: function(s) {\r\n\t\t\t$.extend(true, _setting, s);\r\n\t\t},\r\n\t\tfixPIdKeyValue: function(setting, node) {\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnode[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.afterA.length; i<j; i++) {\r\n\t\t\t\t_init.afterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.beforeA.length; i<j; i++) {\r\n\t\t\t\t_init.beforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerAfterA.length; i<j; i++) {\r\n\t\t\t\t_init.innerAfterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerBeforeA.length; i<j; i++) {\r\n\t\t\t\t_init.innerBeforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetCache: function(setting) {\r\n\t\t\treturn caches[setting.treeId];\r\n\t\t},\r\n\t\tgetNextNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length-1; i<=l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==l ? null : p[childKey][i+1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return null;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tvar tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);\r\n\t\t\t\tif (tmp) return tmp;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeCache: function(setting, tId) {\r\n\t\t\tif (!tId) return null;\r\n\t\t\tvar n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];\r\n\t\t\treturn n ? n : null;\r\n\t\t},\r\n\t\tgetNodeName: function(setting, node) {\r\n\t\t\tvar nameKey = setting.data.key.name;\r\n\t\t\treturn \"\" + node[nameKey];\r\n\t\t},\r\n\t\tgetNodeTitle: function(setting, node) {\r\n\t\t\tvar t = setting.data.key.title === \"\" ? setting.data.key.name : setting.data.key.title;\r\n\t\t\treturn \"\" + node[t];\r\n\t\t},\r\n\t\tgetNodes: function(setting) {\r\n\t\t\treturn data.getRoot(setting)[setting.data.key.children];\r\n\t\t},\r\n\t\tgetNodesByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByParamFuzzy: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tvalue = value.toLowerCase();\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (typeof nodes[i][key] == \"string\" && nodes[i][key].toLowerCase().indexOf(value)>-1) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {\r\n\t\t\tif (!nodes) return (isSingle ? null : []);\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = isSingle ? null : [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (tools.apply(filter, [nodes[i], invokeParam], false)) {\r\n\t\t\t\t\tif (isSingle) {return nodes[i];}\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tvar tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);\r\n\t\t\t\tif (isSingle && !!tmpResult) {return tmpResult;}\r\n\t\t\t\tresult = isSingle ? tmpResult : result.concat(tmpResult);\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetPreNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length; i<l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==0 ? null : p[childKey][i-1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetRoot: function(setting) {\r\n\t\t\treturn setting ? roots[setting.treeId] : null;\r\n\t\t},\r\n\t\tgetRoots: function() {\r\n\t\t\treturn roots;\r\n\t\t},\r\n\t\tgetSetting: function(treeId) {\r\n\t\t\treturn settings[treeId];\r\n\t\t},\r\n\t\tgetSettings: function() {\r\n\t\t\treturn settings;\r\n\t\t},\r\n\t\tgetZTreeTools: function(treeId) {\r\n\t\t\tvar r = this.getRoot(this.getSetting(treeId));\r\n\t\t\treturn r ? r.treeTools : null;\r\n\t\t},\r\n\t\tinitCache: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.caches.length; i<j; i++) {\r\n\t\t\t\t_init.caches[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitNode: function(setting, level, node, parentNode, preNode, nextNode) {\r\n\t\t\tfor (var i=0, j=_init.nodes.length; i<j; i++) {\r\n\t\t\t\t_init.nodes[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitRoot: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.roots.length; i<j; i++) {\r\n\t\t\t\t_init.roots[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tisSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i]) return true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tremoveNodeCache: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i=0, l=node[childKey].length; i<l; i++) {\r\n\t\t\t\t\targuments.callee(setting, node[childKey][i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;\r\n\t\t},\r\n\t\tremoveSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {\r\n\t\t\t\t\troot.curSelectedList.splice(i, 1);\r\n\t\t\t\t\ti--;j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetCache: function(setting, cache) {\r\n\t\t\tcaches[setting.treeId] = cache;\r\n\t\t},\r\n\t\tsetRoot: function(setting, root) {\r\n\t\t\troots[setting.treeId] = root;\r\n\t\t},\r\n\t\tsetZTreeTools: function(setting, zTreeTools) {\r\n\t\t\tfor (var i=0, j=_init.zTreeTools.length; i<j; i++) {\r\n\t\t\t\t_init.zTreeTools[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\ttransformToArrayFormat: function (setting, nodes) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tr = [];\r\n\t\t\tif (tools.isArray(nodes)) {\r\n\t\t\t\tfor (var i=0, l=nodes.length; i<l; i++) {\r\n\t\t\t\t\tr.push(nodes[i]);\r\n\t\t\t\t\tif (nodes[i][childKey])\r\n\t\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr.push(nodes);\r\n\t\t\t\tif (nodes[childKey])\r\n\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\ttransformTozTreeFormat: function(setting, sNodes) {\r\n\t\t\tvar i,l,\r\n\t\t\tkey = setting.data.simpleData.idKey,\r\n\t\t\tparentKey = setting.data.simpleData.pIdKey,\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!key || key==\"\" || !sNodes) return [];\r\n\r\n\t\t\tif (tools.isArray(sNodes)) {\r\n\t\t\t\tvar r = [];\r\n\t\t\t\tvar tmpMap = {};\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\ttmpMap[sNodes[i][key]] = sNodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\tif (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {\r\n\t\t\t\t\t\tif (!tmpMap[sNodes[i][parentKey]][childKey])\r\n\t\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey] = [];\r\n\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tr.push(sNodes[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn r;\r\n\t\t\t}else {\r\n\t\t\t\treturn [sNodes];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\tevent = {\r\n\t\tbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.bind.length; i<j; i++) {\r\n\t\t\t\t_init.bind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tunbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.unbind.length; i<j; i++) {\r\n\t\t\t\t_init.unbind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tbindTree: function(setting) {\r\n\t\t\tvar eventParam = {\r\n\t\t\t\ttreeId: setting.treeId\r\n\t\t\t},\r\n\t\t\to = setting.treeObj;\r\n\t\t\tif (!setting.view.txtSelectedEnable) {\r\n\t\t\t\t// for can't select text\r\n\t\t\t\to.bind('selectstart', function(e){\r\n\t\t\t\t\tvar node\r\n\t\t\t\t\tvar n = e.originalEvent.srcElement.nodeName.toLowerCase();\r\n\t\t\t\t\treturn (n === \"input\" || n === \"textarea\" );\r\n\t\t\t\t}).css({\r\n\t\t\t\t\t\"-moz-user-select\":\"-moz-none\"\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\to.bind('click', eventParam, event.proxy);\r\n\t\t\to.bind('dblclick', eventParam, event.proxy);\r\n\t\t\to.bind('mouseover', eventParam, event.proxy);\r\n\t\t\to.bind('mouseout', eventParam, event.proxy);\r\n\t\t\to.bind('mousedown', eventParam, event.proxy);\r\n\t\t\to.bind('mouseup', eventParam, event.proxy);\r\n\t\t\to.bind('contextmenu', eventParam, event.proxy);\r\n\t\t},\r\n\t\tunbindTree: function(setting) {\r\n\t\t\tvar o = setting.treeObj;\r\n\t\t\to.unbind('click', event.proxy)\r\n\t\t\t.unbind('dblclick', event.proxy)\r\n\t\t\t.unbind('mouseover', event.proxy)\r\n\t\t\t.unbind('mouseout', event.proxy)\r\n\t\t\t.unbind('mousedown', event.proxy)\r\n\t\t\t.unbind('mouseup', event.proxy)\r\n\t\t\t.unbind('contextmenu', event.proxy);\r\n\t\t},\r\n\t\tdoProxy: function(e) {\r\n\t\t\tvar results = [];\r\n\t\t\tfor (var i=0, j=_init.proxys.length; i<j; i++) {\r\n\t\t\t\tvar proxyResult = _init.proxys[i].apply(this, arguments);\r\n\t\t\t\tresults.push(proxyResult);\r\n\t\t\t\tif (proxyResult.stop) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tproxy: function(e) {\r\n\t\t\tvar setting = data.getSetting(e.data.treeId);\r\n\t\t\tif (!tools.uCanDo(setting, e)) return true;\r\n\t\t\tvar results = event.doProxy(e),\r\n\t\t\tr = true, x = false;\r\n\t\t\tfor (var i=0, l=results.length; i<l; i++) {\r\n\t\t\t\tvar proxyResult = results[i];\r\n\t\t\t\tif (proxyResult.nodeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t\tif (proxyResult.treeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t}\r\n\t},\r\n\t//method of event handler\r\n\thandler = {\r\n\t\tonSwitchNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (node.open) {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonClickNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tclickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;\r\n\t\t\tif (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;\r\n\t\t\tif (clickFlag === 0) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tview.selectNode(setting, node, clickFlag === 2);\r\n\t\t\t}\r\n\t\t\tsetting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMousedown: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMouseup: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeDblclick: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeContextmenu: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn (typeof setting.callback.onRightClick) != \"function\";\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\ttools = {\r\n\t\tapply: function(fun, param, defaultValue) {\r\n\t\t\tif ((typeof fun) == \"function\") {\r\n\t\t\t\treturn fun.apply(zt, param?param:[]);\r\n\t\t\t}\r\n\t\t\treturn defaultValue;\r\n\t\t},\r\n\t\tcanAsync: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\treturn (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));\r\n\t\t},\r\n\t\tclone: function (obj){\r\n\t\t\tif (obj === null) return null;\r\n\t\t\tvar o = tools.isArray(obj) ? [] : {};\r\n\t\t\tfor(var i in obj){\r\n\t\t\t\to[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === \"object\" ? arguments.callee(obj[i]) : obj[i]);\r\n\t\t\t}\r\n\t\t\treturn o;\r\n\t\t},\r\n\t\teqs: function(str1, str2) {\r\n\t\t\treturn str1.toLowerCase() === str2.toLowerCase();\r\n\t\t},\r\n\t\tisArray: function(arr) {\r\n\t\t\treturn Object.prototype.toString.apply(arr) === \"[object Array]\";\r\n\t\t},\r\n\t\t$: function(node, exp, setting) {\r\n\t\t\tif (!!exp && typeof exp != \"string\") {\r\n\t\t\t\tsetting = exp;\r\n\t\t\t\texp = \"\";\r\n\t\t\t}\r\n\t\t\tif (typeof node == \"string\") {\r\n\t\t\t\treturn $(node, setting ? setting.treeObj.get(0).ownerDocument : null);\r\n\t\t\t} else {\r\n\t\t\t\treturn $(\"#\" + node.tId + exp, setting ? setting.treeObj : null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetMDom: function (setting, curDom, targetExpr) {\r\n\t\t\tif (!curDom) return null;\r\n\t\t\twhile (curDom && curDom.id !== setting.treeId) {\r\n\t\t\t\tfor (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {\r\n\t\t\t\t\tif (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {\r\n\t\t\t\t\t\treturn curDom;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcurDom = curDom.parentNode;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeMainDom:function(target) {\r\n\t\t\treturn ($(target).parent(\"li\").get(0) || $(target).parentsUntil(\"li\").parent().get(0));\r\n\t\t},\r\n\t\tisChildOrSelf: function(dom, parentId) {\r\n\t\t\treturn ( $(dom).closest(\"#\" + parentId).length> 0 );\r\n\t\t},\r\n\t\tuCanDo: function(setting, e) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of operate ztree dom\r\n\tview = {\r\n\t\taddNodes: function(setting, parentNode, newNodes, isSilent) {\r\n\t\t\tif (setting.data.keep.leaf && parentNode && !parentNode.isParent) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!tools.isArray(newNodes)) {\r\n\t\t\t\tnewNodes = [newNodes];\r\n\t\t\t}\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnewNodes = data.transformTozTreeFormat(setting, newNodes);\r\n\t\t\t}\r\n\t\t\tif (parentNode) {\r\n\t\t\t\tvar target_switchObj = $$(parentNode, consts.id.SWITCH, setting),\r\n\t\t\t\ttarget_icoObj = $$(parentNode, consts.id.ICON, setting),\r\n\t\t\t\ttarget_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\r\n\t\t\t\tif (!parentNode.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tparentNode.open = false;\r\n\t\t\t\t\ttarget_ulObj.css({\r\n\t\t\t\t\t\t\"display\": \"none\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdata.addNodesData(setting, parentNode, newNodes);\r\n\t\t\t\tview.createNodes(setting, parentNode.level + 1, newNodes, parentNode);\r\n\t\t\t\tif (!isSilent) {\r\n\t\t\t\t\tview.expandCollapseParentNode(setting, parentNode, true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdata.addNodesData(setting, data.getRoot(setting), newNodes);\r\n\t\t\t\tview.createNodes(setting, 0, newNodes, null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tappendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar html = [],\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tvar node = nodes[i];\r\n\t\t\t\tif (initFlag) {\r\n\t\t\t\t\tvar tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),\r\n\t\t\t\t\ttmpPChild = tmpPNode[childKey],\r\n\t\t\t\t\tisFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),\r\n\t\t\t\t\tisLastNode = (i == (nodes.length - 1));\r\n\t\t\t\t\tdata.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);\r\n\t\t\t\t\tdata.addNodeCache(setting, node);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar childHtml = [];\r\n\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t//make child html first, because checkType\r\n\t\t\t\t\tchildHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);\r\n\t\t\t\t}\r\n\t\t\t\tif (openFlag) {\r\n\r\n\t\t\t\t\tview.makeDOMNodeMainBefore(html, setting, node);\r\n\t\t\t\t\tview.makeDOMNodeLine(html, setting, node);\r\n\t\t\t\t\tdata.getBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameBefore(html, setting, node);\r\n\t\t\t\t\tdata.getInnerBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeIcon(html, setting, node);\r\n\t\t\t\t\tdata.getInnerAfterA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameAfter(html, setting, node);\r\n\t\t\t\t\tdata.getAfterA(setting, node, html);\r\n\t\t\t\t\tif (node.isParent && node.open) {\r\n\t\t\t\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.makeDOMNodeMainAfter(html, setting, node);\r\n\t\t\t\t\tdata.addCreatedNode(setting, node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tappendParentULDom: function(setting, node) {\r\n\t\t\tvar html = [],\r\n\t\t\tnObj = $$(node, setting);\r\n\t\t\tif (!nObj.get(0) && !!node.parentTId) {\r\n\t\t\t\tview.appendParentULDom(setting, node.getParentNode());\r\n\t\t\t\tnObj = $$(node, setting);\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting);\r\n\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\tulObj.remove();\r\n\t\t\t}\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tchildHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);\r\n\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\tnObj.append(html.join(''));\r\n\t\t},\r\n\t\tasyncNode: function(setting, node, isSilent, callback) {\r\n\t\t\tvar i, l;\r\n\t\t\tif (node && !node.isParent) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (node && node.isAjaxing) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (node) {\r\n\t\t\t\tnode.isAjaxing = true;\r\n\t\t\t\tvar icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\ticoObj.attr({\"style\":\"\", \"class\":consts.className.BUTTON + \" \" + consts.className.ICO_LOADING});\r\n\t\t\t}\r\n\r\n\t\t\tvar tmpParam = {};\r\n\t\t\tfor (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {\r\n\t\t\t\tvar pKey = setting.async.autoParam[i].split(\"=\"), spKey = pKey;\r\n\t\t\t\tif (pKey.length>1) {\r\n\t\t\t\t\tspKey = pKey[1];\r\n\t\t\t\t\tpKey = pKey[0];\r\n\t\t\t\t}\r\n\t\t\t\ttmpParam[spKey] = node[pKey];\r\n\t\t\t}\r\n\t\t\tif (tools.isArray(setting.async.otherParam)) {\r\n\t\t\t\tfor (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {\r\n\t\t\t\t\ttmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (var p in setting.async.otherParam) {\r\n\t\t\t\t\ttmpParam[p] = setting.async.otherParam[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar _tmpV = data.getRoot(setting)._ver;\r\n\t\t\t$.ajax({\r\n\t\t\t\tcontentType: setting.async.contentType,\r\n cache: false,\r\n\t\t\t\ttype: setting.async.type,\r\n\t\t\t\turl: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),\r\n\t\t\t\tdata: tmpParam,\r\n\t\t\t\tdataType: setting.async.dataType,\r\n\t\t\t\tsuccess: function(msg) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar newNodes = [];\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (!msg || msg.length == 0) {\r\n\t\t\t\t\t\t\tnewNodes = [];\r\n\t\t\t\t\t\t} else if (typeof msg == \"string\") {\r\n\t\t\t\t\t\t\tnewNodes = eval(\"(\" + msg + \")\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(err) {\r\n\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tnode.isAjaxing = null;\r\n\t\t\t\t\t\tnode.zAsync = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tif (newNodes && newNodes !== \"\") {\r\n\t\t\t\t\t\tnewNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);\r\n\t\t\t\t\t\tview.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tview.addNodes(setting, node, [], !!isSilent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);\r\n\t\t\t\t\ttools.apply(callback);\r\n\t\t\t\t},\r\n\t\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (node) node.isAjaxing = null;\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tcancelPreSelectedNode: function (setting, node, excludeNode) {\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti, n;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tn = list[i];\r\n\t\t\t\tif (node === n || (!node && (!excludeNode || excludeNode !== n))) {\r\n\t\t\t\t\t$$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED);\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting, node);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlist.splice(i, 1);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodeCallback: function(setting) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\twhile (root.createdNodes.length>0) {\r\n\t\t\t\t\tvar node = root.createdNodes.shift();\r\n\t\t\t\t\ttools.apply(setting.view.addDiyDom, [setting.treeId, node]);\r\n\t\t\t\t\tif (!!setting.callback.onNodeCreated) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodes: function(setting, level, nodes, parentNode) {\r\n\t\t\tif (!nodes || nodes.length == 0) return;\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\topenFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0);\r\n\t\t\troot.createdNodes = [];\r\n\t\t\tvar zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);\r\n\t\t\tif (!parentNode) {\r\n\t\t\t\tsetting.treeObj.append(zTreeHtml.join(''));\r\n\t\t\t} else {\r\n\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\t\tulObj.append(zTreeHtml.join(''));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.createNodeCallback(setting);\r\n\t\t},\r\n\t\tdestroy: function(setting) {\r\n\t\t\tif (!setting) return;\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tdelete settings[setting.treeId];\r\n\t\t},\r\n\t\texpandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!node) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (root.expandTriggerFlag) {\r\n\t\t\t\tvar _callback = callback;\r\n\t\t\t\tcallback = function(){\r\n\t\t\t\t\tif (_callback) _callback();\r\n\t\t\t\t\tif (node.open) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\troot.expandTriggerFlag = false;\r\n\t\t\t}\r\n\t\t\tif (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) {\r\n\t\t\t\tview.appendParentULDom(setting, node);\r\n\t\t\t\tview.createNodeCallback(setting);\r\n\t\t\t}\r\n\t\t\tif (node.open == expandFlag) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting),\r\n\t\t\tswitchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting);\r\n\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tnode.open = !node.open;\r\n\t\t\t\tif (node.iconOpen && node.iconClose) {\r\n\t\t\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (node.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.OPEN);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.OPEN);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\") {\r\n\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t\t\tulObj.slideDown(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\" || !(node[childKey] && node[childKey].length > 0)) {\r\n\t\t\t\t\t\tulObj.hide();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tulObj.slideUp(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (!node.parentTId) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag);\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\ttreeNodes = (node) ? node[childKey]: root[childKey],\r\n\t\t\tselfAnimateSign = (node) ? false : animateFlag,\r\n\t\t\texpandTriggerFlag = data.getRoot(setting).expandTriggerFlag;\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = false;\r\n\t\t\tif (treeNodes) {\r\n\t\t\t\tfor (var i = 0, l = treeNodes.length; i < l; i++) {\r\n\t\t\t\t\tif (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = expandTriggerFlag;\r\n\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );\r\n\t\t},\r\n\t\tisSelectedNode: function (setting, node) {\r\n\t\t\tif (!node) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tif (node === list[i]) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tmakeDOMNodeIcon: function(html, setting, node) {\r\n\t\t\tvar nameStr = data.getNodeName(setting, node),\r\n\t\t\tname = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.ICON,\r\n\t\t\t\t\"' title='' treeNode\", consts.id.ICON,\" class='\", view.makeNodeIcoClass(setting, node),\r\n\t\t\t\t\"' style='\", view.makeNodeIcoStyle(setting, node), \"'></span><span id='\", node.tId, consts.id.SPAN,\r\n\t\t\t\t\"'>\",name,\"</span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeLine: function(html, setting, node) {\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.SWITCH,\t\"' title='' class='\", view.makeNodeLineClass(setting, node), \"' treeNode\", consts.id.SWITCH,\"></span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</li>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainBefore: function(html, setting, node) {\r\n\t\t\thtml.push(\"<li id='\", node.tId, \"' class='\", consts.className.LEVEL, node.level,\"' tabindex='0' hidefocus='true' treenode>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</a>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameBefore: function(html, setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\turl = view.makeNodeUrl(setting, node),\r\n\t\t\tfontcss = view.makeNodeFontCss(setting, node),\r\n\t\t\tfontStyle = [];\r\n\t\t\tfor (var f in fontcss) {\r\n\t\t\t\tfontStyle.push(f, \":\", fontcss[f], \";\");\r\n\t\t\t}\r\n\t\t\thtml.push(\"<a id='\", node.tId, consts.id.A, \"' class='\", consts.className.LEVEL, node.level,\"' treeNode\", consts.id.A,\" onclick=\\\"\", (node.click || ''),\r\n\t\t\t\t\"\\\" \", ((url != null && url.length > 0) ? \"href='\" + url + \"'\" : \"\"), \" target='\",view.makeNodeTarget(node),\"' style='\", fontStyle.join(''),\r\n\t\t\t\t\"'\");\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push(\"title='\", title.replace(/'/g,\"'\").replace(/</g,'<').replace(/>/g,'>'),\"'\");}\r\n\t\t\thtml.push(\">\");\r\n\t\t},\r\n\t\tmakeNodeFontCss: function(setting, node) {\r\n\t\t\tvar fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);\r\n\t\t\treturn (fontCss && ((typeof fontCss) != \"function\")) ? fontCss : {};\r\n\t\t},\r\n\t\tmakeNodeIcoClass: function(setting, node) {\r\n\t\t\tvar icoCss = [\"ico\"];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\ticoCss[0] = (node.iconSkin ? node.iconSkin + \"_\" : \"\") + icoCss[0];\r\n\t\t\t\tif (node.isParent) {\r\n\t\t\t\t\ticoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ticoCss.push(consts.folder.DOCU);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn consts.className.BUTTON + \" \" + icoCss.join('_');\r\n\t\t},\r\n\t\tmakeNodeIcoStyle: function(setting, node) {\r\n\t\t\tvar icoStyle = [];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\tvar icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;\r\n\t\t\t\tif (icon) icoStyle.push(\"background:url(\", icon, \") 0 0 no-repeat;\");\r\n\t\t\t\tif (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {\r\n\t\t\t\t\ticoStyle.push(\"width:0px;height:0px;\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn icoStyle.join('');\r\n\t\t},\r\n\t\tmakeNodeLineClass: function(setting, node) {\r\n\t\t\tvar lineClass = [];\r\n\t\t\tif (setting.view.showLine) {\r\n\t\t\t\tif (node.level == 0 && node.isFirstNode && node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOT);\r\n\t\t\t\t} else if (node.level == 0 && node.isFirstNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOTS);\r\n\t\t\t\t} else if (node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.BOTTOM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlineClass.push(consts.line.CENTER);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.line.NOLINE);\r\n\t\t\t}\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tlineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.folder.DOCU);\r\n\t\t\t}\r\n\t\t\treturn view.makeNodeLineClassEx(node) + lineClass.join('_');\r\n\t\t},\r\n\t\tmakeNodeLineClassEx: function(node) {\r\n\t\t\treturn consts.className.BUTTON + \" \" + consts.className.LEVEL + node.level + \" \" + consts.className.SWITCH + \" \";\r\n\t\t},\r\n\t\tmakeNodeTarget: function(node) {\r\n\t\t\treturn (node.target || \"_blank\");\r\n\t\t},\r\n\t\tmakeNodeUrl: function(setting, node) {\r\n\t\t\tvar urlKey = setting.data.key.url;\r\n\t\t\treturn node[urlKey] ? node[urlKey] : null;\r\n\t\t},\r\n\t\tmakeUlHtml: function(setting, node, html, content) {\r\n\t\t\thtml.push(\"<ul id='\", node.tId, consts.id.UL, \"' class='\", consts.className.LEVEL, node.level, \" \", view.makeUlLineClass(setting, node), \"' style='display:\", (node.open ? \"block\": \"none\"),\"'>\");\r\n\t\t\thtml.push(content);\r\n\t\t\thtml.push(\"</ul>\");\r\n\t\t},\r\n\t\tmakeUlLineClass: function(setting, node) {\r\n\t\t\treturn ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : \"\");\r\n\t\t},\r\n\t\tremoveChildNodes: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tnodes = node[childKey];\r\n\t\t\tif (!nodes) return;\r\n\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tdata.removeNodeCache(setting, nodes[i]);\r\n\t\t\t}\r\n\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\tdelete node[childKey];\r\n\r\n\t\t\tif (!setting.data.keep.parent) {\r\n\t\t\t\tnode.isParent = false;\r\n\t\t\t\tnode.open = false;\r\n\t\t\t\tvar tmp_switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\t\ttmp_icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\t$$(node, consts.id.UL, setting).remove();\r\n\t\t\t} else {\r\n\t\t\t\t$$(node, consts.id.UL, setting).empty();\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetFirstNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][0].isFirstNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetLastNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][childLength - 1].isLastNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tremoveNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : root;\r\n\r\n\t\t\tnode.isFirstNode = false;\r\n\t\t\tnode.isLastNode = false;\r\n\t\t\tnode.getPreNode = function() {return null;};\r\n\t\t\tnode.getNextNode = function() {return null;};\r\n\r\n\t\t\tif (!data.getNodeCache(setting, node.tId)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$$(node, setting).remove();\r\n\t\t\tdata.removeNodeCache(setting, node);\r\n\t\t\tdata.removeSelectedNode(setting, node);\r\n\r\n\t\t\tfor (var i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\tif (parentNode[childKey][i].tId == node.tId) {\r\n\t\t\t\t\tparentNode[childKey].splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.setFirstNode(setting, parentNode);\r\n\t\t\tview.setLastNode(setting, parentNode);\r\n\r\n\t\t\tvar tmp_ulObj,tmp_switchObj,tmp_icoObj,\r\n\t\t\tchildLength = parentNode[childKey].length;\r\n\r\n\t\t\t//repair nodes old parent\r\n\t\t\tif (!setting.data.keep.parent && childLength == 0) {\r\n\t\t\t\t//old parentNode has no child nodes\r\n\t\t\t\tparentNode.isParent = false;\r\n\t\t\t\tparentNode.open = false;\r\n\t\t\t\ttmp_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(parentNode, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(parentNode, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\ttmp_ulObj.css(\"display\", \"none\");\r\n\r\n\t\t\t} else if (setting.view.showLine && childLength > 0) {\r\n\t\t\t\t//old parentNode has child nodes\r\n\t\t\t\tvar newLast = parentNode[childKey][childLength - 1];\r\n\t\t\t\ttmp_ulObj = $$(newLast, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(newLast, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(newLast, consts.id.ICON, setting);\r\n\t\t\t\tif (parentNode == root) {\r\n\t\t\t\t\tif (parentNode[childKey].length == 1) {\r\n\t\t\t\t\t\t//node was root, and ztree has only one root after move node\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting);\r\n\t\t\t\t\t\tview.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t}\r\n\t\t\t\ttmp_ulObj.removeClass(consts.line.LINE);\r\n\t\t\t}\r\n\t\t},\r\n\t\treplaceIcoClass: function(node, obj, newName) {\r\n\t\t\tif (!obj || node.isAjaxing) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[tmpList.length-1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t},\r\n\t\treplaceSwitchClass: function(node, obj, newName) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.line.ROOT:\r\n\t\t\t\tcase consts.line.ROOTS:\r\n\t\t\t\tcase consts.line.CENTER:\r\n\t\t\t\tcase consts.line.BOTTOM:\r\n\t\t\t\tcase consts.line.NOLINE:\r\n\t\t\t\t\ttmpList[0] = view.makeNodeLineClassEx(node) + newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t\tif (newName !== consts.folder.DOCU) {\r\n\t\t\t\tobj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tobj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t},\r\n\t\tselectNode: function(setting, node, addFlag) {\r\n\t\t\tif (!addFlag) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, null, node);\r\n\t\t\t}\r\n\t\t\t$$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED);\r\n\t\t\tdata.addSelectedNode(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]);\r\n\t\t},\r\n\t\tsetNodeFontCss: function(setting, treeNode) {\r\n\t\t\tvar aObj = $$(treeNode, consts.id.A, setting),\r\n\t\t\tfontCss = view.makeNodeFontCss(setting, treeNode);\r\n\t\t\tif (fontCss) {\r\n\t\t\t\taObj.css(fontCss);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeLineIcos: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\tulObj = $$(node, consts.id.UL, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting),\r\n\t\t\tulLine = view.makeUlLineClass(setting, node);\r\n\t\t\tif (ulLine.length==0) {\r\n\t\t\t\tulObj.removeClass(consts.line.LINE);\r\n\t\t\t} else {\r\n\t\t\t\tulObj.addClass(ulLine);\r\n\t\t\t}\r\n\t\t\tswitchObj.attr(\"class\", view.makeNodeLineClass(setting, node));\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tswitchObj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tswitchObj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t\ticoObj.removeAttr(\"style\");\r\n\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\ticoObj.attr(\"class\", view.makeNodeIcoClass(setting, node));\r\n\t\t},\r\n\t\tsetNodeName: function(setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\tnObj = $$(node, consts.id.SPAN, setting);\r\n\t\t\tnObj.empty();\r\n\t\t\tif (setting.view.nameIsHTML) {\r\n\t\t\t\tnObj.html(data.getNodeName(setting, node));\r\n\t\t\t} else {\r\n\t\t\t\tnObj.text(data.getNodeName(setting, node));\r\n\t\t\t}\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {\r\n\t\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\t\taObj.attr(\"title\", !title ? \"\" : title);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeTarget: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\taObj.attr(\"target\", view.makeNodeTarget(node));\r\n\t\t},\r\n\t\tsetNodeUrl: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting),\r\n\t\t\turl = view.makeNodeUrl(setting, node);\r\n\t\t\tif (url == null || url.length == 0) {\r\n\t\t\t\taObj.removeAttr(\"href\");\r\n\t\t\t} else {\r\n\t\t\t\taObj.attr(\"href\", url);\r\n\t\t\t}\r\n\t\t},\r\n\t\tswitchNode: function(setting, node) {\r\n\t\t\tif (node.open || !tools.canAsync(setting, node)) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t} else if (setting.async.enable) {\r\n\t\t\t\tif (!view.asyncNode(setting, node)) {\r\n\t\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} else if (node) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// zTree defind\r\n\t$.fn.zTree = {\r\n\t\tconsts : _consts,\r\n\t\t_z : {\r\n\t\t\ttools: tools,\r\n\t\t\tview: view,\r\n\t\t\tevent: event,\r\n\t\t\tdata: data\r\n\t\t},\r\n\t\tgetZTreeObj: function(treeId) {\r\n\t\t\tvar o = data.getZTreeTools(treeId);\r\n\t\t\treturn o ? o : null;\r\n\t\t},\r\n\t\tdestroy: function(treeId) {\r\n\t\t\tif (!!treeId && treeId.length > 0) {\r\n\t\t\t\tview.destroy(data.getSetting(treeId));\r\n\t\t\t} else {\r\n\t\t\t\tfor(var s in settings) {\r\n\t\t\t\t\tview.destroy(settings[s]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tinit: function(obj, zSetting, zNodes) {\r\n\t\t\tvar setting = tools.clone(_setting);\r\n\t\t\t$.extend(true, setting, zSetting);\r\n\t\t\tsetting.treeId = obj.attr(\"id\");\r\n\t\t\tsetting.treeObj = obj;\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tsettings[setting.treeId] = setting;\r\n\t\t\t//For some older browser,(e.g., ie6)\r\n\t\t\tif(typeof document.body.style.maxHeight === \"undefined\") {\r\n\t\t\t\tsetting.view.expandSpeed = \"\";\r\n\t\t\t}\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tzNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\troot[childKey] = data.transformTozTreeFormat(setting, zNodes);\r\n\t\t\t} else {\r\n\t\t\t\troot[childKey] = zNodes;\r\n\t\t\t}\r\n\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.bindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tevent.bindEvent(setting);\r\n\r\n\t\t\tvar zTreeTools = {\r\n\t\t\t\tsetting : setting,\r\n\t\t\t\taddNodes : function(parentNode, newNodes, isSilent) {\r\n\t\t\t\t\tif (!newNodes) return null;\r\n\t\t\t\t\tif (!parentNode) parentNode = null;\r\n\t\t\t\t\tif (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;\r\n\t\t\t\t\tvar xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);\r\n\t\t\t\t\tfunction addCallback() {\r\n\t\t\t\t\t\tview.addNodes(setting, parentNode, xNewNodes, (isSilent==true));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tools.canAsync(setting, parentNode)) {\r\n\t\t\t\t\t\tview.asyncNode(setting, parentNode, isSilent, addCallback);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\taddCallback();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn xNewNodes;\r\n\t\t\t\t},\r\n\t\t\t\tcancelSelectedNode : function(node) {\r\n\t\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\tdestroy : function() {\r\n\t\t\t\t\tview.destroy(setting);\r\n\t\t\t\t},\r\n\t\t\t\texpandAll : function(expandFlag) {\r\n\t\t\t\t\texpandFlag = !!expandFlag;\r\n\t\t\t\t\tview.expandCollapseSonNode(setting, null, expandFlag, true);\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\texpandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {\r\n\t\t\t\t\tif (!node || !node.isParent) return null;\r\n\t\t\t\t\tif (expandFlag !== true && expandFlag !== false) {\r\n\t\t\t\t\t\texpandFlag = !node.open;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\t\t\tif (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag && node.parentTId) {\r\n\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag === node.open && !sonSign) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdata.getRoot(setting).expandTriggerFlag = callbackFlag;\r\n\t\t\t\t\tif (!tools.canAsync(setting, node) && sonSign) {\r\n\t\t\t\t\t\tview.expandCollapseSonNode(setting, node, expandFlag, true, function() {\r\n\t\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnode.open = !expandFlag;\r\n\t\t\t\t\t\tview.switchNode(this.setting, node);\r\n\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\tgetNodes : function() {\r\n\t\t\t\t\treturn data.getNodes(setting);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByTId : function(tId) {\r\n\t\t\t\t\treturn data.getNodeCache(setting, tId);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParamFuzzy : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {\r\n\t\t\t\t\tisSingle = !!isSingle;\r\n\t\t\t\t\tif (!filter || (typeof filter != \"function\")) return (isSingle ? null : []);\r\n\t\t\t\t\treturn data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeIndex : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\tfor (var i=0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\tif (parentNode[childKey][i] == node) return i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t},\r\n\t\t\t\tgetSelectedNodes : function() {\r\n\t\t\t\t\tvar r = [], list = data.getRoot(setting).curSelectedList;\r\n\t\t\t\t\tfor (var i=0, l=list.length; i<l; i++) {\r\n\t\t\t\t\t\tr.push(list[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn r;\r\n\t\t\t\t},\r\n\t\t\t\tisSelectedNode : function(node) {\r\n\t\t\t\t\treturn data.isSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\treAsyncChildNodes : function(parentNode, reloadType, isSilent) {\r\n\t\t\t\t\tif (!this.setting.async.enable) return;\r\n\t\t\t\t\tvar isRoot = !parentNode;\r\n\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\tparentNode = data.getRoot(setting);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (reloadType==\"refresh\") {\r\n\t\t\t\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\t\t\t\tfor (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {\r\n\t\t\t\t\t\t\tdata.removeNodeCache(setting, parentNode[childKey][i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\t\t\t\tparentNode[childKey] = [];\r\n\t\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\t\t\t\tulObj.empty();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);\r\n\t\t\t\t},\r\n\t\t\t\trefresh : function() {\r\n\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\tvar root = data.getRoot(setting),\r\n\t\t\t\t\tnodes = root[setting.data.key.children]\r\n\t\t\t\t\tdata.initRoot(setting);\r\n\t\t\t\t\troot[setting.data.key.children] = nodes\r\n\t\t\t\t\tdata.initCache(setting);\r\n\t\t\t\t\tview.createNodes(setting, 0, root[setting.data.key.children]);\r\n\t\t\t\t},\r\n\t\t\t\tremoveChildNodes : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tnodes = node[childKey];\r\n\t\t\t\t\tview.removeChildNodes(setting, node);\r\n\t\t\t\t\treturn nodes ? nodes : null;\r\n\t\t\t\t},\r\n\t\t\t\tremoveNode : function(node, callbackFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\t\t\t\t\tif (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;\r\n\t\t\t\t\tview.removeNode(setting, node);\r\n\t\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tselectNode : function(node, addFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tif (tools.uCanDo(setting)) {\r\n\t\t\t\t\t\taddFlag = setting.view.selectedMulti && addFlag;\r\n\t\t\t\t\t\tif (node.parentTId) {\r\n\t\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() {\r\n\t\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tview.selectNode(setting, node, addFlag);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\ttransformTozTreeNodes : function(simpleNodes) {\r\n\t\t\t\t\treturn data.transformTozTreeFormat(setting, simpleNodes);\r\n\t\t\t\t},\r\n\t\t\t\ttransformToArray : function(nodes) {\r\n\t\t\t\t\treturn data.transformToArrayFormat(setting, nodes);\r\n\t\t\t\t},\r\n\t\t\t\tupdateNode : function(node, checkTypeFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tvar nObj = $$(node, setting);\r\n\t\t\t\t\tif (nObj.get(0) && tools.uCanDo(setting)) {\r\n\t\t\t\t\t\tview.setNodeName(setting, node);\r\n\t\t\t\t\t\tview.setNodeTarget(setting, node);\r\n\t\t\t\t\t\tview.setNodeUrl(setting, node);\r\n\t\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\t\tview.setNodeFontCss(setting, node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\troot.treeTools = zTreeTools;\r\n\t\t\tdata.setZTreeTools(setting, zTreeTools);\r\n\r\n\t\t\tif (root[childKey] && root[childKey].length > 0) {\r\n\t\t\t\tview.createNodes(setting, 0, root[childKey]);\r\n\t\t\t} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {\r\n\t\t\t\tview.asyncNode(setting);\r\n\t\t\t}\r\n\t\t\treturn zTreeTools;\r\n\t\t}\r\n\t};\r\n\r\n\tvar zt = $.fn.zTree,\r\n\t$$ = tools.$,\r\n\tconsts = zt.consts;\r\n})(BI.jQuery);/*\r\n * JQuery zTree excheck v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\t//default consts of excheck\r\n\tvar _consts = {\r\n\t\tevent: {\r\n\t\t\tCHECK: \"ztree_check\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tCHECK: \"_check\"\r\n\t\t},\r\n\t\tcheckbox: {\r\n\t\t\tSTYLE: \"checkbox\",\r\n\t\t\tDEFAULT: \"chk\",\r\n\t\t\tDISABLED: \"disable\",\r\n\t\t\tFALSE: \"false\",\r\n\t\t\tTRUE: \"true\",\r\n\t\t\tFULL: \"full\",\r\n\t\t\tPART: \"part\",\r\n\t\t\tFOCUS: \"focus\"\r\n\t\t},\r\n\t\tradio: {\r\n\t\t\tSTYLE: \"radio\",\r\n\t\t\tTYPE_ALL: \"all\",\r\n\t\t\tTYPE_LEVEL: \"level\"\r\n\t\t}\r\n\t},\r\n\t//default setting of excheck\r\n\t_setting = {\r\n\t\tcheck: {\r\n\t\t\tenable: false,\r\n\t\t\tautoCheckTrigger: false,\r\n\t\t\tchkStyle: _consts.checkbox.STYLE,\r\n\t\t\tnocheckInherit: false,\r\n\t\t\tchkDisabledInherit: false,\r\n\t\t\tradioType: _consts.radio.TYPE_LEVEL,\r\n\t\t\tchkboxType: {\r\n\t\t\t\t\"Y\": \"ps\",\r\n\t\t\t\t\"N\": \"ps\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchecked: \"checked\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeCheck:null,\r\n\t\t\tonCheck:null\r\n\t\t}\r\n\t},\r\n\t//default root of excheck\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tr.radioCheckedList = [];\r\n\t},\r\n\t//default cache of excheck\r\n\t_initCache = function(treeId) {},\r\n\t//default bind event of excheck\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.CHECK, function (event, srcEvent, treeId, node) {\r\n\t\t\tevent.srcEvent = srcEvent;\r\n\t\t\ttools.apply(setting.callback.onCheck, [event, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.CHECK);\r\n\t},\r\n\t//default event proxy of excheck\r\n\t_eventProxy = function(e) {\r\n\t\tvar target = e.target,\r\n\t\tsetting = data.getSetting(e.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null;\r\n\r\n\t\tif (tools.eqs(e.type, \"mouseover\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoverCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"mouseout\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoutCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"click\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"checkNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"checkNode\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onCheckNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoverCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoverCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoutCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoutCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: nodeEventType === \"checkNode\",\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of excheck\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (typeof n[checkedKey] == \"string\") n[checkedKey] = tools.eqs(n[checkedKey], \"true\");\r\n\t\tn[checkedKey] = !!n[checkedKey];\r\n\t\tn.checkedOld = n[checkedKey];\r\n\t\tif (typeof n.nocheck == \"string\") n.nocheck = tools.eqs(n.nocheck, \"true\");\r\n\t\tn.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);\r\n\t\tif (typeof n.chkDisabled == \"string\") n.chkDisabled = tools.eqs(n.chkDisabled, \"true\");\r\n\t\tn.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);\r\n\t\tif (typeof n.halfCheck == \"string\") n.halfCheck = tools.eqs(n.halfCheck, \"true\");\r\n\t\tn.halfCheck = !!n.halfCheck;\r\n\t\tn.check_Child_State = -1;\r\n\t\tn.check_Focus = false;\r\n\t\tn.getCheckStatus = function() {return data.getCheckStatus(setting, n);};\r\n\r\n\t\tif (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) {\r\n\t\t\tvar r = data.getRoot(setting);\r\n\t\t\tr.radioCheckedList.push(n);\r\n\t\t}\r\n\t},\r\n\t//add dom for check\r\n\t_beforeA = function(setting, node, html) {\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (setting.check.enable) {\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\thtml.push(\"<span ID='\", node.tId, consts.id.CHECK, \"' class='\", view.makeChkClass(setting, node), \"' treeNode\", consts.id.CHECK, (node.nocheck === true?\" style='display:none;'\":\"\"),\"></span>\");\r\n\t\t}\r\n\t},\r\n\t//update zTreeObj, add method of check\r\n\t_zTreeTools = function(setting, zTreeTools) {\r\n\t\tzTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {\r\n\t\t\tvar checkedKey = this.setting.data.key.checked;\r\n\t\t\tif (node.chkDisabled === true) return;\r\n\t\t\tif (checked !== true && checked !== false) {\r\n\t\t\t\tchecked = !node[checkedKey];\r\n\t\t\t}\r\n\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\tif (node[checkedKey] === checked && !checkTypeFlag) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {\r\n\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tzTreeTools.checkAllNodes = function(checked) {\r\n\t\t\tview.repairAllChk(this.setting, !!checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getCheckedNodes = function(checked) {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\tchecked = (checked !== false);\r\n\t\t\treturn data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getChangeCheckedNodes = function() {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\treturn data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);\r\n\t\t}\r\n\r\n\t\tzTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {\r\n\t\t\tdisabled = !!disabled;\r\n\t\t\tinheritParent = !!inheritParent;\r\n\t\t\tinheritChildren = !!inheritChildren;\r\n\t\t\tview.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);\r\n\t\t\tview.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);\r\n\t\t}\r\n\r\n\t\tvar _updateNode = zTreeTools.updateNode;\r\n\t\tzTreeTools.updateNode = function(node, checkTypeFlag) {\r\n\t\t\tif (_updateNode) _updateNode.apply(zTreeTools, arguments);\r\n\t\t\tif (!node || !this.setting.check.enable) return;\r\n\t\t\tvar nObj = $$(node, this.setting);\r\n\t\t\tif (nObj.get(0) && tools.uCanDo(this.setting)) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of operate data\r\n\t_data = {\r\n\t\tgetRadioCheckedList: function(setting) {\r\n\t\t\tvar checkedList = data.getRoot(setting).radioCheckedList;\r\n\t\t\tfor (var i=0, j=checkedList.length; i<j; i++) {\r\n\t\t\t\tif(!data.getNodeCache(setting, checkedList[i].tId)) {\r\n\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\ti--; j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn checkedList;\r\n\t\t},\r\n\t\tgetCheckStatus: function(setting, node) {\r\n\t\t\tif (!setting.check.enable || node.nocheck || node.chkDisabled) return null;\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tr = {\r\n\t\t\t\tchecked: node[checkedKey],\r\n\t\t\t\thalf: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))\r\n\t\t\t};\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\tgetTreeCheckedNodes: function(setting, nodes, checked, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tonlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t\tif(onlyOne) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);\r\n\t\t\t\tif(onlyOne && results.length > 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tgetTreeChangeCheckedNodes: function(setting, nodes, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tmakeChkFlag: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tchkFlag = -1;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar cNode = node[childKey][i];\r\n\t\t\t\t\tvar tmp = -1;\r\n\t\t\t\t\tif (setting.check.chkStyle == consts.radio.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey]) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State > 0 ? 2:0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp == 2) {\r\n\t\t\t\t\t\t\tchkFlag = 2; break;\r\n\t\t\t\t\t\t} else if (tmp == 0){\r\n\t\t\t\t\t\t\tchkFlag = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (setting.check.chkStyle == consts.checkbox.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 1;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey] ) {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State > 0) ? 1 : 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp === 1) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp > -1) {\r\n\t\t\t\t\t\t\tchkFlag = tmp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnode.check_Child_State = chkFlag;\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\t_event = {\r\n\r\n\t},\r\n\t//method of event handler\r\n\t_handler = {\r\n\t\tonCheckNode: function (event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tif (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;\r\n\t\t\tnode[checkedKey] = !node[checkedKey];\r\n\t\t\tview.checkNodeRelation(setting, node);\r\n\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\tview.repairParentChkClassWithSelf(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoverCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = true;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoutCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = false;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\t_tools = {\r\n\r\n\t},\r\n\t//method of operate ztree dom\r\n\t_view = {\r\n\t\tcheckNodeRelation: function(setting, node) {\r\n\t\t\tvar pNode, i, l,\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tr = consts.radio;\r\n\t\t\tif (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tvar checkedList = data.getRadioCheckedList(setting);\r\n\t\t\t\tif (node[checkedKey]) {\r\n\t\t\t\t\tif (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\t\tfor (i = checkedList.length-1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tpNode = checkedList[i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t\tif (pNode.parentTId != node.parentTId) {\r\n\t\t\t\t\t\t\t\t\tview.repairParentChkClassWithSelf(setting, pNode);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcheckedList.push(node);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\t\tfor (i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\t\tpNode = parentNode[childKey][i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\tfor (i = 0, l = checkedList.length; i < l; i++) {\r\n\t\t\t\t\t\tif (node == checkedList[i]) {\r\n\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t\tif (node[checkedKey] && setting.check.chkboxType.Y.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && setting.check.chkboxType.N.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tmakeChkClass: function(setting, node) {\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tc = consts.checkbox, r = consts.radio,\r\n\t\t\tcheckboxType = setting.check.chkboxType;\r\n\t\t\tvar notEffectByOtherNode = (checkboxType.Y === \"\" && checkboxType.N === \"\");\r\n\t\t\tfullStyle = \"\";\r\n\t\t\tif (node.chkDisabled === true) {\r\n\t\t\t\tfullStyle = c.DISABLED;\r\n\t\t\t} else if (node.halfCheck) {\r\n\t\t\t\tfullStyle = c.PART;\r\n\t\t\t} else if (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tfullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;\r\n\t\t\t} else {\r\n\t\t\t\tfullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) || notEffectByOtherNode ? c.FULL:c.PART) : ((node.check_Child_State < 1 || notEffectByOtherNode)? c.FULL:c.PART);\r\n\t\t\t}\r\n\t\t\tvar chkName = setting.check.chkStyle + \"_\" + (node[checkedKey] ? c.TRUE : c.FALSE) + \"_\" + fullStyle;\r\n\t\t\tchkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + \"_\" + c.FOCUS : chkName;\r\n\t\t\treturn consts.className.BUTTON + \" \" + c.DEFAULT + \" \" + chkName;\r\n\t\t},\r\n\t\trepairAllChk: function(setting, checked) {\r\n\t\t\tif (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {\r\n\t\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\t\tchildKey = setting.data.key.children,\r\n\t\t\t\troot = data.getRoot(setting);\r\n\t\t\t\tfor (var i = 0, l = root[childKey].length; i<l ; i++) {\r\n\t\t\t\t\tvar node = root[childKey][i];\r\n\t\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, checked);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairChkClass: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkClass: function(setting, node) {\r\n\t\t\tif (!node || !node.parentTId) return;\r\n\t\t\tvar pNode = node.getParentNode();\r\n\t\t\tview.repairChkClass(setting, pNode);\r\n\t\t\tview.repairParentChkClass(setting, pNode);\r\n\t\t},\r\n\t\trepairParentChkClassWithSelf: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\tview.repairParentChkClass(setting, node[childKey][0]);\r\n\t\t\t} else {\r\n\t\t\t\tview.repairParentChkClass(setting, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairSonChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node.chkDisabled != chkDisabled) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tif (node[childKey] && inherit) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (node.chkDisabled != chkDisabled && inherit) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tview.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);\r\n\t\t},\r\n\t\tsetChkClass: function(setting, obj, node) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tif (node.nocheck === true) {\r\n\t\t\t\tobj.hide();\r\n\t\t\t} else {\r\n\t\t\t\tobj.show();\r\n\t\t\t}\r\n obj.attr('class', view.makeChkClass(setting, node));\r\n\t\t},\r\n\t\tsetParentNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tvar pSign = true;\r\n\t\t\t\tif (!value) {\r\n\t\t\t\t\tvar pNodes = node.getParentNode()[childKey];\r\n\t\t\t\t\tfor (var i = 0, l = pNodes.length; i < l; i++) {\r\n\t\t\t\t\t\tif ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])\r\n\t\t\t\t\t\t|| ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {\r\n\t\t\t\t\t\t\tpSign = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (pSign) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetSonNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\r\n\t\t\tvar hasDisable = false;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, sNode, value, srcNode);\r\n\t\t\t\t\tif (sNode.chkDisabled === true) hasDisable = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (node != data.getRoot(setting) && node.chkDisabled !== true) {\r\n\t\t\t\tif (hasDisable && node.nocheck !== true) {\r\n\t\t\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\t\t}\r\n\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\t\tif (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnode.check_Child_State = -1;\r\n\t\t\t\t}\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_z = {\r\n\t\ttools: _tools,\r\n\t\tview: _view,\r\n\t\tevent: _event,\r\n\t\tdata: _data\r\n\t};\r\n\t$.extend(true, $.fn.zTree.consts, _consts);\r\n\t$.extend(true, $.fn.zTree._z, _z);\r\n\r\n\tvar zt = $.fn.zTree,\r\n\ttools = zt._z.tools,\r\n\tconsts = zt.consts,\r\n\tview = zt._z.view,\r\n\tdata = zt._z.data,\r\n\tevent = zt._z.event,\r\n\t$$ = tools.$;\r\n\r\n\tdata.exSetting(_setting);\r\n\tdata.addInitBind(_bindEvent);\r\n\tdata.addInitUnBind(_unbindEvent);\r\n\tdata.addInitCache(_initCache);\r\n\tdata.addInitNode(_initNode);\r\n\tdata.addInitProxy(_eventProxy, true);\r\n\tdata.addInitRoot(_initRoot);\r\n\tdata.addBeforeA(_beforeA);\r\n\tdata.addZTreeTools(_zTreeTools);\r\n\r\n\tvar _createNodes = view.createNodes;\r\n\tview.createNodes = function(setting, level, nodes, parentNode) {\r\n\t\tif (_createNodes) _createNodes.apply(view, arguments);\r\n\t\tif (!nodes) return;\r\n\t\tview.repairParentChkClassWithSelf(setting, parentNode);\r\n\t}\r\n\tvar _removeNode = view.removeNode;\r\n\tview.removeNode = function(setting, node) {\r\n\t\tvar parentNode = node.getParentNode();\r\n\t\tif (_removeNode) _removeNode.apply(view, arguments);\r\n\t\tif (!node || !parentNode) return;\r\n\t\tview.repairChkClass(setting, parentNode);\r\n\t\tview.repairParentChkClass(setting, parentNode);\r\n\t}\r\n\r\n\tvar _appendNodes = view.appendNodes;\r\n\tview.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\tvar html = \"\";\r\n\t\tif (_appendNodes) {\r\n\t\t\thtml = _appendNodes.apply(view, arguments);\r\n\t\t}\r\n\t\tif (parentNode) {\r\n\t\t\tdata.makeChkFlag(setting, parentNode);\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n})(BI.jQuery);/**\r\n * @author windy\r\n * @version 2.0\r\n * Created by windy on 2020/1/8\r\n * 提供节点滚动加载方式\r\n */\r\n\r\n!(function () {\r\n BI.TreeRenderScrollService = BI.inherit(BI.OB, {\r\n _init: function () {\r\n this.nodeLists = {};\r\n\r\n this.id = this.options.id;\r\n // renderService是否已经注册了滚动\r\n this.hasBinded = false;\r\n\r\n this.container = this.options.container;\r\n },\r\n\r\n _getNodeListBounds: function (tId) {\r\n var nodeList = this.options.subNodeListGetter(tId)[0];\r\n return {\r\n top: nodeList.offsetTop,\r\n left: nodeList.offsetLeft,\r\n width: nodeList.offsetWidth,\r\n height: nodeList.offsetHeight\r\n }\r\n },\r\n\r\n _getTreeContainerBounds: function () {\r\n var nodeList = this.container[0];\r\n if (BI.isNotNull(nodeList)) {\r\n return {\r\n top: nodeList.offsetTop + nodeList.scrollTop,\r\n left: nodeList.offsetLeft + nodeList.scrollLeft,\r\n width: nodeList.offsetWidth,\r\n height: nodeList.offsetHeight\r\n };\r\n }\r\n return {};\r\n },\r\n\r\n _canNodePopulate: function (tId) {\r\n if (this.nodeLists[tId].locked) {\r\n return false;\r\n }\r\n // 获取ul, 即子节点列表的bounds\r\n // 是否需要继续加载,只需要看子节点列表的下边界与container是否无交集\r\n var bounds = this._getNodeListBounds(tId);\r\n var containerBounds = this._getTreeContainerBounds(tId);\r\n // ul底部是不是漏出来了\r\n if (bounds.top + bounds.height < containerBounds.top + containerBounds.height) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n _isNodeInVisible: function (tId) {\r\n var nodeList = this.options.subNodeListGetter(tId);\r\n return nodeList.length === 0 || nodeList.css(\"display\") === \"none\";\r\n },\r\n\r\n pushNodeList: function (tId, populate) {\r\n var self = this;\r\n if (!BI.has(this.nodeLists, tId)) {\r\n this.nodeLists[tId] = {\r\n populate: BI.debounce(populate, 0),\r\n options: {\r\n times: 1\r\n },\r\n // 在上一次请求返回前, 通过滚动再次触发加载的时候, 不应该认为是下一次分页, 需要等待上次请求返回\r\n // 以保证顺序和请求次数的完整\r\n locked: false\r\n };\r\n } else {\r\n this.nodeLists[tId].locked = false;\r\n }\r\n if(!this.hasBinded) {\r\n // console.log(\"绑定事件\");\r\n this.hasBinded = true;\r\n this.container && this.container.on(\"scroll\", BI.debounce(function () {\r\n self.refreshAllNodes();\r\n }, 30));\r\n }\r\n },\r\n\r\n refreshAllNodes: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n // 不展开的节点就不看了\r\n !self._isNodeInVisible(tId) && self.refreshNodes(tId);\r\n });\r\n },\r\n\r\n refreshNodes: function (tId) {\r\n if (this._canNodePopulate(tId)) {\r\n var nodeList = this.nodeLists[tId];\r\n nodeList.options.times++;\r\n nodeList.locked = true;\r\n nodeList.populate({\r\n times: nodeList.options.times\r\n });\r\n }\r\n },\r\n\r\n removeNodeList: function (tId) {\r\n delete this.nodeLists[tId];\r\n if (BI.size(this.nodeLists) === 0) {\r\n this.clear();\r\n }\r\n },\r\n\r\n clear: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n self.removeNodeList(tId);\r\n });\r\n this.nodeLists = {};\r\n // console.log(\"解绑事件\");\r\n this.container.off(\"scroll\");\r\n this.hasBinded = false;\r\n }\r\n });\r\n})();/**\r\n * @author windy\r\n * @version 2.0\r\n * Created by windy on 2020/1/8\r\n * 提供节点分页加载方式\r\n */\r\n\r\n!(function () {\r\n BI.TreeRenderPageService = BI.inherit(BI.OB, {\r\n _init: function () {\r\n this.nodeLists = {};\r\n },\r\n\r\n _getLoadingBar: function(tId) {\r\n var self = this;\r\n var tip = BI.createWidget({\r\n type: \"bi.loading_bar\",\r\n height: 25,\r\n handler: function () {\r\n self.refreshNodes(tId);\r\n }\r\n });\r\n tip.setLoaded();\r\n return tip;\r\n },\r\n\r\n pushNodeList: function (tId, populate) {\r\n var self = this, o = this.options;\r\n var tip = this._getLoadingBar(tId);\r\n if (!BI.has(this.nodeLists, tId)) {\r\n this.nodeLists[tId] = {\r\n populate: BI.debounce(populate, 0),\r\n options: {\r\n times: 1\r\n },\r\n loadWidget: tip\r\n };\r\n } else {\r\n this.nodeLists[tId].loadWidget.destroy();\r\n this.nodeLists[tId].loadWidget = tip;\r\n }\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: o.subNodeListGetter(tId),\r\n items: [tip]\r\n });\r\n },\r\n\r\n refreshNodes: function (tId) {\r\n var nodeList = this.nodeLists[tId];\r\n nodeList.options.times++;\r\n nodeList.loadWidget.setLoading();\r\n nodeList.populate({\r\n times: nodeList.options.times\r\n });\r\n },\r\n\r\n removeNodeList: function (tId) {\r\n this.nodeLists[tId] && this.nodeLists[tId].loadWidget.destroy();\r\n this.nodeLists[tId] && (this.nodeLists[tId].loadWidget = null);\r\n delete this.nodeLists[tId];\r\n if (BI.size(this.nodeLists) === 0) {\r\n this.clear();\r\n }\r\n },\r\n\r\n clear: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n self.removeNodeList(tId);\r\n });\r\n this.nodeLists = {};\r\n }\r\n });\r\n\r\n})();/**\r\n * 可以改变图标的button\r\n *\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconChangeButton\r\n * @extends BI.Single\r\n */\r\nBI.IconChangeButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-icon-change-button\",\r\n iconCls: \"\",\r\n iconWidth: null,\r\n iconHeight: null,\r\n\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconChangeButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.button = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n element: this,\r\n cls: o.iconCls,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n\r\n stopEvent: o.stopEvent,\r\n stopPropagation: o.stopPropagation,\r\n selected: o.selected,\r\n once: o.once,\r\n forceSelected: o.forceSelected,\r\n forceNotSelected: o.forceNotSelected,\r\n disableSelected: o.disableSelected,\r\n\r\n shadow: o.shadow,\r\n isShadowShowingOnSelected: o.isShadowShowingOnSelected,\r\n trigger: o.trigger,\r\n handler: o.handler\r\n });\r\n\r\n this.button.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.button.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.button.setSelected(b);\r\n },\r\n\r\n setIcon: function (cls) {\r\n var o = this.options;\r\n if (o.iconCls !== cls) {\r\n this.element.removeClass(o.iconCls).addClass(cls);\r\n o.iconCls = cls;\r\n }\r\n }\r\n});\r\nBI.IconChangeButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_change_button\", BI.IconChangeButton);/**\r\n * 统一的trigger图标按钮\r\n *\r\n * Created by GUY on 2015/9/16.\r\n * @class BI.TriggerIconButton\r\n * @extends BI.IconButton\r\n */\r\nBI.TriggerIconButton = BI.inherit(BI.IconButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-trigger-icon-button\",\r\n extraCls: \"pull-down-font\"\r\n });\r\n }\r\n});\r\nBI.TriggerIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\nBI.shortcut(\"bi.trigger_icon_button\", BI.TriggerIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfIconButton = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-icon-button check-half-select-icon\",\r\n height: 16,\r\n width: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n selected: false\r\n });\r\n }\r\n});\r\nBI.HalfIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.half_icon_button\", BI.HalfIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-button bi-high-light-border\",\r\n height: 14,\r\n width: 14,\r\n selected: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.HalfButton.superclass._init.apply(this, arguments);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bi-high-light-background\",\r\n width: 8,\r\n height: 8\r\n }]\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.HalfButton.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.HalfButton.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.HalfButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.half_button\", BI.HalfButton);/**\r\n * guy\r\n * 复选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.MultiSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-item\",\r\n height: 24,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox],\r\n width: o.iconWrapperWidth\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectItem.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiSelectItem.superclass.setSelected.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\nBI.MultiSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_item\", BI.MultiSelectItem);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.SingleSelectIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.SingleSelectIconTextItem = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-icon-text-item bi-list-item-active\",\r\n iconCls: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.icon_text_item\",\r\n element: this,\r\n cls: o.iconCls,\r\n once: o.once,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n selected: o.selected,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.text.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.text.setSelected(b);\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.single_select_icon_text_item\", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-item bi-list-item-active\",\r\n hgap: 10,\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n title: o.title || o.text,\r\n warningTitle: o.warningTitle,\r\n py: o.py\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_item\", BI.SingleSelectItem);/**\r\n * guy\r\n * 单选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n hgap: 10,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectRadioItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\",\r\n once: o.once\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 16\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectRadioItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_radio_item\", BI.SingleSelectRadioItem);/**\r\n * Created by roy on 15/10/16.\r\n */\r\nBI.ArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-arrow-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconWrapperWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.ArrowNode.superclass._init.apply(this, arguments);\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\"\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: o.iconWrapperWidth,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isOpened());\r\n },\r\n \r\n setText: function (text) {\r\n BI.ArrowNode.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.ArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.arrow_group_node\", BI.ArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.FirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-first-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_plus_group_node\", BI.FirstPlusGroupNode);/**\r\n * Created by User on 2016/3/31.\r\n */\r\n/**\r\n * > + icon + 文本\r\n * @class BI.IconArrowNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-arrow-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n iconCls: \"\",\r\n iconWrapperWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n BI.IconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\",\r\n width: 24,\r\n stopPropagation: true\r\n });\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: 24,\r\n cls: o.iconCls,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: o.iconWrapperWidth,\r\n el: this.checkbox\r\n }, {\r\n width: 16,\r\n el: icon\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n rgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.IconArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.IconArrowNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_arrow_node\", BI.IconArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.LastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-last-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if(type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_plus_group_node\", BI.LastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.MidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-mid-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_plus_group_node\", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-icon-arrow-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 16,\r\n iconWidth: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.icon_arrow_node\",\r\n iconCls: o.iconCls,\r\n cls: \"bi-list-item-none\",\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_arrow_node\", BI.MultiLayerIconArrowNode);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.PlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.PlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.PlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.PlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.PlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (this.checkbox) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.plus_group_node\", BI.PlusGroupNode);/**\r\n * Created by Windy on 2018/2/1.\r\n */\r\nBI.Switch = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-switch\",\r\n height: 22,\r\n width: 44,\r\n logic: {\r\n dynamic: false\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.layout = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"circle-button bi-card\"\r\n },\r\n width: 18,\r\n height: 18,\r\n top: 2,\r\n left: this.options.selected ? 24 : 2\r\n }]\r\n };\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.Switch.superclass.setSelected.apply(this, arguments);\r\n this.layout.attr(\"items\")[0].left = v ? 24 : 2;\r\n this.layout.resize();\r\n },\r\n\r\n doClick: function () {\r\n BI.Switch.superclass.doClick.apply(this, arguments);\r\n this.fireEvent(BI.Switch.EVENT_CHANGE);\r\n }\r\n});\r\nBI.Switch.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.switch\", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"first-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_tree_leaf_item\", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 24,\r\n cls: o.iconCls,\r\n items: [{\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 16,\r\n el: icon\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n hgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_tree_leaf_item\", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"last-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_tree_leaf_item\", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"mid-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_tree_leaf_item\", BI.MidTreeLeafItem);/**\r\n * @class BI.MultiLayerIconTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-icon-tree-leaf-item bi-list-item-active\",\r\n layer: 0,\r\n height: 24,\r\n iconCls: \"\",\r\n iconHeight: 16,\r\n iconWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.icon_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n iconCls: o.iconCls,\r\n id: o.id,\r\n pId: o.pId,\r\n isFront: true,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.item.doRedMark.apply(this.item, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.item.unRedMark.apply(this.item, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_tree_leaf_item\", BI.MultiLayerIconTreeLeafItem);\r\n/**\r\n * 树叶子节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.TreeTextLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tree-text-leaf-item bi-list-item-active\",\r\n id: \"\",\r\n pId: \"\",\r\n height: 24,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeTextLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n lgap: o.lgap,\r\n rgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tree_text_leaf_item\", BI.TreeTextLeafItem);/**\r\n * 专门为calendar的视觉加的button,作为私有button,不能配置任何属性,也不要用这个玩意\r\n */\r\nBI.CalendarDateItem = BI.inherit(BI.BasicButton, {\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n value: o.value,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n left: o.lgap,\r\n right: o.rgap,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);\r\n this.text.setSelected(b);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.calendar_date_item\", BI.CalendarDateItem);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.Calendar\r\n * @extends BI.Widget\r\n */\r\nBI.Calendar = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: 2015,\r\n month: 8,\r\n day: 25\r\n });\r\n },\r\n\r\n _dateCreator: function (Y, M, D) {\r\n var self = this, o = this.options, log = {}, De = BI.getDate();\r\n var mins = o.min.match(/\\d+/g);\r\n var maxs = o.max.match(/\\d+/g);\r\n Y < (mins[0] | 0) && (Y = (mins[0] | 0));\r\n Y > (maxs[0] | 0) && (Y = (maxs[0] | 0));\r\n\r\n De.setFullYear(Y, M, D);\r\n log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()];\r\n\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(log.ymd[0]) ? 29 : 28;\r\n\r\n // 日期所在月第一天\r\n De.setFullYear(log.ymd[0], log.ymd[1], 1);\r\n // 是周几\r\n log.FDay = De.getDay();\r\n\r\n // 当前BI.StartOfWeek与周日对齐后的FDay是周几\r\n var offSetFDay = (7 - BI.StartOfWeek + log.FDay) % 7;\r\n\r\n // 当前月页第一天是几号\r\n log.PDay = MD[M === 0 ? 11 : M - 1] - offSetFDay + 1;\r\n log.NDay = 1;\r\n\r\n var items = [];\r\n BI.each(BI.range(42), function (i) {\r\n var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD;\r\n // 上个月的日期\r\n if (i < offSetFDay) {\r\n td.lastMonth = true;\r\n DD = i + log.PDay;\r\n // 上一年\r\n MM === 1 && (YY -= 1);\r\n MM = MM === 1 ? 12 : MM - 1;\r\n } else if (i >= offSetFDay && i < offSetFDay + MD[log.ymd[1]]) {\r\n DD = i - offSetFDay + 1;\r\n if (i - offSetFDay + 1 === log.ymd[2]) {\r\n td.currentDay = true;\r\n }\r\n } else {\r\n td.nextMonth = true;\r\n DD = log.NDay++;\r\n MM === 12 && (YY += 1);\r\n MM = MM === 12 ? 1 : MM + 1;\r\n }\r\n if (BI.checkDateVoid(YY, MM, DD, mins, maxs)[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = DD;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.Calendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var items = BI.map(this._getWeekLabel(), function (i, value) {\r\n return {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: value\r\n };\r\n });\r\n var title = BI.createWidget({\r\n type: \"bi.button_group\",\r\n height: 44,\r\n items: items,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 5,\r\n vgap: 10\r\n }]\r\n });\r\n\r\n this.days = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 7,\r\n rows: 6,\r\n columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],\r\n rowSize: 24,\r\n vgap: 10\r\n }))]\r\n });\r\n this.days.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", title, this.days)\r\n }))));\r\n },\r\n\r\n _getWeekLabel: function () {\r\n return BI.map(BI.range(0, 7), function (idx, v) {\r\n return BI.Date._SDN[(v + BI.StartOfWeek) % 7];\r\n });\r\n },\r\n\r\n isFrontDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, -1 * (day + 1));\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n isFinalDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, 42 - day);\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var days = this._dateCreator(o.year, o.month - 1, o.day);\r\n var items = [];\r\n items.push(days.slice(0, 7));\r\n items.push(days.slice(7, 14));\r\n items.push(days.slice(14, 21));\r\n items.push(days.slice(21, 28));\r\n items.push(days.slice(28, 35));\r\n items.push(days.slice(35, 42));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);\r\n return BI.extend(td, {\r\n type: \"bi.calendar_date_item\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n value: o.year + \"-\" + month + \"-\" + td.text,\r\n disabled: td.lastMonth || td.nextMonth || td.disabled,\r\n lgap: 5,\r\n rgap: 5\r\n // selected: td.currentDay\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function() {\r\n this.days.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.days.setValue([ob.year + \"-\" + ob.month + \"-\" + ob.day]);\r\n },\r\n\r\n getValue: function () {\r\n var date = this.days.getValue()[0].match(/\\d+/g);\r\n return {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n };\r\n }\r\n});\r\n\r\nBI.extend(BI.Calendar, {\r\n getPageByDateJSON: function (json) {\r\n var year = BI.getDate().getFullYear();\r\n var month = BI.getDate().getMonth();\r\n var page = (json.year - year) * 12;\r\n page += json.month - 1 - month;\r\n return page;\r\n },\r\n getDateJSONByPage: function (v) {\r\n var months = BI.getDate().getMonth();\r\n var page = v;\r\n\r\n // 对当前page做偏移,使到当前年初\r\n page = page + months;\r\n\r\n var year = BI.parseInt(page / 12);\r\n if(page < 0 && page % 12 !== 0) {\r\n year--;\r\n }\r\n var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12);\r\n return {\r\n year: BI.getDate().getFullYear() + year,\r\n month: month + 1\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.calendar\", BI.Calendar);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.YearCalendar\r\n * @extends BI.Widget\r\n */\r\nBI.YearCalendar = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-calendar\",\r\n behaviors: {},\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: null\r\n });\r\n },\r\n\r\n _yearCreator: function (Y) {\r\n var o = this.options;\r\n Y = Y | 0;\r\n var start = BI.YearCalendar.getStartYear(Y);\r\n var items = [];\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) {\r\n var td = {};\r\n if (BI.checkDateVoid(start + i, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), \"%Y-%X-%d\"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), \"%Y-%X-%d\"))[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = start + i;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.YearCalendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.currentYear = BI.getDate().getFullYear();\r\n\r\n this.years = BI.createWidget({\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 24\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1\r\n }]\r\n });\r\n this.years.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this.years)\r\n }))));\r\n },\r\n\r\n isFrontYear: function () {\r\n var o = this.options;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n isFinalYear: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var years = this._yearCreator(o.year || this.currentYear);\r\n\r\n // 纵向排列年\r\n var len = years.length, tyears = BI.makeArray(len, \"\");\r\n var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11];\r\n BI.each(years, function (i, y) {\r\n tyears[i] = years[map[i]];\r\n });\r\n\r\n var items = [];\r\n items.push(tyears.slice(0, 2));\r\n items.push(tyears.slice(2, 4));\r\n items.push(tyears.slice(4, 6));\r\n items.push(tyears.slice(6, 8));\r\n items.push(tyears.slice(8, 10));\r\n items.push(tyears.slice(10, 12));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return BI.extend(td, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n width: 45,\r\n value: td.text,\r\n disabled: td.disabled\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function () {\r\n this.years.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (val) {\r\n this.years.setValue([val]);\r\n },\r\n\r\n getValue: function () {\r\n return this.years.getValue()[0];\r\n }\r\n});\r\n// 类方法\r\nBI.extend(BI.YearCalendar, {\r\n INTERVAL: 12,\r\n\r\n // 获取显示的第一年\r\n getStartYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL;\r\n },\r\n\r\n getEndYear: function (year) {\r\n return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;\r\n },\r\n\r\n getPageByYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n year = BI.YearCalendar.getStartYear(year);\r\n return (year - cur + 3) / BI.YearCalendar.INTERVAL;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.year_calendar\", BI.YearCalendar);/**\r\n * Created by roy on 15/10/16.\r\n * 右与下箭头切换的树节点\r\n */\r\nBI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-arrow-group-node-checkbox\"\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.removeClass(\"expander-right-font\").addClass(\"expander-down-font\");\r\n } else {\r\n this.element.removeClass(\"expander-down-font\").addClass(\"expander-right-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.arrow_group_node_checkbox\", BI.ArrowTreeGroupNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.CheckingMarkNode\r\n * @extends BI.IconButton\r\n */\r\nBI.CheckingMarkNode = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"check-mark-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.CheckingMarkNode.superclass._init.apply(this, arguments);\r\n this.setSelected(this.options.selected);\r\n\r\n },\r\n setSelected: function (v) {\r\n BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"check-mark-font\");\r\n } else {\r\n this.element.removeClass(\"check-mark-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.checking_mark_node\", BI.CheckingMarkNode);/**\r\n * 十字型的树节点\r\n * @class BI.FirstTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type2\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type2\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type2\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.first_tree_node_checkbox\", BI.FirstTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.LastTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type4\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if (v === true) {\r\n this.element.addClass(\"tree-expand-icon-type4\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type4\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.last_tree_node_checkbox\", BI.LastTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.MidTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type3\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type3\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type3\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.mid_tree_node_checkbox\", BI.MidTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.TreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.TreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type1\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.addClass(\"tree-expand-icon-type1\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type1\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.tree_node_checkbox\", BI.TreeNodeCheckbox);/**\r\n * 自定义选色\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.CustomColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.CustomColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-color-chooser\",\r\n width: 227,\r\n height: 245\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.editor, {\r\n type: \"bi.simple_color_picker_editor\"\r\n });\r\n this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n this.farbtastic = BI.createWidget({\r\n type: \"bi.farbtastic\"\r\n });\r\n this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.editor,\r\n left: 0,\r\n top: 0,\r\n right: 0\r\n }],\r\n height: 30\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.farbtastic,\r\n left: 15,\r\n right: 15,\r\n top: 7\r\n }],\r\n height: 215\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (color) {\r\n this.editor.setValue(color);\r\n this.farbtastic.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.CustomColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.custom_color_chooser\", BI.CustomColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser\",\r\n value: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 1,\r\n isNeedAdjustWidth: false,\r\n isNeedAdjustHeight: false,\r\n el: BI.extend({\r\n type: o.width <= 24 ? \"bi.color_chooser_trigger\" : \"bi.long_color_chooser_trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n width: o.width - 2,\r\n height: o.height - 2\r\n }, o.el),\r\n popup: {\r\n el: BI.extend({\r\n type: \"bi.color_chooser_popup\",\r\n ref: function (_ref) {\r\n self.colorPicker = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.ColorChooserPopup.EVENT_VALUE_CHANGE,\r\n action: function () {\r\n fn();\r\n if (!self._isRGBColor(self.colorPicker.getValue())) {\r\n self.combo.hideView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.ColorChooserPopup.EVENT_CHANGE,\r\n action: function () {\r\n fn();\r\n self.combo.hideView();\r\n }\r\n }]\r\n }, o.popup),\r\n value: o.value,\r\n width: 230\r\n },\r\n value: o.value\r\n });\r\n\r\n var fn = function () {\r\n var color = self.colorPicker.getValue();\r\n self.trigger.setValue(color);\r\n };\r\n\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.ColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser\", BI.ColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-color-chooser-popup\",\r\n width: 230,\r\n height: 145,\r\n simple: false // 简单模式, popup中没有自动和透明\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.colorEditor = BI.createWidget(o.editor, {\r\n type: o.simple ? \"bi.simple_color_picker_editor\" : \"bi.color_picker_editor\",\r\n value: o.value,\r\n cls: \"bi-header-background bi-border-bottom\",\r\n height: 30\r\n });\r\n\r\n this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n\r\n this.storeColors = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n cls: \"bi-border-bottom bi-border-right\",\r\n items: [this._digestStoreColors(this._getStoreColors())],\r\n width: 210,\r\n height: 24,\r\n value: o.value\r\n });\r\n this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.colorPicker = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n width: 210,\r\n height: 50,\r\n value: o.value\r\n });\r\n\r\n this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.customColorChooser = BI.createWidget({\r\n type: \"bi.custom_color_chooser\",\r\n editor: o.editor\r\n });\r\n\r\n var panel = BI.createWidget({\r\n type: \"bi.popup_panel\",\r\n buttons: [BI.i18nText(\"BI-Basic_Cancel\"), BI.i18nText(\"BI-Basic_Save\")],\r\n title: BI.i18nText(\"BI-Custom_Color\"),\r\n el: this.customColorChooser,\r\n stopPropagation: false,\r\n bgap: -1,\r\n rgap: 1,\r\n lgap: 1,\r\n minWidth: 227\r\n });\r\n\r\n this.more = BI.createWidget({\r\n type: \"bi.combo\",\r\n cls: \"bi-border-top\",\r\n container: null,\r\n direction: \"right,top\",\r\n isNeedAdjustHeight: false,\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"color-chooser-popup-more bi-list-item\",\r\n textAlign: \"center\",\r\n height: 24,\r\n textLgap: 10,\r\n text: BI.i18nText(\"BI-Basic_More\") + \"...\"\r\n },\r\n popup: panel\r\n });\r\n\r\n this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self.customColorChooser.setValue(self.getValue());\r\n });\r\n panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.more.hideView();\r\n break;\r\n case 1:\r\n self.setValue(self.customColorChooser.getValue());\r\n self._dealStoreColors();\r\n self.more.hideView();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n break;\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vtape\",\r\n items: [this.colorEditor, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.storeColors,\r\n left: 10,\r\n right: 10,\r\n top: 5\r\n }]\r\n },\r\n height: 29\r\n }, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.colorPicker,\r\n left: 10,\r\n right: 10,\r\n top: 5,\r\n bottom: 5\r\n }]\r\n },\r\n height: 60\r\n }, {\r\n el: this.more,\r\n height: 24\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"disable-mask\",\r\n invisible: !o.disabled,\r\n ref: function () {\r\n self.mask = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var o = this.options;\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);\r\n this.mask.setVisible(!enable);\r\n },\r\n\r\n _dealStoreColors: function () {\r\n var color = this.getValue();\r\n var colors = this._getStoreColors();\r\n var que = new BI.Queue(8);\r\n que.fromArray(colors);\r\n que.remove(color);\r\n que.unshift(color);\r\n var array = que.toArray();\r\n BI.Cache.setItem(\"colors\", BI.array2String(array));\r\n this.setStoreColors(array);\r\n },\r\n\r\n _digestStoreColors: function (colors) {\r\n var items = BI.map(colors, function (i, color) {\r\n return {\r\n value: color\r\n };\r\n });\r\n BI.count(colors.length, 8, function (i) {\r\n items.push({\r\n value: \"\",\r\n disabled: true\r\n });\r\n });\r\n return items;\r\n },\r\n\r\n _getStoreColors: function() {\r\n var self = this, o = this.options;\r\n var colorsArray = BI.string2Array(BI.Cache.getItem(\"colors\") || \"\");\r\n return BI.filter(colorsArray, function (idx, color) {\r\n return o.simple ? self._isRGBColor(color) : true;\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n if (BI.isArray(colors)) {\r\n this.storeColors.populate([this._digestStoreColors(colors)]);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorEditor.setValue(color);\r\n this.colorPicker.setValue(color);\r\n this.storeColors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colorEditor.getValue();\r\n }\r\n});\r\nBI.ColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.ColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_popup\", BI.ColorChooserPopup);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser-popup\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooserPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.color_chooser_popup\",\r\n value: o.value,\r\n element: this,\r\n simple: true // 是否有自动\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n this.popup.setStoreColors(colors);\r\n },\r\n\r\n setValue: function (color) {\r\n this.popup.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.SimpleColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser_popup\", BI.SimpleColorChooserPopup);/**\r\n * 简单选色控件,没有自动和透明\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-color-chooser\",\r\n value: \"#ffffff\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.color_chooser\",\r\n element: this,\r\n container: o.container,\r\n value: o.value,\r\n width: o.width,\r\n height: o.height,\r\n popup: {\r\n type: \"bi.simple_color_chooser_popup\"\r\n }\r\n });\r\n this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser\", BI.SimpleColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.ColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooserTrigger.superclass._init.apply(this, arguments);\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-chooser-trigger-content\" + (BI.isIE9Below && BI.isIE9Below() ? \" hack\" : \"\")\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: -1,\r\n bottom: 1\r\n }]\r\n });\r\n if (BI.isNotNull(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"auto-color-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color}).removeClass(\"auto-color-background\").removeClass(\"trans-color-background\");\r\n }\r\n }\r\n});\r\nBI.ColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_trigger\", BI.ColorChooserTrigger);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.LongColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LongColorChooserTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"color-chooser-trigger-content\",\r\n items: [{\r\n type: \"bi.icon_change_button\",\r\n ref: function (_ref) {\r\n self.changeIcon = _ref;\r\n },\r\n disableSelected: true,\r\n iconCls: \"auto-color-icon\",\r\n width: 24,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n },\r\n textAlign: \"left\",\r\n hgap: 5,\r\n height: 18,\r\n text: BI.i18nText(\"BI-Basic_Auto\")\r\n }\r\n }]\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: 3,\r\n bottom: 3\r\n }]\r\n });\r\n if (this.options.value) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.LongColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"auto-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Basic_Auto\"));\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"trans-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Transparent_Color\"));\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color});\r\n this.changeIcon.setVisible(false);\r\n this.label.setVisible(false);\r\n }\r\n }\r\n});\r\nBI.LongColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.long_color_chooser_trigger\", BI.LongColorChooserTrigger);/**\r\n * 简单选色控件按钮\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ColorPickerButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-picker-button bi-background bi-border-top bi-border-left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.value) {\r\n this.element.css(\"background-color\", o.value);\r\n var name = this.getName();\r\n this.element.hover(function () {\r\n self._createMask();\r\n if (self.isEnabled()) {\r\n BI.Maskers.show(name);\r\n }\r\n }, function () {\r\n if (!self.isSelected()) {\r\n BI.Maskers.hide(name);\r\n }\r\n });\r\n }\r\n },\r\n\r\n _createMask: function () {\r\n var o = this.options, name = this.getName();\r\n if (this.isEnabled() && !BI.Maskers.has(name)) {\r\n var w = BI.Maskers.make(name, this, {\r\n offset: {\r\n left: -1,\r\n top: -1,\r\n right: -1,\r\n bottom: -1\r\n }\r\n });\r\n w.element.addClass(\"color-picker-button-mask\").css(\"background-color\", o.value);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.ColorPickerButton.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this._createMask();\r\n }\r\n BI.Maskers[b ? \"show\" : \"hide\"](this.getName());\r\n }\r\n});\r\nBI.ColorPickerButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_button\", BI.ColorPickerButton);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPicker\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPicker = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker\",\r\n items: null\r\n });\r\n },\r\n\r\n _items: [\r\n [{\r\n value: \"#ffffff\"\r\n }, {\r\n value: \"#f2f2f2\"\r\n }, {\r\n value: \"#e5e5e5\"\r\n }, {\r\n value: \"#d9d9d9\"\r\n }, {\r\n value: \"#cccccc\"\r\n }, {\r\n value: \"#bfbfbf\"\r\n }, {\r\n value: \"#b2b2b2\"\r\n }, {\r\n value: \"#a6a6a6\"\r\n }, {\r\n value: \"#999999\"\r\n }, {\r\n value: \"#8c8c8c\"\r\n }, {\r\n value: \"#808080\"\r\n }, {\r\n value: \"#737373\"\r\n }, {\r\n value: \"#666666\"\r\n }, {\r\n value: \"#4d4d4d\"\r\n }, {\r\n value: \"#333333\"\r\n }, {\r\n value: \"#000000\"\r\n }],\r\n [{\r\n value: \"#d8b5a6\"\r\n }, {\r\n value: \"#ff9e9a\"\r\n }, {\r\n value: \"#ffc17d\"\r\n }, {\r\n value: \"#f5e56b\"\r\n }, {\r\n value: \"#d8e698\"\r\n }, {\r\n value: \"#e0ebaf\"\r\n }, {\r\n value: \"#c3d825\"\r\n }, {\r\n value: \"#bbe2e7\"\r\n }, {\r\n value: \"#85d3cd\"\r\n }, {\r\n value: \"#bde1e6\"\r\n }, {\r\n value: \"#a0d8ef\"\r\n }, {\r\n value: \"#89c3eb\"\r\n }, {\r\n value: \"#bbc8e6\"\r\n }, {\r\n value: \"#bbbcde\"\r\n }, {\r\n value: \"#d6b4cc\"\r\n }, {\r\n value: \"#fbc0d3\"\r\n }],\r\n [{\r\n value: \"#bb9581\"\r\n }, {\r\n value: \"#f37d79\"\r\n }, {\r\n value: \"#fba74f\"\r\n }, {\r\n value: \"#ffdb4f\"\r\n }, {\r\n value: \"#c7dc68\"\r\n }, {\r\n value: \"#b0ca71\"\r\n }, {\r\n value: \"#99ab4e\"\r\n }, {\r\n value: \"#84b9cb\"\r\n }, {\r\n value: \"#00a3af\"\r\n }, {\r\n value: \"#2ca9e1\"\r\n }, {\r\n value: \"#0095d9\"\r\n }, {\r\n value: \"#4c6cb3\"\r\n }, {\r\n value: \"#8491c3\"\r\n }, {\r\n value: \"#a59aca\"\r\n }, {\r\n value: \"#cc7eb1\"\r\n }, {\r\n value: \"#e89bb4\"\r\n }],\r\n [{\r\n value: \"#9d775f\"\r\n }, {\r\n value: \"#dd4b4b\"\r\n }, {\r\n value: \"#ef8b07\"\r\n }, {\r\n value: \"#fcc800\"\r\n }, {\r\n value: \"#aacf53\"\r\n }, {\r\n value: \"#82ae46\"\r\n }, {\r\n value: \"#69821b\"\r\n }, {\r\n value: \"#59b9c6\"\r\n }, {\r\n value: \"#2a83a2\"\r\n }, {\r\n value: \"#007bbb\"\r\n }, {\r\n value: \"#19448e\"\r\n }, {\r\n value: \"#274a78\"\r\n }, {\r\n value: \"#4a488e\"\r\n }, {\r\n value: \"#7058a3\"\r\n }, {\r\n value: \"#884898\"\r\n }, {\r\n value: \"#d47596\"\r\n }]\r\n ],\r\n\r\n _init: function () {\r\n BI.ColorPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colors = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(o.items || this._items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n }),\r\n layouts: [{\r\n type: \"bi.grid\"\r\n }],\r\n value: o.value\r\n });\r\n this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n var args = [].slice.call(arguments);\r\n args[0] = BI.createItems(items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n });\r\n this.colors.populate.apply(this.colors, args);\r\n },\r\n\r\n setValue: function (color) {\r\n this.colors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colors.getValue();\r\n }\r\n});\r\nBI.ColorPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker\", BI.ColorPicker);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.storeValue = {};\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (checker(self.storeValue.r) && checker(self.storeValue.g) && checker(self.storeValue.b)) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n this.none = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"auto-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Basic_Auto\")\r\n });\r\n this.none.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"\");\r\n } else {\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.transparent = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"trans-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Transparent_Color\")\r\n });\r\n this.transparent.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"transparent\");\r\n } else {\r\n if (self.lastColor === \"transparent\") {\r\n self.lastColor = \"\";\r\n }\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) ||\r\n self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: this.colorShow,\r\n width: 16\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: this.transparent,\r\n width: 16,\r\n lgap: 5\r\n }, {\r\n el: this.none,\r\n width: 16,\r\n lgap: 5\r\n }]\r\n },\r\n left: 10,\r\n right: 10,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n this.storeValue = {\r\n r: this.R.getValue() || 0,\r\n g: this.G.getValue() || 0,\r\n b: this.B.getValue() || 0\r\n };\r\n },\r\n\r\n _isEmptyRGB: function () {\r\n return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b);\r\n },\r\n\r\n _showPreColor: function (color) {\r\n if (color === \"\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-normal-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"auto-color-normal-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorShow.element.css({\"background-color\": color}).removeClass(\"auto-color-normal-background\").removeClass(\"trans-color-background\");\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorPickerEditor.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n if (color === \"transparent\") {\r\n this.transparent.setSelected(true);\r\n this.none.setSelected(false);\r\n this._showPreColor(\"transparent\");\r\n this.R.setValue(\"\");\r\n this.G.setValue(\"\");\r\n this.B.setValue(\"\");\r\n this.storeValue = {\r\n r: \"\",\r\n g: \"\",\r\n b: \"\"\r\n };\r\n return;\r\n }\r\n if (!color) {\r\n color = \"\";\r\n this.none.setSelected(true);\r\n } else {\r\n this.none.setSelected(false);\r\n }\r\n this.transparent.setSelected(false);\r\n this._showPreColor(color);\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.storeValue = {\r\n r: BI.isNull(json.r) ? \"\" : json.r,\r\n g: BI.isNull(json.r) ? \"\" : json.g,\r\n b: BI.isNull(json.r) ? \"\" : json.b\r\n };\r\n this.R.setValue(this.storeValue.r);\r\n this.G.setValue(this.storeValue.g);\r\n this.B.setValue(this.storeValue.b);\r\n },\r\n\r\n getValue: function () {\r\n if (this._isEmptyRGB() && this.transparent.isSelected()) {\r\n return \"transparent\";\r\n }\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.storeValue.r,\r\n g: this.storeValue.g,\r\n b: this.storeValue.b\r\n }));\r\n }\r\n});\r\nBI.ColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_editor\", BI.ColorPickerEditor);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.SimpleColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.colorShow,\r\n width: 16,\r\n lgap: 20,\r\n rgap: 15\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorShow.element.css({\"background-color\": color});\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.R.setValue(BI.isNull(json.r) ? \"\" : json.r);\r\n this.G.setValue(BI.isNull(json.g) ? \"\" : json.g);\r\n this.B.setValue(BI.isNull(json.b) ? \"\" : json.b);\r\n },\r\n\r\n getValue: function () {\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.R.getValue(),\r\n g: this.G.getValue(),\r\n b: this.B.getValue()\r\n }));\r\n }\r\n});\r\nBI.SimpleColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_picker_editor\", BI.SimpleColorPickerEditor);BI.Farbtastic = BI.inherit(BI.BasicButton, {\r\n\r\n constants: {\r\n RADIUS: 84,\r\n SQUARE: 100,\r\n WIDTH: 194\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-farbtastic\",\r\n width: 195,\r\n height: 195,\r\n stopPropagation: true,\r\n value: \"#000000\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"\",\r\n ref: function (_ref) {\r\n self.colorWrapper = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"wheel\",\r\n ref: function (_ref) {\r\n self.wheel = _ref;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"overlay\",\r\n ref: function (_ref) {\r\n self.overlay = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.hMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.slMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _unpack: function (color) {\r\n if (color.length === 7) {\r\n return [parseInt(\"0x\" + color.substring(1, 3)) / 255,\r\n parseInt(\"0x\" + color.substring(3, 5)) / 255,\r\n parseInt(\"0x\" + color.substring(5, 7)) / 255];\r\n } else if (color.length === 4) {\r\n return [parseInt(\"0x\" + color.substring(1, 2)) / 15,\r\n parseInt(\"0x\" + color.substring(2, 3)) / 15,\r\n parseInt(\"0x\" + color.substring(3, 4)) / 15];\r\n }\r\n },\r\n\r\n _pack: function (rgb) {\r\n var r = Math.round(rgb[0] * 255);\r\n var g = Math.round(rgb[1] * 255);\r\n var b = Math.round(rgb[2] * 255);\r\n return \"#\" + (r < 16 ? \"0\" : \"\") + r.toString(16) +\r\n (g < 16 ? \"0\" : \"\") + g.toString(16) +\r\n (b < 16 ? \"0\" : \"\") + b.toString(16);\r\n },\r\n\r\n _setColor: function (color) {\r\n var unpack = this._unpack(color);\r\n if (this.value !== color && unpack) {\r\n this.value = color;\r\n this.rgb = unpack;\r\n this.hsl = this._RGBToHSL(this.rgb);\r\n this._updateDisplay();\r\n }\r\n },\r\n\r\n _setHSL: function (hsl) {\r\n this.hsl = hsl;\r\n this.rgb = this._HSLToRGB(hsl);\r\n this.value = this._pack(this.rgb);\r\n this._updateDisplay();\r\n return this;\r\n },\r\n\r\n _HSLToRGB: function (hsl) {\r\n var m1, m2, r, g, b;\r\n var h = hsl[0], s = hsl[1], l = hsl[2];\r\n m2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;\r\n m1 = l * 2 - m2;\r\n return [this._hueToRGB(m1, m2, h + 0.33333),\r\n this._hueToRGB(m1, m2, h),\r\n this._hueToRGB(m1, m2, h - 0.33333)];\r\n },\r\n\r\n _hueToRGB: function (m1, m2, h) {\r\n h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);\r\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\r\n if (h * 2 < 1) return m2;\r\n if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;\r\n return m1;\r\n },\r\n\r\n _RGBToHSL: function (rgb) {\r\n var min, max, delta, h, s, l;\r\n var r = rgb[0], g = rgb[1], b = rgb[2];\r\n min = Math.min(r, Math.min(g, b));\r\n max = Math.max(r, Math.max(g, b));\r\n delta = max - min;\r\n l = (min + max) / 2;\r\n s = 0;\r\n if (l > 0 && l < 1) {\r\n s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));\r\n }\r\n h = 0;\r\n if (delta > 0) {\r\n if (max == r && max != g) h += (g - b) / delta;\r\n if (max == g && max != b) h += (2 + (b - r) / delta);\r\n if (max == b && max != r) h += (4 + (r - g) / delta);\r\n h /= 6;\r\n }\r\n return [h, s, l];\r\n },\r\n\r\n _updateDisplay: function () {\r\n var angle = this.hsl[0] * 6.28;\r\n this.hMarker.element.css({\r\n left: Math.round(Math.sin(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(-Math.cos(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n this.slMarker.element.css({\r\n left: Math.round(this.constants.SQUARE * (.5 - this.hsl[1]) + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(this.constants.SQUARE * (.5 - this.hsl[2]) + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n // Saturation/Luminance gradient\r\n this.colorWrapper.element.css(\"backgroundColor\", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));\r\n\r\n this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);\r\n },\r\n\r\n _absolutePosition: function (el) {\r\n var r = {x: el.offsetLeft, y: el.offsetTop};\r\n // Resolve relative to offsetParent\r\n if (el.offsetParent) {\r\n var tmp = this._absolutePosition(el.offsetParent);\r\n r.x += tmp.x;\r\n r.y += tmp.y;\r\n }\r\n return r;\r\n },\r\n\r\n _widgetCoords: function (event) {\r\n var x, y;\r\n var el = event.target || event.srcElement;\r\n var reference = this.wheel.element[0];\r\n\r\n if (typeof event.offsetX !== \"undefined\") {\r\n // Use offset coordinates and find common offsetParent\r\n var pos = {x: event.offsetX, y: event.offsetY};\r\n\r\n // Send the coordinates upwards through the offsetParent chain.\r\n var e = el;\r\n while (e) {\r\n e.mouseX = pos.x;\r\n e.mouseY = pos.y;\r\n pos.x += e.offsetLeft;\r\n pos.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Look for the coordinates starting from the wheel widget.\r\n var e = reference;\r\n var offset = {x: 0, y: 0};\r\n while (e) {\r\n if (typeof e.mouseX !== \"undefined\") {\r\n x = e.mouseX - offset.x;\r\n y = e.mouseY - offset.y;\r\n break;\r\n }\r\n offset.x += e.offsetLeft;\r\n offset.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Reset stored coordinates\r\n e = el;\r\n while (e) {\r\n e.mouseX = undefined;\r\n e.mouseY = undefined;\r\n e = e.offsetParent;\r\n }\r\n } else {\r\n // Use absolute coordinates\r\n var pos = this._absolutePosition(reference);\r\n x = (event.pageX || 0) - pos.x;\r\n y = (event.pageY || 0) - pos.y;\r\n }\r\n // Subtract distance to middle\r\n return {x: x - this.constants.WIDTH / 2, y: y - this.constants.WIDTH / 2};\r\n },\r\n\r\n _doMouseMove: function (event) {\r\n var pos = this._widgetCoords(event);\r\n\r\n // Set new HSL parameters\r\n if (this.circleDrag) {\r\n var hue = Math.atan2(pos.x, -pos.y) / 6.28;\r\n if (hue < 0) hue += 1;\r\n this._setHSL([hue, this.hsl[1], this.hsl[2]]);\r\n } else {\r\n var sat = Math.max(0, Math.min(1, -(pos.x / this.constants.SQUARE) + .5));\r\n var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));\r\n this._setHSL([this.hsl[0], sat, lum]);\r\n }\r\n },\r\n\r\n doClick: function (event) {\r\n var pos = this._widgetCoords(event);\r\n this.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > this.constants.SQUARE;\r\n\r\n // Process\r\n this._doMouseMove(event);\r\n return false;\r\n },\r\n\r\n setValue: function (color) {\r\n this._setColor(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n }\r\n});\r\nBI.Farbtastic.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.farbtastic\", BI.Farbtastic);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubbleCombo\r\n * @extends BI.Widget\r\n */\r\nBI.BubbleCombo = BI.inherit(BI.Widget, {\r\n _const: {\r\n TRIANGLE_LENGTH: 6\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-bubble-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom,left\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n // adjustXOffset: 0,\r\n // adjustYOffset: 10,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.BubbleCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n container: o.container,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n destroyWhenHide: o.destroyWhenHide,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n adjustLength: this._getAdjustLength(),\r\n stopPropagation: o.stopPropagation,\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: o.hideChecker,\r\n offsetStyle: o.offsetStyle,\r\n el: o.el,\r\n popup: BI.extend({\r\n type: \"bi.bubble_popup_view\"\r\n }, o.popup)\r\n });\r\n this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_EXPAND, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_COLLAPSE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self._showTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n self._hideTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments);\r\n });\r\n },\r\n\r\n _getAdjustLength: function () {\r\n return this._const.TRIANGLE_LENGTH + this.options.adjustLength;\r\n },\r\n\r\n _createTriangle: function (direction) {\r\n var pos = {}, op = {};\r\n var adjustLength = this.options.adjustLength;\r\n var offset = this.element.offset();\r\n var left = offset.left, right = offset.left + this.element.outerWidth();\r\n var top = offset.top, bottom = offset.top + this.element.outerHeight();\r\n switch (direction) {\r\n case \"left\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: left - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"right\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: right + adjustLength\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"top\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: top - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"bottom\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: bottom + adjustLength\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n default:\r\n break;\r\n }\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = BI.createWidget(op, {\r\n type: \"bi.center_adapt\",\r\n cls: \"button-combo-triangle-wrapper\",\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bubble-combo-triangle-\" + direction\r\n }]\r\n });\r\n pos.el = this.triangle;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [pos]\r\n });\r\n },\r\n\r\n _createLeftTriangle: function () {\r\n this._createTriangle(\"left\");\r\n },\r\n\r\n _createRightTriangle: function () {\r\n this._createTriangle(\"right\");\r\n },\r\n\r\n _createTopTriangle: function () {\r\n this._createTriangle(\"top\");\r\n },\r\n\r\n _createBottomTriangle: function () {\r\n this._createTriangle(\"bottom\");\r\n },\r\n\r\n _showTriangle: function () {\r\n var pos = this.combo.getPopupPosition();\r\n switch (pos.dir) {\r\n case \"left,top\":\r\n case \"left,bottom\":\r\n this._createLeftTriangle();\r\n break;\r\n case \"right,top\":\r\n case \"right,bottom\":\r\n this._createRightTriangle();\r\n break;\r\n case \"top,left\":\r\n case \"top,right\":\r\n this._createTopTriangle();\r\n break;\r\n case \"bottom,left\":\r\n case \"bottom,right\":\r\n this._createBottomTriangle();\r\n break;\r\n }\r\n },\r\n\r\n _hideTriangle: function () {\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = null;\r\n },\r\n\r\n hideView: function () {\r\n this._hideTriangle();\r\n this.combo && this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo && this.combo.showView();\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n }\r\n});\r\n\r\nBI.BubbleCombo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.BubbleCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.BubbleCombo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.BubbleCombo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.BubbleCombo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\nBI.shortcut(\"bi.bubble_combo\", BI.BubbleCombo);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupView\r\n * @extends BI.PopupView\r\n */\r\nBI.BubblePopupView = BI.inherit(BI.PopupView, {\r\n _defaultConfig: function () {\r\n var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(config, {\r\n baseCls: config.baseCls + \" bi-bubble-popup-view\",\r\n minWidth: 220,\r\n maxWidth: 300,\r\n minHeight: 90\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupView.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble_popup_view\", BI.BubblePopupView);\r\n\r\n/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble-bar-popup-view\",\r\n buttons: [{\r\n value: false,\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n ghost: true\r\n }, {\r\n text: BI.i18nText(BI.i18nText(\"BI-Basic_Sure\")),\r\n value: true\r\n }]\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupBarView.superclass._init.apply(this, arguments);\r\n },\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n\r\n var items = [];\r\n BI.each(o.buttons, function (i, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n items.push(buttonOpt);\r\n } else {\r\n items.push(BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);\r\n }\r\n }, buttonOpt));\r\n }\r\n });\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n height: 44,\r\n rgap: 15,\r\n items: [{\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: items\r\n }]\r\n });\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n\r\n var button = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: [o.el],\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n cls: \"bar-popup-container\",\r\n hgap: 15,\r\n tgap: 10\r\n }]\r\n });\r\n\r\n button.element.css(\"min-height\", o.minHeight - 44);\r\n\r\n return button;\r\n }\r\n});\r\nBI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.bubble_bar_popup_view\", BI.BubblePopupBarView);\r\n\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n *\r\n * @class BI.TextBubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.TextBubblePopupBarView = BI.inherit(BI.Widget, {\r\n\r\n props: function () {\r\n return {\r\n baseCls: \"bi-text-bubble-bar-popup-view\",\r\n text: \"\",\r\n buttons: [{\r\n level: \"ignore\",\r\n value: false,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n }, {\r\n value: true,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Sure\")\r\n }]\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var buttons = BI.map(o.buttons, function (index, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n return buttonOpt;\r\n }\r\n return BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);\r\n }\r\n }, buttonOpt);\r\n\r\n });\r\n return {\r\n type: \"bi.bubble_bar_popup_view\",\r\n minWidth: o.minWidth,\r\n maxWidth: o.maxWidth,\r\n minHeight: o.minHeight,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n el: {\r\n type: \"bi.label\",\r\n text: o.text,\r\n whiteSpace: \"normal\",\r\n textAlign: \"left\",\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n buttons: buttons\r\n };\r\n },\r\n\r\n populate: function (v) {\r\n this.text.setText(v || this.options.text);\r\n }\r\n});\r\nBI.TextBubblePopupBarView.EVENT_CHANGE = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.text_bubble_bar_popup_view\", BI.TextBubblePopupBarView);\r\n/**\r\n * Created by Young's on 2016/4/28.\r\n */\r\nBI.EditorIconCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseClass: \"bi-check-editor-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.EditorIconCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.editor_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n value: o.value\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () {\r\n self.popup.setValue(this.getValue());\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_FOCUS, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_EMPTY, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_VALID, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_ERROR, arguments);\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.editorIconCheckCombo.hideView();\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editorIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.editorIconCheckCombo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.trigger.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.editorIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.EditorIconCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorIconCheckCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorIconCheckCombo.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorIconCheckCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorIconCheckCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_icon_check_combo\", BI.EditorIconCheckCombo);\r\n/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconCombo\r\n * @extend BI.Widget\r\n */\r\nBI.IconCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-combo\",\r\n width: 24,\r\n height: 24,\r\n el: {},\r\n popup: {},\r\n minWidth: 100,\r\n maxWidth: \"auto\",\r\n maxHeight: 300,\r\n direction: \"bottom\",\r\n adjustLength: 3, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n offsetStyle: \"left\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.icon_combo_trigger\",\r\n iconCls: o.iconCls,\r\n title: o.title,\r\n items: o.items,\r\n width: o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget(o.popup, {\r\n type: \"bi.icon_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.iconCombo.hideView();\r\n self.fireEvent(BI.IconCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.iconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n direction: o.direction,\r\n trigger: o.trigger,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n adjustXOffset: o.adjustXOffset,\r\n adjustYOffset: o.adjustYOffset,\r\n offsetStyle: o.offsetStyle,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxWidth: o.maxWidth,\r\n maxHeight: o.maxHeight,\r\n minWidth: o.minWidth\r\n }\r\n });\r\n },\r\n\r\n showView: function () {\r\n this.iconCombo.showView();\r\n },\r\n\r\n hideView: function () {\r\n this.iconCombo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.iconCombo.populate(items);\r\n }\r\n});\r\nBI.IconCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo\", BI.IconCombo);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboPopup\r\n * @extend BI.Pane\r\n */\r\nBI.IconComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi.icon-combo-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.IconComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_popup\", BI.IconComboPopup);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboTrigger\r\n * @extend BI.Widget\r\n */\r\nBI.IconComboTrigger = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-combo-trigger\",\r\n el: {},\r\n items: [],\r\n iconCls: \"\",\r\n width: 24,\r\n height: 24,\r\n isShowDown: true,\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n var iconCls = \"\";\r\n if(BI.isKey(o.value)){\r\n iconCls = this._digest(o.value, o.items);\r\n }\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: iconCls,\r\n disableSelected: true,\r\n width: o.isShowDown ? o.width - 12 : o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font font-size-12\",\r\n width: 12,\r\n height: 8,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down.setVisible(o.isShowDown);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.button,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: this.down,\r\n right: 3,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _digest: function (v, items) {\r\n var iconCls = \"\";\r\n v = BI.isArray(v) ? v[0] : v;\r\n BI.any(items, function (i, item) {\r\n if (v === item.value) {\r\n iconCls = item.iconCls;\r\n return true;\r\n }\r\n });\r\n return iconCls;\r\n },\r\n\r\n populate: function (items) {\r\n var o = this.options;\r\n this.options.items = items || [];\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.IconComboTrigger.superclass.setValue.apply(this, arguments);\r\n var o = this.options;\r\n var iconCls = this._digest(v, this.options.items);\r\n v = BI.isArray(v) ? v[0] : v;\r\n if (BI.isNotEmptyString(iconCls)) {\r\n this.button.setIcon(iconCls);\r\n this.button.setSelected(true);\r\n this.down.setSelected(true);\r\n } else {\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n }\r\n }\r\n});\r\nBI.IconComboTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_trigger\", BI.IconComboTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n * combo : icon + text + icon, popup : icon + text\r\n */\r\nBI.IconTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-value-combo\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_icon_text_trigger\",\r\n cls: \"icon-text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n iconCls: o.iconCls,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n title: o.title,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.icon_text_value_combo_popup\",\r\n items: o.items,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.options.tipType = \"warning\";\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.IconTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo\", BI.IconTextValueCombo);\r\n/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.IconTextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-icon-popup\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: o.behaviors,\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items, keyword) {\r\n BI.IconTextValueComboPopup.superclass.populate.apply(this, arguments);\r\n var o = this.options;\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo_popup\", BI.IconTextValueComboPopup);\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n tipType: \"\",\r\n warningTitle: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n adjustLength: 2,\r\n toggle: false,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.search_text_value_trigger\",\r\n cls: \"search-text-value-trigger\",\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n items: o.items,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: o.value,\r\n items: o.items,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.getSearcher().setAdapter(self.popup);\r\n },\r\n listeners: [{\r\n eventName: BI.TextValueComboPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n value: o.value,\r\n maxHeight: 252,\r\n minHeight: 25\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function () {\r\n self.triggerBtn = this;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"warning\");\r\n } else {\r\n this.element.removeClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"success\");\r\n }\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.combo.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n }\r\n});\r\nBI.SearchTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.search_text_value_combo\", BI.SearchTextValueCombo);\r\n/**\r\n * Created by Windy on 2018/2/5.\r\n */\r\nBI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-popup\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this.check();\r\n },\r\n\r\n populate: function (find, match, keyword) {\r\n var items = BI.concat(find, match);\r\n BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.SearchTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_combo_popup\", BI.SearchTextValueComboPopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: {\r\n extraCls: \"bi-search-text-value-trigger bi-border\",\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value, o.items),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\"\r\n },\r\n popup: {\r\n type: \"bi.search_text_value_combo_popup\",\r\n cls: \"bi-card\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n var finding = BI.Func.getSearchResult(o.items, keyword);\r\n var matched = finding.match, find = finding.find;\r\n callback(find, matched);\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n },\r\n\r\n _setState: function (v) {\r\n this.editor.setState(v);\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return result.join(\",\");\r\n } else {\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n }\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n },\r\n\r\n setValue: function (vals) {\r\n this._setState(this._digest(vals, this.options.items));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.SearchTextValueTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchTextValueTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchTextValueTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchTextValueTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_trigger\", BI.SearchTextValueTrigger);/**\r\n * @class BI.TextValueCheckCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : check + text\r\n */\r\nBI.TextValueCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-check-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCheckCombo.hideView();\r\n self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n setTitle: function (title) {\r\n this.trigger.setTitle(title);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.trigger.setWarningTitle(title);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo\", BI.TextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: this._formatItems(o.items),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n return BI.map(items, function (i, item) {\r\n return BI.extend({\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item\",\r\n height: 24\r\n }, item);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments);\r\n this.popup.populate(this._formatItems(items));\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueCheckComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo_popup\", BI.TextValueCheckComboPopup);\r\n/**\r\n * @class BI.TextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.TextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-combo\",\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n text: \"\",\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n value: o.value,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.setTipType(\"warning\");\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.setTipType(\"success\");\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo\", BI.TextValueCombo);\r\n/**\r\n * @class BI.SmallTextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.SmallTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n width: 100,\r\n height: 20,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n el: {},\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.small_select_text_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.SmallTextValueCombo.hideView();\r\n self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.SmallTextValueCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.SmallTextValueCombo.populate(items);\r\n }\r\n});\r\nBI.SmallTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.small_text_value_combo\", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo_popup\", BI.TextValueComboPopup);/**\r\n * 有清楚按钮的文本框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.ClearEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-clear-editor\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: \"\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.ClearEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"search-close-h-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n self.fireEvent(BI.ClearEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_STOP);\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.clear.visible();\r\n } else {\r\n this.clear.invisible();\r\n }\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n var res = this.editor.getValue().match(/[\\S]+/g);\r\n return BI.isNull(res) ? \"\" : res[res.length - 1];\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.ClearEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ClearEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ClearEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ClearEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ClearEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ClearEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ClearEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.ClearEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.ClearEditor.EVENT_START = \"EVENT_START\";\r\nBI.ClearEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ClearEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ClearEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ClearEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ClearEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ClearEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ClearEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ClearEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ClearEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.ClearEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.clear_editor\", BI.ClearEditor);/**\r\n * 带标记的文本框\r\n * Created by GUY on 2016/1/25.\r\n * @class BI.ShelterEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ShelterEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-shelter-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShelterEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"shelter-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: o.hgap\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n arguments[2] = self;\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL);\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setTextStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (k) {\r\n var o = this.options;\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.ShelterEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ShelterEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ShelterEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ShelterEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ShelterEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ShelterEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.ShelterEditor.EVENT_START = \"EVENT_START\";\r\nBI.ShelterEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ShelterEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ShelterEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ShelterEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ShelterEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ShelterEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ShelterEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ShelterEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ShelterEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ShelterEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.shelter_editor\", BI.ShelterEditor);\r\n/**\r\n * 带标记的文本框\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.SignEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SignEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: \"left\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SignEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SignEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SignEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SignEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SignEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SignEditor.EVENT_START = \"EVENT_START\";\r\nBI.SignEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SignEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SignEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SignEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SignEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SignEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SignEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SignEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.sign_editor\", BI.SignEditor);/**\r\n * guy\r\n * 记录状态的输入框\r\n * @class BI.StateEditor\r\n * @extends BI.Single\r\n */\r\nBI.StateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n defaultText: \"\", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\") // 显示值\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.StateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark tip-text-style\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n },\r\n title: BI.isNotNull(o.tipText) ? o.tipText : function () {\r\n var title = \"\";\r\n if (BI.isString(self.stateValue)) {\r\n title = self.stateValue;\r\n }\r\n if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {\r\n title = self.stateValue[0];\r\n }\r\n return title;\r\n },\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if (BI.isNotNull(o.text)) {\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n if (this.options.disabled === false) {\r\n this._showInput();\r\n this.editor.focus();\r\n }\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n _setText: function (v) {\r\n this.text.setText(v);\r\n this.text.setTitle(v);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.StateEditor.superclass.setValue.apply(this, arguments);\r\n this.stateValue = v;\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this._setText(BI.i18nText(\"BI-Select_All\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this._setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (BI.isString(v)) {\r\n this._setText(v);\r\n // 配置了defaultText才判断标灰,其他情况不标灰\r\n (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n return;\r\n }\r\n if (BI.isArray(v)) {\r\n if (BI.isEmpty(v)) {\r\n this._setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v.length === 1) {\r\n this._setText(v[0]);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.StateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.StateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.StateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.StateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.StateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.StateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.StateEditor.EVENT_START = \"EVENT_START\";\r\nBI.StateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.StateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.StateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.StateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.StateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.StateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.StateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.StateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.StateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.StateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.state_editor\", BI.StateEditor);\r\n/**\r\n * 无限制-已选择状态输入框\r\n * Created by GUY on 2016/5/18.\r\n * @class BI.SimpleStateEditor\r\n * @extends BI.Single\r\n */\r\nBI.SimpleStateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-simple-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n mouseOut: false,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleStateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if(BI.isNotNull(o.text)){\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n _setText: function (v) {\r\n this.text.setText(v);\r\n this.text.setTitle(v);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (!BI.isArray(v) || v.length === 1) {\r\n this._setText(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (BI.isEmpty(v)) {\r\n this._setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.SimpleStateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SimpleStateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SimpleStateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SimpleStateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SimpleStateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SimpleStateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SimpleStateEditor.EVENT_START = \"EVENT_START\";\r\nBI.SimpleStateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SimpleStateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SimpleStateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SimpleStateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SimpleStateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SimpleStateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SimpleStateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SimpleStateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.simple_state_editor\", BI.SimpleStateEditor);/**\r\n * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w\r\n * @class BI.MultiPopupView\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.MultiPopupView = BI.inherit(BI.PopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-multi-list-view\",\r\n buttons: [BI.i18nText(\"BI-Basic_Sure\")]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiPopupView.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n var text = []; // 构造[{text:content},……]\r\n BI.each(o.buttons, function (idx, item) {\r\n text.push({\r\n text: item,\r\n value: idx\r\n });\r\n });\r\n\r\n this.buttongroup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(text, {\r\n type: \"bi.text_button\",\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n }),\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n\r\n this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj);\r\n });\r\n\r\n return this.buttongroup;\r\n }\r\n\r\n});\r\n\r\nBI.MultiPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.multi_popup_view\", BI.MultiPopupView);/**\r\n * 可以理解为MultiPopupView和Panel两个面板的结合体\r\n * @class BI.PopupPanel\r\n * @extends BI.MultiPopupView\r\n */\r\n\r\nBI.PopupPanel = BI.inherit(BI.MultiPopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-popup-panel\",\r\n title: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupPanel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createTool: function () {\r\n var self = this, o = this.options;\r\n var close = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"close-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n close.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setVisible(false);\r\n self.fireEvent(BI.PopupPanel.EVENT_CLOSE);\r\n });\r\n return BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"popup-panel-title bi-header-background\",\r\n height: 25,\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n text: o.title,\r\n height: 25,\r\n lgap: 10\r\n }\r\n }, {\r\n el: close,\r\n width: 25\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.PopupPanel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.PopupPanel.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.popup_panel\", BI.PopupPanel);/**\r\n * list面板\r\n *\r\n * Created by GUY on 2015/10/30.\r\n * @class BI.ListPane\r\n * @extends BI.Pane\r\n */\r\nBI.ListPane = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-list-pane\",\r\n logic: {\r\n dynamic: true\r\n },\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.button_group\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.ListPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {},\r\n items: o.items,\r\n itemsCreator: function (op, calback) {\r\n if (op.times === 1) {\r\n self.empty();\r\n BI.nextTick(function () {\r\n self.loading();\r\n });\r\n }\r\n o.itemsCreator(op, function () {\r\n calback.apply(self, arguments);\r\n op.times === 1 && BI.nextTick(function () {\r\n self.loaded();\r\n // callback可能在loading之前执行, check保证显示正确\r\n self.check();\r\n });\r\n });\r\n },\r\n hasNext: o.hasNext,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n },\r\n\r\n hasPrev: function () {\r\n return this.button_group.hasPrev && this.button_group.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.button_group.hasNext && this.button_group.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.options.items = items.concat(this.options.items);\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n addItems: function (items) {\r\n this.options.items = this.options.items.concat(items);\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = indexes || [];\r\n BI.removeAt(this.options.items, indexes);\r\n this.button_group.removeItemAt.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(this.button_group.attr(\"itemsCreator\")))) {// 接管loader的populate方法\r\n this.button_group.attr(\"itemsCreator\").apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n }]);\r\n return;\r\n }\r\n BI.ListPane.superclass.populate.apply(this, arguments);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_pane\", BI.ListPane);/**\r\n * 带有标题栏的pane\r\n * @class BI.Panel\r\n * @extends BI.Widget\r\n */\r\nBI.Panel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-panel bi-border\",\r\n title: \"\",\r\n titleButtons: [],\r\n el: {},\r\n logic: {\r\n dynamic: false\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Panel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this._createTitle()\r\n , this.options.el)\r\n }))));\r\n },\r\n\r\n _createTitle: function () {\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"panel-title-text\",\r\n text: o.title,\r\n height: 30\r\n });\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: o.titleButtons,\r\n layouts: [{\r\n type: \"bi.center_adapt\",\r\n lgap: 10\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj);\r\n });\r\n\r\n return {\r\n el: {\r\n type: \"bi.left_right_vertical_adapt\",\r\n cls: \"panel-title bi-header-background bi-border-bottom\",\r\n height: 29,\r\n items: {\r\n left: [this.text],\r\n right: [this.button_group]\r\n },\r\n lhgap: 10,\r\n rhgap: 10\r\n },\r\n height: 29\r\n };\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setValue(title);\r\n }\r\n});\r\nBI.Panel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.panel\", BI.Panel);\r\nBI.LinearSegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-line-segment-button bi-list-item-effect\",\r\n once: true,\r\n readonly: true,\r\n hgap: 10,\r\n height: 25\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return [{\r\n type: \"bi.label\",\r\n text: o.text,\r\n height: o.height,\r\n value: o.value,\r\n hgap: o.hgap,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"line-segment-button-line\",\r\n height: 2,\r\n ref: function () {\r\n self.line = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }];\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LinearSegmentButton.superclass.setSelected.apply(this, arguments);\r\n if (v) {\r\n this.line.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.line.element.removeClass(\"bi-high-light-background\");\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment_button\", BI.LinearSegmentButton);BI.LinearSegment = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-linear-segment bi-split-bottom\",\r\n items: [],\r\n height: 29\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.linear_segment_button\",\r\n height: o.height - 1\r\n }),\r\n layout: [{\r\n type: \"bi.center\"\r\n }],\r\n listeners: [{\r\n eventName: \"__EVENT_CHANGE__\",\r\n action: function () {\r\n self.fireEvent(\"__EVENT_CHANGE__\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.buttonGroup = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment\", BI.LinearSegment);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n iconWrapperWidth: 36\r\n },\r\n el: {\r\n type: \"bi.list_pane\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 全选\r\n this.toolbar = BI.createWidget(o.toolbar);\r\n this.allSelected = false;\r\n this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.allSelected = this.isSelected();\r\n if (type === BI.Events.CLICK) {\r\n self.setAllSelected(self.allSelected);\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);\r\n }\r\n self._checkAllSelected();\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self._checkAllSelected();\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list)\r\n }))));\r\n\r\n if (o.items.length <= 0) {\r\n this.toolbar.setVisible(false);\r\n this.toolbar.setEnable(false);\r\n }\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkAllSelected: function () {\r\n var selectLength = this.list.getValue().length;\r\n var notSelectLength = this.getAllLeaves().length - selectLength;\r\n var hasNext = this.list.hasNext();\r\n var isAlreadyAllSelected = this.toolbar.isSelected();\r\n var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext));\r\n isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected);\r\n this.toolbar.setHalfSelected(isHalf);\r\n !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected));\r\n },\r\n\r\n setAllSelected: function (v) {\r\n BI.each(this.getAllButtons(), function (i, btn) {\r\n (btn.setSelected || btn.setAllSelected).apply(btn, [v]);\r\n });\r\n this.allSelected = !!v;\r\n this.toolbar.setSelected(v);\r\n this.toolbar.setHalfSelected(false);\r\n },\r\n\r\n setToolBarVisible: function (b) {\r\n this.toolbar.setVisible(b);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.allSelected;\r\n // return this.toolbar.isSelected();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (data) {\r\n var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL;\r\n this.setAllSelected(selectAll);\r\n this.list[selectAll ? \"setNotSelectedValue\" : \"setValue\"](data.value);\r\n this._checkAllSelected();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isAllSelected() === false) {\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n value: this.list.getValue(),\r\n assist: this.list.getNotSelectedValue()\r\n };\r\n }\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_ALL,\r\n value: this.list.getNotSelectedValue(),\r\n assist: this.list.getValue()\r\n };\r\n\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.toolbar.setVisible(!BI.isEmptyArray(items));\r\n this.toolbar.setEnable(this.isEnabled() && !BI.isEmptyArray(items));\r\n this.list.populate.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.SelectList.superclass._setEnable.apply(this, arguments);\r\n this.toolbar.setEnable(enable);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0);\r\n this.list.resetHeight ? this.list.resetHeight(h - toolHeight) :\r\n this.list.element.css({\"max-height\": h - toolHeight + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_list\", BI.SelectList);/**\r\n * Created by roy on 15/11/6.\r\n */\r\nBI.LazyLoader = BI.inherit(BI.Widget, {\r\n _const: {\r\n PAGE: 100\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-lazy-loader\",\r\n el: {},\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.LazyLoader.superclass._init.apply(this, arguments);\r\n var all = o.items.length;\r\n this.loader = BI.createWidget({\r\n type: \"bi.loader\",\r\n element: this,\r\n // 下面是button_group的属性\r\n el: o.el,\r\n\r\n itemsCreator: function (options, populate) {\r\n populate(self._getNextItems(options));\r\n },\r\n hasNext: function (option) {\r\n return option.count < all;\r\n }\r\n });\r\n\r\n this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) {\r\n self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj);\r\n });\r\n },\r\n _getNextItems: function (options) {\r\n var self = this, o = this.options;\r\n var lastNum = o.items.length - this._const.PAGE * (options.times - 1);\r\n var lastItems = BI.takeRight(o.items, lastNum);\r\n var nextItems = BI.take(lastItems, this._const.PAGE);\r\n return nextItems;\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate(items);\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue.apply(this.loader, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n }\r\n});\r\nBI.LazyLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.lazy_loader\", BI.LazyLoader);/**\r\n * 恶心的加载控件, 为解决排序问题引入的控件\r\n *\r\n * Created by GUY on 2015/11/12.\r\n * @class BI.ListLoader\r\n * @extends BI.Widget\r\n */\r\nBI.ListLoader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-loader\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.ListLoader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.next = false;\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n element: this,\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.next]\r\n });\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n this.populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate(o.items);\r\n }\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n this.options.items = this.options.items.concat(items);\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n BI.DOM.hang([this.next]);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n empty: function () {\r\n BI.DOM.hang([this.next]);\r\n this.button_group.empty();\r\n this.next.element.appendTo(this.element);\r\n BI.each([this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_loader\", BI.ListLoader);/**\r\n * Created by GUY on 2016/4/29.\r\n *\r\n * @class BI.SortList\r\n * @extends BI.Widget\r\n */\r\nBI.SortList = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-sort-list\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n\r\n // containment: this.element,\r\n // connectWith: \".bi-sort-list\",\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SortList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.loader = BI.createWidget({\r\n type: \"bi.list_loader\",\r\n element: this,\r\n isDefaultInit: o.isDefaultInit,\r\n el: o.el,\r\n items: this._formatItems(o.items),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (items) {\r\n callback(self._formatItems(items));\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n count: o.count,\r\n next: o.next,\r\n hasNext: o.hasNext\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n\r\n this.loader.element.sortable({\r\n containment: o.containment || this.element,\r\n connectWith: o.connectWith || \".bi-sort-list\",\r\n items: \".sort-item\",\r\n cursor: o.cursor || \"drag\",\r\n tolerance: o.tolerance || \"intersect\",\r\n placeholder: {\r\n element: function ($currentItem) {\r\n var holder = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"bi-sortable-holder\",\r\n height: $currentItem.outerHeight()\r\n });\r\n holder.element.css({\r\n \"margin-left\": $currentItem.css(\"margin-left\"),\r\n \"margin-right\": $currentItem.css(\"margin-right\"),\r\n \"margin-top\": $currentItem.css(\"margin-top\"),\r\n \"margin-bottom\": $currentItem.css(\"margin-bottom\"),\r\n margin: $currentItem.css(\"margin\")\r\n });\r\n return holder.element;\r\n },\r\n update: function () {\r\n\r\n }\r\n },\r\n start: function (event, ui) {\r\n\r\n },\r\n stop: function (event, ui) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE);\r\n },\r\n over: function (event, ui) {\r\n\r\n }\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n BI.each(items, function (i, item) {\r\n item = BI.stripEL(item);\r\n item.cls = item.cls ? item.cls + \" sort-item\" : \"sort-item\";\r\n item.attributes = {\r\n sorted: item.value\r\n };\r\n });\r\n return items;\r\n },\r\n\r\n hasNext: function () {\r\n return this.loader.hasNext();\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n populate: function (items) {\r\n if (items) {\r\n arguments[0] = this._formatItems(items);\r\n }\r\n this.loader.populate.apply(this.loader, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n },\r\n\r\n getSortedValues: function () {\r\n return this.loader.element.sortable(\"toArray\", {attribute: \"sorted\"});\r\n }\r\n});\r\nBI.SortList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.sort_list\", BI.SortList);\r\n/**\r\n * author: young\r\n * createdDate: 2018/12/18\r\n * description:\r\n */\r\nBI.LoadingPane = BI.inherit(BI.Pane, {\r\n _mount: function () {\r\n var isMounted = BI.Pane.superclass._mount.apply(this, arguments);\r\n if (isMounted) {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.loading();\r\n this.beforeInit(BI.bind(this.__loaded, this));\r\n }\r\n }\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__async = true;\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n __loaded: function () {\r\n this.__asking = false;\r\n this.loaded();\r\n this._render();\r\n }\r\n});/**\r\n * 有总页数和总行数的分页控件\r\n * Created by Young's on 2016/10/13.\r\n */\r\nBI.AllCountPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-all-count-pager\",\r\n pagerDirection: \"vertical\", // 翻页按钮方向,可选值:vertical/horizontal\r\n height: 24,\r\n pages: 1, // 必选项\r\n curr: 1, // 初始化当前页, pages为数字时可用,\r\n count: 1 // 总行数\r\n });\r\n },\r\n _init: function () {\r\n BI.AllCountPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, pagerIconCls = this._getPagerIconCls();\r\n this.editor = BI.createWidget({\r\n type: \"bi.small_text_editor\",\r\n cls: \"pager-editor bi-border-radius\",\r\n validationChecker: function (v) {\r\n return (self.rowCount.getValue() === 0 && v === \"0\") || BI.isPositiveInteger(v);\r\n },\r\n hgap: 4,\r\n vgap: 0,\r\n value: o.curr,\r\n errorText: BI.i18nText(\"BI-Please_Input_Positive_Integer\"),\r\n width: 40,\r\n height: 24,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.pager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 58,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n lgap: 5\r\n }],\r\n\r\n dynamicShow: false,\r\n pages: o.pages,\r\n curr: o.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Previous_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-prev bi-list-item-select2 \" + pagerIconCls.preCls\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Next_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-next bi-list-item-select2 \" + pagerIconCls.nextCls\r\n },\r\n\r\n hasPrev: o.hasPrev,\r\n hasNext: o.hasNext,\r\n firstPage: o.firstPage,\r\n lastPage: o.lastPage,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.pager.setValue(BI.parseInt(self.editor.getValue()));\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.editor.setValue(self.pager.getCurrentPage());\r\n });\r\n\r\n this.allPages = BI.createWidget({\r\n type: \"bi.label\",\r\n title: o.pages,\r\n text: \"/\" + o.pages,\r\n lgap: 5,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.rowCount = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"row-count\",\r\n height: o.height,\r\n hgap: 5,\r\n text: o.count,\r\n title: o.count\r\n });\r\n\r\n var count = BI.createWidget({\r\n type: \"bi.left\",\r\n height: o.height,\r\n scrollable: false,\r\n items: [{\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Basic_Total\"),\r\n width: 15\r\n }, this.rowCount, {\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Tiao_Data\"),\r\n width: 50,\r\n textAlign: \"left\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.left_right_vertical_adapt\",\r\n element: this,\r\n items: {\r\n left: [count],\r\n right: [this.editor, this.allPages, this.pager]\r\n }\r\n });\r\n },\r\n\r\n alwaysShowPager: true,\r\n\r\n _getPagerIconCls: function () {\r\n var o = this.options;\r\n switch (o.pagerDirection) {\r\n case \"horizontal\":\r\n return {\r\n preCls: \"row-pre-page-h-font \",\r\n nextCls: \"row-next-page-h-font \"\r\n };\r\n case \"vertical\":\r\n default:\r\n return {\r\n preCls: \"column-pre-page-h-font \",\r\n nextCls: \"column-next-page-h-font \"\r\n };\r\n }\r\n },\r\n\r\n setAllPages: function (v) {\r\n this.allPages.setText(\"/\" + v);\r\n this.allPages.setTitle(v);\r\n this.options.pages = v;\r\n this.pager.setAllPages(v);\r\n this.editor.setEnable(v >= 1);\r\n this.setPagerVisible(v > 1);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setVPage: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setCount: function (count) {\r\n this.rowCount.setText(count);\r\n this.rowCount.setTitle(count);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.pager.getCurrentPage();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.pager.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.pager.hasNext();\r\n },\r\n\r\n setPagerVisible: function (b) {\r\n this.editor.setVisible(b);\r\n this.allPages.setVisible(b);\r\n this.pager.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.pager.populate();\r\n this.setPagerVisible(this.options.pages > 1);\r\n }\r\n});\r\nBI.AllCountPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_count_pager\", BI.AllCountPager);/**\r\n * 显示页码的分页控件\r\n *\r\n * Created by GUY on 2016/6/30.\r\n * @class BI.DirectionPager\r\n * @extends BI.Widget\r\n */\r\nBI.DirectionPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-direction-pager\",\r\n height: 24,\r\n horizontal: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n },\r\n vertical: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.DirectionPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var v = o.vertical, h = o.horizontal;\r\n this._createVPager();\r\n this._createHPager();\r\n this.layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n scrollable: false,\r\n element: this,\r\n items: [{\r\n el: this.vpager,\r\n top: 0,\r\n right: 86\r\n }, {\r\n el: this.vlabel,\r\n top: 0,\r\n right: 110\r\n }, {\r\n el: this.hpager,\r\n top: 0,\r\n right: 0\r\n }, {\r\n el: this.hlabel,\r\n top: 0,\r\n right: 24\r\n }]\r\n });\r\n },\r\n\r\n _createVPager: function () {\r\n var self = this, o = this.options;\r\n var v = o.vertical;\r\n this.vlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: v.curr,\r\n title: v.curr,\r\n invisible: true\r\n });\r\n this.vpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: v.pages,\r\n curr: v.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Up_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Down_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: v.hasPrev,\r\n hasNext: v.hasNext,\r\n firstPage: v.firstPage,\r\n lastPage: v.lastPage\r\n });\r\n\r\n this.vpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.vlabel.setValue(this.getCurrentPage());\r\n self.vlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n _createHPager: function () {\r\n var self = this, o = this.options;\r\n var h = o.horizontal;\r\n this.hlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: h.curr,\r\n title: h.curr,\r\n invisible: true\r\n });\r\n this.hpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: h.pages,\r\n curr: h.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Left_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Right_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: h.hasPrev,\r\n hasNext: h.hasNext,\r\n firstPage: h.firstPage,\r\n lastPage: h.lastPage\r\n });\r\n\r\n this.hpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.hlabel.setValue(this.getCurrentPage());\r\n self.hlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n getVPage: function () {\r\n return this.vpager.getCurrentPage();\r\n },\r\n\r\n getHPage: function () {\r\n return this.hpager.getCurrentPage();\r\n },\r\n\r\n setVPage: function (v) {\r\n this.vpager.setValue(v);\r\n this.vlabel.setValue(v);\r\n this.vlabel.setTitle(v);\r\n },\r\n\r\n setHPage: function (v) {\r\n this.hpager.setValue(v);\r\n this.hlabel.setValue(v);\r\n this.hlabel.setTitle(v);\r\n },\r\n\r\n hasVNext: function () {\r\n return this.vpager.hasNext();\r\n },\r\n\r\n hasHNext: function () {\r\n return this.hpager.hasNext();\r\n },\r\n\r\n hasVPrev: function () {\r\n return this.vpager.hasPrev();\r\n },\r\n\r\n hasHPrev: function () {\r\n return this.hpager.hasPrev();\r\n },\r\n\r\n setHPagerVisible: function (b) {\r\n this.hpager.setVisible(b);\r\n this.hlabel.setVisible(b);\r\n },\r\n\r\n setVPagerVisible: function (b) {\r\n this.vpager.setVisible(b);\r\n this.vlabel.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.vpager.populate();\r\n this.hpager.populate();\r\n var vShow = false, hShow = false;\r\n if (!this.hasHNext() && !this.hasHPrev()) {\r\n this.setHPagerVisible(false);\r\n } else {\r\n this.setHPagerVisible(true);\r\n hShow = true;\r\n }\r\n if (!this.hasVNext() && !this.hasVPrev()) {\r\n this.setVPagerVisible(false);\r\n } else {\r\n this.setVPagerVisible(true);\r\n vShow = true;\r\n }\r\n this.setVisible(hShow || vShow);\r\n var num = [86, 110, 0, 24];\r\n var items = this.layout.attr(\"items\");\r\n\r\n if (vShow === true && hShow === true) {\r\n items[0].right = num[0];\r\n items[1].right = num[1];\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n } else if (vShow === true) {\r\n items[0].right = num[2];\r\n items[1].right = num[3];\r\n } else if (hShow === true) {\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n }\r\n this.layout.attr(\"items\", items);\r\n this.layout.resize();\r\n },\r\n\r\n clear: function () {\r\n this.vpager.attr(\"curr\", 1);\r\n this.hpager.attr(\"curr\", 1);\r\n }\r\n});\r\nBI.DirectionPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.direction_pager\", BI.DirectionPager);/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.DetailPager\r\n * @extends BI.Widget\r\n */\r\nBI.DetailPager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-detail-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.DetailPager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n this._lock = false;\r\n this._debouce = BI.debounce(function () {\r\n self._lock = false;\r\n }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n\r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"page-item bi-border bi-list-item-active\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self._lock === true) {\r\n return;\r\n }\r\n self._lock = true;\r\n self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v || 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.DetailPager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.DetailPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DetailPager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.detail_pager\", BI.DetailPager);/**\r\n * 分段控件使用的button\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.SegmentButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.SegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-segment-button bi-list-item-select\",\r\n shadow: true,\r\n readonly: true,\r\n hgap: 5\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SegmentButton.superclass._init.apply(this, arguments);\r\n var opts = this.options, self = this;\r\n // if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {\r\n // this.element.css({lineHeight : (opts.height - 2) + 'px'});\r\n // }\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textHeight: opts.height,\r\n whiteSpace: opts.whiteSpace,\r\n text: opts.text,\r\n value: opts.value,\r\n hgap: opts.hgap\r\n });\r\n },\r\n\r\n setSelected: function () {\r\n BI.SegmentButton.superclass.setSelected.apply(this, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.SegmentButton.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n destroy: function () {\r\n BI.SegmentButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.segment_button\", BI.SegmentButton);/**\r\n * 单选按钮组\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Segment\r\n * @extends BI.Widget\r\n */\r\nBI.Segment = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-segment\",\r\n items: [],\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.Segment.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.buttonGroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_group\",\r\n value: o.value,\r\n items: BI.createItems(o.items, {\r\n type: \"bi.segment_button\",\r\n height: o.height - 2,\r\n whiteSpace: o.whiteSpace\r\n }),\r\n layout: [\r\n {\r\n type: \"bi.center\"\r\n }\r\n ]\r\n });\r\n this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj);\r\n });\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Segment.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.Segment.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.segment\", BI.Segment);/**\r\n * guy\r\n * 复选导航条\r\n * Created by GUY on 2015/8/25.\r\n * @class BI.MultiSelectBar\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiSelectBar = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-bar\",\r\n height: 25,\r\n text: BI.i18nText(\"BI-Select_All\"),\r\n isAllCheckedBySelectedValue: BI.emptyFn,\r\n // 手动控制选中\r\n disableSelected: true,\r\n isHalfCheckedBySelectedValue: function (selectedValues) {\r\n return selectedValues.length > 0;\r\n },\r\n halfSelected: false,\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectBar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var isSelect = o.selected === true;\r\n var isHalfSelect = !o.selected && o.halfSelected;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(self.isSelected());\r\n },\r\n selected: isSelect,\r\n invisible: isHalfSelect\r\n });\r\n this.half = BI.createWidget({\r\n type: \"bi.half_icon_button\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(true);\r\n },\r\n invisible: isSelect || !isHalfSelect\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.half.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n width: o.iconWrapperWidth,\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox, this.half]\r\n }\r\n }, {\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n _setSelected: function (v) {\r\n this.checkbox.setSelected(!!v);\r\n },\r\n\r\n // 自己手动控制选中\r\n beforeClick: function () {\r\n var isHalf = this.isHalfSelected(), isSelected = this.isSelected();\r\n if (isHalf === true) {\r\n this.setSelected(true);\r\n } else {\r\n this.setSelected(!isSelected);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n this.checkbox.setSelected(v);\r\n this.setHalfSelected(false);\r\n },\r\n\r\n setHalfSelected: function (b) {\r\n this.halfSelected = !!b;\r\n if (b === true) {\r\n this.checkbox.setSelected(false);\r\n this.half.visible();\r\n this.checkbox.invisible();\r\n } else {\r\n this.half.invisible();\r\n this.checkbox.visible();\r\n }\r\n },\r\n\r\n isHalfSelected: function () {\r\n return !this.isSelected() && !!this.halfSelected;\r\n },\r\n\r\n isSelected: function () {\r\n return this.checkbox.isSelected();\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n BI.MultiSelectBar.superclass.setValue.apply(this, arguments);\r\n var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);\r\n this._setSelected(isAllChecked);\r\n !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectBar.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n }\r\n});\r\nBI.MultiSelectBar.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_bar\", BI.MultiSelectBar);\r\n/**\r\n * guy\r\n * 二级树\r\n * @class BI.LevelTree\r\n * @extends BI.Single\r\n */\r\nBI.LevelTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-level-tree\",\r\n el: {\r\n chooseType: 0\r\n },\r\n expander: {},\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n element: this,\r\n expander: BI.extend({\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n }, o.expander),\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n\r\n el: BI.extend({\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }, o.el)\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.LevelTree.EVENT_CHANGE, value, ob);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.tree.stroke.apply(this.tree, arguments);\r\n },\r\n\r\n populate: function (items, keyword) {\r\n items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0);\r\n this.tree.populate(items, keyword);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.LevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.level_tree\", BI.LevelTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.DisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.DisplayTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.DisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.DisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.display_tree\", BI.DisplayTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.ListListDisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListDisplayTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListDisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-list-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.ListDisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false,\r\n fontCss: getFont\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n function getFont(treeId, node) {\r\n return node.isLeaf ? {} : {color: \"#999999\"};\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.ListDisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.ListDisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.ListDisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.list_display_tree\", BI.ListDisplayTree);/**\r\n * 简单的多选树\r\n *\r\n * Created by GUY on 2016/2/16.\r\n * @class BI.SimpleTreeView\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleTreeView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-tree\",\r\n itemsCreator: BI.emptyFn,\r\n items: null\r\n });\r\n },\r\n _init: function () {\r\n BI.SimpleTreeView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.structure = new BI.Tree();\r\n this.tree = BI.createWidget({\r\n type: \"bi.tree_view\",\r\n element: this,\r\n itemsCreator: function (op, callback) {\r\n var fn = function (items) {\r\n callback({\r\n items: items\r\n });\r\n self.structure.initTree(BI.Tree.transformToTreeFormat(items));\r\n };\r\n if (BI.isNotNull(o.items)) {\r\n fn(o.items);\r\n } else {\r\n o.itemsCreator(op, fn);\r\n }\r\n }\r\n });\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate();\r\n }\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n populate: function (items, keyword) {\r\n if (items) {\r\n this.options.items = items;\r\n }\r\n this.tree.stroke({\r\n keyword: keyword\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n v || (v = []);\r\n var self = this, map = {};\r\n var selected = [];\r\n BI.each(v, function (i, val) {\r\n var node = self.structure.search(val, \"value\");\r\n if (node) {\r\n var p = node;\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n\r\n while (p && p.getChildrenLength() <= map[p.value]) {\r\n selected.push(p.value);\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n }\r\n }\r\n });\r\n return BI.makeObject(v.concat(selected));\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(this._digest(v));\r\n },\r\n\r\n _getValue: function () {\r\n var self = this, result = [], val = this.tree.getValue();\r\n var track = function (nodes) {\r\n BI.each(nodes, function (key, node) {\r\n if (BI.isEmpty(node)) {\r\n result.push(key);\r\n } else {\r\n track(node);\r\n }\r\n });\r\n };\r\n track(val);\r\n return result;\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [], val = this._getValue();\r\n BI.each(val, function (i, key) {\r\n var target = self.structure.search(key, \"value\");\r\n if (target) {\r\n self.structure._traverse(target, function (node) {\r\n if (node.isLeaf()) {\r\n result.push(node.value);\r\n }\r\n });\r\n }\r\n });\r\n return result;\r\n }\r\n});\r\nBI.SimpleTreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_tree\", BI.SimpleTreeView);\r\n/**\r\n * 文本输入框trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.EditorTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.EditorTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-editor-trigger bi-border\",\r\n height: 24,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.EditorTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n title: function () {\r\n return self.getValue();\r\n }\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_ERROR, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n },\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (value) {\r\n this.editor.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.editor.setState(text);\r\n }\r\n});\r\nBI.EditorTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorTrigger.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_trigger\", BI.EditorTrigger);\r\n/**\r\n * 图标按钮trigger\r\n *\r\n * Created by GUY on 2015/10/8.\r\n * @class BI.IconTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-trigger\",\r\n extraCls: \"pull-down-font\",\r\n el: {},\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.IconTrigger.superclass._init.apply(this, arguments);\r\n this.iconButton = BI.createWidget(o.el, {\r\n type: \"bi.trigger_icon_button\",\r\n element: this,\r\n width: o.width,\r\n height: o.height,\r\n extraCls: o.extraCls\r\n });\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_trigger\", BI.IconTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.IconTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: o.iconCls,\r\n ref: function (_ref) {\r\n self.icon = _ref;\r\n },\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n disableSelected: true\r\n },\r\n width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)\r\n },\r\n {\r\n el: this.text,\r\n lgap: BI.isEmptyString(o.iconCls) ? 5 : 0\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setIcon: function (iconCls) {\r\n var o = this.options;\r\n this.icon.setIcon(iconCls);\r\n var iconItem = this.wrapper.attr(\"items\")[0];\r\n var textItem = this.wrapper.attr(\"items\")[1];\r\n if(BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {\r\n if(iconItem.width !== 0) {\r\n iconItem.width = 0;\r\n textItem.lgap = 5;\r\n this.wrapper.resize();\r\n }\r\n }else{\r\n if(iconItem.width !== (o.iconWrapperWidth || o.height)) {\r\n iconItem.width = (o.iconWrapperWidth || o.height);\r\n textItem.lgap = 0;\r\n this.wrapper.resize();\r\n }\r\n }\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_text_trigger\", BI.IconTextTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectIconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digist(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.icon_text_trigger\",\r\n element: this,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n iconCls: obj.iconCls,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n },\r\n\r\n _digist: function (vals, items) {\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result;\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.any(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value)) {\r\n result = {\r\n text: item.text || item.value,\r\n iconCls: item.iconCls\r\n };\r\n return true;\r\n }\r\n });\r\n\r\n if (BI.isNotNull(result)) {\r\n return {\r\n text: result.text,\r\n textCls: \"\",\r\n iconCls: result.iconCls\r\n };\r\n } else {\r\n return {\r\n text: BI.isFunction(o.text) ? o.text() : o.text,\r\n textCls: \"bi-water-mark\",\r\n iconCls: o.iconCls\r\n };\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var obj = this._digist(vals, this.options.items);\r\n this.trigger.setText(obj.text);\r\n this.trigger.setIcon(obj.iconCls);\r\n this.trigger.setTextCls(obj.textCls);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_icon_text_trigger\", BI.SelectIconTextTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.TextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.TextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n title: function () {\r\n return self.text.getText();\r\n },\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n hgap: c.hgap,\r\n readonly: o.readonly\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n }\r\n});\r\nBI.shortcut(\"bi.text_trigger\", BI.TextTrigger);\r\n/**\r\n * 选择字段trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.SelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border bi-focus-shadow\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.text_trigger\",\r\n element: this,\r\n height: o.height,\r\n readonly: o.readonly,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n textCls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n textCls: \"bi-water-mark\",\r\n text: BI.isFunction(o.text) ? o.text() : o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.setTextCls(formatValue.textCls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.trigger.setTipType(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_text_trigger\", BI.SelectTextTrigger);\r\n/**\r\n * 选择字段trigger小一号的\r\n *\r\n * @class BI.SmallSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-small-select-text-trigger bi-border\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.small_text_trigger\",\r\n element: this,\r\n height: o.height - 2,\r\n text: obj.text,\r\n cls: obj.cls\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n cls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n cls: \"bi-water-mark\",\r\n text: o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.element.removeClass(\"bi-water-mark\").addClass(formatValue.cls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.small_select_text_trigger\", BI.SmallSelectTextTrigger);/**\r\n * 文字trigger(右边小三角小一号的) ==\r\n *\r\n * @class BI.SmallTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: c.hgap\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_trigger\", BI.SmallTextTrigger);/**\r\n * 日期控件中的月份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.MonthDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-combo\",\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.MonthDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.month_popup\",\r\n behaviors: o.behaviors\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n container: o.container,\r\n element: this,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.combo.hideView();\r\n self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.MonthDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_date_combo\", BI.MonthDateCombo);/**\r\n * 年份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.YearDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-combo\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n behaviors: {},\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.YearDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.year_popup\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n element: this,\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n // BI-22551 popup未初始化传入的behavior无效\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.YearDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_date_combo\", BI.YearDateCombo);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DatePicker\r\n * @extends BI.Widget\r\n */\r\nBI.DatePicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-picker\",\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DatePicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this._month = BI.getDate().getMonth() + 1;\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 1) {\r\n self.setValue({\r\n year: self.year.getValue() - 1,\r\n month: 12\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() - 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 12) {\r\n self.setValue({\r\n year: self.year.getValue() + 1,\r\n month: 1\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() + 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n this.month = BI.createWidget({\r\n type: \"bi.month_date_combo\",\r\n behaviors: o.behaviors\r\n });\r\n this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 24\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal\",\r\n width: 120,\r\n rgap: 10,\r\n items: [{\r\n el: this.year,\r\n lgap: 10\r\n }, this.month]\r\n }\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 24\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year,\r\n month: this._month\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 1 && this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 12 && this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.year.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.year.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (ob) {\r\n this._year = BI.parseInt(ob.year);\r\n this._month = BI.parseInt(ob.month);\r\n this.year.setValue(ob.year);\r\n this.month.setValue(ob.month);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.year.getValue(),\r\n month: this.month.getValue()\r\n };\r\n }\r\n});\r\nBI.DatePicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_picker\", BI.DatePicker);/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearPicker\r\n * @extends BI.Widget\r\n */\r\nBI.YearPicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-picker\",\r\n behaviors: {},\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.YearPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() - 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() + 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n min: o.min,\r\n behaviors: o.behaviors,\r\n max: o.max\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue());\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal_float\",\r\n width: 50,\r\n items: [{\r\n el: this.year\r\n }]\r\n }\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 25\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n\r\n setValue: function (v) {\r\n this._year = v;\r\n this.year.setValue(v);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.year.getValue();\r\n }\r\n});\r\nBI.YearPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_picker\", BI.YearPicker);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateCalendarPopup\r\n * @extends BI.Widget\r\n */\r\nBI.DateCalendarPopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-calendar-popup\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: true\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n // BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可\r\n day: 1\r\n });\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.DateCalendarPopup.superclass._init.apply(this, arguments);\r\n var self = this,\r\n o = this.options;\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n this._day = this.today.getDate();\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month,\r\n day: this._day\r\n };\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"top\",\r\n logic: {\r\n dynamic: true\r\n },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this),\r\n\r\n afterCardCreated: function () {\r\n\r\n },\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedTime);\r\n }\r\n });\r\n\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n self.selectedTime = self.datePicker.getValue();\r\n self.selectedTime.day = 1;\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n });\r\n\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.calendar,\r\n left: 5,\r\n right: 5\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this.datePicker.setMinDate(minDate);\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this.datePicker.setMaxDate(maxDate);\r\n this._checkMax();\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this.datePicker.setValue(timeOb);\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb));\r\n this.calendar.setValue(timeOb);\r\n this.selectedTime = timeOb;\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n});\r\nBI.DateCalendarPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_calendar_popup\", BI.DateCalendarPopup);/**\r\n * 月份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.MonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-popup\",\r\n behaviors: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MonthPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n items = BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td\r\n };\r\n });\r\n });\r\n\r\n this.month = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n behaviors: o.behaviors,\r\n items: BI.createItems(items, {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.month.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.MonthPopup.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.month.getValue()[0];\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.parseInt(v);\r\n this.month.setValue([v]);\r\n }\r\n});\r\nBI.MonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_popup\", BI.MonthPopup);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.YearPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.YearPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: -1\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: 1\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n cls: \"year-popup-navigation bi-high-light bi-split-top\",\r\n height: 24,\r\n items: [this.backBtn, this.preBtn]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n calendar && self.backBtn.setEnable(!calendar.isFrontYear());\r\n calendar && self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.YearPopup.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this._checkMax();\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedYear;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseInt(v);\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n if (BI.checkDateVoid(v, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), \"%Y-%X-%d\"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), \"%Y-%X-%d\"))[0]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = v;\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(v);\r\n }\r\n }\r\n});\r\nBI.YearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_popup\", BI.YearPopup);/**\r\n * 日期控件中的年份或月份trigger\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateTriangleTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DateTriangleTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n height: 24,\r\n iconWidth: 12,\r\n iconHeight: 12\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-triangle-trigger pull-down-ha-font cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTriangleTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"right\",\r\n text: o.text,\r\n value: o.value,\r\n height: c.height\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n rgap: 5\r\n }, {\r\n type: \"bi.icon_label\",\r\n width: 16\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.text.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function (v) {\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.item.getText();\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.date_triangle_trigger\", BI.DateTriangleTrigger);/**\r\n * Created by zcf on 2017/2/20.\r\n */\r\nBI.StaticDatePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDatePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDatePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = {\r\n year: value.year,\r\n month: value.month\r\n };\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar],\r\n hgap: 10\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = date;\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_pane_card\", BI.StaticDatePaneCard);BI.DynamicDatePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDatePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDatePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDatePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDatePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDatePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDatePane.Static:\r\n return {\r\n type: \"bi.static_date_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDatePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateCombo.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_pane\", BI.DynamicDatePane);\r\n\r\nBI.extend(BI.DynamicDatePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 290,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-combo bi-border bi-border-radius\",\r\n width: 200,\r\n height: 24,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeCombo.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n var date = BI.getDate();\r\n this.storeValue = BI.isNotNull(opts.value) ? opts.value : {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n self.setValue(this.storeValue);\r\n\r\n this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE, function () {\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CANCEL);\r\n });\r\n this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE, function () {\r\n self.storeValue = self.popup.getValue();\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM);\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: this.popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n triggerBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.combo,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.popup.setValue(v);\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DateTimeCombo.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.DateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.date_time_combo\", BI.DateTimeCombo);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-popup\",\r\n width: 268,\r\n height: 374\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n this.cancelButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top bi-border-right\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n });\r\n this.cancelButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE);\r\n });\r\n\r\n this.okButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\")\r\n });\r\n this.okButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n });\r\n\r\n this.dateCombo = BI.createWidget({\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: opts.behaviors,\r\n min: self.options.min,\r\n max: self.options.max\r\n });\r\n self.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);\r\n });\r\n\r\n this.dateButton = BI.createWidget({\r\n type: \"bi.grid\",\r\n items: [[this.cancelButton, this.okButton]]\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this.dateCombo\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n height: 50\r\n }, {\r\n el: this.dateButton,\r\n height: 30\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n setValue: function (v) {\r\n var value = v, date;\r\n if (BI.isNull(value)) {\r\n date = BI.getDate();\r\n this.dateCombo.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue({\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n });\r\n } else {\r\n this.dateCombo.setValue({\r\n year: value.year,\r\n month: value.month,\r\n day: value.day\r\n });\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.extend({\r\n year: this.dateCombo.getValue().year,\r\n month: this.dateCombo.getValue().month,\r\n day: this.dateCombo.getValue().day\r\n }, this.timeSelect.getValue());\r\n }\r\n});\r\nBI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE = \"BUTTON_CANCEL_EVENT_CHANGE\";\r\nBI.DateTimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_time_popup\", BI.DateTimePopup);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n width: 200\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n width: o.width,\r\n hgap: c.hgap\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n },{\r\n el: BI.createWidget(),\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _printTime: function (v) {\r\n return v < 10 ? \"0\" + v : v;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this;\r\n var value = v, dateStr;\r\n if(BI.isNull(value)) {\r\n value = BI.getDate();\r\n dateStr = BI.print(value, \"%Y-%X-%d %H:%M:%S\");\r\n } else {\r\n var date = BI.getDate(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);\r\n dateStr = BI.print(date, \"%Y-%X-%d %H:%M:%S\");\r\n\r\n }\r\n this.text.setText(dateStr);\r\n this.text.setTitle(dateStr);\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.date_time_trigger\", BI.DateTimeTrigger);\r\nBI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-time-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDateTimePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = BI.extend(self.selectedTime, {\r\n year: value.year,\r\n month: value.month\r\n });\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n hgap: 10,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,\r\n action: function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n height: 40\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n timeOb = timeOb || {};\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n this.timeSelect.setValue({\r\n hour: timeOb.hour,\r\n minute: timeOb.minute,\r\n second: timeOb.second\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_time_pane_card\", BI.StaticDateTimePaneCard);BI.DynamicDateTimePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateTimePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateTimePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDateTimePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDateTimePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDateTimePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateTimePane.Static:\r\n return {\r\n type: \"bi.static_date_time_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDateTimePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateTimePane.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateTimePane.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateTimePane.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_time_pane\", BI.DynamicDateTimePane);\r\n\r\nBI.extend(BI.DynamicDateTimePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls,\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000,\r\n minWidth: 140\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/6.\r\n */\r\nBI.DownListGroup = BI.inherit(BI.Widget, {\r\n constants: {\r\n iconCls: \"check-mark-ha-font\"\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-group\",\r\n items: [\r\n {\r\n el: {}\r\n }\r\n ]\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n\r\n this.downlistgroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_tree\",\r\n items: o.items,\r\n chooseType: 0, // 0单选,1多选\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n });\r\n this.downlistgroup.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if(type === BI.Events.CLICK) {\r\n self.fireEvent(BI.DownListGroup.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n },\r\n getValue: function () {\r\n return this.downlistgroup.getValue();\r\n },\r\n setValue: function (v) {\r\n this.downlistgroup.setValue(v);\r\n }\r\n\r\n\r\n});\r\nBI.DownListGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group\", BI.DownListGroup);BI.DownListItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-item bi-list-item-active\",\r\n cls: \"\",\r\n height: 24,\r\n logic: {\r\n dynamic: true\r\n },\r\n selected: false,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 36,\r\n height: o.height,\r\n items: [{\r\n el: {\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.DownListItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_item\", BI.DownListItem);BI.DownListGroupItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListGroupItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-down-list-group-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n // invalid: true,\r\n iconCls1: \"dot-e-font\",\r\n iconCls2: \"pull-right-e-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroupItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var self = this;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-group-item-text\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n value: o.value,\r\n height: o.height\r\n });\r\n\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n width: 36,\r\n disableSelected: true,\r\n selected: this._digest(o.value)\r\n });\r\n\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n width: 24,\r\n forceNotSelected: true\r\n });\r\n\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: 24\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.icon2,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon1, this.text, blank)\r\n }))));\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled()) {\r\n self.hover();\r\n }\r\n }, function () {\r\n if (self.isEnabled()) {\r\n self.dishover();\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n var self = this, o = this.options;\r\n v = BI.isArray(v) ? v : [v];\r\n return BI.any(v, function (idx, value) {\r\n return BI.contains(o.childValues, value);\r\n });\r\n },\r\n\r\n hover: function () {\r\n BI.DownListGroupItem.superclass.hover.apply(this, arguments);\r\n this.icon1.element.addClass(\"hover\");\r\n this.icon2.element.addClass(\"hover\");\r\n\r\n },\r\n\r\n dishover: function () {\r\n BI.DownListGroupItem.superclass.dishover.apply(this, arguments);\r\n this.icon1.element.removeClass(\"hover\");\r\n this.icon2.element.removeClass(\"hover\");\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListGroupItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE, this.getValue());\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.icon1.setSelected(this._digest(v));\r\n }\r\n});\r\nBI.DownListGroupItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group_item\", BI.DownListGroupItem);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.DownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.items = BI.deepClone(this.options.items);\r\n var self = this, o = this.options, children = this._createChildren(this.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n self.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, self.fatherValueMap[value]);\r\n } else {\r\n self.fireEvent(BI.DownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createChildren: function (items) {\r\n var self = this, result = [];\r\n // 不能修改populate进来的item的引用\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n // popup未初始化返回的是options中的value, 在经过buttontree的getValue concat之后,无法区分值来自options\r\n // 还是item自身, 这边控制defaultInit为true来避免这个问题\r\n item.isDefaultInit = true;\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5,\r\n maxHeight: 378\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-split-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10,\r\n rgap: 0\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n return fatherValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var value = [];\r\n BI.each(this.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = BI.map(item.children, \"value\");\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.DownListPopup.superclass.populate.apply(this, arguments);\r\n this.items = BI.deepClone(items);\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.singleValues = [];\r\n var children = this._createChildren(this.items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n this.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n valueItem.value = fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.DownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.down_list_popup\", BI.DownListPopup);!(function () {\r\n BI.DynamicDateHelper = {};\r\n BI.extend(BI.DynamicDateHelper, {\r\n getCalculation: function (obj) {\r\n var date = BI.getDate();\r\n\r\n return this.getCalculationByDate(date, obj);\r\n },\r\n\r\n getCalculationByDate: function (date, obj) {\r\n if (BI.isNotNull(obj.year)) {\r\n date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n date = BI.getOffsetQuarter(date, BI.parseInt(obj.quarter));\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n date = BI.getOffsetMonth(date, BI.parseInt(obj.month));\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.week) * 7);\r\n }\r\n if (BI.isNotNull(obj.day)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.day));\r\n }\r\n if (BI.isNotNull(obj.workDay)) {\r\n // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算\r\n if(BI.isNotNull(BI.holidays)) {\r\n var count = Math.abs(obj.workDay);\r\n for (var i = 0; i < count; i++) {\r\n date = BI.getOffsetDate(date, obj.workDay < 0 ? -1 : 1);\r\n if(BI.isNotNull(BI.holidays[BI.print(date, \"%Y-%X-%d\")])) {\r\n i--;\r\n }\r\n }\r\n } else {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.workDay));\r\n }\r\n }\r\n if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {\r\n date = this.getBeginDate(date, obj);\r\n }\r\n\r\n return BI.getDate(date.getFullYear(), date.getMonth(), date.getDate());\r\n },\r\n\r\n getBeginDate: function (date, obj) {\r\n if (BI.isNotNull(obj.day)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getWeekStartDate(date) : BI.getWeekEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getQuarterStartDate(date) : BI.getQuarterEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.year)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), 0, 1) : BI.getDate(date.getFullYear(), 11, 31);\r\n }\r\n return date;\r\n }\r\n });\r\n})();\r\nBI.DynamicDateCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n this.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 12,\r\n lgap: 10\r\n },\r\n tgap: 10,\r\n bgap: 5\r\n }, {\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.checkgroup = this;\r\n },\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n lgap: 4,\r\n value: [BI.DynamicDateCard.TYPE.YEAR],\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year\"),\r\n value: BI.DynamicDateCard.TYPE.YEAR\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Single_Quarter\"),\r\n value: BI.DynamicDateCard.TYPE.QUARTER\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month\"),\r\n value: BI.DynamicDateCard.TYPE.MONTH\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week\"),\r\n value: BI.DynamicDateCard.TYPE.WEEK\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Day\"),\r\n value: BI.DynamicDateCard.TYPE.DAY\r\n }], {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: true\r\n }\r\n }),\r\n layouts: [{\r\n type: \"bi.left\",\r\n rgap: 4\r\n }],\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = self.checkgroup.getValue();\r\n if(value.length !== 0) {\r\n self.workDayBox.setSelected(false);\r\n }\r\n\r\n var plainValue = {};\r\n BI.each(self.resultPane.getAllButtons(), function (idx, button) {\r\n var value = button.getValue();\r\n if(BI.isNotNull(value.dateType)) {\r\n plainValue[value.dateType] = {\r\n value: value.value,\r\n offset: value.offset\r\n };\r\n }\r\n });\r\n self.resultPane.populate(self._getParamJson(BI.map(self.checkgroup.getValue(), function (idx, v) {\r\n var obj = {\r\n dateType: v\r\n };\r\n if(BI.has(plainValue, v)) {\r\n obj.value = plainValue[v].value;\r\n obj.offset = plainValue[v].offset;\r\n }\r\n return obj;\r\n })));\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.vertical_adapt\",\r\n lgap: 2,\r\n items: [{\r\n el: {\r\n type: \"bi.multi_select_item\",\r\n ref: function () {\r\n self.workDayBox = this;\r\n },\r\n logic: {\r\n dynamic: true\r\n },\r\n text: BI.i18nText(\"BI-Basic_Work_Day\"),\r\n value: BI.DynamicDateCard.TYPE.WORK_DAY,\r\n listeners: [{\r\n eventName: BI.MultiSelectItem.EVENT_CHANGE,\r\n action: function () {\r\n if(this.isSelected()) {\r\n self.checkgroup.setValue();\r\n }\r\n self.resultPane.populate(this.isSelected() ? self._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.WORK_DAY\r\n }]) : []);\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }\r\n }],\r\n ref: function () {\r\n self.workDay = this;\r\n }\r\n }, {\r\n type: \"bi.button_group\",\r\n items: this._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.YEAR\r\n }]),\r\n ref: function () {\r\n self.resultPane = this;\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n bgap: 10,\r\n hgap: 10\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getParamJson: function (values, positionValue) {\r\n var self = this;\r\n var items = BI.map(values, function (idx, value) {\r\n return {\r\n el: {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: value.dateType,\r\n value: value.value,\r\n offset: value.offset,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n tgap: idx === 0 ? 5 : 0\r\n };\r\n });\r\n\r\n if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {\r\n var comboItems = this._getText(BI.DynamicDateCard.TYPE.MONTH);\r\n comboItems[0].text = BI.i18nText(\"BI-Basic_Empty\");\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: comboItems,\r\n container: null,\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n }else{\r\n if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n container: null,\r\n items: this._getText(BI.last(values).dateType),\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n\r\n }\r\n }\r\n\r\n return items;\r\n },\r\n\r\n _getText: function (lastValue) {\r\n switch (lastValue) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n default:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n }\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n this.position = v.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n var values = [];\r\n var valuesItems = [];\r\n if(BI.isNotNull(v.year)) {\r\n values.push(BI.DynamicDateCard.TYPE.YEAR);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n }\r\n if(BI.isNotNull(v.quarter)) {\r\n values.push(BI.DynamicDateCard.TYPE.QUARTER);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n }\r\n if(BI.isNotNull(v.month)) {\r\n values.push(BI.DynamicDateCard.TYPE.MONTH);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n }\r\n if(BI.isNotNull(v.week)) {\r\n values.push(BI.DynamicDateCard.TYPE.WEEK);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK, v.week));\r\n }\r\n if(BI.isNotNull(v.day)) {\r\n values.push(BI.DynamicDateCard.TYPE.DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.DAY, v.day));\r\n }\r\n if(BI.isNotNull(v.workDay)) {\r\n values.push(BI.DynamicDateCard.TYPE.WORK_DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY, v.workDay));\r\n }\r\n this.checkgroup.setValue(values);\r\n this.workDayBox.setSelected(BI.isNotNull(v.workDay));\r\n this.resultPane.populate(this._getParamJson(valuesItems, v.position));\r\n },\r\n\r\n getValue: function () {\r\n var self = this;\r\n var valueMap = {};\r\n var selectValues = this.checkgroup.getValue();\r\n var buttons = this.resultPane.getAllButtons();\r\n if(selectValues.length !== 0) {\r\n BI.each(buttons, function (idx, button) {\r\n var value = button.getValue();\r\n switch (value.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n valueMap.year = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n valueMap.quarter = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n valueMap.month = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n valueMap.week = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n valueMap.day = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n default:\r\n break;\r\n }\r\n if(BI.isNull(value.dateType)) {\r\n valueMap.position = self.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n }\r\n });\r\n }\r\n if(this.workDayBox.isSelected()) {\r\n var value = buttons[0].getValue();\r\n valueMap.workDay = (value.offset === 0 ? -value.value : value.value);\r\n }\r\n return valueMap;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.dynamic_date_card\", BI.DynamicDateCard);\r\n\r\nBI.extend(BI.DynamicDateCard, {\r\n TYPE: {\r\n YEAR: 1,\r\n QUARTER: 2,\r\n MONTH: 3,\r\n WEEK: 4,\r\n DAY: 5,\r\n WORK_DAY: 6\r\n },\r\n OFFSET: {\r\n CURRENT: 1,\r\n BEGIN: 2,\r\n END: 3\r\n }\r\n\r\n});BI.DynamicDateCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n destroyWhenHide: true,\r\n el: {\r\n type: \"bi.dynamic_date_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n format: opts.format,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击triggerBtn不默认收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n _defaultState: function () {\r\n\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DynamicDateCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_combo\", BI.DynamicDateCombo);\r\n\r\nBI.extend(BI.DynamicDateCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateParamItem = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-param-item\",\r\n dateType: BI.DynamicDateCard.TYPE.YEAR,\r\n value: 0,\r\n offset: 0,\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n cls: \"bi-border\",\r\n height: 22,\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v);\r\n },\r\n value: o.value,\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n errorText: function (v) {\r\n if(BI.isEmptyString(v)) {\r\n return BI.i18nText(\"BI-Basic_Please_Input_Content\");\r\n }\r\n return BI.i18nText(\"BI-Please_Input_Natural_Number\");\r\n },\r\n allowBlank: false,\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n width: 60\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: this._getText()\r\n },\r\n width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20\r\n }, {\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: [{\r\n text: BI.i18nText(\"BI-Basic_Front\"),\r\n value: 0\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Behind\"),\r\n value: 1\r\n }],\r\n ref: function () {\r\n self.offsetCombo = this;\r\n },\r\n container: null,\r\n value: o.offset,\r\n listeners: [{\r\n eventName: BI.TextValueCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getText: function () {\r\n var text = \"\";\r\n switch (this.options.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n text = BI.i18nText(\"BI-Basic_Year\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n text = BI.i18nText(\"BI-Basic_Single_Quarter\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n text = BI.i18nText(\"BI-Basic_Month\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n text = BI.i18nText(\"BI-Basic_Week\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n text = BI.i18nText(\"BI-Basic_Day\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WORK_DAY:\r\n default:\r\n text = BI.i18nText(\"BI-Basic_Work_Day\");\r\n break;\r\n }\r\n return text;\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n v.value = v.value || 0;\r\n v.offset = v.offset || 0;\r\n this.editor.setValue(v.value);\r\n this.offsetCombo.setValue(v.offset);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n dateType: this.options.dateType,\r\n value: this.editor.getValue(),\r\n offset: this.offsetCombo.getValue()[0]\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicDateParamItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_param_item\", BI.DynamicDateParamItem);\r\nBI.DynamicDatePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-popup\",\r\n width: 248,\r\n height: 344\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDatePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n textHeight: c.buttonHeight - 1,\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DateCalendarPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDatePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_popup\", BI.DynamicDatePopup);BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Date_Trigger_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [0, 1, 2];\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n default:\r\n result[2] = idx;\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g);\r\n var newArray = [];\r\n BI.each(dateArray, function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 这边之所以不直接返回join结果是因为年的格式可能只有2位,所以需要format一下\r\n if(newArray.length === result.length && newArray[0].length === 2) {\r\n return BI.print(BI.parseDateTime(newArray.join(\"-\"), c.compareFormat), c.compareFormat);\r\n }\r\n // 这边format成-20-也没关系, 反正都是不合法的\r\n return newArray.join(\"-\");\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, this._getFormatString()), this._const.compareFormat);\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n var dateStr = BI.print(date, this._const.compareFormat);\r\n return (date.getMonth() >= 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_trigger\", BI.DynamicDateTrigger);\r\nBI.DynamicDateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n destroyWhenHide: true,\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.dynamic_date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,\r\n action: function () {\r\n self.combo.toggle();\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: 0,\r\n minute: 0,\r\n second: 0\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateTimeCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n});\r\n\r\nBI.DynamicDateTimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_time_combo\", BI.DynamicDateTimeCombo);\r\n\r\nBI.extend(BI.DynamicDateTimeCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-time-popup\",\r\n width: 248,\r\n height: 385\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n }\r\n },\r\n height: 40\r\n }]\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self.timeSelect.setValue();\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue();\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var type = this.dateTab.getSelect();\r\n return {\r\n type: type,\r\n value: type === BI.DynamicDateTimeCombo.Static ? BI.extend(this.ymd.getValue(), this.timeSelect.getValue()) : this.dynamicPane.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDateTimePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_time_popup\", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-date-time-select\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.hour = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-23\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkHour(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.minute = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMinute(value);\r\n this.setValue(self._formatValueToDoubleDigit(value), BI.DynamicDateTimeSelect.MINUTE);\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.second = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkSecond(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _checkBorder: function (v) {\r\n v = v || {};\r\n this._checkHour(v.hour);\r\n this._checkMinute(v.minute);\r\n this._checkSecond(v.second);\r\n },\r\n\r\n _checkHour: function (value) {\r\n this.hour.setDownEnable(BI.parseInt(value) > 0);\r\n this.hour.setUpEnable(BI.parseInt(value) < 23);\r\n },\r\n\r\n _checkMinute: function (value) {\r\n this.minute.setDownEnable(BI.parseInt(value) > 0);\r\n this.minute.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _checkSecond: function (value) {\r\n this.second.setDownEnable(BI.parseInt(value) > 0);\r\n this.second.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _autoSwitch: function (v, type) {\r\n var limit = 0;\r\n var value = v + \"\";\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n limit = 2;\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n limit = 5;\r\n break;\r\n default:\r\n break;\r\n }\r\n if(value.length === 1 && BI.parseInt(value) > limit) {\r\n value = \"0\" + value;\r\n }\r\n if (value.length === 2) {\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n this.hour.isEditing() && this.minute.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n this.minute.isEditing() && this.second.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.SECOND:\r\n default:\r\n break;\r\n }\r\n }\r\n return value;\r\n },\r\n\r\n _formatValueToDoubleDigit: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyString(v)) {\r\n v = 0;\r\n }\r\n var value = BI.parseInt(v);\r\n if(value < 10) {\r\n value = \"0\" + value;\r\n }\r\n return value;\r\n },\r\n\r\n _assertValue: function (v) {\r\n v = v || {};\r\n v.hour = this._formatValueToDoubleDigit(v.hour) || \"00\";\r\n v.minute = this._formatValueToDoubleDigit(v.minute) || \"00\";\r\n v.second = this._formatValueToDoubleDigit(v.second) || \"00\";\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n hour: BI.parseInt(this.hour.getValue()),\r\n minute: BI.parseInt(this.minute.getValue()),\r\n second: BI.parseInt(this.second.getValue())\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._assertValue(v);\r\n this.hour.setValue(v.hour);\r\n this.minute.setValue(v.minute);\r\n this.second.setValue(v.second);\r\n this._checkBorder(v);\r\n }\r\n\r\n});\r\nBI.DynamicDateTimeSelect.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.dynamic_date_time_select\", BI.DynamicDateTimeSelect);\r\n\r\nBI.extend(BI.DynamicDateTimeSelect, {\r\n HOUR: 1,\r\n MINUTE: 2,\r\n SECOND: 3\r\n});BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d %H:%M:%S\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Basic_Date_Time_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0,\r\n hour: date[3] | 0,\r\n minute: date[4] | 0,\r\n second: date[5] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [];\r\n var hasSecond = false;\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n result[2] = idx;\r\n break;\r\n case \"%S\":\r\n hasSecond = true;\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g) || [];\r\n var newArray = [];\r\n // 处理乱序的年月日\r\n BI.each(dateArray.slice(0, 3), function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 拼接时分秒和pm\r\n var suffixArray = dateArray.slice(3);\r\n // 时分秒补0\r\n BI.each(suffixArray, function (idx, v) {\r\n BI.isNumeric(v) && v.length === 1 && (suffixArray[idx] = \"0\" + v);\r\n });\r\n // hh:mm\r\n if(suffixArray.length === 2 && !hasSecond) {\r\n suffixArray.push(\"00\");\r\n }\r\n var suffixString = suffixArray.join(\":\");\r\n var dateString = newArray.slice(0, 3).join(\"-\");\r\n if (BI.isNotEmptyString(suffixString)) {\r\n dateString += \" \" + suffixString;\r\n }\r\n return dateString;\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date ||\r\n\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, \"%Y-%X-%d\");\r\n var dateStr = BI.print(date, \"%Y-%X-%d\");\r\n return (date.getMonth() > 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTimeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTimeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTimeTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTimeTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_time_trigger\", BI.DynamicDateTimeTrigger);/**\r\n * Created by roy on 15/9/14.\r\n */\r\nBI.SearchEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-search-editor bi-border bi-focus-shadow\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SearchEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n hgap: 1,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"close-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n // 从有内容到无内容的清空也是一次change\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.SearchEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: \"search-font\"\r\n },\r\n width: 24\r\n },\r\n {\r\n el: self.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }\r\n ]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_STOP);\r\n });\r\n\r\n this.clear.invisible();\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n return this.editor.getValue();\r\n }\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.SearchEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SearchEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SearchEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SearchEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SearchEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SearchEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.SearchEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.SearchEditor.EVENT_START = \"EVENT_START\";\r\nBI.SearchEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SearchEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SearchEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SearchEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SearchEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SearchEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SearchEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.SearchEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.search_editor\", BI.SearchEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallSearchEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallSearchEditor = BI.inherit(BI.SearchEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-search-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallSearchEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_search_editor\", BI.SmallSearchEditor);/**\r\n * guy\r\n * @class BI.TextEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-text-editor bi-border bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({height: o.height - 2});\r\n }\r\n if (BI.isNumber(o.width)) {\r\n this.element.css({width: o.width - 2});\r\n }\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height - 2,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n title: o.title,\r\n tipType: o.tipType,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_STOP);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_EMPTY);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.TextEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TextEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.TextEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.TextEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.TextEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.TextEditor.EVENT_START = \"EVENT_START\";\r\nBI.TextEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.TextEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.TextEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TextEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TextEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.TextEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.TextEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.TextEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.text_editor\", BI.TextEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallTextEditor = BI.inherit(BI.TextEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-text-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_editor\", BI.SmallTextEditor);/**\r\n * Created by zcf on 2016/9/26.\r\n */\r\nBI.IntervalSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 58,\r\n EDITOR_R_GAP: 60,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-interval-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n\r\n var self = this;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.calculation = new BI.AccurateCalculationModel();\r\n\r\n // this.backgroundTrack = BI.createWidget({\r\n // type: \"bi.layout\",\r\n // cls: \"background-track\",\r\n // height: c.TRACK_HEIGHT\r\n // });\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.labelOne = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelOne.element.hover(function () {\r\n self.labelOne.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelOne.element.removeClass(\"bi-border\");\r\n });\r\n this.labelOne.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueOne = self.valueOne;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueOne = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 分成1000份\r\n self._setSliderOnePosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(oldValueOne, self.valueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.labelTwo = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelTwo.element.hover(function () {\r\n self.labelTwo.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelTwo.element.removeClass(\"bi-border\");\r\n });\r\n this.labelTwo.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueTwo = self.valueTwo;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueTwo = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderTwoPosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(self.valueOne, oldValueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.sliderOne = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this.sliderTwo = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.sliderOne, true);\r\n this._draggable(this.sliderTwo, false);\r\n this._setVisible(false);\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: 7,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n },\r\n this._createLabelWrapper(),\r\n this._createSliderWrapper()\r\n ]\r\n };\r\n },\r\n\r\n _rePosBySizeAfterMove: function (size, isLeft) {\r\n var o = this.options;\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n var v = this._getValueByPercent(significantPercent);\r\n v = this._assertValue(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n var oldValueOne = this.valueOne, oldValueTwo = this.valueTwo;\r\n if(isLeft) {\r\n this._setSliderOnePosition(significantPercent);\r\n this.labelOne.setValue(v);\r\n this.valueOne = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, v, this.valueTwo);\r\n }else{\r\n this._setSliderTwoPosition(significantPercent);\r\n this.labelTwo.setValue(v);\r\n this.valueTwo = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, this.valueOne, v);\r\n }\r\n this._setBlueTrack();\r\n },\r\n\r\n _rePosBySizeAfterStop: function (size, isLeft) {\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n isLeft ? this._setSliderOnePosition(significantPercent) : this._setSliderTwoPosition(significantPercent);\r\n },\r\n\r\n _draggable: function (widget, isLeft) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n self._rePosBySizeAfterMove(size, isLeft);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n self._rePosBySizeAfterStop(size, isLeft);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createLabelWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n rgap: c.EDITOR_R_GAP,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createSliderWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n // 像90.这样的既不属于整数又不属于小数,是不合法的值\r\n var dotText = (v + \"\").split(\".\")[1];\r\n if (BI.isEmptyString(dotText)) {\r\n }else{\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n // 虽然规定了所填写的小数位数,但是我们认为所有的整数都是满足设置的小数位数的\r\n // 100等价于100.0 100.00 100.000\r\n if(o.digit === false || BI.isInteger(v)) {\r\n valid = true;\r\n }else{\r\n dotText = dotText || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _checkOverlap: function () {\r\n var labelOneLeft = this.labelOne.element[0].offsetLeft;\r\n var labelTwoLeft = this.labelTwo.element[0].offsetLeft;\r\n if (labelOneLeft <= labelTwoLeft) {\r\n if ((labelTwoLeft - labelOneLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n } else {\r\n if ((labelOneLeft - labelTwoLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n }\r\n },\r\n\r\n _checkLabelPosition: function (oldValueOne, oldValueTwo, valueOne, valueTwo, isLeft) {\r\n oldValueOne = BI.parseFloat(oldValueOne);\r\n oldValueTwo = BI.parseFloat(oldValueTwo);\r\n valueOne = BI.parseFloat(valueOne);\r\n valueTwo = BI.parseFloat(valueTwo);\r\n if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {\r\n var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);\r\n this._resetLabelPosition(!isSliderOneLeft);\r\n }\r\n },\r\n\r\n _resetLabelPosition: function(needReverse) {\r\n this.labelOne.element.css({left: needReverse ? \"100%\" : \"0%\"});\r\n this.labelTwo.element.css({left: needReverse ? \"0%\" : \"100%\"});\r\n },\r\n\r\n _setSliderOnePosition: function (percent) {\r\n this.sliderOne.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderTwoPosition: function (percent) {\r\n this.sliderTwo.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackLeft: function (percent) {\r\n this.blueTrack.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackWidth: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrack: function () {\r\n var percentOne = this._getPercentByValue(this.labelOne.getValue());\r\n var percentTwo = this._getPercentByValue(this.labelTwo.getValue());\r\n if (percentOne <= percentTwo) {\r\n this._setBlueTrackLeft(percentOne);\r\n this._setBlueTrackWidth(percentTwo - percentOne);\r\n } else {\r\n this._setBlueTrackLeft(percentTwo);\r\n this._setBlueTrackWidth(percentOne - percentTwo);\r\n }\r\n },\r\n\r\n _setAllPosition: function (one, two) {\r\n this._setSliderOnePosition(one);\r\n this._setSliderTwoPosition(two);\r\n this._setBlueTrack();\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.sliderOne.setVisible(visible);\r\n this.sliderTwo.setVisible(visible);\r\n this.labelOne.setVisible(visible);\r\n this.labelTwo.setVisible(visible);\r\n },\r\n\r\n _setErrorText: function () {\r\n var errorText = BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max);\r\n this.labelOne.setErrorText(errorText);\r\n this.labelTwo.setErrorText(errorText);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n // 其中取max-min后保留4为有效数字后的值的小数位数为最终value的精度\r\n // 端点处的值有可能因为min,max相差量级很大(precision很大)而丢失精度,此时直接返回端点值即可\r\n _getValueByPercent: function (percent) {// return (((max-min)*percent)/100+min)\r\n if (percent === 0) {\r\n return this.min;\r\n }\r\n if (percent === 100) {\r\n return this.max;\r\n }\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var mul = this.calculation.accurateMultiplication(sub, percent);\r\n var div = this.calculation.accurateDivisionTenExponent(mul, 2);\r\n if(this.precision < 0) {\r\n var value = BI.parseFloat(this.calculation.accurateAddition(div, this.min));\r\n var reduceValue = Math.round(this.calculation.accurateDivisionTenExponent(value, -this.precision));\r\n return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));\r\n }\r\n return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));\r\n\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setDraggableEnable: function (enable) {\r\n this.sliderOne.setEnable(enable);\r\n this.sliderTwo.setEnable(enable);\r\n },\r\n\r\n _getPrecision: function () {\r\n // 计算每一份值的精度(最大值和最小值的差值保留4为有效数字后的精度)\r\n // 如果差值的整数位数大于4,toPrecision(4)得到的是科学计数法123456 => 1.235e+5\r\n // 返回非负值: 保留的小数位数\r\n // 返回负值: 保留的10^n精度中的n\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var pre = sub.toPrecision(4);\r\n // 科学计数法\r\n var eIndex = pre.indexOf(\"e\");\r\n var arr = [];\r\n if(eIndex > -1) {\r\n arr = pre.split(\"e\");\r\n var decimalPartLength = BI.size(arr[0].split(\".\")[1]);\r\n var sciencePartLength = BI.parseInt(arr[1].substring(1));\r\n return decimalPartLength - sciencePartLength;\r\n }\r\n arr = pre.split(\".\");\r\n return arr.length > 1 ? arr[1].length : 0;\r\n\r\n },\r\n\r\n _assertValue: function (value) {\r\n if(value <= this.min) {\r\n return this.min;\r\n }\r\n if(value >= this.max) {\r\n return this.max;\r\n }\r\n return value;\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.IntervalSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.valueOne <= this.valueTwo) {\r\n return {min: this.valueOne, max: this.valueTwo};\r\n }\r\n return {min: this.valueTwo, max: this.valueOne};\r\n\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n this.valueOne = minNumber;\r\n this.valueTwo = maxNumber;\r\n this.precision = this._getPrecision();\r\n this._setDraggableEnable(true);\r\n }\r\n if (maxNumber === minNumber) {\r\n this._setDraggableEnable(false);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n var valueOne = BI.parseFloat(v.min);\r\n var valueTwo = BI.parseFloat(v.max);\r\n valueOne = o.digit === false ? valueOne : BI.parseFloat(valueOne.toFixed(o.digit));\r\n valueTwo = o.digit === false ? valueTwo : BI.parseFloat(valueTwo.toFixed(o.digit));\r\n if (!isNaN(valueOne) && !isNaN(valueTwo)) {\r\n if (this._checkValidation(valueOne)) {\r\n this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo);\r\n }\r\n if (this._checkValidation(valueTwo)) {\r\n this.valueTwo = (this.valueOne <= this.valueTwo ? valueTwo : valueOne);\r\n }\r\n if (valueOne < this.min) {\r\n this.valueOne = this.min;\r\n }\r\n if (valueTwo > this.max) {\r\n this.valueTwo = this.max;\r\n }\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.min = NaN;\r\n this.max = NaN;\r\n this._setBlueTrackWidth(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this.enable = true;\r\n this._setVisible(true);\r\n this._setErrorText();\r\n if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {\r\n this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));\r\n this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));\r\n this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));\r\n } else {\r\n this.labelOne.setValue(this.min);\r\n this.labelTwo.setValue(this.max);\r\n this._setAllPosition(0, 100);\r\n }\r\n this._resetLabelPosition(this.valueOne > this.valueTwo);\r\n }\r\n }\r\n});\r\nBI.IntervalSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.interval_slider\", BI.IntervalSlider);/**\r\n * Created by zcf on 2017/3/1.\r\n * 万恶的IEEE-754\r\n * 使用字符串精确计算含小数加法、减法、乘法和10的指数倍除法,支持负数\r\n */\r\nBI.AccurateCalculationModel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AccurateCalculationModel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _getMagnitude: function (n) {\r\n var magnitude = \"1\";\r\n for (var i = 0; i < n; i++) {\r\n magnitude += \"0\";\r\n }\r\n return BI.parseInt(magnitude);\r\n },\r\n\r\n _formatDecimal: function (stringNumber1, stringNumber2) {\r\n if (stringNumber1.numDecimalLength === stringNumber2.numDecimalLength) {\r\n return;\r\n }\r\n var magnitudeDiff = stringNumber1.numDecimalLength - stringNumber2.numDecimalLength;\r\n if (magnitudeDiff > 0) {\r\n var needAddZero = stringNumber2;\r\n } else {\r\n var needAddZero = stringNumber1;\r\n magnitudeDiff = (0 - magnitudeDiff);\r\n }\r\n for (var i = 0; i < magnitudeDiff; i++) {\r\n if (needAddZero.numDecimal === \"0\" && i === 0) {\r\n continue;\r\n }\r\n needAddZero.numDecimal += \"0\";\r\n }\r\n },\r\n\r\n _stringNumberFactory: function (num) {\r\n var strNum = num.toString();\r\n var numStrArray = strNum.split(\".\");\r\n var numInteger = numStrArray[0];\r\n if (numStrArray.length === 1) {\r\n var numDecimal = \"0\";\r\n var numDecimalLength = 0;\r\n } else {\r\n var numDecimal = numStrArray[1];\r\n var numDecimalLength = numStrArray[1].length;\r\n }\r\n return {\r\n numInteger: numInteger,\r\n numDecimal: numDecimal,\r\n numDecimalLength: numDecimalLength\r\n };\r\n },\r\n\r\n _accurateSubtraction: function (num1, num2) {// num1-num2 && num1>num2\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) - BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n var decimalMaxLength = getDecimalMaxLength(stringNumber1, stringNumber2);\r\n\r\n if (BI.parseInt(stringNumber1.numDecimal) >= BI.parseInt(stringNumber2.numDecimal)) {\r\n var decimalResultTemp = (BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n } else {// 否则借位\r\n integerResult--;\r\n var borrow = this._getMagnitude(decimalMaxLength);\r\n var decimalResultTemp = (borrow + BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function getDecimalMaxLength (num1, num2) {\r\n if (num1.numDecimal.length >= num2.numDecimal.length) {\r\n return num1.numDecimal.length;\r\n }\r\n return num2.numDecimal.length;\r\n }\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateAddition: function (num1, num2) {// 加法结合律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) + BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n\r\n var decimalResult = (BI.parseInt(stringNumber1.numDecimal) + BI.parseInt(stringNumber2.numDecimal)).toString();\r\n\r\n if (decimalResult !== \"0\") {\r\n if (decimalResult.length <= stringNumber1.numDecimal.length) {\r\n decimalResult = addZero(decimalResult, stringNumber1.numDecimal.length);\r\n } else {\r\n integerResult++;// 进一\r\n decimalResult = decimalResult.slice(1);\r\n }\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateMultiplication: function (num1, num2) {// 乘法分配律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numInteger);\r\n // num1的小数和num2的整数\r\n var dec1Int2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numInteger), stringNumber1.numDecimalLength);\r\n // num1的整数和num2的小数\r\n var int1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numDecimal), stringNumber2.numDecimalLength);\r\n // 小数*小数\r\n var dec1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numDecimal), (stringNumber1.numDecimalLength + stringNumber2.numDecimalLength));\r\n\r\n return this._accurateAddition(this._accurateAddition(this._accurateAddition(integerResult, dec1Int2), int1dec2), dec1dec2);\r\n },\r\n\r\n _accurateDivisionTenExponent: function (num, n) {// num/10^n && n>0\r\n var stringNumber = this._stringNumberFactory(num);\r\n if (stringNumber.numInteger.length > n) {\r\n var integerResult = stringNumber.numInteger.slice(0, (stringNumber.numInteger.length - n));\r\n var partDecimalResult = stringNumber.numInteger.slice(-n);\r\n } else {\r\n var integerResult = \"0\";\r\n var partDecimalResult = addZero(stringNumber.numInteger, n);\r\n }\r\n var result = integerResult + \".\" + partDecimalResult + stringNumber.numDecimal;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n accurateSubtraction: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(num1, num2);\r\n }\r\n return -this._accurateSubtraction(num2, num1);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this._accurateAddition(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateAddition(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(-num2, -num1);\r\n }\r\n return this._accurateSubtraction(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateAddition: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateAddition(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this.accurateSubtraction(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return this.accurateSubtraction(num2, -num1);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return -this._accurateAddition(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateMultiplication: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateMultiplication(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return -this._accurateMultiplication(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateMultiplication(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return this._accurateMultiplication(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateDivisionTenExponent: function (num1, n) {\r\n if (num1 >= 0) {\r\n return this._accurateDivisionTenExponent(num1, n);\r\n }\r\n return -this._accurateDivisionTenExponent(-num1, n);\r\n }\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.multi_layer_down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls ? o.iconCls : \"pull-down-font\",\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_layer_down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 25,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerDownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n var self = this, o = this.options, children = this._createPopupItems(o.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n var fatherValue = self.fatherValueMap[value];\r\n var fatherArrayValue = (fatherValue + \"\").split(\"_\");\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, fatherArrayValue.length > 1 ? fatherArrayValue : fatherValue);\r\n } else {\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createPopupItems: function (items) {\r\n var self = this, result = [];\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n child = child.el ? BI.extend(child.el, {children: child.children}) : child;\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n if (BI.isNotEmptyArray(child.children)) {\r\n child.type = \"bi.down_list_group_item\";\r\n self._createChildren(child);\r\n child.height = self.constants.height;\r\n child.iconCls2 = self.constants.nextIcon;\r\n item.el.childValues = BI.concat(item.el.childValues, child.childValues);\r\n }\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-border-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _createChildren: function (child) {\r\n var self = this;\r\n child.childValues = [];\r\n BI.each(child.children, function (i, c) {\r\n var fatherValue = BI.deepClone(child.value);\r\n var childValue = BI.deepClone(c.value);\r\n c.type = \"bi.down_list_item\";\r\n c.title = c.title || c.text;\r\n c.textRgap = 10;\r\n c.isNeedAdjustWidth = false;\r\n c.logic = {\r\n dynamic: true\r\n };\r\n c.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n c.value = self._createChildValue(fatherValue, childValue);\r\n child.childValues.push(c.value);\r\n });\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n var fValue = fatherValue;\r\n if(BI.isArray(fatherValue)) {\r\n fValue = fatherValue.join(\"_\");\r\n }\r\n return fValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var self = this, o = this.options;\r\n var value = [];\r\n BI.each(o.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = getChildrenValue(item);\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n\r\n function getChildrenValue (item) {\r\n var children = [];\r\n if(BI.isNotNull(item.children)) {\r\n BI.each(item.children, function (idx, child) {\r\n children = BI.concat(children, getChildrenValue(child));\r\n });\r\n } else {\r\n children.push(item.value);\r\n }\r\n return children;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.MultiLayerDownListPopup.superclass.populate.apply(this, arguments);\r\n var self = this;\r\n self.childValueMap = {};\r\n self.fatherValueMap = {};\r\n self.singleValues = [];\r\n var children = self._createPopupItems(items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n self.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n var fatherArrayValue = (fartherValue + \"\").split(\"_\");\r\n valueItem.value = fatherArrayValue.length > 1 ? fatherArrayValue : fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.MultiLayerDownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.multi_layer_down_list_popup\", BI.MultiLayerDownListPopup);/**\r\n * @class BI.MultiLayerSelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_select_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_select_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-select-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0;\r\n\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multilayer_select_tree_combo\", BI.MultiLayerSelectTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_insert_search_pane\", BI.MultiLayerSelectTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSelectLevelTree\r\n * @extends BI.Pane\r\n */\r\nBI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n value: \"\",\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_select_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n value: o.value,\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(value);\r\n self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSelectLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_select_level_tree\", BI.MultiLayerSelectLevelTree);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_popup\", BI.MultiLayerSelectTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false,\r\n title: BI.bind(this._getShowText, this)\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_select_tree_insert_search_pane\" : \"bi.multilayer_select_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n },\r\n\r\n _getShowText: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_select_tree_trigger\", BI.MultiLayerSelectTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_first_plus_group_node\", BI.MultiLayerSelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_last_plus_group_node\", BI.MultiLayerSelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_mid_plus_group_node\", BI.MultiLayerSelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_plus_group_node\", BI.MultiLayerSelectTreePlusGroupNode);/**\r\n * 多层级下拉单选树\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_single_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_single_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-single-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n watermark: o.watermark,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multilayer_single_tree_combo\", BI.MultiLayerSingleTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-single-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_single_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_insert_search_pane\", BI.MultiLayerSingleTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSingleLevelTree\r\n * @extends BI.Single\r\n */\r\nBI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n chooseType: BI.Selection.Single,\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_single_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_single_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(v);\r\n self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSingleLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_single_level_tree\", BI.MultiLayerSingleLevelTree);\r\n/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-singletree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_single_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_popup\", BI.MultiLayerSingleTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false,\r\n title: BI.bind(this._getShowText, this)\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_single_tree_insert_search_pane\" : \"bi.multilayer_single_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n\r\n },\r\n\r\n _getShowText: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_single_tree_trigger\", BI.MultiLayerSingleTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-first-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_plus_group_node\", BI.MultiLayerSingleTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-last-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_plus_group_node\", BI.MultiLayerSingleTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-mid-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_plus_group_node\", BI.MultiLayerSingleTreeMidPlusGroupNode);/**\r\n *@desc 根节点,既是第一个又是最后一个\r\n *@author dailer\r\n *@date 2018/09/16\r\n */\r\nBI.MultiLayerSingleTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_plus_group_node\", BI.MultiLayerSingleTreePlusGroupNode);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.first_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_tree_leaf_item\", BI.MultiLayerSingleTreeFirstTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.last_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_tree_leaf_item\", BI.MultiLayerSingleTreeLastTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.mid_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_tree_leaf_item\", BI.MultiLayerSingleTreeMidTreeLeafItem);/**\r\n *\r\n * @class BI.MultiSelectCheckPane\r\n * @extends BI.Widget\r\n */\r\nBI.MultiSelectCheckPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 12,\r\n lgap: 10,\r\n tgap: 10,\r\n bgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-pane bi-background\",\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n onClickContinueSelect: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.storeValue = opts.value || {};\r\n this.display = BI.createWidget({\r\n type: \"bi.display_selected_list\",\r\n items: opts.items,\r\n itemsCreator: function (op, callback) {\r\n op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n });\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n callback({\r\n items: BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt\r\n };\r\n })\r\n });\r\n return;\r\n }\r\n opts.itemsCreator(op, callback);\r\n }\r\n });\r\n\r\n this.continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-select-check-selected bi-high-light\"\r\n });\r\n\r\n this.continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n cls: \"multi-select-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap\r\n },\r\n {\r\n el: this.continueSelect,\r\n lgap: this.constants.lgap\r\n }]\r\n },\r\n tgap: this.constants.tgap\r\n }, {\r\n height: \"fill\",\r\n el: this.display,\r\n tgap: this.constants.bgap\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function () {\r\n this.display.populate.apply(this.display, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multi_select_check_pane\", BI.MultiSelectCheckPane);/**\r\n *\r\n *\r\n * 查看已选弹出层的展示面板\r\n * @class BI.DisplaySelectedList\r\n * @extends BI.Widget\r\n */\r\nBI.DisplaySelectedList = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-display-list\",\r\n itemsCreator: BI.emptyFn,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DisplaySelectedList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.list_pane\",\r\n element: this,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n items: this._createItems(opts.items),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n lgap: 10\r\n }]\r\n },\r\n itemsCreator: function (options, callback) {\r\n\r\n opts.itemsCreator(options, function (ob) {\r\n self.hasNext = !!ob.hasNext;\r\n callback(self._createItems(ob.items));\r\n });\r\n },\r\n hasNext: function () {\r\n return self.hasNext;\r\n }\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.icon_text_item\",\r\n cls: \"cursor-default check-font icon-size-12 display-list-item bi-tips\",\r\n once: true,\r\n invalid: true,\r\n selected: true,\r\n height: this.constants.height,\r\n logic: {\r\n dynamic: true\r\n }\r\n });\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n if (arguments.length === 0) {\r\n this.button_group.populate();\r\n } else {\r\n this.button_group.populate(this._createItems(items));\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.display_selected_list\", BI.DisplaySelectedList);/**\r\n *\r\n * @class BI.MultiSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n\r\n this._assertValue(this.storeValue);\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 && self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_combo\", BI.MultiSelectCombo);/**\r\n *\r\n * @class BI.MultiSelectNoBarCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function (op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function () {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest(items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust() {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectNoBarCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectNoBarCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectNoBarCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectNoBarCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_combo\", BI.MultiSelectNoBarCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if(self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n var addedValue = this.getSearcher().getKeyword();\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM, addedValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n container: o.container,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n // value更新的时候assist也需要更新\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiSelectInsertCombo.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_combo\", BI.MultiSelectInsertCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n var addedValue = this.getSearcher().getKeyword();\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM, addedValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_combo\", BI.MultiSelectInsertNoBarCombo);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectInsertTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_insert_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectInsertTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_trigger\", BI.MultiSelectInsertTrigger);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n logic: opts.logic,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n vgap: 5\r\n }, opts.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h - 10);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_loader\", BI.MultiSelectLoader);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectNoBarLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget(BI.extend({\r\n type: \"bi.list_pane\",\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n }, opts.el));\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: this.options.logic,\r\n height: 24,\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue.value);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: this.button_group.getValue()\r\n };\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n resetWidth: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_no_bar_loader\", BI.MultiSelectNoBarLoader);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_popup_view\", BI.MultiSelectPopupView);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_popup_view\", BI.MultiSelectNoBarPopupView);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\n\r\nBI.shortcut(\"bi.multi_select_trigger\", BI.MultiSelectTrigger);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) {\r\n return keyword === btn.getValue();\r\n });\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue;\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_insert_pane\", BI.MultiSelectSearchInsertPane);/**\r\n * 多选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.MultiSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-loader\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = BI.deepClone(opts.value);\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword);\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = BI.deepClone(src.value) || [];\r\n var newValues = BI.map(values, function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: src.type === BI.Selection.All\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = BI.deepClone(v);\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_search_loader\", BI.MultiSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_pane\", BI.MultiSelectSearchPane);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.text_button\",\r\n element: this,\r\n hgap: 4,\r\n text: \"0\",\r\n textAlign: \"center\",\r\n textHeight: 16,\r\n cls: \"bi-high-light-background count-tip\"\r\n });\r\n this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.element.hover(function () {\r\n self.numberCounter.setTag(self.numberCounter.getText());\r\n self.numberCounter.setText(BI.i18nText(\"BI-Check_Selected\"));\r\n }, function () {\r\n self.numberCounter.setText(self.numberCounter.getTag());\r\n });\r\n this.setVisible(false);\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _populate: function (ob) {\r\n var self = this, o = this.options;\r\n if (ob.type === BI.Selection.All) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n var length = res.count - ob.value.length;\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(length);\r\n self.setVisible(length > 0);\r\n });\r\n });\r\n return;\r\n }\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(ob.value.length);\r\n self.setVisible(ob.value.length > 0);\r\n });\r\n },\r\n\r\n _assertValue: function (ob) {\r\n ob || (ob = {});\r\n ob.type || (ob.type = BI.Selection.Multi);\r\n ob.value || (ob.value = []);\r\n return ob;\r\n },\r\n\r\n setValue: function (ob) {\r\n ob = this._assertValue(ob);\r\n this.options.value = ob;\r\n this._populate(ob);\r\n },\r\n\r\n populate: function () {\r\n this._populate(this._assertValue(this.options.value));\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_check_selected_button\", BI.MultiSelectCheckSelectedButton);/**\r\n * 多选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectEditor\r\n * @extends Widget\r\n */\r\nBI.MultiSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-editor\",\r\n el: {},\r\n watermark: BI.i18nText(\"BI-Basic_Search\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_select_editor\", BI.MultiSelectEditor);\r\n/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectInsertSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM);\r\n }\r\n }]\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectInsertSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertSearcher.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_insert_searcher\", BI.MultiSelectInsertSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_searcher\", BI.MultiSelectSearcher);/**\r\n * 查看已选switcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedSwitcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-switcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_check_selected_button\",\r\n itemsCreator: o.itemsCreator,\r\n value: o.value\r\n });\r\n this.button.on(BI.Events.VIEW, function () {\r\n self.fireEvent(BI.Events.VIEW, arguments);\r\n });\r\n this.switcher = BI.createWidget({\r\n type: \"bi.switcher\",\r\n toggle: false,\r\n element: this,\r\n el: this.button,\r\n popup: BI.extend({\r\n type: \"bi.multi_select_check_pane\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n onClickContinueSelect: function () {\r\n self.switcher.hideView();\r\n },\r\n ref: function (_ref) {\r\n self.checkPane = _ref;\r\n },\r\n value: o.value\r\n }, o.popup),\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW, function () {\r\n var me = this;\r\n BI.nextTick(function () {\r\n me.populate();\r\n });\r\n });\r\n },\r\n\r\n adjustView: function () {\r\n this.switcher.adjustView();\r\n },\r\n\r\n hideView: function () {\r\n this.switcher.empty();\r\n this.switcher.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.switcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n },\r\n\r\n // 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数\r\n updateSelectedValue: function (v) {\r\n this.checkPane.setValue(v);\r\n },\r\n\r\n setButtonChecked: function (v) {\r\n this.button.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n populate: function (items) {\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n populateSwitcher: function () {\r\n this.button.populate.apply(this.button, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multi_select_check_selected_switcher\", BI.MultiSelectCheckSelectedSwitcher);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value || {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n self._showAdapter();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: o.value\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_list\", BI.MultiSelectInsertList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_list\", BI.MultiSelectInsertNoBarList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectList = BI.inherit(BI.Widget, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {}\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_list\", BI.MultiSelectList);/**\r\n * Created by zcf_1 on 2017/5/11.\r\n */\r\nBI.MultiSelectTree = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTree.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = {value: {}};\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_tree_popup\",\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE, function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n });\r\n\r\n // 搜索中的时候用的是parttree,同adapter中的synctree不一样\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_tree_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n keywordGetter: function () {\r\n return self.searcher.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.searcher.getKeyword();\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.searcher.getKeyword()\r\n });\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n // self.storeValue = {value: self.adapter.getValue()};\r\n // self.searcherPane.setSelectedValue(self.storeValue.value);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n // self.storeValue = {value: self.searcherPane.getValue()};\r\n // self.adapter.setSelectedValue(self.storeValue.value);\r\n BI.nextTick(function () {\r\n self.adapter.populate();\r\n });\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n self._showAdapter();\r\n // BI-64732 pause 和stop一致, 都应该刷新adapter\r\n BI.nextTick(function () {\r\n self.adapter.populate();\r\n });\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.searcher,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.adapter.setSelectedValue(v);\r\n this.searcherPane.setSelectedValue(v);\r\n this.searcher.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.adapter.setValue(v);\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n updateValue: function (v) {\r\n this.adapter.updateValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue.value;\r\n },\r\n\r\n populate: function () {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n }\r\n});\r\nBI.MultiSelectTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree\", BI.MultiSelectTree);/**\r\n * Created by zcf on 2016/12/21.\r\n */\r\nBI.MultiSelectTreePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectTreePopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.async_tree\",\r\n element: this,\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT);\r\n });\r\n this.popup.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n hasChecked: function () {\r\n return this.popup.hasChecked();\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.popup.setValue(v);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.popup.setSelectedValue(v);\r\n },\r\n\r\n updateValue: function (v) {\r\n this.popup.updateValue(v);\r\n this.popup.refresh();\r\n },\r\n\r\n populate: function (config) {\r\n this.popup.stroke(config);\r\n }\r\n\r\n});\r\nBI.MultiSelectTreePopup.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\nBI.MultiSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree_popup\", BI.MultiSelectTreePopup);/**\r\n *\r\n * @class BI.MultiTreeCheckPane\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreeCheckPane = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-pane bi-background\",\r\n onClickContinueSelect: BI.emptyFn,\r\n el: {\r\n type: \"bi.display_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.selectedValues = {};\r\n\r\n var continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-tree-check-selected\"\r\n });\r\n continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n BI.nextTick(function () {\r\n self.empty();\r\n });\r\n });\r\n\r\n var backToPopup = BI.createWidget({\r\n type: \"bi.left\",\r\n cls: \"multi-tree-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n },\r\n {\r\n el: continueSelect,\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n }]\r\n });\r\n\r\n this.display = BI.createWidget(opts.el, {\r\n type: \"bi.display_tree\",\r\n cls: \"bi-multi-tree-display\",\r\n itemsCreator: function (op, callback) {\r\n op.type = BI.TreeView.REQ_TYPE_GET_SELECTED_DATA;\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: (opts.value || {}).value\r\n });\r\n\r\n this.display.on(BI.Events.AFTERINIT, function () {\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_INIT, function () {\r\n backToPopup.setVisible(false);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n backToPopup.setVisible(true);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: backToPopup\r\n }, {\r\n height: \"fill\",\r\n el: this.display\r\n }]\r\n });\r\n\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function (configs) {\r\n this.display.stroke(configs);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.display.setSelectedValue(v.value);\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK = \"EVENT_CONTINUE_CLICK\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_check_pane\", BI.MultiTreeCheckPane);/**\r\n *\r\n * @class BI.MultiTreeCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n itemsCreator: o.itemsCreator\r\n },\r\n value: {value: o.value || {}}\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n value: {value: o.value || {}}\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_combo\", BI.MultiTreeCombo);/**\r\n * 可以往当前选中节点下添加新值的下拉树\r\n * @class BI.MultiTreeInsertCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeInsertCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeInsertCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n text: o.text,\r\n watermark: o.watermark,\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: \"bi.multi_tree_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value[self.trigger.getSearcher().getKeyword()] = {};\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_insert_combo\", BI.MultiTreeInsertCombo);/**\r\n * 选中节点不影响父子节点状态的下拉树\r\n * @class BI.MultiTreeListCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeListCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-list-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true,\r\n allowInsertValue: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeListCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || []};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n watermark: o.watermark,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_list_tree_searcher\",\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multi_tree_search_insert_pane\" : \"bi.multi_tree_search_pane\",\r\n el: {\r\n type: \"bi.list_part_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value.unshift([self.trigger.getSearcher().getKeyword()]);\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n switcher: {\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\",\r\n el: {\r\n type: \"bi.list_display_tree\"\r\n },\r\n itemsCreator: o.itemsCreator\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n el: {\r\n type: \"bi.list_async_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : []\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self.trigger.stopEditing();\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: []};\r\n }\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || [];\r\n this.combo.setValue({\r\n value: v || []\r\n });\r\n this.numberCounter.setValue({\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeListCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeListCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeListCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeListCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeListCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeListCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_list_combo\", BI.MultiTreeListCombo);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiTreePopup\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-popup\",\r\n maxWidth: \"auto\",\r\n minWidth: 140,\r\n maxHeight: 400,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.async_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options, v = opts.value;\r\n\r\n this.selectedValues = {};\r\n\r\n this.tree = BI.createWidget(opts.el, {\r\n type: \"bi.async_tree\",\r\n height: 400,\r\n cls: \"popup-view-tree\",\r\n itemsCreator: opts.itemsCreator,\r\n onLoaded: opts.onLoaded,\r\n value: v.value || {}\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n element: this,\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.tree\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT);\r\n });\r\n\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.tree.setSelectedValue(v.value);\r\n },\r\n\r\n populate: function (config) {\r\n this.tree.stroke(config);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.tree.hasChecked();\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreePopup.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreePopup.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreePopup.EVENT_AFTERINIT = \"EVENT_AFTERINIT\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_popup_view\", BI.MultiTreePopup);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.indicator = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"check-font trigger-check-selected icon-size-12\",\r\n width: 15,\r\n height: 15,\r\n stopPropagation: true\r\n });\r\n\r\n this.checkSelected = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"trigger-check-selected\",\r\n invisible: true,\r\n hgap: 4,\r\n text: BI.i18nText(\"BI-Check_Selected\"),\r\n textAlign: \"center\",\r\n textHeight: 15\r\n });\r\n this.checkSelected.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.checkSelected.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.horizontal\",\r\n element: this,\r\n items: [this.indicator, this.checkSelected]\r\n });\r\n\r\n this.element.hover(function () {\r\n self.indicator.setVisible(false);\r\n self.checkSelected.setVisible(true);\r\n }, function () {\r\n self.indicator.setVisible(true);\r\n self.checkSelected.setVisible(false);\r\n });\r\n this.setVisible(false);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n var show = BI.size(v.value) > 0;\r\n this.setVisible(show);\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_tree_check_selected_button\", BI.MultiTreeCheckSelectedButton);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchInsertPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-insert-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n el: {\r\n type: \"bi.part_tree\"\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n ref: function (_ref) {\r\n self.addTip = _ref;\r\n },\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n handler: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter());\r\n }\r\n },\r\n top: 5,\r\n left: 0,\r\n right: 0\r\n }, {\r\n el: BI.extend({\r\n type: \"bi.part_tree\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(opts.keywordGetter(), res.items);\r\n });\r\n },\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE);\r\n }\r\n }]\r\n }, opts.el),\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword, nodes) {\r\n var isAddTipVisible = BI.isEmptyArray(nodes);\r\n this.addTip.setVisible(isAddTipVisible);\r\n this.partTree.setVisible(!isAddTipVisible);\r\n isAddTipVisible && this.addTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_insert_pane\", BI.MultiTreeSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchPane = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return BI.extend({\r\n type: \"bi.part_tree\",\r\n element: this,\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n }\r\n }, opts.el);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_pane\", BI.MultiTreeSearchPane);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiListTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiListTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiListTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n height: o.height\r\n }\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (idx, path) {\r\n var childValue = BI.last(path);\r\n text += (o.valueFormatter(childValue + \"\") || childValue) + \"; \";\r\n count++;\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiListTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiListTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiListTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiListTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_list_tree_searcher\", BI.MultiListTreeSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n text: o.text,\r\n height: o.height\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = {});\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (name, children) {\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + \"; \";\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n\r\n function getChildrenNode (ob) {\r\n var text = \"\";\r\n var index = 0, size = BI.size(ob);\r\n BI.each(ob, function (name, children) {\r\n index++;\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + (index === size ? \"\" : \",\");\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n return text;\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_tree_searcher\", BI.MultiTreeSearcher);/**\r\n * Created by windy on 2017/3/13.\r\n * 数值微调器\r\n */\r\nBI.NumberEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-number-editor bi-border bi-focus-shadow\",\r\n validationChecker: function () {\r\n return true;\r\n },\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n value: 0,\r\n allowBlank: false,\r\n errorText: \"\",\r\n step: 1\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NumberEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height - 2,\r\n allowBlank: o.allowBlank,\r\n value: o.valueFormatter(o.value),\r\n validationChecker: o.validationChecker,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_ERROR, function () {\r\n o.value = BI.parseFloat(this.getLastValidValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_VALID, function () {\r\n o.value = BI.parseFloat(this.getValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.topBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n forceNotSelected: true,\r\n trigger: \"lclick,\",\r\n cls: \"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.bottomBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n trigger: \"lclick,\",\r\n forceNotSelected: true,\r\n cls: \"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(-o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n height: o.height - 2,\r\n element: this,\r\n items: [this.editor, {\r\n el: {\r\n type: \"bi.grid\",\r\n columns: 1,\r\n rows: 2,\r\n items: [{\r\n column: 0,\r\n row: 0,\r\n el: this.topBtn\r\n }, {\r\n column: 0,\r\n row: 1,\r\n el: this.bottomBtn\r\n }]\r\n },\r\n width: 23\r\n }]\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n // 微调\r\n _finetuning: function (add) {\r\n var v = BI.parseFloat(this.getValue());\r\n this.setValue(BI.add(v, add));\r\n },\r\n\r\n setUpEnable: function (v) {\r\n this.topBtn.setEnable(!!v);\r\n },\r\n\r\n setDownEnable: function (v) {\r\n this.bottomBtn.setEnable(!!v);\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n o.value = v;\r\n this.editor.setValue(o.valueFormatter(v));\r\n }\r\n\r\n});\r\nBI.NumberEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.number_editor\", BI.NumberEditor);// 小于号的值为:0,小于等于号的值为:1\r\n// closeMIn:最小值的符号,closeMax:最大值的符号\r\n/**\r\n * Created by roy on 15/9/17.\r\n *\r\n */\r\nBI.NumberInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n typeError: \"typeBubble\",\r\n numberError: \"numberBubble\",\r\n signalError: \"signalBubble\",\r\n editorWidth: 114,\r\n columns: 5,\r\n width: 24,\r\n rows: 1,\r\n numberErrorCls: \"number-error\",\r\n border: 1,\r\n less: 0,\r\n less_equal: 1,\r\n numTip: \"\",\r\n adjustYOffset: 2\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-number-interval\" + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n height: 24,\r\n validation: \"valid\",\r\n closeMin: true,\r\n allowBlank: true,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n _init: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n BI.NumberInterval.superclass._init.apply(this, arguments);\r\n this.smallEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.min,\r\n level: \"warning\",\r\n tipType: \"success\",\r\n title: function () {\r\n return self.smallEditor && self.smallEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.smallEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-small-editor bi-border\"\r\n });\r\n\r\n this.smallTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.smallEditor.element,\r\n items: [{\r\n el: this.smallTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n\r\n this.bigEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.max,\r\n title: function () {\r\n return self.bigEditor && self.bigEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.bigEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-big-editor bi-border\"\r\n });\r\n\r\n this.bigTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.bigEditor.element,\r\n items: [{\r\n el: this.bigTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n this.smallCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMin === true) {\r\n this.smallCombo.setValue(1);\r\n } else {\r\n this.smallCombo.setValue(0);\r\n }\r\n this.bigCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMax === true) {\r\n this.bigCombo.setValue(1);\r\n } else {\r\n this.bigCombo.setValue(0);\r\n }\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Basic_Value\"),\r\n textHeight: o.height - c.border * 2,\r\n width: c.width - c.border * 2,\r\n height: o.height - c.border * 2,\r\n level: \"warning\",\r\n tipType: \"warning\"\r\n });\r\n this.left = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.smallEditor\r\n }, {\r\n el: self.smallCombo,\r\n width: c.width - c.border\r\n }]\r\n\r\n });\r\n this.right = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.bigCombo,\r\n width: c.width - c.border\r\n }, {\r\n el: self.bigEditor,\r\n // BI-23883 间距考虑边框\r\n lgap: 1\r\n }]\r\n });\r\n\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: o.height,\r\n items: [\r\n {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: -15,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: -15,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }\r\n ]\r\n });\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.horizontal_auto\",\r\n items: [\r\n self.label\r\n ]\r\n });\r\n\r\n\r\n self._setValidEvent(self.bigEditor, c.bigEditor);\r\n self._setValidEvent(self.smallEditor, c.smallEditor);\r\n self._setErrorEvent(self.bigEditor, c.bigEditor);\r\n self._setErrorEvent(self.smallEditor, c.smallEditor);\r\n self._setBlurEvent(self.bigEditor);\r\n self._setBlurEvent(self.smallEditor);\r\n self._setFocusEvent(self.bigEditor);\r\n self._setFocusEvent(self.smallEditor);\r\n self._setComboValueChangedEvent(self.bigCombo);\r\n self._setComboValueChangedEvent(self.smallCombo);\r\n self._setEditorValueChangedEvent(self.bigEditor);\r\n self._setEditorValueChangedEvent(self.smallEditor);\r\n\r\n self._checkValidation();\r\n },\r\n\r\n _checkValidation: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n self._setTitle(\"\");\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n if (!self.smallEditor.isValid() || !self.bigEditor.isValid()) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.typeError;\r\n }\r\n if (BI.isEmptyString(self.smallEditor.getValue()) || BI.isEmptyString(self.bigEditor.getValue())) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n }\r\n var smallValue = parseFloat(self.smallEditor.getValue()), bigValue = parseFloat(self.bigEditor.getValue()),\r\n bigComboValue = self.bigCombo.getValue(), smallComboValue = self.smallCombo.getValue();\r\n if (bigComboValue[0] === c.less_equal && smallComboValue[0] === c.less_equal) {\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n }\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n } else if (smallValue === bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.signalError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n\r\n\r\n\r\n\r\n },\r\n\r\n _setTitle: function (v) {\r\n this.label.setTitle(v);\r\n },\r\n\r\n _setFocusEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {\r\n self._setTitle(\"\");\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n return;\r\n }\r\n\r\n });\r\n },\r\n _setBlurEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n break;\r\n default:\r\n self._setTitle(\"\");\r\n }\r\n });\r\n },\r\n\r\n _setErrorEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {\r\n self._checkValidation();\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n });\r\n },\r\n\r\n\r\n _setValidEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {\r\n switch (self._checkValidation()) {\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default:\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n\r\n _setEditorValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n break;\r\n }\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n });\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n _setComboValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.IconCombo.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default :\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n isStateValid: function () {\r\n return this.options.validation === \"valid\";\r\n },\r\n\r\n setMinEnable: function (b) {\r\n this.smallEditor.setEnable(b);\r\n },\r\n\r\n setCloseMinEnable: function (b) {\r\n this.smallCombo.setEnable(b);\r\n },\r\n\r\n setMaxEnable: function (b) {\r\n this.bigEditor.setEnable(b);\r\n },\r\n\r\n setCloseMaxEnable: function (b) {\r\n this.bigCombo.setEnable(b);\r\n },\r\n\r\n showNumTip: function () {\r\n this.smallTip.setVisible(true);\r\n this.bigTip.setVisible(true);\r\n },\r\n\r\n hideNumTip: function () {\r\n this.smallTip.setVisible(false);\r\n this.bigTip.setVisible(false);\r\n },\r\n\r\n setNumTip: function (numTip) {\r\n this.smallTip.setText(numTip);\r\n this.bigTip.setText(numTip);\r\n },\r\n\r\n getNumTip: function () {\r\n return this.smallTip.getText();\r\n },\r\n\r\n setValue: function (data) {\r\n data = data || {};\r\n var self = this, combo_value;\r\n if (BI.isNumeric(data.min) || BI.isEmptyString(data.min)) {\r\n self.smallEditor.setValue(data.min);\r\n }\r\n\r\n if (!BI.isNotNull(data.min)) {\r\n self.smallEditor.setValue(\"\");\r\n }\r\n\r\n if (BI.isNumeric(data.max) || BI.isEmptyString(data.max)) {\r\n self.bigEditor.setValue(data.max);\r\n }\r\n\r\n if (!BI.isNotNull(data.max)) {\r\n self.bigEditor.setValue(\"\");\r\n }\r\n\r\n if (!BI.isNull(data.closeMin)) {\r\n if (data.closeMin === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.smallCombo.setValue(combo_value);\r\n }\r\n\r\n if (!BI.isNull(data.closeMax)) {\r\n if (data.closeMax === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.bigCombo.setValue(combo_value);\r\n }\r\n\r\n this._checkValidation();\r\n },\r\n\r\n\r\n getValue: function () {\r\n var self = this, value = {}, minComboValue = self.smallCombo.getValue(), maxComboValue = self.bigCombo.getValue();\r\n value.min = self.smallEditor.getValue();\r\n value.max = self.bigEditor.getValue();\r\n if (minComboValue[0] === 0) {\r\n value.closeMin = false;\r\n } else {\r\n value.closeMin = true;\r\n }\r\n\r\n if (maxComboValue[0] === 0) {\r\n value.closeMax = false;\r\n } else {\r\n value.closeMax = true;\r\n }\r\n return value;\r\n },\r\n\r\n destroyed: function () {\r\n var c = this.constants;\r\n BI.Bubbles.remove(c.typeError);\r\n BI.Bubbles.remove(c.numberError);\r\n BI.Bubbles.remove(c.signalError);\r\n }\r\n});\r\nBI.NumberInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberInterval.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.number_interval\", BI.NumberInterval);BI.NumberIntervalSingleEidtor = BI.inherit(BI.Single, {\r\n props: {\r\n baseCls: \"bi-number-interval-single-editor\",\r\n tipType: \"success\",\r\n title: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.editor\",\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.value,\r\n quitChecker: o.quitChecker,\r\n validationChecker: o.validationChecker,\r\n listeners: [{\r\n eventName: BI.Editor.EVENT_ERROR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n return this.editor.setValue(v);\r\n }\r\n});\r\n\r\nBI.NumberIntervalSingleEidtor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.NumberIntervalSingleEidtor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.number_interval_single_editor\", BI.NumberIntervalSingleEidtor);/**\r\n *\r\n * @class BI.SearchMultiTextValueCombo\r\n * @extends BI.Single\r\n */\r\nBI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo bi-search-multi-text-value-combo\",\r\n height: 24,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self._updateAllValue();\r\n self._checkError();\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.trigger.getCounter().setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = BI.deepClone(o.value || {});\r\n this._updateAllValue();\r\n\r\n this._assertValue(this.storeValue);\r\n this._checkError();\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.search_multi_select_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n allValueGetter: function () {\r\n return self.allValue;\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n self._itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n value: this.storeValue,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self._populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n this.getCounter().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.search_multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: BI.bind(self._itemsCreator, this),\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getCounter().adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n /**\r\n * 在存在标红的情况,如果popover没有发生改变就确认需要同步trigger的值,否则对外value值和trigger样式不统一\r\n */\r\n assertShowValue();\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.trigger.getCounter().hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this._checkError();\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n var o = this.options;\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n BI.remove(val.value, function (idx, value) {\r\n return !BI.contains(BI.map(o.items, \"value\"), value);\r\n });\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n self._updateAllValue();\r\n self._checkError();\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * 100 < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n var items = o.items;\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n items = search.match.concat(search.find);\r\n });\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n items = BI.filter(items, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: items\r\n });\r\n return;\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: items.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(items, options.times),\r\n hasNext: self._hasNextByTimes(items, options.times)\r\n });\r\n },\r\n\r\n _checkError: function () {\r\n var v = this.storeValue.value || [];\r\n if(BI.isNotEmptyArray(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.allValue, function (idx, value) {\r\n return !BI.contains(v, value);\r\n });\r\n if (BI.isNull(result)) {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n } else {\r\n if(v.length === this.allValue.length){\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n }else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n _updateAllValue: function () {\r\n this.storeValue = this.storeValue || {};\r\n this.allValue = BI.deepClone(this.storeValue.value || []);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = BI.deepClone(v || {});\r\n this._updateAllValue();\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this._checkError();\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n _populate: function () {\r\n this._count = null;\r\n this.combo.populate();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._populate();\r\n }\r\n});\r\n\r\nBI.extend(BI.SearchMultiTextValueCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SearchMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.search_multi_text_value_combo\", BI.SearchMultiTextValueCombo);\r\nBI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.search_multi_select_searcher\",\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n allValueGetter: o.allValueGetter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.numberCounter = BI.createWidget(o.switcher, {\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK);\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW);\r\n });\r\n\r\n var wrapNumberCounter = BI.createWidget({\r\n type: \"bi.right_vertical_adapt\",\r\n hgap: 4,\r\n items: [{\r\n el: this.numberCounter\r\n }]\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n wrapper.attr(\"items\")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);\r\n wrapper.resize();\r\n });\r\n });\r\n\r\n this.element.click(function (e) {\r\n if (self.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n },\r\n\r\n getCounter: function () {\r\n return this.numberCounter;\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n this.numberCounter.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n this.numberCounter.setValue(ob);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.searcher.setTipType(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.search_multi_select_trigger\", BI.SearchMultiSelectTrigger);\r\n/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SearchMultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n element: this,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_multi_select_loader\", BI.SearchMultiSelectLoader);BI.SearchMultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.search_multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.search_multi_select_popup_view\", BI.SearchMultiSelectPopupView);BI.SearchMultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (obj) {\r\n var o = this.options;\r\n var ob = {};\r\n ob.type = obj.type;\r\n ob.value = o.allValueGetter() || [];\r\n ob.assist = obj.assist;\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SearchMultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.search_multi_select_searcher\", BI.SearchMultiSelectSearcher);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-first-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_first_plus_group_node\", BI.SelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-last-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_last_plus_group_node\", BI.SelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-mid-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_mid_plus_group_node\", BI.SelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_plus_group_node\", BI.SelectTreePlusGroupNode);/**\r\n * @class BI.SelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.select_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\n\r\nBI.shortcut(\"bi.select_tree_combo\", BI.SelectTreeCombo);/**\r\n * @class BI.SelectTreeExpander\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeExpander = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-expander\",\r\n trigger: \"\",\r\n toggle: true,\r\n direction: \"bottom\",\r\n isDefaultInit: true,\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeExpander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(o.el);\r\n this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.expander.setValue([]);\r\n }\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.expander = BI.createWidget({\r\n type: \"bi.expander\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n el: this.trigger,\r\n popup: o.popup\r\n });\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.trigger.setSelected(false);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.expander.getAllLeaves();\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.contains(v, this.trigger.getValue())) {\r\n this.trigger.setSelected(true);\r\n this.expander.setValue([]);\r\n } else {\r\n this.trigger.setSelected(false);\r\n this.expander.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.trigger.isSelected()) {\r\n return [this.trigger.getValue()];\r\n }\r\n return this.expander.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.expander.populate(items);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_expander\", BI.SelectTreeExpander);/**\r\n * @class BI.SelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SelectTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n node.id = node.id || BI.UUID();\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.select_tree_first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: true\r\n },\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(o.items), 0),\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SelectTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SelectTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(items)));\r\n }\r\n});\r\n\r\nBI.SelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_level_tree\", BI.SelectTreePopup);/**\r\n * 单选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.SingleSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-loader\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 25,\r\n selected: false\r\n });\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = src || [];\r\n var newValues = BI.map(BI.isArray(values) ? values : [values], function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: false\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = v;\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_search_loader\", BI.SingleSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"single-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) {\r\n return keyword === btn.getValue();\r\n });\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue;\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.single_select_search_insert_pane\", BI.SingleSelectSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"single-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.single_select_search_pane\", BI.SingleSelectSearchPane);/**\r\n *\r\n * @class BI.SingleSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n // adapter: this.popup,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_combo\", BI.SingleSelectCombo);\r\n/**\r\n *\r\n * @class BI.SingleSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n // adapter: this.popup,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue,\r\n searcher: {\r\n popup: {\r\n type: \"bi.single_select_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n if (!self.trigger.getSearcher().hasMatched()) {\r\n self.storeValue = self.trigger.getSearcher().getKeyword();\r\n assertShowValue();\r\n self._defaultState();\r\n }\r\n }\r\n }]\r\n }\r\n }\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.storeValue = keyword;\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_insert_combo\", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectComboItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 26\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\nBI.SingleSelectComboItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_combo_item\", BI.SingleSelectComboItem);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SingleSelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SingleSelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.list_pane\"\r\n },\r\n allowNoSelect: false\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar && self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar && self.toolbar.setEnable(items && items.length > 0);\r\n }\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext,\r\n value: o.value\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n forceNotSelected: true,\r\n text: BI.i18nText(\"BI-Basic_No_Select\"),\r\n ref: function (_ref) {\r\n self.toolbar = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.list.setValue();\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n }, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)\r\n }))));\r\n\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue([v]);\r\n },\r\n\r\n getValue: function () {\r\n return this.list.getValue()[0];\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.list.populate.apply(this.list, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.list.resetHeight ? this.list.resetHeight(h) :\r\n this.list.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SingleSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_list\", BI.SingleSelectList);/**\r\n * 单选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SingleSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n allowNoSelect: false,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = opts.value;\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n BI.isNotNull(self.storeValue) && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = BI.map([self.storeValue], function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: true\r\n };\r\n });\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue = startValue);\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: false\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_loader\", BI.SingleSelectLoader);\r\n/**\r\n * 带加载的单选下拉面板\r\n * @class BI.SingleSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.SingleSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-popup-view\",\r\n allowNoSelect: false,\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: opts.allowNoSelect,\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\n\r\nBI.shortcut(\"bi.single_select_popup_view\", BI.SingleSelectPopupView);/**\r\n *\r\n * 单选下拉框\r\n * @class BI.SingleSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-trigger bi-border bi-border-radius\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.single_select_searcher\",\r\n allowNoSelect: o.allowNoSelect,\r\n text: o.text,\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR, arguments);\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SingleSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.SingleSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.single_select_trigger\", BI.SingleSelectTrigger);/**\r\n * @author: Teller\r\n * @createdAt: 2018/3/28\r\n * @Description\r\n*/\r\nBI.SingleSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"popup-single-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.single_select_search_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue();\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue();\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n self.storeValue = keyword;\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 24,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function () {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n if (!this._allData) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertList.REQ_GET_ALL_DATA\r\n }, function (ob) {\r\n self._allData = BI.map(ob.items, \"value\");\r\n digest(self._allData);\r\n });\r\n } else {\r\n digest(this._allData);\r\n }\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Single ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this._allData = null;\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_insert_list\", BI.SingleSelectInsertList);\r\n/**\r\n * 单选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectEditor\r\n * @extends Widget\r\n */\r\nBI.SingleSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-editor\",\r\n el: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.single_select_editor\", BI.SingleSelectEditor);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n allowNoSelect: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.single_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.SingleSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.SingleSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.single_select_search_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n\r\n if(BI.isNotNull(o.value)){\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n if (BI.isNull(v)) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n this.editor.setState(o.valueFormatter(v + \"\") || (v + \"\"));\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SingleSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.single_select_searcher\", BI.SingleSelectSearcher);\r\nBI.SignTextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-initial-editor\",\r\n validationChecker: BI.emptyFn,\r\n text: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignTextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: 4,\r\n vgap: 2,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n allowBlank: false\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: function () {\r\n return self.getValue();\r\n },\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: 4,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n var v = this.editor.getValue();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n this._showHint();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignTextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.shortcut(\"bi.sign_text_editor\", BI.SignTextEditor);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SliderIconButton = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-button\"\r\n },\r\n\r\n constants: {\r\n LARGE_SIZE: 16,\r\n NORMAL_SIZE: 12,\r\n LARGE_OFFSET: 4,\r\n NORMAL_OFFSET: 6\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.wrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"slider-button bi-high-light-border\",\r\n ref: function () {\r\n self.slider = this;\r\n }\r\n }\r\n }]\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.single_slider_button\", BI.SliderIconButton);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SingleSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n // 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: o.unit,\r\n width: c.EDITOR_WIDTH - 2,\r\n allowBlank: false,\r\n textAlign: \"center\",\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.label.element.hover(function () {\r\n self.label.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.label.element.removeClass(\"bi-border\");\r\n });\r\n this.label.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var v = BI.parseFloat(this.getValue());\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n this.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n });\r\n this._setVisible(false);\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n if(o.digit === false) {\r\n valid = true;\r\n }else{\r\n var dotText = (v + \"\").split(\".\")[1] || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n this.label.setErrorText(BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max));\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider\", BI.SingleSlider);/**\r\n * Created by Urthur on 2017/9/12.\r\n */\r\nBI.SingleSliderLabel = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 20,\r\n HEIGHT: 20,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-slider-label bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSliderLabel.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setText(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: c.HEIGHT,\r\n width: c.EDITOR_WIDTH - 2\r\n });\r\n\r\n this._setVisible(false);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 13,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 10,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value + o.unit);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max + o.unit);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderLabel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider_label\", BI.SingleSliderLabel);/**\r\n * normal single slider\r\n * Created by Young on 2017/6/21.\r\n */\r\nBI.SingleSliderNormal = BI.inherit(BI.Single, {\r\n\r\n _constant: {\r\n HEIGHT: 28,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-normal bi-slider-track\",\r\n minMax: {\r\n min: 0,\r\n max: 100\r\n }\r\n // color: \"#3f8ce8\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n var c = this._constant;\r\n var track = this._createTrack();\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 3,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG, v);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrack: function () {\r\n var self = this;\r\n var c = this._constant;\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n if (this.options.color) {\r\n this.blueTrack.element.css({\"background-color\": this.options.color});\r\n }\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }],\r\n ref: function (ref) {\r\n self.track = ref;\r\n }\r\n };\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var value = BI.parseFloat(v);\r\n if ((!isNaN(value))) {\r\n if (this._checkValidation(value)) {\r\n this.value = value;\r\n }\r\n if (value > this.max) {\r\n this.value = this.max;\r\n }\r\n if (value < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderNormal.EVENT_DRAG = \"EVENT_DRAG\";\r\nBI.shortcut(\"bi.single_slider_normal\", BI.SingleSliderNormal);/**\r\n * @class BI.SingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-combo\",\r\n trigger: {},\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(BI.extend({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }, o.trigger));\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.single_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\n\r\nBI.SingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.single_tree_combo\", BI.SingleTreeCombo);/**\r\n * @class BI.SingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SingleTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n \r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n isDefaultInit: true\r\n },\r\n items: o.items,\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.SingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_level_tree\", BI.SingleTreePopup);/**\r\n * @class BI.SingleTreeTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-trigger\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n text: o.text,\r\n items: o.items,\r\n height: o.height,\r\n value: o.value\r\n });\r\n },\r\n\r\n _checkTitle: function () {\r\n var self = this, val = this.getValue();\r\n BI.any(this.options.items, function (i, item) {\r\n if (BI.contains(val, item.value)) {\r\n self.trigger.setTitle(item.text || item.value);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.options.value = v;\r\n this.trigger.setValue(v);\r\n this._checkTitle();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreeTrigger.superclass.populate.apply(this, arguments);\r\n this.trigger.populate(items);\r\n }\r\n\r\n});\r\n\r\nBI.shortcut(\"bi.single_tree_trigger\", BI.SingleTreeTrigger);/**\r\n * @class BI.TextValueDownListCombo\r\n * @extend BI.Widget\r\n */\r\nBI.TextValueDownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-down-list-combo\",\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueDownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this._createValueMap();\r\n\r\n var value;\r\n if(BI.isNotNull(o.value)) {\r\n value = this._digest(o.value);\r\n }\r\n this.trigger = BI.createWidget({\r\n type: \"bi.down_list_select_text_trigger\",\r\n cls: \"text-value-down-list-trigger\",\r\n height: o.height,\r\n items: o.items,\r\n text: o.text,\r\n value: value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.down_list_combo\",\r\n element: this,\r\n chooseType: BI.Selection.Single,\r\n adjustLength: 2,\r\n height: o.height,\r\n el: this.trigger,\r\n value: BI.isNull(value) ? [] : [value],\r\n items: BI.deepClone(o.items)\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].value;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].childValue;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n _createValueMap: function () {\r\n var self = this;\r\n this.valueMap = {};\r\n BI.each(BI.flatten(this.options.items), function (idx, item) {\r\n if (BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n self.valueMap[it.value] = {value: item.el.value, childValue: it.value};\r\n });\r\n } else {\r\n self.valueMap[item.value] = {value: item.value};\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n this.value = v;\r\n return this.valueMap[v];\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._digest(v);\r\n this.combo.setValue([v]);\r\n this.trigger.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.combo.getValue()[0];\r\n return [v.childValue || v.value];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = BI.flatten(items);\r\n this.combo.populate(items);\r\n this._createValueMap();\r\n }\r\n});\r\nBI.TextValueDownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_down_list_combo\", BI.TextValueDownListCombo);/**\r\n * 选择字段trigger, downlist专用\r\n * 显示形式为 父亲值(儿子值)\r\n *\r\n * @class BI.DownListSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-select-text-trigger\",\r\n height: 24,\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n height: o.height,\r\n items: this._formatItemArray(o.items),\r\n text: o.text,\r\n value: BI.isNull(o.value) ? \"\" : o.value.childValue || o.value.value\r\n });\r\n },\r\n\r\n _formatItemArray: function () {\r\n var sourceArray = BI.flatten(BI.deepClone(this.options.items));\r\n var targetArray = [];\r\n BI.each(sourceArray, function (idx, item) {\r\n if(BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n it.text = item.el.text + \"(\" + it.text + \")\";\r\n });\r\n targetArray = BI.concat(targetArray, item.children);\r\n }else{\r\n targetArray.push(item);\r\n }\r\n });\r\n return targetArray;\r\n },\r\n\r\n setValue: function (vals) {\r\n this.trigger.setValue(vals.childValue || vals.value);\r\n },\r\n\r\n populate: function (items) {\r\n this.trigger.populate(this._formatItemArray(items));\r\n }\r\n});\r\nBI.shortcut(\"bi.down_list_select_text_trigger\", BI.DownListSelectTextTrigger);!(function () {\r\n BI.TimePopup = BI.inherit(BI.Widget, {\r\n props: {\r\n baseCls: \"bi-date-time-popup\",\r\n height: 68\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n value: o.value,\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n hgap: 10,\r\n height: 44\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clears\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Now\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (value) {\r\n if (this._checkValueValid(value)) {\r\n this.timeSelect.setValue();\r\n } else {\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.timeSelect.getValue();\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n }\r\n });\r\n BI.TimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_NOW_EVENT_CHANGE = \"BUTTON_NOW_EVENT_CHANGE\";\r\n BI.TimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_popup\", BI.TimePopup);\r\n})();/**\r\n * 时间选择\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 80,\r\n popupWidth: 240,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n props: {\r\n baseCls: \"bi-time-combo bi-border bi-border-radius bi-focus-shadow\",\r\n width: 78,\r\n height: 22,\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = opts.value;\r\n\r\n var popup = {\r\n type: \"bi.time_popup\",\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,\r\n action: function () {\r\n self._setNowTime();\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n };\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.time_trigger\",\r\n height: opts.height,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n value: opts.value,\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n var date = BI.getDate();\r\n self.storeValue = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 22,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button time-font icon-size-16\",\r\n width: 22,\r\n height: 22,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n _setNowTime: function () {\r\n var date = BI.getDate();\r\n var nowTome = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.setValue(nowTome);\r\n this.hidePopupView();\r\n this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n BI.TimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\n BI.TimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.TimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\n BI.TimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n BI.shortcut(\"bi.time_combo\", BI.TimeCombo);\r\n})();!(function () {\r\n BI.TimeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _const: {\r\n COMPARE_FORMAT: \"%H:%M:%S\",\r\n COMPLETE_COMPARE_FORMAT: \"%Y-%M-%d %H:%M:%S %P\",\r\n FORMAT_ARRAY: [\r\n \"%H:%M:%S\", // HH:mm:ss\r\n \"%I:%M:%S\", // hh:mm:ss\r\n \"%l:%M:%S\", // h:mm:ss\r\n \"%k:%M:%S\", // H:mm:ss\r\n \"%l:%M:%S %p\", // h:mm:ss a\r\n \"%l:%M:%S %P\", // h:mm:ss a\r\n \"%H:%M:%S %p\", // HH:mm:ss a\r\n \"%H:%M:%S %P\", // HH:mm:ss a\r\n \"%l:%M\", // h:mm\r\n \"%k:%M\", // H:mm\r\n \"%I:%M\", // hh:mm\r\n \"%H:%M\", // HH:mm\r\n \"%M:%S\" // mm:ss\r\n ],\r\n DEFAULT_DATE_STRING: \"2000-01-01\",\r\n DEFAULT_HOUR: \"00\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-time-trigger\",\r\n value: {},\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = o.value;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return self._dateCheck(v);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n value: this._formatValue(o.value),\r\n hgap: 4,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n title: BI.bind(this._getTitle, this),\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_KEY_DOWN\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_STOP\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var date = value.match(/\\d+/g);\r\n self.storeValue = {\r\n hour: date[0] | 0,\r\n minute: date[1] | 0,\r\n second: date[2] | 0\r\n };\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }, {\r\n eventName: \"EVENT_START\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_START\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.text\",\r\n invisible: o.allowEdit,\r\n cls: \"show-text\",\r\n title: BI.bind(this._getTitle, this),\r\n hgap: 4\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _dateCheck: function (date) {\r\n var c = this._const;\r\n var self = this;\r\n return BI.any(c.FORMAT_ARRAY, function (idx, format) {\r\n return BI.print(BI.parseDateTime(c.DEFAULT_DATE_STRING + \" \" + self._getCompleteHMS(date, format), c.COMPLETE_COMPARE_FORMAT), format) === date;\r\n });\r\n },\r\n\r\n _getCompleteHMS: function (str, format) {\r\n var c = this._const;\r\n switch (format) {\r\n case \"%M:%S\":\r\n str = c.DEFAULT_HOUR + \":\" + str;\r\n break;\r\n default:\r\n break;\r\n }\r\n return str;\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var date = BI.getDate();\r\n return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.COMPARE_FORMAT;\r\n },\r\n\r\n _formatValue: function (v) {\r\n var now = BI.getDate();\r\n return BI.isNotEmptyObject(v) ? BI.print(BI.getDate(now.getFullYear(), now.getMonth(), now.getDay(), v.hour, v.minute, v.second), this._getFormatString()) : \"\";\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.editor.setValue(this._formatValue(v));\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n });\r\n BI.shortcut(\"bi.time_trigger\", BI.TimeTrigger);\r\n})();/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.DateInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DateInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-date-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.DateInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // combo.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.DateInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DateInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DateInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_interval\", BI.DateInterval);/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.TimeInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.TimeInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-time-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.TimeInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_time_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // 不知道干啥的,先注释掉\r\n // combo.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.TimeInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TimeInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TimeInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.time_interval\", BI.TimeInterval);/**\r\n * 时间区间\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimePeriods = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0\r\n },\r\n props: {\r\n extraCls: \"bi-time-interval\",\r\n value: {}\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n height: this.constants.height,\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal_auto\",\r\n items: [{\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.left = _ref;\r\n }\r\n }, this._createCombo(o.value.start)),\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.right = _ref;\r\n }\r\n }, this._createCombo(o.value.end)),\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this;\r\n return {\r\n type: \"bi.time_combo\",\r\n value: v,\r\n listeners: [{\r\n eventName: BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.left.hidePopupView();\r\n self.right.hidePopupView();\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CONFIRM);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n });\r\n BI.TimePeriods.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimePeriods.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_periods\", BI.TimePeriods);\r\n})();/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.item = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0};\r\n this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n },\r\n\r\n getValue: function () {\r\n var value = this.item.getValue();\r\n return {\r\n year: (value.offset === 0 ? -value.value : value.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_card\", BI.DynamicYearCard);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.StaticYearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.StaticYearCard = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-card\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.StaticYearCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: -1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() - 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: 1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() + 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n direction: \"top\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n type: \"bi.htape\",\r\n cls: \"bi-split-top bi-split-bottom\",\r\n height: 30,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.backBtn]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.layout\"\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.preBtn]\r\n },\r\n width: 25\r\n }]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n self.backBtn.setEnable(!calendar.isFrontYear());\r\n self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.StaticYearCard.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.backBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.preBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n obj = obj || {};\r\n var v = obj.year;\r\n if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = BI.parseInt(v);\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(this.selectedYear);\r\n }\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n }\r\n});\r\nBI.StaticYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_card\", BI.StaticYearCard);BI.DynamicYearCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = this.getKey();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM, function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n if (this.getKey() && this.getKey() !== self.storeTriggerValue) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.storeValue);\r\n } else if (!this.getKey()) {\r\n self.storeValue = null;\r\n self.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_combo\", BI.DynamicYearCombo);\r\n\r\nBI.extend(BI.DynamicYearCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n textHeight: c.buttonHeight - 1,\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Year\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Fen\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear()});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_popup\", BI.DynamicYearPopup);BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-year-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24\r\n });\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function (v) {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n allowBlank: true,\r\n errorText: function () {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setValue(value);\r\n }\r\n if (BI.isNotEmptyString(value)) {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: value\r\n }\r\n };\r\n }\r\n\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.text_button\",\r\n baseCls: \"bi-trigger-year-text\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y\");\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.editor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return value.year;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n this.editor.setState(value.year);\r\n this.editor.setValue(value.year);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue() | 0;\r\n }\r\n});\r\nBI.DynamicYearTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicYearTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.shortcut(\"bi.dynamic_year_trigger\", BI.DynamicYearTrigger);/**\r\n * 年月展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.MONTH,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var month = this.month.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n month: (month.offset === 0 ? -month.value : month.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_card\", BI.DynamicYearMonthCard);BI.StaticYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-month-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createMonths: function () {\r\n var self = this;\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td,\r\n ref: function (_ref) {\r\n self.monthMap[j === 0 ? i : i + 6] = _ref;\r\n }\r\n };\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.monthMap = {};\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n min: o.min,\r\n max: o.max,\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMonthStatus(value);\r\n self.setValue({\r\n year: value,\r\n month: self.selectedMonth\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n cls: \"bi-split-top\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n items: this._createMonths(),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedMonth = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this._checkMonthStatus(this.selectedYear);\r\n },\r\n\r\n _checkMonthStatus: function (year) {\r\n var o = this.options;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\"), maxDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n var minYear = minDate.getFullYear(), maxYear = maxDate.getFullYear();\r\n var minMonth = 0; var maxMonth = 11;\r\n minYear === year && (minMonth = minDate.getMonth());\r\n maxYear === year && (maxMonth = maxDate.getMonth());\r\n var yearInvalid = year < minYear || year > maxYear;\r\n BI.each(this.monthMap, function (month, obj) {\r\n var monthInvalid = month < minMonth || month > maxMonth;\r\n obj.setEnable(!yearInvalid && !monthInvalid);\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.yearPicker.setMinDate(minDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.yearPicker.setMaxDate(maxDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n month: this.selectedMonth\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.month = obj.month || 0;\r\n if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedMonth = \"\";\r\n this.yearPicker.setValue(year);\r\n this.month.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedMonth = BI.parseInt(newObj.month);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.month.setValue(this.selectedMonth);\r\n }\r\n }\r\n});\r\nBI.StaticYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_month_card\", BI.StaticYearMonthCard);\r\nBI.DynamicYearMonthCombo = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n minDate: \"1900-01-01\", // 最小日期\r\n maxDate: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_month_trigger\",\r\n min: o.minDate,\r\n max: o.maxDate,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_month_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.minDate,\r\n max: o.maxDate\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearMonthCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_month_combo\", BI.DynamicYearMonthCombo);\r\n\r\nBI.extend(BI.DynamicYearMonthCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年月\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearMonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-month-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearMonthCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Month\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%x\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Month\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_month_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_month_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearMonthCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_popup\", BI.DynamicYearMonthPopup);BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.monthEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.monthEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Month\"),\r\n width: o.height\r\n },\r\n width: o.height}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, v === minDate.getFullYear() ? minDate.getMonth() + 1 : 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n var year = self.yearEditor.getValue();\r\n var month = self.monthEditor.getValue();\r\n if(BI.isNotEmptyString(year) && BI.isNotEmptyString(month)) {\r\n if(BI.isPositiveInteger(year) && month >= 1 && month <= 12 && !BI.checkDateVoid(year, month, 1, o.min, o.max)[0]) {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID);\r\n }\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y-%x\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return this._getStaticTitle(value);\r\n }\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var monthValue = this.monthEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n month: BI.isEmptyString(this.monthEditor.getValue()) ? \"\" : monthValue\r\n }\r\n };\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n this.monthEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.month) && BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.monthEditor.setValue(date.getMonth() + 1);\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.month) || BI.isEmptyString(value.month));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.month;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.month;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n var month = BI.isNull(value.month) ? null : value.month;\r\n this.yearEditor.setValue(value.year);\r\n this.monthEditor.setValue(month);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.monthEditor.getValue();\r\n },\r\n\r\n isValid: function () {\r\n return this.yearEditor.isValid() && this.monthEditor.isValid();\r\n }\r\n});\r\nBI.DynamicYearMonthTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearMonthTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_month_trigger\", BI.DynamicYearMonthTrigger);BI.YearMonthInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 25,\r\n lgap: 15,\r\n offset: -15,\r\n timeErrorCls: \"time-error\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.YearMonthInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_year_month_combo\",\r\n behaviors: o.behaviors,\r\n value: v,\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_VALID, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_FOCUS, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.left.hideView();\r\n self.right.hideView();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x\"), \"%Y-%x\") === date || BI.print(BI.parseDateTime(date, \"%Y-%X\"), \"%Y-%X\") === date;\r\n },\r\n\r\n\r\n // 判是否在最大最小之间\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, 1, o.minDate, o.maxDate)[0];\r\n },\r\n\r\n // 判格式合法\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n\r\n var smallDate4Check = \"\";\r\n if (BI.isNotNull(smallObj)) {\r\n smallDate4Check = (smallObj[0] || \"\") + \"-\" + (smallObj[1] || 1);\r\n }\r\n\r\n var bigDate4Check = \"\";\r\n if (BI.isNotNull(bigObj)) {\r\n bigDate4Check = (bigObj[0] || \"\") + \"-\" + (bigObj[1] || 1);\r\n }\r\n\r\n return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate4Check) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1] || 1,\r\n day: 1\r\n }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate4Check) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1] || 1,\r\n day: 1\r\n });\r\n },\r\n\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X\"), \"%Y-%X\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X\"), \"%Y-%X\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.setTitle(\"\");\r\n },\r\n _checkValid: function () {\r\n var self = this;\r\n\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n\r\n this._checkValid();\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.YearMonthInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.YearMonthInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.YearMonthInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.year_month_interval\", BI.YearMonthInterval);\r\n/**\r\n * 年季度展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.QUARTER,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var quarter = this.quarter.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n quarter: (quarter.offset === 0 ? -quarter.value : quarter.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_card\", BI.DynamicYearQuarterCard);BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-quarter-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createQuarter: function () {\r\n\r\n var items = [{\r\n text: BI.Date._QN[1],\r\n value: 1\r\n }, {\r\n text: BI.Date._QN[2],\r\n value: 2\r\n }, {\r\n text: BI.Date._QN[3],\r\n value: 3\r\n }, {\r\n text: BI.Date._QN[4],\r\n value: 4\r\n }];\r\n return BI.map(items, function (j, item) {\r\n return BI.extend(item, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self.setValue({\r\n year: value,\r\n quarter: self.selectedQuarter\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n items: this._createQuarter(),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n vgap: 10\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedQuarter = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n quarter: this.selectedQuarter\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.quarter = obj.quarter || 0;\r\n if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedQuarter = \"\";\r\n this.yearPicker.setValue(year);\r\n this.quarter.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedQuarter = BI.parseInt(newObj.quarter);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.quarter.setValue(this.selectedQuarter);\r\n }\r\n }\r\n});\r\nBI.StaticYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_quarter_card\", BI.StaticYearQuarterCard);\r\nBI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n self.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_quarter_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_quarter_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: BI.getQuarter(date)}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_combo\", BI.DynamicYearQuarterCombo);\r\n\r\nBI.extend(BI.DynamicYearQuarterCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearQuarterCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Quarter\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicYearQuarterCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%Q\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Quarter\"),\r\n value: BI.DynamicYearQuarterCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearQuarterCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_quarter_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_quarter_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DynamicYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), quarter: BI.getQuarter(date)});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearQuarterCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_popup\", BI.DynamicYearQuarterPopup);BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-quarter-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.quarterEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.quarterEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Quarter\"),\r\n width: 24\r\n },\r\n width: 24}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 4) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n title: \"\",\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var quarterValue = this.quarterEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicYearQuarterCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? \"\" : quarterValue\r\n }\r\n };\r\n this.setTitle(this._getStaticTitle(this.storeValue.value));\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n this.quarterEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.quarter) || BI.isEmptyString(value.quarter));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.quarter;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.quarter;\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.quarter) && BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y-%Q\");\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.quarterEditor.setValue(BI.getQuarter(date));\r\n this.setTitle(BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr));\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicYearQuarterCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n value = value || {};\r\n var quarter = BI.isNull(value.quarter) ? null : value.quarter;\r\n this.yearEditor.setValue(value.year);\r\n this.yearEditor.setTitle(value.year);\r\n this.quarterEditor.setValue(quarter);\r\n this.quarterEditor.setTitle(quarter);\r\n this.setTitle(this._getStaticTitle(value));\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.quarterEditor.getValue();\r\n }\r\n});\r\nBI.DynamicYearQuarterTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearQuarterTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearQuarterTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearQuarterTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_trigger\", BI.DynamicYearQuarterTrigger);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractAllValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractAllValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n // 需要考虑到value也可能是数字\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: resultItems,\r\n hasNext: false\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserCombo\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n text: o.text,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.AllValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_chooser_combo\", BI.AllValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserPane\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserPane = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-pane\",\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.AllValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_value_chooser_pane\", BI.AllValueChooserPane);BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-all-value-multi-text-value-combo\",\r\n width: 200,\r\n height: 24,\r\n items: []\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var value = this._digestValue(o.value);\r\n return {\r\n type: \"bi.search_multi_text_value_combo\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: value,\r\n numOfPage: 100,\r\n valueFormatter: o.valueFormatter,\r\n warningTitle: o.warningTitle,\r\n listeners: [{\r\n eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n ref: function () {\r\n self.combo = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n var value = this._digestValue(v);\r\n this.combo.setValue(value);\r\n },\r\n\r\n getValue: function () {\r\n var obj = this.combo.getValue() || {};\r\n obj.value = obj.value || [];\r\n if(obj.type === BI.Selection.All) {\r\n var values = [];\r\n BI.each(this.options.items, function (idx, item) {\r\n !BI.contains(obj.value, item.value) && values.push(item.value);\r\n });\r\n return values;\r\n }\r\n return obj.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n },\r\n\r\n _digestValue: function (v) {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n }\r\n});\r\nBI.AllValueMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_multi_text_value_combo\", BI.AllValueMultiTextValueCombo);\r\nBI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n open: false\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _initData: function (items) {\r\n this.items = items;\r\n var nodes = BI.Tree.treeFormat(items);\r\n this.tree = new BI.Tree();\r\n this.tree.initTree(nodes);\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self._initData(items);\r\n call();\r\n });\r\n } else {\r\n call();\r\n }\r\n\r\n function call() {\r\n switch (options.type) {\r\n case BI.TreeView.REQ_TYPE_INIT_DATA:\r\n self._reqInitTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_ADJUST_DATA:\r\n self._reqAdjustTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_SELECT_DATA:\r\n self._reqSelectedTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:\r\n self._reqDisplayTreeNode(options, callback);\r\n break;\r\n default :\r\n self._reqTreeNode(options, callback);\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: result\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n BI.each(node.getChildren(), function (i, child) {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(child.value);\r\n var llen = self._getChildCount(newParents);\r\n createOneJson(child, node.id, llen);\r\n doCheck(newParents, child, {});\r\n });\r\n return;\r\n }\r\n BI.each(selected, function (k) {\r\n var node = self._getTreeNode(parentValues, k);\r\n // 找不到就是新增值\r\n if(BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: k,\r\n value: k\r\n }, BI.UUID(), 0);\r\n } else {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(node.value);\r\n createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents));\r\n doCheck(newParents, node, selected[k]);\r\n }\r\n });\r\n }\r\n\r\n function getCount(jo, parentValues) {\r\n if (jo == null) {\r\n return 0;\r\n }\r\n if (BI.isEmpty(jo)) {\r\n return self._getChildCount(parentValues);\r\n }\r\n\r\n return BI.size(jo);\r\n }\r\n\r\n function createOneJson(node, pId, llen) {\r\n result.push({\r\n id: node.id,\r\n pId: pId,\r\n text: node.text + (llen > 0 ? (\"(\" + BI.i18nText(\"BI-Basic_Altogether\") + llen + BI.i18nText(\"BI-Basic_Count\") + \")\") : \"\"),\r\n value: node.value,\r\n open: true\r\n });\r\n }\r\n },\r\n\r\n _reqSelectedTreeNode: function (op, callback) {\r\n var self = this;\r\n var selectedValues = BI.deepClone(op.selectedValues);\r\n var notSelectedValue = op.notSelectedValue || {};\r\n var keyword = op.keyword || \"\";\r\n var parentValues = op.parentValues || [];\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n dealWithSelectedValues(selectedValues);\r\n callback(selectedValues);\r\n\r\n\r\n function dealWithSelectedValues(selectedValues) {\r\n var p = parentValues.concat(notSelectedValue);\r\n // 存储的值中存在这个值就把它删掉\r\n // 例如选中了中国-江苏-南京, 取消中国或江苏或南京\r\n // p长度不大于selectedValues的情况才可能找到,这样可以直接删除selectedValues的节点\r\n if (canFindKey(selectedValues, p)) {\r\n // 如果搜索的值在父亲链中\r\n if (isSearchValueInParent(p)) {\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消江苏(干掉了江苏)\r\n self._deleteNode(selectedValues, p);\r\n } else {\r\n var searched = [];\r\n // 要找到所有以notSelectedValue为叶子节点的链路\r\n var find = search(parentValues, notSelectedValue, [], searched);\r\n if (find && BI.isNotEmptyArray(searched)) {\r\n BI.each(searched, function (i, arr) {\r\n var node = self._getNode(selectedValues, arr);\r\n if (node) {\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消中国(实际上只想删除中国-江苏,因为搜的是江苏)\r\n // 例如选中了 中国-江苏-南京,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)\r\n self._deleteNode(selectedValues, arr);\r\n } else {\r\n // 例如选中了 中国-江苏,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)\r\n expandSelectedValue(selectedValues, arr, BI.last(arr));\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n // 存储的值中不存在这个值,但父亲节点是全选的情况\r\n // 例如选中了中国-江苏,取消南京\r\n // important 选中了中国-江苏,取消了江苏,但是搜索的是南京\r\n if (isChild(selectedValues, p)) {\r\n var result = [], find = false;\r\n // 如果parentValues中有匹配的值,说明搜索结果不在当前值下\r\n if (isSearchValueInParent(p)) {\r\n find = true;\r\n } else {\r\n // 从当前值开始搜\r\n find = search(parentValues, notSelectedValue, result);\r\n p = parentValues;\r\n }\r\n\r\n if (find === true) {\r\n // 去掉点击的节点之后的结果集\r\n expandSelectedValue(selectedValues, p, notSelectedValue);\r\n // 添加去掉搜索的结果集\r\n if (result.length > 0) {\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(selectedValues, strs);\r\n });\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n function expandSelectedValue(selectedValues, parents, notSelectedValue) {\r\n var next = selectedValues;\r\n var childrenCount = [];\r\n var path = [];\r\n // 去掉点击的节点之后的结果集\r\n BI.some(parents, function (i, v) {\r\n var t = next[v];\r\n if (t == null) {\r\n if (i === 0) {\r\n return true;\r\n }\r\n if (BI.isEmpty(next)) {\r\n var split = parents.slice(0, i);\r\n var expanded = self._getChildren(split);\r\n path.push(split);\r\n childrenCount.push(expanded.length);\r\n // 如果只有一个值且取消的就是这个值\r\n if (i === parents.length - 1 && expanded.length === 1 && expanded[0].value === notSelectedValue) {\r\n for (var j = childrenCount.length - 1; j >= 0; j--) {\r\n if (childrenCount[j] === 1) {\r\n self._deleteNode(selectedValues, path[j]);\r\n } else {\r\n break;\r\n }\r\n }\r\n } else {\r\n BI.each(expanded, function (m, child) {\r\n if (i === parents.length - 1 && child.value === notSelectedValue) {\r\n return true;\r\n }\r\n next[child.value] = {};\r\n });\r\n }\r\n next = next[v];\r\n } else {\r\n return true;\r\n // next = {};\r\n // next[v] = {};\r\n }\r\n } else {\r\n next = t;\r\n }\r\n });\r\n }\r\n\r\n function search(parents, current, result, searched) {\r\n var newParents = BI.clone(parents);\r\n newParents.push(current);\r\n if (self._isMatch(parents, current, keyword)) {\r\n searched && searched.push(newParents);\r\n return true;\r\n }\r\n\r\n var children = self._getChildren(newParents);\r\n\r\n var notSearch = [];\r\n var can = false;\r\n\r\n BI.each(children, function (i, child) {\r\n if (search(newParents, child.value, result, searched)) {\r\n can = true;\r\n } else {\r\n notSearch.push(child.value);\r\n }\r\n });\r\n if (can === true) {\r\n BI.each(notSearch, function (i, v) {\r\n var next = BI.clone(newParents);\r\n next.push(v);\r\n result.push(next);\r\n });\r\n }\r\n return can;\r\n }\r\n\r\n function isSearchValueInParent(parentValues) {\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (self._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function canFindKey(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n t = t[v];\r\n if (t == null) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n function isChild(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n if (!BI.has(t, v)) {\r\n return false;\r\n }\r\n t = t[v];\r\n if (BI.isEmpty(t)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n\r\n _reqAdjustTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n BI.each(selectedValues, function (k, v) {\r\n result.push([k]);\r\n });\r\n\r\n dealWithSelectedValues(selectedValues, []);\r\n\r\n var jo = {};\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(jo, strs);\r\n });\r\n callback(jo);\r\n\r\n function dealWithSelectedValues(selected, parents) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n return true;\r\n }\r\n var can = true;\r\n BI.each(selected, function (k, v) {\r\n var p = BI.clone(parents);\r\n p.push(k);\r\n if (!dealWithSelectedValues(selected[k], p)) {\r\n BI.each(selected[k], function (nk, nv) {\r\n var t = BI.clone(p);\r\n t.push(nk);\r\n result.push(t);\r\n });\r\n can = false;\r\n }\r\n });\r\n return can && isAllSelected(selected, parents);\r\n }\r\n\r\n function isAllSelected(selected, parents) {\r\n return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, isAllSelect, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isAllSelect || isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n var isCurAllSelected = isAllSelect || isAllSelected(parentValues, current);\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, isCurAllSelected, result);\r\n // 当前节点的子节点是否选中,并不确定全选还是半选\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n // 当前节点的子节点要不要加入到结果集中\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n // 子节点匹配, 补充父节点\r\n if (can === true) {\r\n checked = isCurAllSelected || (isSelected(parentValues, current) && checked);\r\n createOneJson(parentValues, current, true, checked, false, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: half,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return false;\r\n }\r\n return BI.any(find, function (v) {\r\n if (v === value) {\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var checkState = op.checkState || {};\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || {};\r\n var valueMap = {};\r\n // if (judgeState(parentValues, selectedValues, checkState)) {\r\n valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n // }\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var state = getCheckState(nodes[i].value, parentValues, valueMap, checkState);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);\r\n // REPORT-24409 fix: 设置节点全部展开,添加的节点没有给状态\r\n var parentCheckState = {};\r\n var find = BI.find(result, function (idx, pNode) {\r\n return pNode.id === node.pId;\r\n });\r\n if (find) {\r\n parentCheckState.checked = find.halfCheck ? false : find.checked;\r\n parentCheckState.half = find.halfCheck;\r\n }\r\n var state = getCheckState(node.value, node.parentValues, valueMap, parentCheckState);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: self.options.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function judgeState(parentValues, selected_value, checkState) {\r\n var checked = checkState.checked, half = checkState.half;\r\n if (parentValues.length > 0 && !checked) {\r\n return false;\r\n }\r\n return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));\r\n }\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(parentValues, function (i, v) {\r\n selectedValues = selectedValues[v] || {};\r\n });\r\n BI.each(selectedValues, function (value, obj) {\r\n if (BI.isNull(obj)) {\r\n valueMap[value] = [0, 0];\r\n return;\r\n }\r\n if (BI.isEmpty(obj)) {\r\n valueMap[value] = [2, 0];\r\n return;\r\n }\r\n var nextNames = {};\r\n BI.each(obj, function (t, o) {\r\n if (BI.isNull(o) || BI.isEmpty(o)) {\r\n nextNames[t] = true;\r\n }\r\n });\r\n // valueMap的数组第一个参数为不选: 0, 半选: 1, 全选:2, 第二个参数为改节点下选中的子节点个数(子节点全选或者不存在)\r\n valueMap[value] = [1, BI.size(nextNames)];\r\n });\r\n return valueMap;\r\n }\r\n\r\n function getCheckState(current, parentValues, valueMap, checkState) {\r\n // 节点本身的checked和half优先级最高\r\n var checked = checkState.checked, half = checkState.half;\r\n var tempCheck = false, halfCheck = false;\r\n if (BI.has(valueMap, current)) {\r\n // 可能是半选\r\n if (valueMap[current][0] === 1) {\r\n var values = BI.clone(parentValues);\r\n values.push(current);\r\n var childCount = self._getChildCount(values);\r\n if (childCount > 0 && childCount !== valueMap[current][1]) {\r\n halfCheck = true;\r\n }\r\n } else if (valueMap[current][0] === 2) {\r\n tempCheck = true;\r\n }\r\n }\r\n var check;\r\n // 展开的节点checked为false 且没有明确得出当前子节点是半选或者全选, 则check状态取决于valueMap\r\n if (!checked && !halfCheck && !tempCheck) {\r\n check = BI.has(valueMap, current);\r\n } else {\r\n // 不是上面那种情况就先看在节点没有带有明确半选的时候,通过节点自身的checked和valueMap的状态能都得到选中信息\r\n check = ((tempCheck || checked) && !half) || BI.has(valueMap, current);\r\n }\r\n return [check, halfCheck];\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n return BI.map(BI.difference(BI.keys(selectedValues), BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n },\r\n\r\n _getNode: function (selectedValues, parentValues) {\r\n var pNode = selectedValues;\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (pNode == null) {\r\n return null;\r\n }\r\n pNode = pNode[parentValues[i]];\r\n }\r\n return pNode;\r\n },\r\n\r\n _deleteNode: function (selectedValues, values) {\r\n var name = values[values.length - 1];\r\n var p = values.slice(0, values.length - 1);\r\n var pNode = this._getNode(selectedValues, p);\r\n if (pNode != null && pNode[name]) {\r\n delete pNode[name];\r\n // 递归删掉空父节点\r\n while (p.length > 0 && BI.isEmpty(pNode)) {\r\n name = p[p.length - 1];\r\n p = p.slice(0, p.length - 1);\r\n pNode = this._getNode(selectedValues, p);\r\n if (pNode != null) {\r\n delete pNode[name];\r\n }\r\n }\r\n }\r\n },\r\n\r\n _buildTree: function (jo, values) {\r\n var t = jo;\r\n BI.each(values, function (i, v) {\r\n if (!BI.has(t, v)) {\r\n t[v] = {};\r\n }\r\n t = t[v];\r\n });\r\n },\r\n\r\n _isMatch: function (parentValues, value, keyword) {\r\n var o = this.options;\r\n var node = this._getTreeNode(parentValues, value);\r\n if (!node) {\r\n return false;\r\n }\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n if(o.allowSearchValue && node.value) {\r\n var valueFind = BI.Func.getSearchResult([node.value], keyword);\r\n return valueFind.find.length > 0 || valueFind.match.length > 0 ||\r\n find.find.length > 0 || find.match.length > 0;\r\n }\r\n return find.find.length > 0 || find.match.length > 0;\r\n },\r\n\r\n _getTreeNode: function (parentValues, v) {\r\n var self = this;\r\n var findParentNode;\r\n var index = 0;\r\n this.tree.traverse(function (node) {\r\n if (self.tree.isRoot(node)) {\r\n return;\r\n }\r\n if (index > parentValues.length) {\r\n return false;\r\n }\r\n if (index === parentValues.length && node.value === v) {\r\n findParentNode = node;\r\n return false;\r\n }\r\n if (node.value === parentValues[index]) {\r\n index++;\r\n return;\r\n }\r\n return true;\r\n });\r\n return findParentNode;\r\n },\r\n\r\n _getChildren: function (parentValues) {\r\n if (parentValues.length > 0) {\r\n var value = BI.last(parentValues);\r\n var parent = this._getTreeNode(parentValues.slice(0, parentValues.length - 1), value);\r\n } else {\r\n var parent = this.tree.getRoot();\r\n }\r\n return parent.getChildren();\r\n },\r\n\r\n _getAllChildren: function(parentValues) {\r\n var children = this._getChildren(parentValues);\r\n var nodes = [].concat(children);\r\n BI.each(nodes, function (idx, node) {\r\n node.parentValues = parentValues;\r\n });\r\n var queue = BI.map(children, function (idx, node) {\r\n return {\r\n parentValues: parentValues,\r\n value: node.value\r\n };\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.shift();\r\n var pValues = (node.parentValues).concat(node.value);\r\n var childNodes = this._getChildren(pValues);\r\n BI.each(childNodes, function (idx, node) {\r\n node.parentValues = pValues;\r\n });\r\n queue = queue.concat(childNodes);\r\n nodes = nodes.concat(childNodes);\r\n }\r\n return nodes;\r\n },\r\n\r\n _getChildCount: function (parentValues) {\r\n return this._getChildren(parentValues).length;\r\n }\r\n});BI.AbstractListTreeValueChooser = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = {};\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: BI.values(result)\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n BI.each(selected, function (idx, path) {\r\n BI.each(path, function (id, value) {\r\n var nodeValue = value;\r\n var node = self._getTreeNode(path.slice(0, id), nodeValue);\r\n // 找不到就是新增值\r\n if (BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: nodeValue,\r\n value: nodeValue,\r\n isLeaf: true\r\n }, BI.UUID());\r\n } else {\r\n if(!BI.has(result, node.id)) {\r\n createOneJson(node, node.parent && node.parent.id);\r\n }\r\n result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n function createOneJson(node, pId) {\r\n result[node.id] = {\r\n id: node.id,\r\n pId: pId,\r\n text: node.text,\r\n value: node.value,\r\n open: true,\r\n isLeaf: node.isLeaf\r\n };\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, result);\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n if (can === true) {\r\n checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, true, checked, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: false,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n return BI.any(selectedValues, function (idx, array) {\r\n return BI.isEqual(parentValues, array.slice(0, parentValues.length)) && BI.last(array) === value;\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || [];\r\n var valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var checked = BI.has(valueMap, nodes[i].value);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);\r\n var checked = BI.has(valueMap, node.value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(selectedValues, function (idx, v) {\r\n if (BI.isEqual(parentValues, v.slice(0, parentValues.length))) {\r\n valueMap[BI.last(v)] = [2, 0];\r\n }\r\n });\r\n return valueMap;\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n var values = BI.flatten(BI.filter(selectedValues, function (idx, array) {\r\n return array.length === 1;\r\n }));\r\n return BI.map(BI.difference(values, BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n }\r\n});/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ListTreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ListTreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_list_combo\",\r\n element: this,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n allowInsertValue: o.allowInsertValue,\r\n allowEdit: o.allowEdit,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeListCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.ListTreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.list_tree_value_chooser_insert_combo\", BI.ListTreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_insert_combo\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeInsertCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.tree_value_chooser_insert_combo\", BI.TreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_combo\",\r\n text: o.text,\r\n allowEdit: o.allowEdit,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.TreeValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TreeValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.tree_value_chooser_combo\", BI.TreeValueChooserCombo);/**\r\n * 简单的树面板, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserPane\r\n * @extends BI.AbstractTreeValueChooser\r\n */\r\nBI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.pane = BI.createWidget({\r\n type: \"bi.multi_select_tree\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this)\r\n });\r\n\r\n this.pane.on(BI.MultiSelectTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n this.populate();\r\n }\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.pane.setSelectedValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pane.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.pane.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.pane.populate.apply(this.pane, arguments);\r\n }\r\n});\r\nBI.TreeValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.tree_value_chooser_pane\", BI.TreeValueChooserPane);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * this._const.perPage < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(resultItems, options.times),\r\n hasNext: self._hasNextByTimes(resultItems, options.times)\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n */\r\nBI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_insert_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_insert_combo\", BI.ValueChooserInsertCombo);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_combo\", BI.ValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserPane\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this)\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n this.list.populate();\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n items && (this.items = items);\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.ValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.value_chooser_pane\", BI.ValueChooserPane);(function () {\r\n var Events = {\r\n\r\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\r\n // the callback to all events fired.\r\n on: function (name, callback, context) {\r\n if (!eventsApi(this, \"on\", name, [callback, context]) || !callback) return this;\r\n this._events || (this._events = {});\r\n var events = this._events[name] || (this._events[name] = []);\r\n events.push({callback: callback, context: context, ctx: context || this});\r\n return this;\r\n },\r\n\r\n // Bind an event to only be triggered a single time. After the first time\r\n // the callback is invoked, it will be removed.\r\n once: function (name, callback, context) {\r\n if (!eventsApi(this, \"once\", name, [callback, context]) || !callback) return this;\r\n var self = this;\r\n var once = _.once(function () {\r\n self.off(name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.on(name, once, context);\r\n },\r\n\r\n // Remove one or many callbacks. If `context` is null, removes all\r\n // callbacks with that function. If `callback` is null, removes all\r\n // callbacks for the event. If `name` is null, removes all bound\r\n // callbacks for all events.\r\n off: function (name, callback, context) {\r\n if (!this._events || !eventsApi(this, \"off\", name, [callback, context])) return this;\r\n\r\n // Remove all callbacks for all events.\r\n if (!name && !callback && !context) {\r\n this._events = void 0;\r\n return this;\r\n }\r\n\r\n var names = name ? [name] : _.keys(this._events);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n name = names[i];\r\n\r\n // Bail out if there are no events stored.\r\n var events = this._events[name];\r\n if (!events) continue;\r\n\r\n // Remove all callbacks for this event.\r\n if (!callback && !context) {\r\n delete this._events[name];\r\n continue;\r\n }\r\n\r\n // Find any remaining events.\r\n var remaining = [];\r\n for (var j = 0, k = events.length; j < k; j++) {\r\n var event = events[j];\r\n if (\r\n callback && callback !== event.callback &&\r\n callback !== event.callback._callback ||\r\n context && context !== event.context\r\n ) {\r\n remaining.push(event);\r\n }\r\n }\r\n\r\n // Replace events if there are any remaining. Otherwise, clean up.\r\n if (remaining.length) {\r\n this._events[name] = remaining;\r\n } else {\r\n delete this._events[name];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n un: function () {\r\n this.off.apply(this, arguments);\r\n },\r\n\r\n // Trigger one or many events, firing all bound callbacks. Callbacks are\r\n // passed the same arguments as `trigger` is, apart from the event name\r\n // (unless you're listening on `\"all\"`, which will cause your callback to\r\n // receive the true name of the event as the first argument).\r\n trigger: function (name) {\r\n if (!this._events) return this;\r\n var args = slice.call(arguments, 1);\r\n if (!eventsApi(this, \"trigger\", name, args)) return this;\r\n var events = this._events[name];\r\n var allEvents = this._events.all;\r\n if (events) triggerEvents(events, args);\r\n if (allEvents) triggerEvents(allEvents, arguments);\r\n return this;\r\n },\r\n\r\n fireEvent: function () {\r\n this.trigger.apply(this, arguments);\r\n },\r\n\r\n // Inversion-of-control versions of `on` and `once`. Tell *this* object to\r\n // listen to an event in another object ... keeping track of what it's\r\n // listening to.\r\n listenTo: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo || (this._listeningTo = {});\r\n var id = obj._listenId || (obj._listenId = _.uniqueId(\"l\"));\r\n listeningTo[id] = obj;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n obj.on(name, callback, this);\r\n return this;\r\n },\r\n\r\n listenToOnce: function (obj, name, callback) {\r\n if (typeof name === \"object\") {\r\n for (var event in name) this.listenToOnce(obj, event, name[event]);\r\n return this;\r\n }\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n this.listenToOnce(obj, names[i], callback);\r\n }\r\n return this;\r\n }\r\n if (!callback) return this;\r\n var once = _.once(function () {\r\n this.stopListening(obj, name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.listenTo(obj, name, once);\r\n },\r\n\r\n // Tell this object to stop listening to either specific events ... or\r\n // to every object it's currently listening to.\r\n stopListening: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo;\r\n if (!listeningTo) return this;\r\n var remove = !name && !callback;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n if (obj) (listeningTo = {})[obj._listenId] = obj;\r\n for (var id in listeningTo) {\r\n obj = listeningTo[id];\r\n obj.off(name, callback, this);\r\n if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];\r\n }\r\n return this;\r\n }\r\n\r\n };\r\n\r\n // Regular expression used to split event strings.\r\n var eventSplitter = /\\s+/;\r\n\r\n // Implement fancy features of the Events API such as multiple event\r\n // names `\"change blur\"` and jQuery-style event maps `{change: action}`\r\n // in terms of the existing API.\r\n var eventsApi = function (obj, action, name, rest) {\r\n if (!name) return true;\r\n\r\n // Handle event maps.\r\n if (typeof name === \"object\") {\r\n for (var key in name) {\r\n obj[action].apply(obj, [key, name[key]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n // Handle space separated event names.\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n obj[action].apply(obj, [names[i]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n // A difficult-to-believe, but optimized internal dispatch function for\r\n // triggering events. Tries to keep the usual cases speedy (most internal\r\n // BI events have 3 arguments).\r\n var triggerEvents = function (events, args) {\r\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\r\n switch (args.length) {\r\n case 0:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx);\r\n return;\r\n case 1:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);\r\n return;\r\n case 2:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);\r\n return;\r\n case 3:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);\r\n return;\r\n default:\r\n while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\r\n return;\r\n }\r\n };\r\n\r\n // BI.Router\r\n // ---------------\r\n\r\n // Routers map faux-URLs to actions, and fire events when routes are\r\n // matched. Creating a new one sets its `routes` hash, if not set statically.\r\n var Router = BI.Router = function (options) {\r\n options || (options = {});\r\n if (options.routes) this.routes = options.routes;\r\n this._bindRoutes();\r\n this._init.apply(this, arguments);\r\n };\r\n\r\n // Cached regular expressions for matching named param parts and splatted\r\n // parts of route strings.\r\n var optionalParam = /\\((.*?)\\)/g;\r\n var namedParam = /(\\(\\?)?:\\w+/g;\r\n var splatParam = /\\*\\w+/g;\r\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\r\n\r\n // Set up all inheritable **BI.Router** properties and methods.\r\n _.extend(Router.prototype, Events, {\r\n\r\n // _init is an empty function by default. Override it with your own\r\n // initialization logic.\r\n _init: function () {\r\n },\r\n\r\n // Manually bind a single named route to a callback. For example:\r\n //\r\n // this.route('search/:query/p:num', 'search', function(query, num) {\r\n // ...\r\n // });\r\n //\r\n route: function (route, name, callback) {\r\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\r\n if (_.isFunction(name)) {\r\n callback = name;\r\n name = \"\";\r\n }\r\n if (!callback) callback = this[name];\r\n var router = this;\r\n BI.history.route(route, function (fragment) {\r\n var args = router._extractParameters(route, fragment);\r\n if (router.execute(callback, args, name) !== false) {\r\n router.trigger.apply(router, [\"route:\" + name].concat(args));\r\n router.trigger(\"route\", name, args);\r\n BI.history.trigger(\"route\", router, name, args);\r\n }\r\n });\r\n return this;\r\n },\r\n\r\n // Execute a route handler with the provided parameters. This is an\r\n // excellent place to do pre-route setup or post-route cleanup.\r\n execute: function (callback, args, name) {\r\n if (callback) callback.apply(this, args);\r\n },\r\n\r\n // Simple proxy to `BI.history` to save a fragment into the history.\r\n navigate: function (fragment, options) {\r\n BI.history.navigate(fragment, options);\r\n return this;\r\n },\r\n\r\n // Bind all defined routes to `BI.history`. We have to reverse the\r\n // order of the routes here to support behavior where the most general\r\n // routes can be defined at the bottom of the route map.\r\n _bindRoutes: function () {\r\n if (!this.routes) return;\r\n this.routes = _.result(this, \"routes\");\r\n var route, routes = _.keys(this.routes);\r\n while ((route = routes.pop()) != null) {\r\n this.route(route, this.routes[route]);\r\n }\r\n },\r\n\r\n // Convert a route string into a regular expression, suitable for matching\r\n // against the current location hash.\r\n _routeToRegExp: function (route) {\r\n route = route.replace(escapeRegExp, \"\\\\$&\")\r\n .replace(optionalParam, \"(?:$1)?\")\r\n .replace(namedParam, function (match, optional) {\r\n return optional ? match : \"([^/?]+)\";\r\n })\r\n .replace(splatParam, \"([^?]*?)\");\r\n return new RegExp(\"^\" + route + \"(?:\\\\?([\\\\s\\\\S]*))?$\");\r\n },\r\n\r\n // Given a route, and a URL fragment that it matches, return the array of\r\n // extracted decoded parameters. Empty or unmatched parameters will be\r\n // treated as `null` to normalize cross-browser behavior.\r\n _extractParameters: function (route, fragment) {\r\n var params = route.exec(fragment).slice(1);\r\n return _.map(params, function (param, i) {\r\n // Don't decode the search params.\r\n if (i === params.length - 1) return param || null;\r\n return param ? decodeURIComponent(param) : null;\r\n });\r\n }\r\n\r\n });\r\n\r\n // History\r\n // ----------------\r\n\r\n // Handles cross-browser history management, based on either\r\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\r\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\r\n // and URL fragments. If the browser supports neither (old IE, natch),\r\n // falls back to polling.\r\n var History = function () {\r\n this.handlers = [];\r\n this.checkUrl = _.bind(this.checkUrl, this);\r\n\r\n // Ensure that `History` can be used outside of the browser.\r\n if (typeof window !== \"undefined\") {\r\n this.location = _global.location;\r\n this.history = _global.history;\r\n }\r\n };\r\n\r\n // Cached regex for stripping a leading hash/slash and trailing space.\r\n var routeStripper = /^[#\\/]|\\s+$/g;\r\n\r\n // Cached regex for stripping leading and trailing slashes.\r\n var rootStripper = /^\\/+|\\/+$/g;\r\n\r\n // Cached regex for stripping urls of hash.\r\n var pathStripper = /#.*$/;\r\n\r\n // Has the history handling already been started?\r\n History.started = false;\r\n\r\n // Set up all inheritable **BI.History** properties and methods.\r\n _.extend(History.prototype, Events, {\r\n\r\n // The default interval to poll for hash changes, if necessary, is\r\n // twenty times a second.\r\n interval: 50,\r\n\r\n // Are we at the app root?\r\n atRoot: function () {\r\n var path = this.location.pathname.replace(/[^\\/]$/, \"$&/\");\r\n return path === this.root && !this.getSearch();\r\n },\r\n\r\n // In IE6, the hash fragment and search params are incorrect if the\r\n // fragment contains `?`.\r\n getSearch: function () {\r\n var match = this.location.href.replace(/#.*/, \"\").match(/\\?.+/);\r\n return match ? match[0] : \"\";\r\n },\r\n\r\n // Gets the true hash value. Cannot use location.hash directly due to bug\r\n // in Firefox where location.hash will always be decoded.\r\n getHash: function (window) {\r\n var match = (window || this).location.href.match(/#(.*)$/);\r\n return match ? match[1] : \"\";\r\n },\r\n\r\n // Get the pathname and search params, without the root.\r\n getPath: function () {\r\n var path = decodeURI(this.location.pathname + this.getSearch());\r\n var root = this.root.slice(0, -1);\r\n if (!path.indexOf(root)) path = path.slice(root.length);\r\n return path.charAt(0) === \"/\" ? path.slice(1) : path;\r\n },\r\n\r\n // Get the cross-browser normalized URL fragment from the path or hash.\r\n getFragment: function (fragment) {\r\n if (fragment == null) {\r\n if (this._hasPushState || !this._wantsHashChange) {\r\n fragment = this.getPath();\r\n } else {\r\n fragment = this.getHash();\r\n }\r\n }\r\n return fragment.replace(routeStripper, \"\");\r\n },\r\n\r\n // Start the hash change handling, returning `true` if the current URL matches\r\n // an existing route, and `false` otherwise.\r\n start: function (options) {\r\n if (History.started) throw new Error(\"BI.history has already been started\");\r\n History.started = true;\r\n\r\n // Figure out the initial configuration. Do we need an iframe?\r\n // Is pushState desired ... is it available?\r\n this.options = _.extend({root: \"/\"}, this.options, options);\r\n this.root = this.options.root;\r\n this._wantsHashChange = this.options.hashChange !== false;\r\n this._hasHashChange = \"onhashchange\" in window;\r\n this._wantsPushState = !!this.options.pushState;\r\n this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);\r\n this.fragment = this.getFragment();\r\n\r\n // Normalize root to always include a leading and trailing slash.\r\n this.root = (\"/\" + this.root + \"/\").replace(rootStripper, \"/\");\r\n\r\n // Transition from hashChange to pushState or vice versa if both are\r\n // requested.\r\n if (this._wantsHashChange && this._wantsPushState) {\r\n\r\n // If we've started off with a route from a `pushState`-enabled\r\n // browser, but we're currently in a browser that doesn't support it...\r\n if (!this._hasPushState && !this.atRoot()) {\r\n var root = this.root.slice(0, -1) || \"/\";\r\n this.location.replace(root + \"#\" + this.getPath());\r\n // Return immediately as browser will do redirect to new url\r\n return true;\r\n\r\n // Or if we've started out with a hash-based route, but we're currently\r\n // in a browser where it could be `pushState`-based instead...\r\n } else if (this._hasPushState && this.atRoot()) {\r\n this.navigate(this.getHash(), {replace: true});\r\n }\r\n\r\n }\r\n\r\n // Proxy an iframe to handle location events if the browser doesn't\r\n // support the `hashchange` event, HTML5 history, or the user wants\r\n // `hashChange` but not `pushState`.\r\n if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {\r\n var iframe = document.createElement(\"iframe\");\r\n iframe.src = \"javascript:0\";\r\n iframe.style.display = \"none\";\r\n iframe.tabIndex = -1;\r\n var body = document.body;\r\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\r\n this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;\r\n this.iframe.document.open().close();\r\n this.iframe.location.hash = \"#\" + this.fragment;\r\n }\r\n\r\n // Add a cross-platform `addEventListener` shim for older browsers.\r\n var addEventListener = _global.addEventListener || function (eventName, listener) {\r\n return attachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Depending on whether we're using pushState or hashes, and whether\r\n // 'onhashchange' is supported, determine how we check the URL state.\r\n if (this._hasPushState) {\r\n addEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n addEventListener(\"hashchange\", this.checkUrl, false);\r\n } else if (this._wantsHashChange) {\r\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\r\n }\r\n\r\n if (!this.options.silent) return this.loadUrl();\r\n },\r\n\r\n // Disable BI.history, perhaps temporarily. Not useful in a real app,\r\n // but possibly useful for unit testing Routers.\r\n stop: function () {\r\n // Add a cross-platform `removeEventListener` shim for older browsers.\r\n var removeEventListener = _global.removeEventListener || function (eventName, listener) {\r\n return detachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Remove window listeners.\r\n if (this._hasPushState) {\r\n removeEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n removeEventListener(\"hashchange\", this.checkUrl, false);\r\n }\r\n\r\n // Clean up the iframe if necessary.\r\n if (this.iframe) {\r\n document.body.removeChild(this.iframe.frameElement);\r\n this.iframe = null;\r\n }\r\n\r\n // Some environments will throw when clearing an undefined interval.\r\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\r\n History.started = false;\r\n },\r\n\r\n // Add a route to be tested when the fragment changes. Routes added later\r\n // may override previous routes.\r\n route: function (route, callback) {\r\n this.handlers.unshift({route: route, callback: callback});\r\n },\r\n\r\n // Checks the current URL to see if it has changed, and if it has,\r\n // calls `loadUrl`, normalizing across the hidden iframe.\r\n checkUrl: function (e) {\r\n var current = this.getFragment();\r\n\r\n // If the user pressed the back button, the iframe's hash will have\r\n // changed and we should use that for comparison.\r\n if (current === this.fragment && this.iframe) {\r\n current = this.getHash(this.iframe);\r\n }\r\n\r\n if (current === this.fragment) return false;\r\n if (this.iframe) this.navigate(current);\r\n this.loadUrl();\r\n },\r\n\r\n // Attempt to load the current URL fragment. If a route succeeds with a\r\n // match, returns `true`. If no defined routes matches the fragment,\r\n // returns `false`.\r\n loadUrl: function (fragment) {\r\n fragment = this.fragment = this.getFragment(fragment);\r\n return _.some(this.handlers, function (handler) {\r\n if (handler.route.test(fragment)) {\r\n handler.callback(fragment);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n // Save a fragment into the hash history, or replace the URL state if the\r\n // 'replace' option is passed. You are responsible for properly URL-encoding\r\n // the fragment in advance.\r\n //\r\n // The options object can contain `trigger: true` if you wish to have the\r\n // route callback be fired (not usually desirable), or `replace: true`, if\r\n // you wish to modify the current URL without adding an entry to the history.\r\n navigate: function (fragment, options) {\r\n if (!History.started) return false;\r\n if (!options || options === true) options = {trigger: !!options};\r\n\r\n // Normalize the fragment.\r\n fragment = this.getFragment(fragment || \"\");\r\n\r\n // Don't include a trailing slash on the root.\r\n var root = this.root;\r\n if (fragment === \"\" || fragment.charAt(0) === \"?\") {\r\n root = root.slice(0, -1) || \"/\";\r\n }\r\n var url = root + fragment;\r\n\r\n // Strip the hash and decode for matching.\r\n fragment = decodeURI(fragment.replace(pathStripper, \"\"));\r\n\r\n if (this.fragment === fragment) return;\r\n this.fragment = fragment;\r\n\r\n // If pushState is available, we use it to set the fragment as a real URL.\r\n if (this._hasPushState) {\r\n this.history[options.replace ? \"replaceState\" : \"pushState\"]({}, document.title, url);\r\n\r\n // If hash changes haven't been explicitly disabled, update the hash\r\n // fragment to store history.\r\n } else if (this._wantsHashChange) {\r\n this._updateHash(this.location, fragment, options.replace);\r\n if (this.iframe && (fragment !== this.getHash(this.iframe))) {\r\n // Opening and closing the iframe tricks IE7 and earlier to push a\r\n // history entry on hash-tag change. When replace is true, we don't\r\n // want this.\r\n if (!options.replace) this.iframe.document.open().close();\r\n this._updateHash(this.iframe.location, fragment, options.replace);\r\n }\r\n\r\n // If you've told us that you explicitly don't want fallback hashchange-\r\n // based history, then `navigate` becomes a page refresh.\r\n } else {\r\n return this.location.assign(url);\r\n }\r\n if (options.trigger) return this.loadUrl(fragment);\r\n },\r\n\r\n // Update the hash location, either replacing the current entry, or adding\r\n // a new one to the browser history.\r\n _updateHash: function (location, fragment, replace) {\r\n if (replace) {\r\n var href = location.href.replace(/(javascript:|#).*$/, \"\");\r\n location.replace(href + \"#\" + fragment);\r\n } else {\r\n // Some browsers require that `hash` contains a leading #.\r\n location.hash = \"#\" + fragment;\r\n }\r\n }\r\n\r\n });\r\n\r\n // Create the default BI.history.\r\n BI.history = new History;\r\n}());;(function () {\r\n function initWatch(vm, watch) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var key in watch) {\r\n var handler = watch[key];\r\n if (BI.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n vm._watchers.push(createWatcher(vm, key, handler[i]));\r\n }\r\n } else {\r\n vm._watchers.push(createWatcher(vm, key, handler));\r\n }\r\n }\r\n }\r\n\r\n function createWatcher(vm, keyOrFn, handler) {\r\n return Fix.watch(vm.store, keyOrFn, _.bind(handler, vm), {\r\n store: vm.store\r\n });\r\n }\r\n\r\n var target = null;\r\n var targetStack = [];\r\n\r\n function pushTarget(_target) {\r\n if (target) targetStack.push(target);\r\n Fix.Model.target = target = _target;\r\n }\r\n\r\n function popTarget() {\r\n Fix.Model.target = target = targetStack.pop();\r\n }\r\n\r\n var context = null;\r\n var contextStack = [];\r\n\r\n function pushContext(_context) {\r\n if (context) contextStack.push(context);\r\n Fix.Model.context = context = _context;\r\n }\r\n\r\n function popContext() {\r\n Fix.Model.context = context = contextStack.pop();\r\n }\r\n\r\n var oldWatch = Fix.watch;\r\n Fix.watch = function (model, expOrFn, cb, options) {\r\n if (BI.isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === \"string\") {\r\n cb = model[cb];\r\n }\r\n return oldWatch.call(this, model, expOrFn, function () {\r\n options && options.store && pushTarget(options.store);\r\n var res = cb.apply(this, arguments);\r\n options && options.store && popTarget();\r\n return res;\r\n }, options);\r\n };\r\n\r\n function findStore(widget) {\r\n if (target != null) {\r\n return target;\r\n }\r\n widget = widget || context;\r\n var p = widget;\r\n while (p) {\r\n if (p instanceof Fix.Model || p.store || p.__cacheStore) {\r\n break;\r\n }\r\n p = p._parent || (p.options && p.options.element);\r\n }\r\n if (p) {\r\n if (p instanceof Fix.Model) {\r\n return widget.__cacheStore = p;\r\n }\r\n widget.__cacheStore = p.store || p.__cacheStore;\r\n return p.__cacheStore || p.store;\r\n }\r\n }\r\n\r\n var _create = BI.createWidget;\r\n BI.createWidget = function (item, options, context) {\r\n var pushed = false;\r\n if (BI.isWidget(options)) {\r\n pushContext(options);\r\n pushed = true;\r\n } else if (context != null) {\r\n pushContext(context);\r\n pushed = true;\r\n }\r\n var result = _create.apply(this, arguments);\r\n pushed && popContext();\r\n return result;\r\n };\r\n\r\n _.each([\"populate\", \"addItems\", \"prependItems\"], function (name) {\r\n var old = BI.Loader.prototype[name];\r\n BI.Loader.prototype[name] = function () {\r\n pushContext(this);\r\n var result = old.apply(this, arguments);\r\n popContext();\r\n return result;\r\n };\r\n });\r\n\r\n function createStore() {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n var store = findStore(this.options.context || this.options.element);\r\n if (store) {\r\n pushTarget(store);\r\n needPop = true;\r\n }\r\n this.store = this._store();\r\n this.store && (this.store._widget = this);\r\n needPop && popTarget();\r\n needPop = false;\r\n pushTarget(this.store);\r\n if (this.store instanceof Fix.Model) {\r\n this.model = this.store.model;\r\n } else {\r\n this.model = this.store;\r\n }\r\n needPop = true;\r\n }\r\n return needPop;\r\n }\r\n\r\n BI.Widget.prototype._initRender = function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(function () {\r\n if (this.model && this.model.$vm) {\r\n this.model.$vm.$digest();\r\n }\r\n this._render();\r\n }, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n };\r\n\r\n var _init = BI.Widget.prototype._init;\r\n BI.Widget.prototype._init = function () {\r\n var self = this;\r\n var needPop = createStore.call(this);\r\n _init.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var _render = BI.Widget.prototype._render;\r\n BI.Widget.prototype._render = function () {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n needPop = true;\r\n pushTarget(this.store);\r\n initWatch(this, this.watch);\r\n }\r\n _render.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var unMount = BI.Widget.prototype.__d;\r\n BI.Widget.prototype.__d = function () {\r\n unMount.apply(this, arguments);\r\n this.store && BI.isFunction(this.store.destroy) && this.store.destroy();\r\n BI.each(this._watchers, function (i, unwatches) {\r\n unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];\r\n BI.each(unwatches, function (j, unwatch) {\r\n unwatch();\r\n });\r\n });\r\n this._watchers && (this._watchers = []);\r\n if (this.store) {\r\n this.store._parent && (this.store._parent = null);\r\n this.store._widget && (this.store._widget = null);\r\n this.store = null;\r\n }\r\n delete this.__cacheStore;\r\n };\r\n\r\n _.each([\"_mount\"], function (name) {\r\n var old = BI.Widget.prototype[name];\r\n old && (BI.Widget.prototype[name] = function () {\r\n this.store && pushTarget(this.store);\r\n try {\r\n var res = old.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n this.store && popTarget();\r\n return res;\r\n });\r\n });\r\n\r\n var additionFunc = function () {\r\n BI.nextTick(function () {\r\n Fix && Fix.refreshAll && Fix.refreshAll();\r\n });\r\n };\r\n\r\n $(document).ajaxComplete(additionFunc);\r\n\r\n if (BI.history) {\r\n var navigate = BI.history.navigate;\r\n // navigate之后不会立即变化有一段延迟\r\n BI.history.navigate = function () {\r\n navigate.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n var back = window.history.back;\r\n window.history.back = function () {\r\n back.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n }\r\n\r\n if (BI.Router) {\r\n var execute = BI.Router.prototype.execute;\r\n BI.Router.prototype.execute = function () {\r\n execute.apply(this, arguments);\r\n additionFunc();\r\n }\r\n }\r\n\r\n _.each([\"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\",\r\n \"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\",\r\n \"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n var old = BI[name];\r\n BI[name] = function (obj, fn, context) {\r\n return typeof fn === \"function\" ? old(obj, function (key, value) {\r\n if (!(key in Fix.$$skipArray)) {\r\n return fn.apply(this, arguments);\r\n }\r\n }, context) : old.apply(this, arguments);\r\n };\r\n });\r\n BI.isEmpty = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length === 0;\r\n }\r\n return _.isEmpty(ob);\r\n };\r\n BI.keys = function (ob) {\r\n var keys = _.keys(ob);\r\n var nKeys = [];\r\n for (var i = 0; i < keys.length; i++) {\r\n if (!(keys[i] in Fix.$$skipArray)) {\r\n nKeys.push(keys[i]);\r\n }\r\n }\r\n return nKeys;\r\n };\r\n BI.values = function (ob) {\r\n var keys = BI.keys(obj);\r\n var length = keys.length;\r\n var values = [];\r\n for (var i = 0; i < length; i++) {\r\n values[i] = obj[keys[i]];\r\n }\r\n return values;\r\n };\r\n BI.extend = function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n if (args.length < 1) {\r\n return {};\r\n }\r\n var object = args[0];\r\n var i = 1;\r\n while (i < args.length) {\r\n BI.each(args[i], function (key, v) {\r\n object[key] = v;\r\n });\r\n i++;\r\n }\r\n return object;\r\n };\r\n BI.size = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length;\r\n }\r\n return _.size(ob);\r\n };\r\n BI.isEmptyObject = function (ob) {\r\n return BI.size(ob) === 0;\r\n };\r\n BI.deepClone = function (ob) {\r\n return Fix.toJSON(ob);\r\n };\r\n\r\n Fix.set = function (obj, k, v) {\r\n try {\r\n if(obj) {\r\n obj[k] = v;\r\n }\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n Fix.del = function (obj, k) {\r\n try {\r\n delete obj[k];\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n BI.watch = Fix.watch;\r\n}());\r\n\n//# sourceMappingURL=fineui.ie.js.map"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 141);\n","import fineui from \"./index\";\r\n\r\nBI.extend(BI, fineui);\r\n","import { _Combo, _ComboStatic } from \"./base/combination/combo\";\r\nimport { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from \"./base/combination/group.button\";\r\nimport { _Tab, _TabStatic } from \"./base/combination/tab\";\r\nimport { _Pane, _PaneStatic } from \"./base/pane\";\r\nimport { _BasicButton, _BasicButtonStatic } from \"./base/single/button/button.basic\";\r\nimport { _Button, _ButtonStatic } from \"./base/single/button/buttons/button\";\r\nimport { _TextButton, _TextButtonStatic } from \"./base/single/button/buttons/button.text\";\r\nimport { _IconTextItem, _IconTextItemStatic } from \"./base/single/button/listitem/icontextitem\";\r\nimport { _Editor, _EditorStatic } from \"./base/single/editor/editor\";\r\nimport { _Checkbox, _CheckboxStatic } from \"./base/single/input/checkbox\";\r\nimport { _AbstractLabel } from \"./base/single/label/abstract.label\";\r\nimport { _Label } from \"./base/single/label/label\";\r\nimport { _Single } from \"./base/single/single\";\r\nimport { _Text } from \"./base/single/text\";\r\nimport { _Trigger } from \"./base/single/trigger/trigger\";\r\nimport { _IconChangeButton, _IconChangeButtonStatic } from \"./case/button/icon/icon.change\";\r\nimport { _MultiSelectItem, _MultiSelectItemStatic } from \"./case/button/item.multiselect\";\r\nimport { _BubbleCombo, _BubbleComboStatic } from \"./case/combo/bubblecombo/combo.bubble\";\r\nimport { _TextValueCombo, _TextValueComboStatic } from \"./case/combo/combo.textvalue\";\r\nimport { _SignEditor, _SignEditorStatic } from \"./case/editor/editor.sign\";\r\nimport { _LoadingPane } from \"./case/loading/loading_pane\";\r\nimport { _AllValueMultiTextValueCombo, _AllValueMultiTextValueComboStatic } from \"./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo\";\r\nimport { _Action, _ActionFactory } from \"./core/action/action\";\r\nimport { _ShowAction } from \"./core/action/action.show\";\r\nimport { _base } from \"./core/base\";\r\nimport { _Behavior, _BehaviorFactory } from \"./core/behavior/behavior\";\r\nimport { _HighlightBehavior } from \"./core/behavior/behavior.highlight\";\r\nimport { _RedMarkBehavior } from \"./core/behavior/behavior.redmark\";\r\nimport * as decorator from \"./core/decorator/decorator\";\r\nimport { _func } from \"./core/func\";\r\nimport { _i18n } from \"./core/i18n\";\r\nimport { _OB } from \"./core/ob\";\r\nimport { _Widget, _WidgetStatic } from \"./core/widget\";\r\nimport { _Layout } from \"./core/wrapper/layout\";\r\nimport { _HTapeLayout, _VTapeLayout } from \"./core/wrapper/layout/layout.tape\";\r\nimport { _AbstractTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser\";\r\nimport { _AbstractListTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser.list\";\r\n\r\n\r\ntype ClassConstructor<T extends {}> = T & {\r\n new(config: any): T;\r\n (config: any): T;\r\n readonly prototype: T;\r\n}\r\n\r\nexport interface BI extends _func, _i18n, _base {\r\n OB: ClassConstructor<_OB>;\r\n Widget: ClassConstructor<_Widget> & _WidgetStatic;\r\n Single: ClassConstructor<_Single>;\r\n BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;\r\n Checkbox: ClassConstructor<_Checkbox> & _CheckboxStatic;\r\n Button: ClassConstructor<_Button> & _ButtonStatic;\r\n TextButton: ClassConstructor<_TextButton> & _TextButtonStatic;\r\n IconChangeButton: ClassConstructor<_IconChangeButton> & _IconChangeButtonStatic;\r\n Trigger: ClassConstructor<_Trigger>;\r\n Action: ClassConstructor<_Action>;\r\n ActionFactory: ClassConstructor<_ActionFactory>;\r\n ShowAction: ClassConstructor<_ShowAction>;\r\n Behavior: ClassConstructor<_Behavior>;\r\n BehaviorFactory: ClassConstructor<_BehaviorFactory>;\r\n HighlightBehavior: ClassConstructor<_HighlightBehavior>;\r\n RedMarkBehavior: ClassConstructor<_RedMarkBehavior>;\r\n Pane: ClassConstructor<_Pane> & _PaneStatic;\r\n LoadingPane: ClassConstructor<_LoadingPane>;\r\n Tab: ClassConstructor<_Tab> & _TabStatic;\r\n ButtonGroup: ClassConstructor<_ButtonGroup> & _ButtonGroupChooseType & _ButtonGroupStatic;\r\n Combo: ClassConstructor<_Combo> & _ComboStatic;\r\n TextValueCombo: ClassConstructor<_TextValueCombo> & _TextValueComboStatic;\r\n BubbleCombo: ClassConstructor<_BubbleCombo> & _BubbleComboStatic;\r\n AllValueMultiTextValueCombo: ClassConstructor<_AllValueMultiTextValueCombo> & _AllValueMultiTextValueComboStatic;\r\n IconTextItem: ClassConstructor<_IconTextItem> & _IconTextItemStatic;\r\n MultiSelectItem: ClassConstructor<_MultiSelectItem> & _MultiSelectItemStatic;\r\n AbstractLabel: ClassConstructor<_AbstractLabel>;\r\n Label: ClassConstructor<_Label>;\r\n Text: ClassConstructor<_Text>;\r\n Editor: ClassConstructor<_Editor> & _EditorStatic;\r\n SignEditor: ClassConstructor<_SignEditor> & _SignEditorStatic;\r\n Layout: ClassConstructor<_Layout>;\r\n HTapeLayout: ClassConstructor<_HTapeLayout>;\r\n VTapeLayout: ClassConstructor<_VTapeLayout>;\r\n AbstractTreeValueChooser: ClassConstructor<_AbstractTreeValueChooser>;\r\n AbstractListTreeValueChooser: ClassConstructor<_AbstractListTreeValueChooser>;\r\n Decorators: typeof decorator;\r\n}\r\n\r\nexport default {\r\n Decorators: decorator,\r\n};\r\n","export type Constructor<T> = new(...args: any[]) => T;\r\n\r\n/**\r\n * 注册widget\r\n */\r\nexport function shortcut() {\r\n return function decorator<U>(Target: Constructor<U> & {xtype: string}): void {\r\n BI.shortcut(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 注册model\r\n */\r\nexport function model() {\r\n return function decorator<U extends {new(...args:any[]):{}} & {xtype: string, context?: ReadonlyArray<string>}>(Target: U): void {\r\n BI.model(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 类注册_store属性\r\n * @param Model model类\r\n * @param opts 额外条件\r\n */\r\nexport function store<T>(Model: Constructor<T> & {xtype: string}, opts: { props?(this: unknown): { [key: string]: unknown } } = {}) {\r\n return function classDecorator<U extends {new(...args:any[]):{}}>(constructor:U) {\r\n return class extends constructor {\r\n _store() {\r\n const props = opts.props ? opts.props.apply(this) : undefined;\r\n\r\n return BI.Models.getModel(Model.xtype, props);\r\n }\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Model基类\r\n */\r\nexport class Model<U extends {types?: {[key: string]: unknown} | {}, context?: ReadonlyArray<string>} = {}> extends Fix.Model {\r\n // @ts-ignore this[\"computed\"][key]为空\r\n model: Pick<{[key in keyof U[\"types\"]]: U[\"types\"][key]}, U[\"context\"][number]> & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]} & {[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>};\r\n\r\n store: this[\"actions\"];\r\n\r\n state(): {[key: string]: unknown} | {} {\r\n return {};\r\n }\r\n\r\n context: U[\"context\"];\r\n\r\n actions:{[key: string]: (...args: any[]) => any};\r\n\r\n childContext: ReadonlyArray<keyof (this[\"computed\"] & ReturnType<this[\"state\"]>)>;\r\n\r\n // @ts-ignore this[\"computed\"][key]为空\r\n TYPE: Pick<{[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>} & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]}, this[\"childContext\"][number]>;\r\n\r\n computed: {[key: string]: () => unknown} | {};\r\n}\r\n\r\n/* 分享一段很好看的代码\r\n// union to intersection of functions\r\ntype UnionToIoF<U> =\r\n (U extends any ? (k: (x: U) => void) => void : never) extends\r\n ((k: infer I) => void) ? I : never\r\n\r\n// return last element from Union\r\ntype UnionPop<U> = UnionToIoF<U> extends { (a: infer A): void; } ? A : never;\r\n\r\n// prepend an element to a tuple.\r\ntype Prepend<U, T extends ReadonlyArray<any>> =\r\n ((a: U, ...r: T) => void) extends (...r: infer R) => void ? R : never;\r\n\r\ntype UnionToTupleRecursively<Union, Result extends ReadonlyArray<any>> = {\r\n 1: Result;\r\n 0: UnionToTupleRecursively_<Union, UnionPop<Union>, Result>;\r\n // 0: UnionToTupleRecursively<Exclude<Union, UnionPop<Union>>, Prepend<UnionPop<Union>, Result>>\r\n}[[Union] extends [never] ? 1 : 0];\r\n\r\ntype UnionToTupleRecursively_<Union, Element, Result extends ReadonlyArray<any>> =\r\n UnionToTupleRecursively<Exclude<Union, Element>, Prepend<Element, Result>>;\r\n\r\ntype UnionToTuple<U> = UnionToTupleRecursively<U, []>;\r\n*/\r\n"]} |