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.7 MiB
1 lines
4.7 MiB
{"version":3,"sources":["bundle.js","webpack:///webpack/bootstrap","webpack:///typescript/core/decorator/decorator.ts","webpack:///typescript/index.ts","webpack:///typescript/bundle.ts"],"names":["_classCallCheck","instance","Constructor","TypeError","_global","window","global","self","this","BI","prepares","apply","func","thisArg","args","length","call","arrayAggregator","array","setter","iteratee","accumulator","index","value","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","result","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","Array","arrayPush","values","offset","arrayReduce","initAccum","arraySome","asciiToArray","string","split","baseFindKey","collection","eachFunc","key","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","undefined","basePropertyOf","baseReduce","baseSortBy","comparer","sort","baseTimes","n","baseUnary","baseValues","props","cacheHas","cache","has","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","test","iteratorToArray","iterator","data","next","done","push","mapToArray","map","size","forEach","overArg","transform","arg","replaceHolders","PLACEHOLDER","safeGet","setToArray","set","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lastIndex","match","lodash","isObjectLike","isArray","LazyWrapper","LodashWrapper","hasOwnProperty","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","dir","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","type","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entries","clear","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","get","mapCacheHas","mapCacheSet","SetCache","add","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","String","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","source","copyObject","keys","baseAssignIn","keysIn","defineProperty","configurable","enumerable","writable","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","tag","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","FUNC_ERROR_TEXT","setTimeout","baseDifference","includes","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","Object","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","parent","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","toString","castSlice","buffer","slice","allocUnsafe","constructor","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","exec","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","fn","root","Ctor","isBind","arguments","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","prototype","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","name","message","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","e","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","join","replace","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","proto","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","concat","drop","findIndex","findLastIndex","flattenDeep","head","indexOf","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","previous","wrapperReverse","wrapped","wrapperValue","every","filter","reduce","reject","negate","isString","some","before","debounce","options","invokeFunc","time","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","now","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","Cache","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNaN","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","valueOf","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","create","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","random","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","_","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","max","min","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","RegExp","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","Function","freeExports","exports","nodeType","freeModule","module","moduleExports","freeProcess","process","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","Symbol","getPrototypeOf","objectCreate","propertyIsEnumerable","isConcatSpreadable","toStringTag","Math","ceil","floor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","Date","DataView","Promise","Set","WeakMap","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","resolve","ctorString","charCodeAt","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","find","groupBy","sortBy","bind","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","assert","v","is","Error","deepContains","warn","console","UUID","f","str","i","r","isWidget","widget","Widget","View","createWidgets","items","item","createWidget","deepClone","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","k","it","formatEL","stripEL","trans2Element","widgets","wi","element","from","to","t","inverse","firstKey","res","any","lastKey","firstObject","lastObject","obj1","obj2","idx","backEach","backAny","backEvery","backFindKey","backFind","remove","target","contains","removeAt","string2Array","array2String","abc2Int","toUpperCase","len","charAt","int2Abc","num","DIGITS","makeObject","makeArrayByArray","callee","isSorted","inherit","sb","sp","overrides","F","spp","superclass","init","initialized","freeze","isCapitalEqual","a","b","toLowerCase","isWidthOrHeight","w","isNotNull","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTick","nextTickHandler","pending","copies","callbacks","timerFunc","p","then","MutationObserver","counter","observer","textNode","document","createTextNode","observe","characterData","setImmediate","queueNextTick","cb","_resolve","error","getTime","performance","webkitNow","getDate","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","Number","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","text","CRYPT_TYPE","AES","aesEncrypt","decrypt","aesDecrypt","leftPad","val","ch","format","m","isLeapYear","year","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","_MD","parseDateTime","fmt","today","y","d","yearlength","otherlength","substring","j","hr","sec","_MN","substr","getFullYear","getMonth","getHours","getMinutes","getSeconds","search","dt","timeZone","localTime","localOffset","getTimezoneOffset","utc","src","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","o","widgetName","_isRoot","_parent","addWidget","_renderEngine","createElement","_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","h","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","c","patchProps","children","triggerLifeHook","append","kv","shortcut","component","xtype","Plugin","getWidget","getObject","CryptoJS","C","C_lib","lib","Base","subtype","mixIn","$super","propertyName","WordArray","words","sigBytes","encoder","Hex","stringify","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","x","s","GG","HH","II","T","abs","sin","MD5","_hash","M","offset_i","M_offset_i","H","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","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","l","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","localStorage","setItem","getUsername","getItem","_getKeyPrefix","_generateKey","removeItem","addCookie","expiresHours","cookieString","date","setTime","toUTCString","cookie","getCookie","reg","deleteCookie","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","stop","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","tmp","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","removeChild","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","appendChild","_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","log","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","JSON","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","close","open","__hasZIndexMask__","__releaseZIndexMask__","__buildZIndexMask__","setZindex","W","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","navigator","userAgent","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","location","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","style","offsetWidth","offsetHeight","checkTriggers","__resizeLast__","scrollListener","__resizeRAF__","__resizeListeners__","animation","animationstring","keyframeprefix","animationstartevent","domPrefixes","startEvents","pfx","elm","animationName","animationKeyframes","animationStyle","createStyles","addResizeListener","getComputedStyle","innerHTML","addEventListener","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","g","getContrastColor","rgb2hex","rgbColour","rgbValues","red","green","blue","hexColour","int2hex","rgba2json","json2rgb","json2rgba","rgba","strNum","hexdig","tempValue","colorArray","rgba2rgb","rgbColor","bgColor","R","G","B","A","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","version","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","display","hidden","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","augmentWidthOrHeight","extra","isBorderBox","cssExpand","getWidthOrHeight","valueIsBorderBox","getStyles","boxSizing","curCSS","rnumnonpx","boxSizingReliable","doc","elemdisplay","actualDisplay","iframe","contentWindow","contentDocument","write","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","ct","finalDataType","contents","responseFields","mimeType","getResponseHeader","converters","ajaxConvert","response","conv2","conv","prev","dataFilter","state","createStandardXHR","XMLHttpRequest","createActiveXHR","ActiveXObject","createFxNow","fxNow","createTweens","tweeners","Animation","stopped","animationPrefilters","deferred","Deferred","always","tick","currentTime","startTime","duration","percent","tweens","notifyWith","resolveWith","promise","opts","specialEasing","originalProperties","createTween","tween","Tween","easing","gotoEnd","rejectWith","propFilter","fx","timer","anim","progress","fail","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","all","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","for","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","groups","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","lt","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","wrap","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","status","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","z","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","Fix","makeHashCode","rhashcode","_toString","isConfigurable","getOwnPropertyDescriptor","isExtensible","parsePath","bailRE","segments","pushTarget","_target","Dep","targetStack","popTarget","def","protoAugment","__proto__","copyAugment","parentObserver","parentKey","__ob__","Observer","observerState","shouldConvert","dep","refresh","_deps","_scopeDeps","_key2","_globalDeps","defineReactive","shallow","$$skipArray","childOb","reactiveGetter","depend","dependArray","reactiveSetter","newVal","createViewModel$1","resetSchedulerState","activatedChildren","waiting","flushing","flushSchedulerQueue","watcher","queueWatcher","seenObjects","isA","depId","runBinaryFunction","binarys","routeToRegExp","watch","expOrFn","user","exps","Watcher","immediate","unwatchFn","watchers","running","oldValue","sync","isGlobal","getter","NaN","currentModel","regStr","_dep","_w","getMixins","mixinInjection","initState","vm","$$state","initComputed","_computedWatchers","defineComputed","userDef","$$model","$$computed","computedWatcherOptions","shouldCache","sharedPropertyDefinition","createComputedGetter","computedGetter","dirty","evaluate","initWatch","watch$$1","_watchers","createWatcher","keyOrFn","initMethods","methods","initMixins","mixinType","mixin$$1","defineProps","_loop","$$context","defineContext","_loop2","_key4","hasProto","MessageChannel","channel","port","port2","port1","onmessage","postMessage","falsy","$accessors","$vbthis","$vbsetter","subs","addSub","removeSub","addDep","arrayMethods","mutator","_len","inserted","observeArray","canHideProperty","createViewModel","defineProperties","timeBucket","desc","__defineGetter__","__defineSetter__","descs","VBClassPool","VBMediator","accessors","accessor","parseVB","arrayKeys","vmCount","augment","walk","uid$1","lazy","deps","newDeps","depIds","newDepIds","expression","cleanupDeps","falsy$1","||","&&","(",")","Model","childContext","_key3","unwatches","unwatch","__esModule","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","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","Y","N","_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","st","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","listener","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","lastIndexOf","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","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","D","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","_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","digest","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","1","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","pushContext","_context","contextStack","popContext","findStore","__cacheStore","createStore","needPop","_store","_widget","oldWatch","_create","pushed","unMount","nKeys","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","assign","_updateHash","BI-Multi_Date_Quarter_End","BI-Multi_Date_Month_Begin","BI-Multi_Date_YMD","BI-Custom_Color","BI-Numerical_Interval_Input_Data","BI-Please_Input_Natural_Number","BI-No_More_Data","BI-Basic_Altogether","BI-Basic_Sunday","BI-Widget_Background_Colour","BI-Color_Picker_Error_Text","BI-Multi_Date_Month","BI-No_Selected_Item","BI-Multi_Date_Year_Begin","BI-Quarter_1","BI-Quarter_2","BI-Quarter_3","BI-Quarter_4","BI-Multi_Date_Year_Next","BI-Multi_Date_Month_Prev","BI-Month_Trigger_Error_Text","BI-Less_And_Equal","BI-Year_Trigger_Invalid_Text","BI-Multi_Date_Week_Next","BI-Font_Size","BI-Basic_Total","BI-Already_Selected","BI-Formula_Insert","BI-Select_All","BI-Basic_Tuesday","BI-Multi_Date_Month_End","BI-Load_More","BI-Basic_September","BI-Current_Is_Last_Page","BI-Basic_Auto","BI-Basic_Count","BI-Basic_Value","BI-Basic_Unrestricted","BI-Quarter_Trigger_Error_Text","BI-Basic_More","BI-Basic_Wednesday","BI-Basic_Bold","BI-Basic_Simple_Saturday","BI-Multi_Date_Month_Next","BI-Basic_March","BI-Current_Is_First_Page","BI-Basic_Thursday","BI-Basic_Prompt","BI-Multi_Date_Today","BI-Multi_Date_Quarter_Prev","BI-Row_Header","BI-Date_Trigger_Error_Text","BI-Basic_Cancel","BI-Basic_January","BI-Basic_June","BI-Basic_July","BI-Basic_April","BI-Multi_Date_Quarter_Begin","BI-Multi_Date_Week","BI-Click_Blank_To_Select","BI-Basic_August","BI-Word_Align_Left","BI-Basic_November","BI-Font_Colour","BI-Multi_Date_Day_Prev","BI-Select_Part","BI-Multi_Date_Day_Next","BI-Less_Than","BI-Basic_February","BI-Multi_Date_Year","BI-Number_Index","BI-Multi_Date_Week_Prev","BI-Next_Page","BI-Right_Page","BI-Numerical_Interval_Signal_Value","BI-Basic_December","BI-Basic_Saturday","BI-Basic_Simple_Wednesday","BI-Multi_Date_Quarter_Next","BI-Basic_October","BI-Basic_Simple_Friday","BI-Basic_Save","BI-Numerical_Interval_Number_Value","BI-Previous_Page","BI-No_Select","BI-Basic_Clears","BI-Created_By_Me","BI-Basic_Simple_Tuesday","BI-Word_Align_Right","BI-Summary_Values","BI-Basic_Clear","BI-Upload_File_Size_Error","BI-Up_Page","BI-Basic_Simple_Sunday","BI-Multi_Date_Relative_Current_Time","BI-Selected_Data","BI-Multi_Date_Quarter","BI-Check_Selected","BI-Basic_Search","BI-Basic_May","BI-Continue_Select","BI-Please_Input_Positive_Integer","BI-Upload_File_Type_Error","BI-Upload_File_Error","BI-Basic_Friday","BI-Down_Page","BI-Basic_Monday","BI-Left_Page","BI-Transparent_Color","BI-Basic_Simple_Monday","BI-Multi_Date_Year_End","BI-Time_Interval_Error_Text","BI-Basic_Time","BI-Basic_OK","BI-Basic_Sure","BI-Basic_Simple_Thursday","BI-Multi_Date_Year_Prev","BI-Tiao_Data","BI-Basic_Italic","BI-Basic_Dynamic_Title","BI-Basic_Year","BI-Basic_Single_Quarter","BI-Basic_Month","BI-Basic_Week","BI-Basic_Day","BI-Basic_Work_Day","BI-Basic_Front","BI-Basic_Behind","BI-Basic_Empty","BI-Basic_Month_End","BI-Basic_Month_Begin","BI-Basic_Year_End","BI-Basic_Year_Begin","BI-Basic_Quarter_End","BI-Basic_Quarter_Begin","BI-Basic_Week_End","BI-Basic_Week_Begin","BI-Basic_Current_Day","BI-Basic_Begin_Start","BI-Basic_End_Stop","BI-Basic_Current_Year","BI-Basic_Year_Fen","BI-Basic_Current_Month","BI-Basic_Current_Quarter","BI-Basic_Year_Month","BI-Basic_Year_Quarter","BI-Basic_Input_Can_Not_Null","BI-Basic_Date_Time_Error_Text","BI-Basic_Input_From_To_Number","BI-Basic_Or","BI-Basic_And","BI-Conf_Add_Formula","BI-Conf_Add_Condition","BI-Conf_Formula_And","BI-Conf_Formula_Or","BI-Conf_Condition_And","BI-Conf_Condition_Or","BI-Microsoft_YaHei","BI-Apple_Light","BI-Font_Family","BI-Basic_Please_Input_Content","BI-Word_Align_Center","BI-Basic_Please_Enter_Number_Between","BI-More_Than","BI-More_And_Equal","BI-Please_Enter_SQL","BI-Basic_Click_To_Add_Text","BI-Basic_Please_Select","BI-Basic_Font_Color","BI-Basic_Background_Color","BI-Basic_Underline","BI-Basic_Param_Month","BI-Basic_Param_Day","BI-Basic_Param_Quarter","BI-Basic_Param_Week_Count","BI-Basic_Param_Hour","BI-Basic_Param_Minute","BI-Basic_Param_Second","BI-Basic_Param_Year","BI-Basic_Date_Day","BI-Basic_Hour_Sin","BI-Basic_Seconds","BI-Basic_Minute","BI-Basic_Wan","BI-Basic_Million","BI-Basic_Billion","BI-Basic_Quarter","BI-Basic_No_Select","BI-Basic_Now","installedModules","__webpack_require__","moduleId","modules","Target","Decorators","decorator","fineui"],"mappings":";;AAwooCA,QAASA,iBAAgBC,SAAUC,aAAe,KAAMD,mBAAoBC,cAAgB,KAAM,IAAIC,WAAU,qCAlooChH,GAAIC,QAEAA,SADkB,mBAAXC,QACGA,OACe,mBAAXC,QACJA,OACa,mBAATC,MACJA,KAEAC,KAEI,MAAdJ,QAAQK,KACRL,QAAQK,IAAMC,cAEQ,MAAvBN,QAAQK,GAAGC,WACVN,QAAQK,GAAGC,aAUb,WAoRA,QAASC,OAAMC,KAAMC,QAASC,MAC5B,OAAQA,KAAKC,QACX,IAAK,GAAG,MAAOH,MAAKI,KAAKH,QACzB,KAAK,GAAG,MAAOD,MAAKI,KAAKH,QAASC,KAAK,GACvC,KAAK,GAA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KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC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0DAAJ,GAC5H,OACI,wFACIsrG,OAAA,WACI,IAAMhrM,EAAQ0/F,EAAK1/F,MAAQ0/F,EAAK1/F,MAAMvD,MAAMH,MAAQgD,UAEpD,OAAO/C,GAAGynF,OAAOC,SAASiiD,EAAMj8F,MAAOjqC,IAJ/C,G,0JAaD,IAAMkmI,EAAb,2VAMIhoC,MAAA,WACI,MAAO,IAPf,GAAoHm+B,IAAI6J,OC+CzG,GACXy0E,WAAYC,GCtFhBr+M,GAAGs2B,OAAOt2B,GAAIs+M","file":"bundle.min.js","sourcesContent":["/**\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 = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQT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MGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\r\n\r\n // 此处收录了375个多音字,数据来自于http://www.51windows.net/pages/pinyin.asp\r\n var oMultiDiff = {\r\n 19969: \"DZ\",\r\n 19975: \"WM\",\r\n 19988: \"QJ\",\r\n 20048: \"YL\",\r\n 20056: \"SC\",\r\n 20060: \"NM\",\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) : typeof define === 'function' && define.amd ? define(['exports'], factory) : factory(global.Fix = global.Fix || {});\r\n})(this, function (exports) {\r\n 'use strict';\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(prefix) {\r\n /* istanbul ignore next*/\r\n prefix = prefix || 'bi';\r\n /* istanbul ignore next*/\r\n return String(Math.random() + Math.random()).replace(rhashcode, prefix);\r\n }\r\n\r\n var hasProto = '__proto__' in {};\r\n\r\n var isIE = function isIE() {\r\n if (typeof navigator === \"undefined\") {\r\n return false;\r\n }\r\n return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase())\r\n );\r\n };\r\n\r\n var getIEVersion = 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 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 function isConfigurable(obj, key) {\r\n var configurable = true;\r\n var property = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, key);\r\n if (property && property.configurable === false) {\r\n configurable = false;\r\n }\r\n return configurable;\r\n }\r\n\r\n function isExtensible(obj) {\r\n if (Object.isExtensible) {\r\n return Object.isExtensible(obj);\r\n }\r\n var name = '';\r\n while (obj.hasOwnProperty(name)) {\r\n name += '?';\r\n }\r\n obj[name] = true;\r\n var returnValue = obj.hasOwnProperty(name);\r\n delete obj[name];\r\n return returnValue;\r\n }\r\n\r\n function remove(arr, item) {\r\n if (arr && arr.length) {\r\n var _index = arr.indexOf(item);\r\n if (_index > -1) {\r\n return arr.splice(_index, 1);\r\n }\r\n }\r\n }\r\n\r\n var bailRE = /[^\\w.$]/;\r\n\r\n function parsePath(path) {\r\n if (bailRE.test(path)) {\r\n return;\r\n }\r\n var segments = path.split('.');\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 return obj;\r\n };\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 } else\r\n /* istanbul ignore next */\r\n 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 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\r\n var uid = 0;\r\n\r\n /**\r\n * A dep is an observable that can have multiple\r\n * directives subscribing to it.\r\n */\r\n\r\n var Dep = function () {\r\n function Dep() {\r\n _classCallCheck(this, Dep);\r\n\r\n this.id = uid++;\r\n this.subs = [];\r\n }\r\n\r\n Dep.prototype.addSub = function addSub(sub) {\r\n this.subs.push(sub);\r\n };\r\n\r\n Dep.prototype.removeSub = function removeSub(sub) {\r\n remove(this.subs, sub);\r\n };\r\n\r\n Dep.prototype.depend = function depend() {\r\n if (Dep.target) {\r\n Dep.target.addDep(this);\r\n }\r\n };\r\n\r\n Dep.prototype.notify = function notify(options) {\r\n // stabilize the subscriber list first\r\n var subs = this.subs.slice();\r\n for (var i = 0, l = subs.length; i < l; i++) {\r\n subs[i].update(options);\r\n }\r\n };\r\n\r\n return Dep;\r\n }();\r\n\r\n // the current target watcher being evaluated.\r\n // this is globally unique because there could be only one\r\n // watcher being evaluated at any time.\r\n\r\n\r\n Dep.target = null;\r\n var targetStack = [];\r\n\r\n function pushTarget(_target) {\r\n if (Dep.target) targetStack.push(Dep.target);\r\n Dep.target = _target;\r\n }\r\n\r\n function popTarget() {\r\n Dep.target = targetStack.pop();\r\n }\r\n\r\n var arrayProto = Array.prototype;\r\n var arrayMethods = [];\r\n _.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {\r\n var original = arrayProto[method];\r\n arrayMethods[method] = function mutator() {\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 var ob = this.__ob__;\r\n var inserted = void 0;\r\n switch (method) {\r\n case 'push':\r\n case 'unshift':\r\n inserted = args;\r\n break;\r\n case 'splice':\r\n inserted = args.slice(2);\r\n break;\r\n }\r\n if (inserted) inserted = ob.observeArray(inserted);\r\n switch (method) {\r\n case 'push':\r\n case 'unshift':\r\n args = inserted;\r\n break;\r\n case 'splice':\r\n args = [args[0], args[1]].concat(inserted ? inserted : []);\r\n break;\r\n }\r\n var result = original.apply(this, args);\r\n notify(ob.parent, ob.parentKey, ob.dep, true);\r\n return result;\r\n };\r\n });\r\n\r\n //如果浏览器不支持ecma262v5的Object.defineProperties或者存在BUG,比如IE8\r\n //标准浏览器使用__defineGetter__, __defineSetter__实现\r\n var canHideProperty = true;\r\n try {\r\n Object.defineProperty({}, '_', {\r\n value: 'x'\r\n });\r\n delete $$skipArray.$vbsetter;\r\n delete $$skipArray.$vbthis;\r\n } catch (e) {\r\n /* istanbul ignore next*/\r\n canHideProperty = false;\r\n }\r\n\r\n var createViewModel = Object.defineProperties;\r\n var defineProperty = void 0;\r\n\r\n var timeBucket = new Date() - 0;\r\n /* istanbul ignore if*/\r\n if (!canHideProperty) {\r\n if ('__defineGetter__' in {}) {\r\n defineProperty = function defineProperty(obj, prop, desc) {\r\n if ('value' in desc) {\r\n obj[prop] = desc.value;\r\n }\r\n if ('get' in desc) {\r\n obj.__defineGetter__(prop, desc.get);\r\n }\r\n if ('set' in desc) {\r\n obj.__defineSetter__(prop, desc.set);\r\n }\r\n return obj;\r\n };\r\n createViewModel = function createViewModel(obj, descs) {\r\n for (var prop in descs) {\r\n if (descs.hasOwnProperty(prop)) {\r\n defineProperty(obj, prop, descs[prop]);\r\n }\r\n }\r\n return obj;\r\n };\r\n }\r\n /* istanbul ignore if*/\r\n if (isIE9Below) {\r\n var VBClassPool = {};\r\n window.execScript([// jshint ignore:line\r\n 'Function parseVB(code)', '\\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码\r\n ].join('\\n'), 'VBScript');\r\n\r\n var VBMediator = function VBMediator(instance, accessors, name, value) {\r\n // jshint ignore:line\r\n var accessor = accessors[name];\r\n if (arguments.length === 4) {\r\n accessor.set.call(instance, value);\r\n } else {\r\n return accessor.get.call(instance);\r\n }\r\n };\r\n createViewModel = function createViewModel(name, accessors, properties) {\r\n // jshint ignore:line\r\n var buffer = [];\r\n buffer.push('\\tPrivate [$vbsetter]', '\\tPublic [$accessors]', '\\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\\t\\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\\t\\tSet [$vbthis] = Me', //链式调用\r\n '\\tEnd Function');\r\n //添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好\r\n var uniq = {\r\n $vbthis: true,\r\n $vbsetter: true,\r\n $accessors: true\r\n };\r\n for (name in $$skipArray) {\r\n if (!uniq[name]) {\r\n buffer.push('\\tPublic [' + name + ']');\r\n uniq[name] = true;\r\n }\r\n }\r\n //添加访问器属性\r\n for (name in accessors) {\r\n if (uniq[name]) {\r\n continue;\r\n }\r\n uniq[name] = true;\r\n buffer.push(\r\n //由于不知对方会传入什么,因此set, let都用上\r\n '\\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter\r\n '\\t\\tCall [$vbsetter](Me, [$accessors], \"' + name + '\", val' + timeBucket + ')', '\\tEnd Property', '\\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter\r\n '\\t\\tCall [$vbsetter](Me, [$accessors], \"' + name + '\", val' + timeBucket + ')', '\\tEnd Property', '\\tPublic Property Get [' + name + ']', //getter\r\n '\\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回\r\n '\\t\\tSet[' + name + '] = [$vbsetter](Me, [$accessors],\"' + name + '\")', '\\tIf Err.Number <> 0 Then', '\\t\\t[' + name + '] = [$vbsetter](Me, [$accessors],\"' + name + '\")', '\\tEnd If', '\\tOn Error Goto 0', '\\tEnd Property');\r\n }\r\n\r\n for (name in properties) {\r\n if (!uniq[name]) {\r\n uniq[name] = true;\r\n buffer.push('\\tPublic [' + name + ']');\r\n }\r\n }\r\n\r\n buffer.push('\\tPublic [hasOwnProperty]');\r\n buffer.push('End Class');\r\n var body = buffer.join('\\r\\n');\r\n var className = VBClassPool[body];\r\n if (!className) {\r\n className = makeHashCode('VBClass');\r\n window.parseVB('Class ' + className + body);\r\n window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数\r\n '\\tDim o', '\\tSet o = (New ' + className + ')(acc, vbm)', '\\tSet ' + className + 'Factory = o', 'End Function'].join('\\r\\n'));\r\n VBClassPool[body] = className;\r\n }\r\n var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品\r\n return ret; //得到其产品\r\n };\r\n }\r\n }\r\n\r\n var createViewModel$1 = createViewModel;\r\n\r\n var arrayKeys = _.keys(arrayMethods);\r\n\r\n var observerState = {\r\n shouldConvert: true\r\n };\r\n\r\n function def(obj, key, val, enumerable) {\r\n Object.defineProperty(obj, key, {\r\n value: val,\r\n enumerable: !!enumerable,\r\n writable: true,\r\n configurable: true\r\n });\r\n }\r\n\r\n /**\r\n * Observer class that are attached to each observed\r\n * object. Once attached, the observer converts target\r\n * object's property keys into getter/setters that\r\n * collect dependencies and dispatches updates.\r\n */\r\n\r\n var Observer = function () {\r\n function Observer(value) {\r\n _classCallCheck(this, Observer);\r\n\r\n this.value = value;\r\n this.dep = new Dep();\r\n this.vmCount = 0;\r\n if (_.isArray(value)) {\r\n var augment = hasProto ? protoAugment : copyAugment;\r\n augment(value, arrayMethods, arrayKeys);\r\n this.model = this.observeArray(value);\r\n } else {\r\n this.model = this.walk(value);\r\n }\r\n if (isIE9Below) {\r\n this.model['__ob__'] = this;\r\n } else {\r\n def(this.model, \"__ob__\", this);\r\n }\r\n }\r\n\r\n Observer.prototype.walk = function walk(obj) {\r\n return defineReactive(obj, this);\r\n };\r\n\r\n Observer.prototype.observeArray = function observeArray(items) {\r\n for (var i = 0, l = items.length; i < l; i++) {\r\n var ob = observe(items[i], this, i);\r\n items[i] = ob ? ob.model : items[i];\r\n }\r\n return items;\r\n };\r\n\r\n return Observer;\r\n }();\r\n\r\n function protoAugment(target, src, keys) {\r\n /* eslint-disable no-proto */\r\n target.__proto__ = src;\r\n /* eslint-enable no-proto */\r\n }\r\n\r\n /* istanbul ignore next */\r\n function copyAugment(target, src, keys) {\r\n for (var i = 0, l = keys.length; i < l; i++) {\r\n var key = keys[i];\r\n target[key] = src[key];\r\n }\r\n }\r\n\r\n function observe(value, parentObserver, parentKey) {\r\n if (!_.isObject(value)) {\r\n return;\r\n }\r\n var ob = void 0;\r\n if (value.__ob__ instanceof Observer) {\r\n ob = value.__ob__;\r\n } else if (observerState.shouldConvert && isExtensible(value) && (_.isArray(value) || isPlainObject(value))) {\r\n ob = new Observer(value);\r\n }\r\n if (ob) {\r\n ob.parent = parentObserver || ob.parent;\r\n ob.parentKey = parentKey;\r\n }\r\n return ob;\r\n }\r\n\r\n function notify(observer, key, dep, refresh) {\r\n dep.notify({ observer: observer, key: key, refresh: refresh });\r\n if (observer) {\r\n //触发a.*绑定的依赖\r\n _.each(observer._deps, function (dep) {\r\n dep.notify({ observer: observer, key: key });\r\n });\r\n //触发a.**绑定的依赖\r\n var parent = observer,\r\n root = observer,\r\n route = key || \"\";\r\n while (parent) {\r\n _.each(parent._scopeDeps, function (dep) {\r\n dep.notify({ observer: observer, key: key });\r\n });\r\n if (parent.parentKey != null) {\r\n route = parent.parentKey + '.' + route;\r\n }\r\n root = parent;\r\n parent = parent.parent;\r\n }\r\n for (var _key2 in root._globalDeps) {\r\n var reg = new RegExp(_key2);\r\n if (reg.test(route)) {\r\n root._globalDeps[_key2].notify({ observer: observer, key: _key2 });\r\n }\r\n }\r\n }\r\n }\r\n\r\n function defineReactive(obj, observer, shallow) {\r\n var props = {};\r\n var model = void 0;\r\n // if (typeof Proxy === 'function') {\r\n // const deps = {}, childObs = {}, cache = {}\r\n // _.each(obj, function (val, key) {\r\n // if (key in $$skipArray) {\r\n // return\r\n // }\r\n // cache[key] = val\r\n // const dep = deps[key] = (observer && observer['__dep' + key]) || new Dep()\r\n // observer && (observer['__dep' + key] = dep)\r\n // childObs[key] = !shallow && observe(val, observer, key)\r\n // })\r\n // return model = new Proxy(props, {\r\n // has: function (target, key) {\r\n // return key in obj;\r\n // },\r\n // get: function (target, key) {\r\n // if (key in $$skipArray) {\r\n // return target[key]\r\n // }\r\n // const value = cache[key]\r\n // if (Dep.target) {\r\n // deps[key].depend()\r\n // if (childObs[key]) {\r\n // childObs[key].dep.depend()\r\n // if (_.isArray(value)) {\r\n // dependArray(value)\r\n // }\r\n // }\r\n // }\r\n // return value\r\n // },\r\n // set: function (target, key, newVal) {\r\n // if (key in $$skipArray) {\r\n // return target[key] = newVal\r\n // }\r\n // const value = cache[key], dep = deps[key]\r\n // if (newVal === value || (newVal !== newVal && value !== value)) {\r\n // return newVal\r\n // }\r\n // cache[key] = newVal\r\n // childObs[key] = !shallow && observe(newVal, observer, key)\r\n // obj[key] = childObs[key] ? childObs[key].model : newVal\r\n // notify(model, key, dep)\r\n // return obj[key]\r\n // }\r\n // })\r\n // }\r\n _.each(obj, function (val, key) {\r\n if (key in $$skipArray) {\r\n return;\r\n }\r\n var configurable = isConfigurable(obj, key);\r\n var dep = observer && observer['__dep' + key] || new Dep();\r\n observer && (observer['__dep' + key] = dep);\r\n var childOb = configurable && !shallow && observe(val, observer, key);\r\n props[key] = {\r\n enumerable: true,\r\n configurable: true,\r\n get: function reactiveGetter() {\r\n var value = childOb ? childOb.model : val;\r\n if (Dep.target) {\r\n dep.depend();\r\n if (childOb) {\r\n childOb.dep.depend();\r\n if (_.isArray(value)) {\r\n dependArray(value);\r\n }\r\n }\r\n }\r\n return value;\r\n },\r\n set: function reactiveSetter(newVal) {\r\n var value = childOb ? childOb.model : val;\r\n if (newVal === value || newVal !== newVal && value !== value) {\r\n return;\r\n }\r\n val = newVal;\r\n childOb = configurable && !shallow && observe(newVal, observer, key);\r\n if (childOb && value && value.__ob__) {\r\n childOb._scopeDeps = value.__ob__._scopeDeps;\r\n childOb._deps = value.__ob__._deps;\r\n }\r\n obj[key] = childOb ? childOb.model : newVal;\r\n notify(model.__ob__, key, dep);\r\n }\r\n };\r\n });\r\n return model = createViewModel$1(obj, props);\r\n }\r\n\r\n /**\r\n * Set a property on an object. Adds the new property and\r\n * triggers change notification if the property doesn't\r\n * already exist.\r\n */\r\n function set(target, key, val) {\r\n if (_.isArray(target)) {\r\n target.length = Math.max(target.length, key);\r\n target.splice(key, 1, val);\r\n return val;\r\n }\r\n if (_.has(target, key)) {\r\n target[key] = val;\r\n return val;\r\n }\r\n var ob = target.__ob__;\r\n if (!ob) {\r\n target[key] = val;\r\n return val;\r\n }\r\n ob.value[key] = val;\r\n target = defineReactive(ob.value, ob);\r\n notify(ob, key, ob.dep);\r\n return target;\r\n }\r\n\r\n /**\r\n * Delete a property and trigger change if necessary.\r\n */\r\n function del(target, key) {\r\n if (_.isArray(target)) {\r\n target.splice(key, 1);\r\n return;\r\n }\r\n var ob = target.__ob__;\r\n if (!_.has(target, key)) {\r\n return;\r\n }\r\n if (!ob) {\r\n delete target[key];\r\n return target;\r\n }\r\n delete ob.value[key];\r\n target = defineReactive(ob.value, ob);\r\n notify(ob, key, ob.dep);\r\n return target;\r\n }\r\n\r\n /**\r\n * Collect dependencies on array elements when the array is touched, since\r\n * we cannot intercept array element access like property getters.\r\n */\r\n function dependArray(value) {\r\n for (var e, i = 0, l = value.length; i < l; i++) {\r\n e = value[i];\r\n e && e.__ob__ && e.__ob__.dep.depend();\r\n if (_.isArray(e)) {\r\n dependArray(e);\r\n }\r\n }\r\n }\r\n\r\n var queue = [];\r\n var activatedChildren = [];\r\n var has = {};\r\n var waiting = false;\r\n var flushing = false;\r\n var index = 0;\r\n\r\n function resetSchedulerState() {\r\n index = queue.length = activatedChildren.length = 0;\r\n has = {};\r\n waiting = flushing = false;\r\n }\r\n\r\n function flushSchedulerQueue() {\r\n flushing = true;\r\n var watcher = void 0,\r\n id = void 0,\r\n options = void 0;\r\n\r\n // Sort queue before flush.\r\n // This ensures that:\r\n // 1. Components are updated from parent to child. (because parent is always\r\n // created before the child)\r\n // 2. A component's user watchers are run before its render watcher (because\r\n // user watchers are created before the render watcher)\r\n // 3. If a component is destroyed during a parent component's watcher run,\r\n // its watchers can be skipped.\r\n queue.sort(function (a, b) {\r\n return a.id - b.id;\r\n });\r\n\r\n // do not cache length because more watchers might be pushed\r\n // as we run existing watchers\r\n for (index = 0; index < queue.length; index++) {\r\n watcher = queue[index].watcher;\r\n options = queue[index].options;\r\n id = watcher.id;\r\n has[id] = null;\r\n watcher.run(options);\r\n }\r\n\r\n resetSchedulerState();\r\n }\r\n\r\n function queueWatcher(watcher, options) {\r\n var id = watcher.id;\r\n if (has[id] == null) {\r\n has[id] = true;\r\n if (!flushing) {\r\n queue.push({ watcher: watcher, options: options });\r\n } else {\r\n // if already flushing, splice the watcher based on its id\r\n // if already past its id, it will be run next immediately.\r\n var i = queue.length - 1;\r\n while (i > index && queue[i].watcher.id > watcher.id) {\r\n i--;\r\n }\r\n queue.splice(i + 1, 0, { watcher: watcher, options: options });\r\n }\r\n // queue the flush\r\n if (!waiting) {\r\n waiting = true;\r\n nextTick(flushSchedulerQueue);\r\n }\r\n }\r\n }\r\n\r\n var uid$1 = 0;\r\n\r\n var Watcher = function () {\r\n function Watcher(vm, expOrFn, cb, options) {\r\n _classCallCheck(this, Watcher);\r\n\r\n this.vm = vm;\r\n // vm._watchers || (vm._watchers = [])\r\n // vm._watchers.push(this)\r\n // options\r\n if (options) {\r\n this.deep = !!options.deep;\r\n this.user = !!options.user;\r\n this.lazy = !!options.lazy;\r\n this.sync = !!options.sync;\r\n } else {\r\n this.deep = this.user = this.lazy = this.sync = false;\r\n }\r\n this.cb = cb;\r\n this.id = ++uid$1; // uid for batching\r\n this.active = true;\r\n this.dirty = this.lazy; // for lazy watchers\r\n this.deps = [];\r\n this.newDeps = [];\r\n this.depIds = new Set();\r\n this.newDepIds = new Set();\r\n this.expression = '';\r\n // parse expression for getter\r\n if (typeof expOrFn === 'function') {\r\n this.getter = expOrFn;\r\n } else {\r\n this.getter = parsePath(expOrFn);\r\n if (!this.getter) {\r\n this.getter = function () {};\r\n }\r\n }\r\n this.value = this.lazy ? undefined : this.get();\r\n }\r\n\r\n Watcher.prototype.get = function get() {\r\n pushTarget(this);\r\n var value = void 0;\r\n var vm = this.vm;\r\n try {\r\n value = this.getter.call(vm, vm);\r\n } catch (e) {\r\n // if (this.user) {\r\n // } else {\r\n // console.error(e)\r\n // }\r\n } finally {\r\n // \"touch\" every property so they are all tracked as\r\n // dependencies for deep watching\r\n if (this.deep) {\r\n traverse(value);\r\n }\r\n popTarget();\r\n this.cleanupDeps();\r\n }\r\n return value;\r\n };\r\n\r\n Watcher.prototype.addDep = function addDep(dep) {\r\n var id = dep.id;\r\n if (!this.newDepIds.has(id)) {\r\n this.newDepIds.add(id);\r\n this.newDeps.push(dep);\r\n if (!this.depIds.has(id)) {\r\n dep.addSub(this);\r\n }\r\n }\r\n };\r\n\r\n Watcher.prototype.cleanupDeps = function cleanupDeps() {\r\n var i = this.deps.length;\r\n while (i--) {\r\n var dep = this.deps[i];\r\n if (!this.newDepIds.has(dep.id)) {\r\n dep.removeSub(this);\r\n }\r\n }\r\n var tmp = this.depIds;\r\n this.depIds = this.newDepIds;\r\n this.newDepIds = tmp;\r\n this.newDepIds.clear();\r\n tmp = this.deps;\r\n this.deps = this.newDeps;\r\n this.newDeps = tmp;\r\n this.newDeps.length = 0;\r\n };\r\n\r\n Watcher.prototype.update = function update(options) {\r\n /* istanbul ignore else */\r\n if (this.lazy) {\r\n this.dirty = true;\r\n } else if (this.sync) {\r\n this.run(options);\r\n } else {\r\n queueWatcher(this, options);\r\n }\r\n };\r\n\r\n Watcher.prototype.run = function run(options) {\r\n if (this.active) {\r\n var value = this.get();\r\n if (value !== this.value ||\r\n // Deep watchers and watchers on Object/Arrays should fire even\r\n // when the value is the same, because the value may\r\n // have mutated.\r\n options && options.refresh || this.deep) {\r\n // set new value\r\n var oldValue = this.value;\r\n this.value = value;\r\n if (this.user) {\r\n try {\r\n this.cb.call(this.vm, value, oldValue, options);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else {\r\n try {\r\n this.cb.call(this.vm, value, oldValue, options);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n Watcher.prototype.evaluate = function evaluate() {\r\n this.value = this.get();\r\n this.dirty = false;\r\n };\r\n\r\n Watcher.prototype.depend = function depend() {\r\n var i = this.deps.length;\r\n while (i--) {\r\n this.deps[i].depend();\r\n }\r\n };\r\n\r\n Watcher.prototype.teardown = function teardown() {\r\n if (this.active) {\r\n // remove self from vm's watcher list\r\n // this is a somewhat expensive operation so we skip it\r\n // if the vm is being destroyed.\r\n remove(this.vm._watchers, this);\r\n var i = this.deps.length;\r\n while (i--) {\r\n this.deps[i].removeSub(this);\r\n }\r\n this.active = false;\r\n }\r\n };\r\n\r\n return Watcher;\r\n }();\r\n\r\n var seenObjects = new Set();\r\n\r\n function traverse(val) {\r\n seenObjects.clear();\r\n _traverse(val, seenObjects);\r\n }\r\n\r\n function _traverse(val, seen) {\r\n var i = void 0,\r\n keys = void 0;\r\n var isA = _.isArray(val);\r\n if (!isA && !_.isObject(val)) {\r\n return;\r\n }\r\n if (val.__ob__) {\r\n var depId = val.__ob__.dep.id;\r\n if (seen.has(depId)) {\r\n return;\r\n }\r\n seen.add(depId);\r\n }\r\n if (isA) {\r\n i = val.length;\r\n while (i--) {\r\n _traverse(val[i], seen);\r\n }\r\n } else {\r\n keys = _.keys(val);\r\n i = keys.length;\r\n while (i--) {\r\n _traverse(val[keys[i]], seen);\r\n }\r\n }\r\n }\r\n\r\n var falsy$1;\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 (_.isBoolean(binarys[i]) || _.has(operators, binarys[i])) {\r\n expr += binarys[i];\r\n } else {\r\n expr += 'false';\r\n }\r\n }\r\n return new Function('return ' + expr)();\r\n }\r\n\r\n function routeToRegExp(route) {\r\n route = route.replace(/\\*./g, '[a-zA-Z0-9_]+.');\r\n return '^' + route + '$';\r\n }\r\n\r\n function watch(model, expOrFn, cb, options) {\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 (_.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\\*/.test(expOrFn)) {\r\n var watcher = new Watcher(model, expOrFn, cb, options);\r\n if (options.immediate) {\r\n cb(watcher.value);\r\n }\r\n return function unwatchFn() {\r\n watcher.teardown();\r\n };\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(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 _.each(exps, function (exp, i) {\r\n if (_.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 = exp === \"**\" ? function (m) {\r\n return m;\r\n } : parsePath(exp);\r\n var v = getter.call(model, model);\r\n var dep = new Dep();\r\n if (isGlobal) {\r\n (v.__ob__._scopeDeps || (v.__ob__._scopeDeps = [])).push(dep);\r\n } else {\r\n (v.__ob__._deps || (v.__ob__._deps = [])).push(dep);\r\n }\r\n var w = new Watcher(model, function () {\r\n dep.depend();\r\n return NaN;\r\n }, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _.extend({ index: i }, attrs));\r\n }, options);\r\n watchers.push(function unwatchFn() {\r\n w.teardown();\r\n v.__ob__._scopeDeps && remove(v.__ob__._scopeDeps, dep);\r\n v.__ob__._deps && remove(v.__ob__._deps, dep);\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 var currentModel = model;\r\n //先获取到能获取到的对象\r\n var paths = exp.split(\".\");\r\n for (var _i = 0, len = paths.length; _i < len; _i++) {\r\n if (paths[_i] === \"*\") {\r\n break;\r\n }\r\n currentModel = model[paths[_i]];\r\n }\r\n exp = exp.substr(exp.indexOf(\"*\"));\r\n //补全路径\r\n var parent = currentModel.__ob__.parent,\r\n root = currentModel.__ob__;\r\n while (parent) {\r\n exp = '*.' + exp;\r\n root = parent;\r\n parent = parent.parent;\r\n }\r\n var regStr = routeToRegExp(exp);\r\n var _dep = new Dep();\r\n root._globalDeps || (root._globalDeps = {});\r\n root._globalDeps[regStr] = _dep;\r\n\r\n var _w = new Watcher(currentModel, function () {\r\n _dep.depend();\r\n return NaN;\r\n }, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _.extend({ index: i }, attrs));\r\n }, options);\r\n watchers.push(function unwatchFn() {\r\n _w.teardown();\r\n root._globalDeps && delete root._globalDeps[regStr];\r\n });\r\n return;\r\n }\r\n var watcher = new Watcher(model, exp, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _.extend({ index: i }, attrs));\r\n }, options);\r\n watchers.push(function unwatchFn() {\r\n watcher.teardown();\r\n });\r\n });\r\n return watchers;\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 computedWatcherOptions = { lazy: true };\r\n\r\n function initState(vm, state) {\r\n if (state) {\r\n vm.$$state = observe(state).model;\r\n }\r\n }\r\n\r\n function initComputed(vm, computed) {\r\n var watchers = vm._computedWatchers = {};\r\n\r\n defineComputed(vm, computed);\r\n\r\n for (var key in computed) {\r\n var userDef = computed[key],\r\n context = vm.$$model ? vm.model : vm;\r\n var getter = typeof userDef === \"function\" ? _.bind(userDef, context) : _.bind(userDef.get, context);\r\n\r\n watchers[key] = new Watcher(vm.$$computed, getter || noop, noop, computedWatcherOptions);\r\n }\r\n }\r\n\r\n function defineComputed(vm, computed) {\r\n var props = {};\r\n // if (typeof Proxy === 'function') {\r\n // return vm.$$computed = new Proxy(props, {\r\n // has: function (target, key) {\r\n // return computed && key in computed\r\n // },\r\n // get: function (target, key) {\r\n // return createComputedGetter(vm, key)()\r\n // }\r\n // })\r\n // }\r\n var shouldCache = true;\r\n for (var key in computed) {\r\n if (!(key in vm)) {\r\n var sharedPropertyDefinition = {\r\n enumerable: true,\r\n configurable: true,\r\n get: noop,\r\n set: noop\r\n };\r\n var userDef = computed[key];\r\n if (typeof userDef === \"function\") {\r\n sharedPropertyDefinition.get = createComputedGetter(vm, key);\r\n sharedPropertyDefinition.set = noop;\r\n } else {\r\n sharedPropertyDefinition.get = userDef.get ? shouldCache && userDef.cache !== false ? createComputedGetter(key) : userDef.get : noop;\r\n sharedPropertyDefinition.set = userDef.set ? userDef.set : noop;\r\n }\r\n\r\n props[key] = sharedPropertyDefinition;\r\n }\r\n }\r\n vm.$$computed = createViewModel$1({}, props);\r\n }\r\n\r\n function createComputedGetter(vm, key) {\r\n return function computedGetter() {\r\n var watcher = vm._computedWatchers && vm._computedWatchers[key];\r\n if (watcher) {\r\n if (watcher.dirty) {\r\n watcher.evaluate();\r\n }\r\n if (Dep.target) {\r\n watcher.depend();\r\n }\r\n return watcher.value;\r\n }\r\n };\r\n }\r\n\r\n function initWatch(vm, watch$$1) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var key in watch$$1) {\r\n var handler = watch$$1[key];\r\n if (_.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, cb, options) {\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 return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), options);\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 : _.bind(methods[key], vm.$$model ? vm.model : vm);\r\n }\r\n }\r\n\r\n function initMixins(vm, mixins) {\r\n mixins = mixins || [];\r\n\r\n _.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 (_.has(vm, key)) continue;\r\n\r\n vm[key] = _.bind(mixin$$1[key], vm.$$model ? vm.model : vm);\r\n }\r\n });\r\n }\r\n\r\n function defineProps(vm, keys) {\r\n var props = {};\r\n // if (typeof Proxy === 'function') {\r\n // return vm.model = new Proxy(props, {\r\n // has: function (target, key) {\r\n // return keys.indexOf(key) > -1;\r\n // },\r\n // get: function (target, key) {\r\n // if (key in $$skipArray) {\r\n // return props[key]\r\n // }\r\n // if (vm.$$computed && key in vm.$$computed) {\r\n // return vm.$$computed[key]\r\n // }\r\n // if (vm.$$state && key in vm.$$state) {\r\n // return vm.$$state[key]\r\n // }\r\n // return vm.$$model[key]\r\n // },\r\n // set: function (target, key, val) {\r\n // if (key in $$skipArray) {\r\n // return props[key] = val\r\n // }\r\n // if (vm.$$state && key in vm.$$state) {\r\n // return vm.$$state[key] = val\r\n // }\r\n // if (vm.$$model && key in vm.$$model) {\r\n // return vm.$$model[key] = val\r\n // }\r\n // }\r\n // })\r\n // }\r\n\r\n var _loop = function _loop(i, len) {\r\n var key = keys[i];\r\n if (!(key in $$skipArray)) {\r\n props[key] = {\r\n enumerable: true,\r\n configurable: true,\r\n get: function get() {\r\n if (vm.$$computed && key in vm.$$computed) {\r\n return vm.$$computed[key];\r\n }\r\n if (vm.$$state && key in vm.$$state) {\r\n return vm.$$state[key];\r\n }\r\n if (vm.$$model && key in vm.$$model) {\r\n return vm.$$model[key];\r\n }\r\n var p = vm._parent;\r\n while (p) {\r\n if (p.$$context && key in p.$$context) {\r\n return p.$$context[key];\r\n }\r\n p = p._parent;\r\n }\r\n },\r\n set: function set(val) {\r\n if (vm.$$state && key in vm.$$state) {\r\n return vm.$$state[key] = val;\r\n }\r\n if (vm.$$model && key in vm.$$model) {\r\n return vm.$$model[key] = val;\r\n }\r\n var p = vm._parent;\r\n while (p) {\r\n if (p.$$context && key in p.$$context) {\r\n return p.$$context[key] = val;\r\n }\r\n p = p._parent;\r\n }\r\n }\r\n };\r\n }\r\n };\r\n\r\n for (var i = 0, len = keys.length; i < len; i++) {\r\n _loop(i, len);\r\n }\r\n vm.model = createViewModel$1({}, props);\r\n }\r\n\r\n function defineContext(vm, keys) {\r\n var props = {};\r\n\r\n var _loop2 = function _loop2(i, len) {\r\n var key = keys[i];\r\n if (!(key in $$skipArray)) {\r\n props[key] = {\r\n enumerable: true,\r\n configurable: true,\r\n get: function get() {\r\n return vm.model[key];\r\n },\r\n set: function set(val) {\r\n return vm.model[key] = val;\r\n }\r\n };\r\n }\r\n };\r\n\r\n for (var i = 0, len = keys.length; i < len; i++) {\r\n _loop2(i, len);\r\n }\r\n vm.$$context = createViewModel$1({}, props);\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 if (model instanceof Observer || model instanceof Model) {\r\n model = model.model;\r\n }\r\n if (model && model.__ob__) {\r\n this.$$model = model;\r\n } else {\r\n this.options = model || {};\r\n }\r\n this._parent = Model.target;\r\n var state = _.isFunction(this.state) ? this.state() : this.state;\r\n var computed = this.computed;\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 keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context || []);\r\n var mixins = this.mixins;\r\n defineProps(this, keys);\r\n childContext && defineContext(this, childContext);\r\n this.$$model && (this.model.__ob__ = this.$$model.__ob__);\r\n initMixins(this, mixins);\r\n this.init();\r\n initState(this, state);\r\n initComputed(this, computed);\r\n initWatch(this, watch$$1);\r\n initMethods(this, actions);\r\n this.created && this.created();\r\n if (this.$$model) {\r\n return this.model;\r\n }\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 for (var _key3 in this._computedWatchers) {\r\n this._computedWatchers[_key3].teardown();\r\n }\r\n _.each(this._watchers, function (unwatches) {\r\n unwatches = _.isArray(unwatches) ? unwatches : [unwatches];\r\n _.each(unwatches, function (unwatch) {\r\n unwatch();\r\n });\r\n });\r\n this._watchers && (this._watchers = []);\r\n this.destroyed && this.destroyed();\r\n this.$$model = null;\r\n this.$$computed = null;\r\n this.$$state = null;\r\n };\r\n\r\n return Model;\r\n }();\r\n\r\n function toJSON(model) {\r\n var result = void 0;\r\n if (_.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 _key4 in model) {\r\n if (!_.has($$skipArray, _key4)) {\r\n result[_key4] = toJSON(model[_key4]);\r\n }\r\n }\r\n } else {\r\n result = model;\r\n }\r\n return result;\r\n }\r\n\r\n function define(model) {\r\n return new Observer(model).model;\r\n }\r\n var version = '2.0';\r\n\r\n exports.define = define;\r\n exports.version = version;\r\n exports.$$skipArray = $$skipArray;\r\n exports.mixin = mixin;\r\n exports.Model = Model;\r\n exports.observerState = observerState;\r\n exports.Observer = Observer;\r\n exports.observe = observe;\r\n exports.notify = notify;\r\n exports.defineReactive = defineReactive;\r\n exports.set = set;\r\n exports.del = del;\r\n exports.Watcher = Watcher;\r\n exports.pushTarget = pushTarget;\r\n exports.popTarget = popTarget;\r\n exports.watch = watch;\r\n exports.toJSON = toJSON;\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 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, cb, options) {\r\n if (BI.isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n options = options || {};\r\n return Fix.watch(vm.model, keyOrFn, _.bind(cb, vm), BI.extend(options, {\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 try {\r\n var res = cb.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\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 // try {\r\n // var result = _create.apply(this, arguments);\r\n // } catch (e) {\r\n // console.error(e);\r\n // }\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 try {\r\n var result = old.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\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 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 try {\r\n _init.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\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 // try {\r\n // _render.apply(this, arguments);\r\n // } catch (e) {\r\n // console.error(e);\r\n // }\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 try {\r\n unMount.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\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 if (BI.isIE9Below && BI.isIE9Below()) {\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 BI.watch = Fix.watch;\r\n}());\r\n(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}());BI.i18n = {\r\n \"BI-Multi_Date_Quarter_End\": \"季度末\",\r\n \"BI-Multi_Date_Month_Begin\": \"月初\",\r\n \"BI-Multi_Date_YMD\": \"年月日\",\r\n \"BI-Custom_Color\": \"自定义颜色\",\r\n \"BI-Numerical_Interval_Input_Data\": \"请输入数值\",\r\n \"BI-Please_Input_Natural_Number\": \"请输入非负整数\",\r\n \"BI-No_More_Data\": \"无更多数据\",\r\n \"BI-Basic_Altogether\": \"共\",\r\n \"BI-Basic_Sunday\": \"星期日\",\r\n \"BI-Widget_Background_Colour\": \"组件背景\",\r\n \"BI-Color_Picker_Error_Text\": \"请输入0~255的正整数\",\r\n \"BI-Multi_Date_Month\": \"月\",\r\n \"BI-No_Selected_Item\": \"没有可选项\",\r\n \"BI-Multi_Date_Year_Begin\": \"年初\",\r\n \"BI-Quarter_1\": \"第1季度\",\r\n \"BI-Quarter_2\": \"第2季度\",\r\n \"BI-Quarter_3\": \"第3季度\",\r\n \"BI-Quarter_4\": \"第4季度\",\r\n \"BI-Multi_Date_Year_Next\": \"年后\",\r\n \"BI-Multi_Date_Month_Prev\": \"个月前\",\r\n \"BI-Month_Trigger_Error_Text\": \"请输入1~12的正整数\",\r\n \"BI-Less_And_Equal\": \"小于等于\",\r\n \"BI-Year_Trigger_Invalid_Text\": \"请输入有效时间\",\r\n \"BI-Multi_Date_Week_Next\": \"周后\",\r\n \"BI-Font_Size\": \"字号\",\r\n \"BI-Basic_Total\": \"共\",\r\n \"BI-Already_Selected\": \"已选择\",\r\n \"BI-Formula_Insert\": \"插入\",\r\n \"BI-Select_All\": \"全选\",\r\n \"BI-Basic_Tuesday\": \"星期二\",\r\n \"BI-Multi_Date_Month_End\": \"月末\",\r\n \"BI-Load_More\": \"点击加载更多数据\",\r\n \"BI-Basic_September\": \"九月\",\r\n \"BI-Current_Is_Last_Page\": \"当前已是最后一页\",\r\n \"BI-Basic_Auto\": \"自动\",\r\n \"BI-Basic_Count\": \"个\",\r\n \"BI-Basic_Value\": \"值\",\r\n \"BI-Basic_Unrestricted\": \"无限制\",\r\n \"BI-Quarter_Trigger_Error_Text\": \"请输入1~4的正整数\",\r\n \"BI-Basic_More\": \"更多\",\r\n \"BI-Basic_Wednesday\": \"星期三\",\r\n \"BI-Basic_Bold\": \"加粗\",\r\n \"BI-Basic_Simple_Saturday\": \"六\",\r\n \"BI-Multi_Date_Month_Next\": \"个月后\",\r\n \"BI-Basic_March\": \"三月\",\r\n \"BI-Current_Is_First_Page\": \"当前已是第一页\",\r\n \"BI-Basic_Thursday\": \"星期四\",\r\n \"BI-Basic_Prompt\": \"提示\",\r\n \"BI-Multi_Date_Today\": \"今天\",\r\n \"BI-Multi_Date_Quarter_Prev\": \"个季度前\",\r\n \"BI-Row_Header\": \"行表头\",\r\n \"BI-Date_Trigger_Error_Text\": \"日期格式示例:2015-3-11\",\r\n \"BI-Basic_Cancel\": \"取消\",\r\n \"BI-Basic_January\": \"一月\",\r\n \"BI-Basic_June\": \"六月\",\r\n \"BI-Basic_July\": \"七月\",\r\n \"BI-Basic_April\": \"四月\",\r\n \"BI-Multi_Date_Quarter_Begin\": \"季度初\",\r\n \"BI-Multi_Date_Week\": \"周\",\r\n \"BI-Click_Blank_To_Select\": \"点击\\\"空格键\\\"选中完全匹配项\",\r\n \"BI-Basic_August\": \"八月\",\r\n \"BI-Word_Align_Left\": \"文字居左\",\r\n \"BI-Basic_November\": \"十一月\",\r\n \"BI-Font_Colour\": \"字体颜色\",\r\n \"BI-Multi_Date_Day_Prev\": \"天前\",\r\n \"BI-Select_Part\": \"部分选择\",\r\n \"BI-Multi_Date_Day_Next\": \"天后\",\r\n \"BI-Less_Than\": \"小于\",\r\n \"BI-Basic_February\": \"二月\",\r\n \"BI-Multi_Date_Year\": \"年\",\r\n \"BI-Number_Index\": \"序号\",\r\n \"BI-Multi_Date_Week_Prev\": \"周前\",\r\n \"BI-Next_Page\": \"下一页\",\r\n \"BI-Right_Page\": \"向右翻页\",\r\n \"BI-Numerical_Interval_Signal_Value\": \"前后值相等,请将操作符改为“≤”\",\r\n \"BI-Basic_December\": \"十二月\",\r\n \"BI-Basic_Saturday\": \"星期六\",\r\n \"BI-Basic_Simple_Wednesday\": \"三\",\r\n \"BI-Multi_Date_Quarter_Next\": \"个季度后\",\r\n \"BI-Basic_October\": \"十月\",\r\n \"BI-Basic_Simple_Friday\": \"五\",\r\n \"BI-Basic_Save\": \"保存\",\r\n \"BI-Numerical_Interval_Number_Value\": \"请保证前面的数值小于/等于后面的数值\",\r\n \"BI-Previous_Page\": \"上一页\",\r\n \"BI-No_Select\": \"搜索结果为空\",\r\n \"BI-Basic_Clears\": \"清空\",\r\n \"BI-Created_By_Me\": \"我创建的\",\r\n \"BI-Basic_Simple_Tuesday\": \"二\",\r\n \"BI-Word_Align_Right\": \"文字居右\",\r\n \"BI-Summary_Values\": \"汇总\",\r\n \"BI-Basic_Clear\": \"清除\",\r\n \"BI-Upload_File_Size_Error\": \"文件大小不支持\",\r\n \"BI-Up_Page\": \"向上翻页\",\r\n \"BI-Basic_Simple_Sunday\": \"日\",\r\n \"BI-Multi_Date_Relative_Current_Time\": \"相对当前时间\",\r\n \"BI-Selected_Data\": \"已选数据:\",\r\n \"BI-Multi_Date_Quarter\": \"季度\",\r\n \"BI-Check_Selected\": \"查看已选\",\r\n \"BI-Basic_Search\": \"搜索\",\r\n \"BI-Basic_May\": \"五月\",\r\n \"BI-Continue_Select\": \"继续选择\",\r\n \"BI-Please_Input_Positive_Integer\": \"请输入正整数\",\r\n \"BI-Upload_File_Type_Error\": \"文件类型不支持\",\r\n \"BI-Upload_File_Error\": \"文件上传失败\",\r\n \"BI-Basic_Friday\": \"星期五\",\r\n \"BI-Down_Page\": \"向下翻页\",\r\n \"BI-Basic_Monday\": \"星期一\",\r\n \"BI-Left_Page\": \"向左翻页\",\r\n \"BI-Transparent_Color\": \"透明\",\r\n \"BI-Basic_Simple_Monday\": \"一\",\r\n \"BI-Multi_Date_Year_End\": \"年末\",\r\n \"BI-Time_Interval_Error_Text\": \"请保证开始时间早于/等于结束时间\",\r\n \"BI-Basic_Time\": \"时间\",\r\n \"BI-Basic_OK\": \"确定\",\r\n \"BI-Basic_Sure\": \"确定\",\r\n \"BI-Basic_Simple_Thursday\": \"四\",\r\n \"BI-Multi_Date_Year_Prev\": \"年前\",\r\n \"BI-Tiao_Data\": \"条数据\",\r\n \"BI-Basic_Italic\": \"斜体\",\r\n \"BI-Basic_Dynamic_Title\": \"动态时间\",\r\n \"BI-Basic_Year\": \"年\",\r\n \"BI-Basic_Single_Quarter\": \"季\",\r\n \"BI-Basic_Month\": \"月\",\r\n \"BI-Basic_Week\": \"周\",\r\n \"BI-Basic_Day\": \"天\",\r\n \"BI-Basic_Work_Day\": \"工作日\",\r\n \"BI-Basic_Front\": \"前\",\r\n \"BI-Basic_Behind\": \"后\",\r\n \"BI-Basic_Empty\": \"空\",\r\n \"BI-Basic_Month_End\": \"月末\",\r\n \"BI-Basic_Month_Begin\": \"月初\",\r\n \"BI-Basic_Year_End\": \"年末\",\r\n \"BI-Basic_Year_Begin\": \"年初\",\r\n \"BI-Basic_Quarter_End\": \"季末\",\r\n \"BI-Basic_Quarter_Begin\": \"季初\",\r\n \"BI-Basic_Week_End\": \"周末\",\r\n \"BI-Basic_Week_Begin\": \"周初\",\r\n \"BI-Basic_Current_Day\": \"当天\",\r\n \"BI-Basic_Begin_Start\": \"初\",\r\n \"BI-Basic_End_Stop\": \"末\",\r\n \"BI-Basic_Current_Year\": \"今年\",\r\n \"BI-Basic_Year_Fen\": \"年份\",\r\n \"BI-Basic_Current_Month\": \"本月\",\r\n \"BI-Basic_Current_Quarter\": \"本季度\",\r\n \"BI-Basic_Year_Month\": \"年月\",\r\n \"BI-Basic_Year_Quarter\": \"年季度\",\r\n \"BI-Basic_Input_Can_Not_Null\": \"输入框不能为空\",\r\n \"BI-Basic_Date_Time_Error_Text\": \"日期格式示例:2015-3-11 00:00:00\",\r\n \"BI-Basic_Input_From_To_Number\": \"请输入{R1}的数值\",\r\n \"BI-Basic_Or\": \"或\",\r\n \"BI-Basic_And\": \"且\",\r\n \"BI-Conf_Add_Formula\": \"添加公式\",\r\n \"BI-Conf_Add_Condition\": \"添加条件\",\r\n \"BI-Conf_Formula_And\": \"且公式条件\",\r\n \"BI-Conf_Formula_Or\": \"或公式条件\",\r\n \"BI-Conf_Condition_And\": \"且条件\",\r\n \"BI-Conf_Condition_Or\": \"或条件\",\r\n \"BI-Microsoft_YaHei\": \"微软雅黑\",\r\n \"BI-Apple_Light\": \"苹方-light\",\r\n \"BI-Font_Family\": \"字体\",\r\n \"BI-Basic_Please_Input_Content\": \"请输入内容\",\r\n \"BI-Word_Align_Center\": \"文字居中\",\r\n \"BI-Basic_Please_Enter_Number_Between\": \"请输入{R1}-{R2}的值\",\r\n \"BI-More_Than\": \"大于\",\r\n \"BI-More_And_Equal\": \"大于等于\",\r\n \"BI-Please_Enter_SQL\": \"请输入SQL\",\r\n \"BI-Basic_Click_To_Add_Text\": \"+点击新增\\\"{R1}\\\"\",\r\n \"BI-Basic_Please_Select\": \"请选择\",\r\n \"BI-Basic_Font_Color\": \"文字颜色\",\r\n \"BI-Basic_Background_Color\": \"背景色\",\r\n \"BI-Basic_Underline\": \"下划线\",\r\n \"BI-Basic_Param_Month\": \"{R1}月\",\r\n \"BI-Basic_Param_Day\": \"{R1}日\",\r\n \"BI-Basic_Param_Quarter\": \"{R1}季度\",\r\n \"BI-Basic_Param_Week_Count\": \"第{R1}周\",\r\n \"BI-Basic_Param_Hour\": \"{R1}时\",\r\n \"BI-Basic_Param_Minute\": \"{R1}分\",\r\n \"BI-Basic_Param_Second\": \"{R1}秒\",\r\n \"BI-Basic_Param_Year\": \"{R1}年\",\r\n \"BI-Basic_Date_Day\": \"日\",\r\n \"BI-Basic_Hour_Sin\": \"时\",\r\n \"BI-Basic_Seconds\": \"秒\",\r\n \"BI-Basic_Minute\": \"分\",\r\n \"BI-Basic_Wan\": \"万\",\r\n \"BI-Basic_Million\": \"百万\",\r\n \"BI-Basic_Billion\": \"亿\",\r\n \"BI-Basic_Quarter\": \"季度\",\r\n \"BI-Basic_No_Select\": \"不选\",\r\n \"BI-Basic_Now\": \"此刻\"\r\n};\n//# sourceMappingURL=bundle.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 = 313);\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","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 { _AbstractTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser\";\r\nimport { _AbstractListTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser.list\";\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 { _DownListCombo, _DownListComboStatic } from \"./widget/downlist/combo.downlist\";\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 DownListCombo: ClassConstructor<_DownListCombo> & _DownListComboStatic;\r\n}\r\n\r\nexport default {\r\n Decorators: decorator,\r\n};\r\n","import fineui from \"./index\";\r\n\r\nBI.extend(BI, fineui);\r\n"]} |