/*! fineui 2020-06-12 17:35:55 */
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) throw new TypeError ( "Cannot call a class as a function" ) } ! function ( e ) { function o ( t ) { if ( r [ t ] ) return r [ t ] . exports ; var n = r [ t ] = { i : t , l : ! 1 , exports : { } } ; return e [ t ] . call ( n . exports , n , n . exports , o ) , n . l = ! 0 , n . exports } var r = { } ; o . m = e , o . c = r , o . d = function ( t , n , e ) { o . o ( t , n ) || Object . defineProperty ( t , n , { enumerable : ! 0 , get : e } ) } , o . r = function ( t ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( t , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) } , o . t = function ( n , t ) { if ( 1 & t && ( n = o ( n ) ) , 8 & t ) return n ; if ( 4 & t && "object" == typeof n && n && n . _ _esModule ) return n ; var e = Object . create ( null ) ; if ( o . r ( e ) , Object . defineProperty ( e , "default" , { enumerable : ! 0 , value : n } ) , 2 & t && "string" != typeof n ) for ( var r in n ) o . d ( e , r , function ( t ) { return n [ t ] } . bind ( null , r ) ) ; return e } , o . n = function ( t ) { var n = t && t . _ _esModule ? function ( ) { return t [ "default" ] } : function ( ) { return t } ; return o . d ( n , "a" , n ) , n } , o . o = function ( t , n ) { return Object . prototype . hasOwnProperty . call ( t , n ) } , o . p = "" , o ( o . s = 78 ) } ( [ function ( e , t , n ) { ( function ( t ) { var n = function ( t ) { return t && t . Math == Math && t } ; e . exports = n ( "object" == typeof globalThis && globalThis ) || n ( "object" == typeof window && window ) || n ( "object" == typeof self && self ) || n ( "object" == typeof t && t ) || Function ( "return this" ) ( ) } ) . call ( this , n ( 82 ) ) } , function ( t , n , e ) { var r = e ( 0 ) , o = e ( 22 ) , i = e ( 31 ) , u = e ( 56 ) , c = r . Symbol , f = o ( "wks" ) ; t . exports = function ( t ) { return f [ t ] || ( f [ t ] = u && c [ t ] || ( u ? c : i ) ( "Symbol." + t ) ) } } , function ( t , n , e ) { var s = e ( 0 ) , l = e ( 28 ) . f , p = e ( 8 ) , d = e ( 11 ) , v = e ( 41 ) , h = e ( 85 ) , y = e ( 45 ) ; t . exports = function ( t , n ) { var e , r , o , i , u = t . target , c = t . global , f = t . stat , a = c ? s : f ? s [ u ] || v ( u , { } ) : ( s [ u ] || { } ) . prototype ; if ( a ) for ( e in n ) { if ( o = n [ e ] , r = t . noTargetGet ? ( i = l ( a , e ) ) && i . value : a [ e ] , ! y ( c ? e : u + ( f ? "." : "#" ) + e , t . forced ) && void 0 !== r ) { if ( typeof o == typeof r ) continue ; h ( o , r ) } ( t . sham || r && r . sham ) && p ( o , "sham" , ! 0 ) , d ( a , e , o , t ) } } } , function ( t , n ) { t . exports = function ( t ) { try { return ! ! t ( ) } catch ( n ) { return ! 0 } } } , function ( t , n ) { t . exports = function ( t ) { return "object" == typeof t ? null !== t : "function" == typeof t } } , function ( t , n , e ) { var r = e ( 4 ) ; t . exports = function ( t ) { if ( ! r ( t ) ) throw TypeError ( String ( t ) + " is not an object" ) ; return t } } , function ( t , n , e ) { var r = e ( 3 ) ; t . exports = ! r ( function ( ) { return 7 != Object . defineProperty ( { } , "a" , { get : function ( ) { return 7 } } ) . a } ) } , function ( t , n ) { var e = { } . hasOwnProperty ; t . exports = function ( t , n ) { return e . call ( t , n ) } } , function ( t , n , e ) { var r = e ( 6 ) , o = e ( 9 ) , i = e ( 21 ) ; t . exports = r ? function ( t , n , e ) { return o . f ( t , n , i ( 1 , e ) ) } : function ( t , n , e ) { return t [ n ] = e , t } } , function ( t , n , e ) { var r = e ( 6 ) , o = e ( 51 ) , i = e ( 5 ) , u = e ( 39 ) , c = Object . defineProperty ; n . f = r ? c : function ( t , n , e ) { if ( i ( t ) , n = u ( n , ! 0 ) , i ( e ) , o ) try { return c ( t , n , e ) } catch ( r ) { } if ( "get" in e || "set" in e ) throw TypeError ( "Accessors not supported" ) ; return "value" in e && ( t [ n ] = e . value ) , t } } , function ( t , n , e ) { t . exports = e ( 0 ) } , function ( t , n , e ) { var c = e ( 0 ) , r = e ( 22 ) , f = e ( 8 ) , a = e ( 7 ) , s = e ( 41 ) , o = e ( 52 ) , i = e ( 13 ) , u = i . get , l = i . enforce , p = String ( o ) . split ( "toString" ) ; r ( "inspectSource" , function ( t ) { return o . call ( t ) } ) , ( t . exports = function ( t , n , e , r ) { var o = ! ! r && ! ! r . unsafe , i = ! ! r && ! ! r . enumerable , u = ! ! r && ! ! r . noTargetGet ; "function" == typeof e && ( "string" != typeof n || a ( e , "name" ) || f ( e , "name" , n ) , l ( e ) . source = p . join ( "string" == typeof n ? n : "" ) ) , t !== c ? ( o ? ! u && t [ n ] && ( i = ! 0 ) : delete t [ n ] , i ? t [ n ] = e : f ( t , n , e ) ) : i ? t [ n ] = e : s ( n , e ) } ) ( Function . prototype , "toString" , function ( ) { return "function" == typeof this && u ( this ) . source || o . call ( this ) } ) } , function ( t , n ) { var e = { } . toString ; t . exports = function ( t ) { return e . call ( t ) . slice ( 8 , - 1 ) } } , function ( t , n , e ) { var r , o , i , u , c , f , a , s , l = e ( 84 ) , p = e ( 0 ) , d = e ( 4 ) , v = e ( 8 ) , h = e ( 7 ) , y = e ( 30 ) , g = e ( 23 ) , x = p . WeakMap ; a = l ? ( r = new x , o = r . get , i = r . has , u = r . set , c = function ( t , n ) { return u . call ( r , t , n ) , n } , f = function ( t ) { return o . call ( r , t ) || { } } , function ( t ) { return i . call ( r , t ) } ) : ( g [ s = y ( "state" ) ] = ! 0 , c = function ( t , n ) { return v ( t , s , n ) , n } , f = function ( t ) { return h ( t , s ) ? t [ s ] : { } } , function ( t ) { return h ( t , s ) } ) , t . exports = { set : c , get : f , has : a , enforce : function ( t ) { return a ( t ) ? f ( t ) : c ( t , { } ) } , getterFor : function ( e ) { return function ( t ) { var n ; if ( ! d ( t ) || ( n = f ( t ) ) . type !== e ) throw TypeError ( "Incompatible receiver, " + e + " required" ) ; return n } } } } , function ( t , n ) { t . exports = function ( t ) { if ( "function" != typeof t ) throw TypeError ( String ( t ) + " is no
b ( t , function ( t ) { n . call ( e , t ) . then ( r . resolve , o ) } ) } ) ; return n . error && o ( n . value ) , r . promise } } ) } , function ( t , n , e ) { var r = e ( 1 ) , o = e ( 26 ) , i = r ( "iterator" ) , u = Array . prototype ; t . exports = function ( t ) { return void 0 !== t && ( o . Array === t || u [ i ] === t ) } } , function ( t , n , e ) { var r = e ( 63 ) , o = e ( 26 ) , i = e ( 1 ) ( "iterator" ) ; t . exports = function ( t ) { if ( void 0 != t ) return t [ i ] || t [ "@@iterator" ] || o [ r ( t ) ] } } , function ( t , n , e ) { var u = e ( 5 ) ; t . exports = function ( t , n , e , r ) { try { return r ? n ( u ( e ) [ 0 ] , e [ 1 ] ) : n ( e ) } catch ( i ) { var o = t [ "return" ] ; throw void 0 !== o && u ( o . call ( t ) ) , i } } } , function ( t , n , e ) { var r , o , i , u , c , f , a , s , l = e ( 0 ) , p = e ( 28 ) . f , d = e ( 12 ) , v = e ( 73 ) . set , h = e ( 50 ) , y = l . MutationObserver || l . WebKitMutationObserver , g = l . process , x = l . Promise , m = "process" == d ( g ) , b = p ( l , "queueMicrotask" ) , O = b && b . value ; O || ( r = function ( ) { var t , n ; for ( m && ( t = g . domain ) && t . exit ( ) ; o ; ) { n = o . fn , o = o . next ; try { n ( ) } catch ( e ) { throw o ? u ( ) : i = void 0 , e } } i = void 0 , t && t . enter ( ) } , u = m ? function ( ) { g . nextTick ( r ) } : y && ! /(iphone|ipod|ipad).*applewebkit/i . test ( h ) ? ( c = ! 0 , f = document . createTextNode ( "" ) , new y ( r ) . observe ( f , { characterData : ! 0 } ) , function ( ) { f . data = c = ! c } ) : x && x . resolve ? ( a = x . resolve ( void 0 ) , s = a . then , function ( ) { s . call ( a , r ) } ) : function ( ) { v . call ( l , r ) } ) , t . exports = O || function ( t ) { var n = { fn : t , next : void 0 } ; i && ( i . next = n ) , o || ( o = n , u ( ) ) , i = n } } , function ( t , n , e ) { var r = e ( 0 ) ; t . exports = function ( t , n ) { var e = r . console ; e && e . error && ( 1 === arguments . length ? e . error ( t ) : e . error ( t , n ) ) } } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 16 ) , i = e ( 68 ) , u = e ( 17 ) , c = e ( 72 ) , f = e ( 74 ) , a = e ( 11 ) ; r ( { target : "Promise" , proto : ! 0 , real : ! 0 } , { "finally" : function ( n ) { var e = c ( this , u ( "Promise" ) ) , t = "function" == typeof n ; return this . then ( t ? function ( t ) { return f ( e , n ( ) ) . then ( function ( ) { return t } ) } : n , t ? function ( t ) { return f ( e , n ( ) ) . then ( function ( ) { throw t } ) } : n ) } } ) , o || "function" != typeof i || i . prototype [ "finally" ] || a ( i . prototype , "finally" , u ( "Promise" ) . prototype [ "finally" ] ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 6 ) , i = e ( 34 ) , u = e ( 48 ) , c = e ( 18 ) , f = e ( 9 ) , a = e ( 21 ) , s = e ( 20 ) , l = e ( 8 ) , p = e ( 5 ) , d = e ( 13 ) , v = d . set , h = d . getterFor ( "AggregateError" ) , y = function ( t , n ) { var e = this ; if ( ! ( e instanceof y ) ) return new y ( t , n ) ; u && ( e = u ( new Error ( n ) , i ( e ) ) ) ; var r = [ ] ; return s ( t , r . push , r ) , o ? v ( e , { errors : r , type : "AggregateError" } ) : e . errors = r , void 0 !== n && l ( e , "message" , String ( n ) ) , e } ; y . prototype = c ( Error . prototype , { constructor : a ( 5 , y ) , message : a ( 5 , "" ) , name : a ( 5 , "AggregateError" ) , toString : a ( 5 , function ( ) { var t = void 0 === ( t = p ( this ) . name ) ? "AggregateError" : String ( t ) , n = this . message ; return t + ": " + ( n = void 0 === n ? "" : String ( n ) ) } ) } ) , o && f . f ( y . prototype , "errors" , { get : function ( ) { return h ( this ) . errors } , configurable : ! 0 } ) , r ( { global : ! 0 } , { AggregateError : y } ) } , function ( t , n , e ) { e ( 75 ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 27 ) , i = e ( 36 ) ; r ( { target : "Promise" , stat : ! 0 } , { "try" : function ( t ) { var n = o . f ( this ) , e = i ( t ) ; return ( e . error ? n . reject : n . resolve ) ( e . value ) , n . promise } } ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , l = e ( 14 ) , p = e ( 17 ) , o = e ( 27 ) , i = e ( 36 ) , d = e ( 20 ) , v = "No one promise resolved" ; r ( { target : "Promise" , stat : ! 0 } , { any : function ( t ) { var f = this , n = o . f ( f ) , a = n . resolve , s = n . reject , e = i ( function ( ) { var r = l ( f . resolve ) , o = [ ] , i = 0 , u = 1 , c = ! 1 ; d ( t , function ( t ) { var n = i ++ , e = ! 1 ; o . push ( void 0 ) , u ++ , r . call ( f , t ) . then ( function ( t ) { e || c || ( c = ! 0 , a ( t ) ) } , function ( t ) { e || c || ( e = ! 0 , o [ n ] = t , -- u || s ( new ( p ( "AggregateError" ) ) ( o , v ) ) ) } ) } ) , -- u || s ( new ( p ( "AggregateError" ) ) ( o , v ) ) } ) ; return e . error && s ( e . value ) , n . promise } } ) } , function ( t , n , e ) { t . exports = e ( 136 ) } , function ( t , n , e ) { e ( 137 ) ; var r = e ( 35 ) ; t . exports = r ( "String" , "replace" ) } , function ( t , n , e ) { "use strict" ; var r = e ( 138 ) , j = e ( 5 ) , w = e ( 19 ) , E = e ( 32 ) , P = e ( 33 ) , i = e ( 29 ) , A = e ( 140 ) , T = e ( 141 ) , k = Math . max , I = Math . min , M = Math . floor , L = /\$([$&'`]|\d\d?|<[^>]*>)/g , _ = /\$([$&'`]|\d\d?)/g ; r ( "replace" , 2 , function ( o , O , S ) { return [ function ( t , n ) { var e = i ( this ) , r = void 0 == t ? void 0 : t [ o ] ; return void 0 !== r ? r . call ( t , e , n ) : O . call ( String ( e ) , t , n ) } , function ( t , n ) { var e = S ( O , t , this , n ) ; if ( e . done ) return e . value ; var r = j ( t ) , o = String ( this ) , i = "function" == typeof n ; i || ( n = String ( n ) ) ; var u , c = r . global ; c && ( u = r . unicode , r . lastIndex = 0 ) ; for ( var f = [ ] ; ; ) { var a = T ( r , o ) ; if ( null === a ) break ; if ( f . push ( a ) , ! c ) break ; "" === String ( a [ 0 ] ) && ( r . lastIndex = A ( o , E ( r . lastIndex ) , u ) ) } for ( var s , l = "" , p = 0 , d = 0 ; d < f . length ; d ++ ) { a = f [ d ] ; for ( var v = String ( a [ 0 ] ) , h = k ( I ( P ( a . index ) , o . length ) , 0 ) , y = [ ] , g = 1 ; g < a . length ; g ++ ) y . push ( void 0 === ( s = a [
if ( isSameTag && isBuffer ( object ) ) { if ( ! isBuffer ( other ) ) return ! 1 ; objIsArr = ! 0 , objIsObj = ! 1 } if ( isSameTag && ! objIsObj ) return stack || ( stack = new Stack ) , objIsArr || isTypedArray ( object ) ? equalArrays ( object , other , bitmask , customizer , equalFunc , stack ) : equalByTag ( object , other , objTag , bitmask , customizer , equalFunc , stack ) ; if ( ! ( bitmask & COMPARE _PARTIAL _FLAG ) ) { var objIsWrapped = objIsObj && hasOwnProperty . call ( object , "__wrapped__" ) , othIsWrapped = othIsObj && hasOwnProperty . call ( other , "__wrapped__" ) ; if ( objIsWrapped || othIsWrapped ) { var objUnwrapped = objIsWrapped ? object . value ( ) : object , othUnwrapped = othIsWrapped ? other . value ( ) : other ; return stack || ( stack = new Stack ) , equalFunc ( objUnwrapped , othUnwrapped , bitmask , customizer , stack ) } } return ! ! isSameTag && ( stack || ( stack = new Stack ) , equalObjects ( object , other , bitmask , customizer , equalFunc , stack ) ) } function baseIsMap ( value ) { return isObjectLike ( value ) && getTag ( value ) == mapTag } function baseIsMatch ( object , source , matchData , customizer ) { var index = matchData . length , length = index , noCustomizer = ! customizer ; if ( null == object ) return ! length ; for ( object = Object ( object ) ; index -- ; ) { var data = matchData [ index ] ; if ( noCustomizer && data [ 2 ] ? data [ 1 ] !== object [ data [ 0 ] ] : ! ( data [ 0 ] in object ) ) return ! 1 } for ( ; ++ index < length ; ) { data = matchData [ index ] ; var key = data [ 0 ] , objValue = object [ key ] , srcValue = data [ 1 ] ; if ( noCustomizer && data [ 2 ] ) { if ( objValue === undefined && ! ( key in object ) ) return ! 1 } else { var stack = new Stack ; if ( customizer ) var result = customizer ( objValue , srcValue , key , object , source , stack ) ; if ( ! ( result === undefined ? baseIsEqual ( srcValue , objValue , COMPARE _PARTIAL _FLAG | COMPARE _UNORDERED _FLAG , customizer , stack ) : result ) ) return ! 1 } } return ! 0 } function baseIsNative ( value ) { if ( ! isObject ( value ) || isMasked ( value ) ) return ! 1 ; var pattern = isFunction ( value ) ? reIsNative : reIsHostCtor ; return pattern . test ( toSource ( value ) ) } function baseIsRegExp ( value ) { return isObjectLike ( value ) && baseGetTag ( value ) == regexpTag } function baseIsSet ( value ) { return isObjectLike ( value ) && getTag ( value ) == setTag } function baseIsTypedArray ( value ) { return isObjectLike ( value ) && isLength ( value . length ) && ! ! typedArrayTags [ baseGetTag ( value ) ] } function baseIteratee ( value ) { return "function" == typeof value ? value : null == value ? identity : "object" == typeof value ? isArray ( value ) ? baseMatchesProperty ( value [ 0 ] , value [ 1 ] ) : baseMatches ( value ) : property ( value ) } function baseKeys ( object ) { if ( ! isPrototype ( object ) ) return nativeKeys ( object ) ; var result = [ ] ; for ( var key in Object ( object ) ) hasOwnProperty . call ( object , key ) && "constructor" != key && result . push ( key ) ; return result } function baseKeysIn ( object ) { if ( ! isObject ( object ) ) return nativeKeysIn ( object ) ; var isProto = isPrototype ( object ) , result = [ ] ; for ( var key in object ) ( "constructor" != key || ! isProto && hasOwnProperty . call ( object , key ) ) && result . push ( key ) ; return result } function baseLt ( value , other ) { return value < other } function baseMap ( collection , iteratee ) { var index = - 1 , result = isArrayLike ( collection ) ? Array ( collection . length ) : [ ] ; return baseEach ( collection , function ( value , key , collection ) { result [ ++ index ] = iteratee ( value , key , collection ) } ) , result } function baseMatches ( source ) { var matchData = getMatchData ( source ) ; return 1 == matchData . length && matchData [ 0 ] [ 2 ] ? matchesStrictComparable ( matchData [ 0 ] [ 0 ] , matchData [ 0 ] [ 1 ] ) : function ( object ) { return object === source || baseIsMatch ( object , source , matchData ) } } function baseMatchesProperty ( path , srcValue ) { return isKey ( path ) && isStrictComparable ( srcValue ) ? matchesStrictComparable ( toKey ( path ) , srcValue ) : function ( object ) { var objValue = get ( object , path ) ; return objValue === undefined && objValue === srcValue ? hasIn ( object , path ) : baseIsEqual ( srcValue , objValue , COMPARE _PARTIAL _FLAG | COMPARE _UNORDERED _FLAG ) } } function baseMerge ( object , source , srcIndex , customizer , stack ) { object !== source && baseFor ( source , function ( srcValue , key ) { if ( isObject ( srcValue ) ) stack || ( stack = new Stack ) , baseMergeDeep ( object , source , key , srcIndex , baseMerge , customizer , stack ) ; else { var newValue = customizer ? customizer ( safeGet ( object , key ) , srcValue , key + "" , object , source , stack ) : undefined ; newValue === undefined && ( newValue = srcValue ) , assignMergeValue ( object , key , newValue ) } } , keysIn ) } function baseMergeDeep ( object , source , key , srcIndex , mergeFunc , customizer , stack ) { var objValue = safeGet ( object , key ) , srcValue = safeGet ( source , key )
} return array } function setWrapToString ( wrapper , reference , bitmask ) { var source = reference + "" ; return setToString ( wrapper , insertWrapDetails ( source , updateWrapDetails ( getWrapDetails ( source ) , bitmask ) ) ) } function shortOut ( func ) { var count = 0 , lastCalled = 0 ; return function ( ) { var stamp = nativeNow ( ) , remaining = HOT _SPAN - ( stamp - lastCalled ) ; if ( lastCalled = stamp , remaining > 0 ) { if ( ++ count >= HOT _COUNT ) return arguments [ 0 ] } else count = 0 ; return func . apply ( undefined , arguments ) } } function toKey ( value ) { if ( "string" == typeof value || isSymbol ( value ) ) return value ; var result = value + "" ; return "0" == result && 1 / value == - INFINITY ? "-0" : result } function toSource ( func ) { if ( null != func ) { try { return funcToString . call ( func ) } catch ( e ) { } try { return func + "" } catch ( e ) { } } return "" } function updateWrapDetails ( details , bitmask ) { return arrayEach ( wrapFlags , function ( pair ) { var value = "_." + pair [ 0 ] ; bitmask & pair [ 1 ] && ! arrayIncludes ( details , value ) && details . push ( value ) } ) , details . sort ( ) } function wrapperClone ( wrapper ) { if ( wrapper instanceof LazyWrapper ) return wrapper . clone ( ) ; var result = new LodashWrapper ( wrapper . _ _wrapped _ _ , wrapper . _ _chain _ _ ) ; return result . _ _actions _ _ = copyArray ( wrapper . _ _actions _ _ ) , result . _ _index _ _ = wrapper . _ _index _ _ , result . _ _values _ _ = wrapper . _ _values _ _ , result } function compact ( array ) { for ( var index = - 1 , length = null == array ? 0 : array . length , resIndex = 0 , result = [ ] ; ++ index < length ; ) { var value = array [ index ] ; value && ( result [ resIndex ++ ] = value ) } return result } function concat ( ) { var length = arguments . length ; if ( ! length ) return [ ] ; for ( var args = Array ( length - 1 ) , array = arguments [ 0 ] , index = length ; index -- ; ) args [ index - 1 ] = arguments [ index ] ; return arrayPush ( isArray ( array ) ? copyArray ( array ) : [ array ] , baseFlatten ( args , 1 ) ) } function drop ( array , n , guard ) { var length = null == array ? 0 : array . length ; return length ? ( n = guard || n === undefined ? 1 : toInteger ( n ) , baseSlice ( array , n < 0 ? 0 : n , length ) ) : [ ] } function findIndex ( array , predicate , fromIndex ) { var length = null == array ? 0 : array . length ; if ( ! length ) return - 1 ; var index = null == fromIndex ? 0 : toInteger ( fromIndex ) ; return index < 0 && ( index = nativeMax ( length + index , 0 ) ) , baseFindIndex ( array , baseIteratee ( predicate , 3 ) , index ) } function findLastIndex ( array , predicate , fromIndex ) { var length = null == array ? 0 : array . length ; if ( ! length ) return - 1 ; var index = length - 1 ; return fromIndex !== undefined && ( index = toInteger ( fromIndex ) , index = fromIndex < 0 ? nativeMax ( length + index , 0 ) : nativeMin ( index , length - 1 ) ) , baseFindIndex ( array , baseIteratee ( predicate , 3 ) , index , ! 0 ) } function flatten ( array ) { var length = null == array ? 0 : array . length ; return length ? baseFlatten ( array , 1 ) : [ ] } function flattenDeep ( array ) { var length = null == array ? 0 : array . length ; return length ? baseFlatten ( array , INFINITY ) : [ ] } function head ( array ) { return array && array . length ? array [ 0 ] : undefined } function indexOf ( array , value , fromIndex ) { var length = null == array ? 0 : array . length ; if ( ! length ) return - 1 ; var index = null == fromIndex ? 0 : toInteger ( fromIndex ) ; return index < 0 && ( index = nativeMax ( length + index , 0 ) ) , baseIndexOf ( array , value , index ) } function initial ( array ) { var length = null == array ? 0 : array . length ; return length ? baseSlice ( array , 0 , - 1 ) : [ ] } function last ( array ) { var length = null == array ? 0 : array . length ; return length ? array [ length - 1 ] : undefined } function reverse ( array ) { return null == array ? array : nativeReverse . call ( array ) } function slice ( array , start , end ) { var length = null == array ? 0 : array . length ; return length ? ( end && "number" != typeof end && isIterateeCall ( array , start , end ) ? ( start = 0 , end = length ) : ( start = null == start ? 0 : toInteger ( start ) , end = end === undefined ? length : toInteger ( end ) ) , baseSlice ( array , start , end ) ) : [ ] } function take ( array , n , guard ) { return array && array . length ? ( n = guard || n === undefined ? 1 : toInteger ( n ) , baseSlice ( array , 0 , n < 0 ? 0 : n ) ) : [ ] } function takeRight ( array , n , guard ) { var length = null == array ? 0 : array . length ; return length ? ( n = guard || n === undefined ? 1 : toInteger ( n ) , n = length - n , baseSlice ( array , n < 0 ? 0 : n , length ) ) : [ ] } function uniq ( array ) { return array && array . length ? baseUniq ( array ) : [ ] } function uniqBy ( array , iteratee ) { return array && array . length ? baseUniq ( array , baseIteratee ( iteratee , 2 ) ) : [ ] } function unzip ( array ) { if ( ! array || ! array . length ) return [ ] ; var length = 0 ; return array = arrayFilter ( array , function ( group ) { if ( isArrayLikeObject ( group ) ) return length = nativeMax ( group . length , length ) , ! 0 } ) , baseTimes ( length
var isArguments = baseIsArguments ( function ( ) { return arguments } ( ) ) ? baseIsArguments : function ( value ) { return isObjectLike ( value ) && hasOwnProperty . call ( value , "callee" ) && ! propertyIsEnumerable . call ( value , "callee" ) } , isArray = Array . isArray , isBuffer = nativeIsBuffer || stubFalse , isDate = nodeIsDate ? baseUnary ( nodeIsDate ) : baseIsDate , isMap = nodeIsMap ? baseUnary ( nodeIsMap ) : baseIsMap , isRegExp = nodeIsRegExp ? baseUnary ( nodeIsRegExp ) : baseIsRegExp , isSet = nodeIsSet ? baseUnary ( nodeIsSet ) : baseIsSet , isTypedArray = nodeIsTypedArray ? baseUnary ( nodeIsTypedArray ) : baseIsTypedArray , assignIn = createAssigner ( function ( object , source ) { copyObject ( source , keysIn ( source ) , object ) } ) , defaults = baseRest ( function ( object , sources ) { object = Object ( object ) ; var index = - 1 , length = sources . length , guard = length > 2 ? sources [ 2 ] : undefined ; for ( guard && isIterateeCall ( sources [ 0 ] , sources [ 1 ] , guard ) && ( length = 1 ) ; ++ index < length ; ) for ( var source = sources [ index ] , props = keysIn ( source ) , propsIndex = - 1 , propsLength = props . length ; ++ propsIndex < propsLength ; ) { var key = props [ propsIndex ] , value = object [ key ] ; ( value === undefined || eq ( value , objectProto [ key ] ) && ! hasOwnProperty . call ( object , key ) ) && ( object [ key ] = source [ key ] ) } return object } ) , defaultsDeep = baseRest ( function ( args ) { return args . push ( undefined , customDefaultsMerge ) , apply ( mergeWith , undefined , args ) } ) , invert = createInverter ( function ( result , value , key ) { null != value && "function" != typeof value . toString && ( value = nativeObjectToString . call ( value ) ) , result [ value ] = key } , constant ( identity ) ) , invertBy = createInverter ( function ( result , value , key ) { null != value && "function" != typeof value . toString && ( value = nativeObjectToString . call ( value ) ) , hasOwnProperty . call ( result , value ) ? result [ value ] . push ( key ) : result [ value ] = [ key ] } , baseIteratee ) , merge = createAssigner ( function ( object , source , srcIndex ) { baseMerge ( object , source , srcIndex ) } ) , mergeWith = createAssigner ( function ( object , source , srcIndex , customizer ) { baseMerge ( object , source , srcIndex , customizer ) } ) , omit = flatRest ( function ( object , paths ) { var result = { } ; if ( null == object ) return result ; var isDeep = ! 1 ; paths = arrayMap ( paths , function ( path ) { return path = castPath ( path , object ) , isDeep || ( isDeep = path . length > 1 ) , path } ) , copyObject ( object , getAllKeysIn ( object ) , result ) , isDeep && ( result = baseClone ( result , CLONE _DEEP _FLAG | CLONE _FLAT _FLAG | CLONE _SYMBOLS _FLAG , customOmitClone ) ) ; for ( var length = paths . length ; length -- ; ) baseUnset ( result , paths [ length ] ) ; return result } ) , pick = flatRest ( function ( object , paths ) { return null == object ? { } : basePick ( object , paths ) } ) , range = createRange ( ) ; lodash . after = after , lodash . assignIn = assignIn , lodash . before = before , lodash . bind = bind , lodash . chain = chain , lodash . compact = compact , lodash . concat = concat , lodash . countBy = countBy , lodash . create = create , lodash . debounce = debounce , lodash . defaults = defaults , lodash . defaultsDeep = defaultsDeep , lodash . defer = defer , lodash . delay = delay , lodash . difference = difference , lodash . drop = drop , lodash . filter = filter , lodash . flatten = flatten , lodash . flattenDeep = flattenDeep , lodash . groupBy = groupBy , lodash . initial = initial , lodash . intersection = intersection , lodash . invert = invert , lodash . invertBy = invertBy , lodash . iteratee = iteratee , lodash . keys = keys , lodash . map = map , lodash . matches = matches , lodash . merge = merge , lodash . mixin = mixin , lodash . negate = negate , lodash . omit = omit , lodash . omitBy = omitBy , lodash . once = once , lodash . pick = pick , lodash . range = range , lodash . reject = reject , lodash . rest = rest , lodash . set = set , lodash . slice = slice , lodash . sortBy = sortBy , lodash . take = take , lodash . takeRight = takeRight , lodash . tap = tap , lodash . throttle = throttle , lodash . thru = thru , lodash . toArray = toArray , lodash . union = union , lodash . uniq = uniq , lodash . uniqBy = uniqBy , lodash . unzip = unzip , lodash . values = values , lodash . without = without , lodash . zip = zip , lodash . zipObject = zipObject , lodash . extend = assignIn , mixin ( lodash , lodash ) , lodash . clamp = clamp , lodash . clone = clone , lodash . cloneDeep = cloneDeep , lodash . escape = escape , lodash . every = every , lodash . find = find , lodash . findIndex = findIndex , lodash . findKey = findKey , lodash . findLastIndex = findLastIndex , lodash . findLastKey = findLastKey , lodash . forEach = forEach , lodash . get = get , lodash . has = has , lodash . head = head , lodash . identity = identity , lodash . indexOf = indexOf , lodash . isArguments = isArguments , lodash . isArray = isArray , lodash . isArrayLike = isArrayLike , lodash . isBoolean = isBoolean , lod
this . _parent . addWidget ( this . widgetName , this ) ) : this . _isRoot = ! 0 , this . element = this . options . element . element ) : o . element ? ( this . element = BI . Widget . _renderEngine . createElement ( this ) , this . _isRoot = ! 0 ) : this . element = BI . Widget . _renderEngine . createElement ( this ) , this . element . _isWidget = ! 0 , ( o . _baseCls || o . baseCls || o . extraCls || o . cls ) && this . element . addClass ( ( o . _baseCls || "" ) + " " + ( o . baseCls || "" ) + " " + ( o . extraCls || "" ) + " " + ( o . cls || "" ) ) , o . attributes && this . element . attr ( o . attributes ) , o . data && this . element . data ( o . data ) , o . css && this . element . css ( o . css ) , this . _children = { } } , _initElementWidth : function ( ) { var o = this . options ; BI . isWidthOrHeight ( o . width ) && this . element . css ( "width" , o . width ) } , _initElementHeight : function ( ) { var o = this . options ; BI . isWidthOrHeight ( o . height ) && this . element . css ( "height" , o . height ) } , _initVisual : function ( ) { var o = this . options ; o . invisible && this . element . css ( "display" , "none" ) } , _initEffects : function ( ) { var o = this . options ; ( o . disabled || o . invalid ) && ( this . options . disabled && this . setEnable ( ! 1 ) , this . options . invalid && this . setValid ( ! 1 ) ) } , _initState : function ( ) { this . _isMounted = ! 1 } , _initElement : function ( ) { var self = this , els = this . render && this . render ( ) ; BI . isPlainObject ( els ) && ( els = [ els ] ) , BI . isArray ( els ) && BI . each ( els , function ( i , el ) { BI . createWidget ( el , { element : self } ) } ) , this . _mount ( ) } , _setParent : function ( parent ) { this . _parent = parent } , _mount : function ( force , deep , lifeHook , predicate ) { var self = this ; return ! ! ( force || ! this . _isMounted && this . isVisible ( ) && this . _ _asking !== ! 0 && ( this . _isRoot === ! 0 || this . _parent && this . _parent . _isMounted === ! 0 ) ) && ( lifeHook !== ! 1 && this . beforeMount && this . beforeMount ( ) , this . _isMounted = ! 0 , this . _mountChildren && this . _mountChildren ( ) , BI . each ( this . _children , function ( i , widget ) { ! self . isEnabled ( ) && widget . _setEnable ( ! 1 ) , ! self . isValid ( ) && widget . _setValid ( ! 1 ) , widget . _mount && widget . _mount ( ! ! deep && force , deep , lifeHook , predicate ) } ) , lifeHook !== ! 1 && this . mounted && this . mounted ( ) , this . fireEvent ( BI . Events . MOUNT ) , predicate && predicate ( this ) , ! 0 ) } , _mountChildren : null , isMounted : function ( ) { return this . _isMounted } , setWidth : function ( w ) { this . options . width = w , this . _initElementWidth ( ) } , setHeight : function ( h ) { this . options . height = h , this . _initElementHeight ( ) } , _setEnable : function ( enable ) { enable === ! 0 ? this . options . disabled = ! 1 : enable === ! 1 && ( this . options . disabled = ! 0 ) , BI . each ( this . _children , function ( i , child ) { ! child . _manualSetEnable && child . _setEnable && child . _setEnable ( enable ) } ) } , _setValid : function ( valid ) { valid === ! 0 ? this . options . invalid = ! 1 : valid === ! 1 && ( this . options . invalid = ! 0 ) , BI . each ( this . _children , function ( i , child ) { ! child . _manualSetValid && child . _setValid && child . _setValid ( valid ) } ) } , _setVisible : function ( visible ) { visible === ! 0 ? this . options . invisible = ! 1 : visible === ! 1 && ( this . options . invisible = ! 0 ) } , setEnable : function ( enable ) { this . _manualSetEnable = ! 0 , this . _setEnable ( enable ) , enable === ! 0 ? this . element . removeClass ( "base-disabled disabled" ) : enable === ! 1 && this . element . addClass ( "base-disabled disabled" ) } , setVisible : function ( visible ) { this . _setVisible ( visible ) , visible === ! 0 ? ( this . element . css ( "display" , "" ) , this . _mount ( ) ) : visible === ! 1 && this . element . css ( "display" , "none" ) , this . fireEvent ( BI . Events . VIEW , visible ) } , setValid : function ( valid ) { this . _manualSetValid = ! 0 , this . _setValid ( valid ) , valid === ! 0 ? this . element . removeClass ( "base-invalid invalid" ) : valid === ! 1 && this . element . addClass ( "base-invalid invalid" ) } , doBehavior : function ( ) { var args = arguments ; BI . each ( this . _children , function ( i , child ) { child . doBehavior && child . doBehavior . apply ( child , args ) } ) } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return this . options . height } , isValid : function ( ) { return ! this . options . invalid } , addWidget : function ( name , widget ) { var self = this ; if ( name instanceof BI . Widget && ( widget = name , name = widget . getName ( ) ) , BI . isKey ( name ) && ( name += "" ) , name = name || widget . getName ( ) || BI . uniqueId ( "widget" ) , this . _children [ name ] ) throw new Error ( "name has already been existed" ) ; return widget . _setParent && widget . _setParent ( this ) , widget . on ( BI . Events . DESTROY , function ( ) { BI . remove ( self . _children , this ) } ) , this . _children [ name ] = widget } , getWidgetByName : function ( name ) { if ( ! BI . isKey ( name ) || name === this . getName ( ) ) return this ; name += "" ; var widget = void 0 , other = { } ; return BI . any ( this . _childr
i += 2 ) : ( c2 = utftext . charCodeAt ( i + 1 ) , c3 = utftext . charCodeAt ( i + 2 ) , string += String . fromCharCode ( ( 15 & c ) << 12 | ( 63 & c2 ) << 6 | 63 & c3 ) , i += 3 ) ; return string } ; _ . extend ( BI , { encode : function ( input ) { var output = "" , chr1 , chr2 , chr3 , enc1 , enc2 , enc3 , enc4 , i = 0 ; for ( input = _utf8 _encode ( input ) ; i < input . length ; ) chr1 = input . charCodeAt ( i ++ ) , chr2 = input . charCodeAt ( i ++ ) , chr3 = input . charCodeAt ( i ++ ) , enc1 = chr1 >> 2 , enc2 = ( 3 & chr1 ) << 4 | chr2 >> 4 , enc3 = ( 15 & chr2 ) << 2 | chr3 >> 6 , enc4 = 63 & chr3 , isNaN ( chr2 ) ? enc3 = enc4 = 64 : isNaN ( chr3 ) && ( enc4 = 64 ) , output = output + _keyStr . charAt ( enc1 ) + _keyStr . charAt ( enc2 ) + _keyStr . charAt ( enc3 ) + _keyStr . charAt ( enc4 ) ; return output } , decode : function ( input ) { var output = "" , chr1 , chr2 , chr3 , enc1 , enc2 , enc3 , enc4 , i = 0 ; for ( input = input . replace ( /[^A-Za-z0-9\+\/\=]/g , "" ) ; i < input . length ; ) enc1 = _keyStr . indexOf ( input . charAt ( i ++ ) ) , enc2 = _keyStr . indexOf ( input . charAt ( i ++ ) ) , enc3 = _keyStr . indexOf ( input . charAt ( i ++ ) ) , enc4 = _keyStr . indexOf ( input . charAt ( i ++ ) ) , chr1 = enc1 << 2 | enc2 >> 4 , chr2 = ( 15 & enc2 ) << 4 | enc3 >> 2 , chr3 = ( 3 & enc3 ) << 6 | enc4 , output += String . fromCharCode ( chr1 ) , 64 != enc3 && ( output += String . fromCharCode ( chr2 ) ) , 64 != enc4 && ( output += String . fromCharCode ( chr3 ) ) ; return output = _utf8 _decode ( output ) } } ) } ( ) , BI . Cache = { _prefix : "bi" , setUsername : function ( username ) { localStorage . setItem ( BI . Cache . _prefix + ".username" , ( username + "" || "" ) . toUpperCase ( ) ) } , getUsername : function ( ) { return localStorage . getItem ( BI . Cache . _prefix + ".username" ) || "" } , _getKeyPrefix : function ( ) { return BI . Cache . getUsername ( ) + "." + BI . Cache . _prefix + "." } , _generateKey : function ( key ) { return BI . Cache . _getKeyPrefix ( ) + ( key || "" ) } , getItem : function ( key ) { return localStorage . getItem ( BI . Cache . _generateKey ( key ) ) } , setItem : function ( key , value ) { localStorage . setItem ( BI . Cache . _generateKey ( key ) , value ) } , removeItem : function ( key ) { localStorage . removeItem ( BI . Cache . _generateKey ( key ) ) } , clear : function ( ) { for ( var i = localStorage . length ; i >= 0 ; i -- ) { var key = localStorage . key ( i ) ; key && 0 === key . indexOf ( BI . Cache . _getKeyPrefix ( ) ) && localStorage . removeItem ( key ) } } , keys : function ( ) { for ( var result = [ ] , i = localStorage . length ; i >= 0 ; i -- ) { var key = localStorage . key ( i ) ; if ( key ) { var prefix = BI . Cache . _getKeyPrefix ( ) ; 0 === key . indexOf ( prefix ) && ( result [ result . length ] = key . substring ( prefix . length ) ) } } return result } , addCookie : function ( name , value , path , expiresHours ) { var cookieString = name + "=" + escape ( value ) ; if ( expiresHours && expiresHours > 0 ) { var date = new Date ; date . setTime ( date . getTime ( ) + 3600 * expiresHours * 1e3 ) , cookieString = cookieString + "; expires=" + date . toUTCString ( ) } path && ( cookieString = cookieString + "; path=" + path ) , document . cookie = cookieString } , getCookie : function ( name ) { var arr , reg = new RegExp ( "(^| )" + name + "=([^;]*)(;|$)" ) ; return ( arr = document . cookie . match ( reg ) ) ? unescape ( arr [ 2 ] ) : null } , deleteCookie : function ( name , path ) { var date = new Date ; date . setTime ( date . getTime ( ) - 1e4 ) ; var cookieString = name + "=v; expires=" + date . toUTCString ( ) ; path && ( cookieString = cookieString + "; path=" + path ) , document . cookie = cookieString } } , BI . CellSizeAndPositionManager = function ( cellCount , cellSizeGetter , estimatedCellSize ) { this . _cellSizeGetter = cellSizeGetter , this . _cellCount = cellCount , this . _estimatedCellSize = estimatedCellSize , this . _cellSizeAndPositionData = { } , this . _lastMeasuredIndex = - 1 } , BI . CellSizeAndPositionManager . prototype = { constructor : BI . CellSizeAndPositionManager , configure : function ( cellCount , estimatedCellSize ) { this . _cellCount = cellCount , this . _estimatedCellSize = estimatedCellSize } , getCellCount : function ( ) { return this . _cellCount } , getEstimatedCellSize : function ( ) { return this . _estimatedCellSize } , getLastMeasuredIndex : function ( ) { return this . _lastMeasuredIndex } , getSizeAndPositionOfCell : function ( index ) { if ( ! ( index < 0 || index >= this . _cellCount ) ) { if ( index > this . _lastMeasuredIndex ) { for ( var lastMeasuredCellSizeAndPosition = this . getSizeAndPositionOfLastMeasuredCell ( ) , offset = lastMeasuredCellSizeAndPosition . offset + lastMeasuredCellSizeAndPosition . size , i = this . _lastMeasuredIndex + 1 ; i <= index ; i ++ ) { var size = this . _cellSizeGetter ( i ) ; null == size || isNaN ( size ) || ( this . _cellSizeAndPositionData [ i ] = { offset : offset , size : size } , offset += size ) } this . _lastMeasuredIndex = index } return this . _cellSizeAndPositionData [ index ] } } , getSizeAndPositionOfLastMeasuredCell : function ( ) { return this . _lastMeasuredIndex >= 0 ? this . _cellSizeAndPositionDa
26597 : "CZ" , 26629 : "ZS" , 26638 : "YL" , 26646 : "XQ" , 26653 : "KG" , 26657 : "XJ" , 26727 : "HG" , 26894 : "ZC" , 26937 : "ZS" , 26946 : "ZC" , 26999 : "KJ" , 27099 : "KJ" , 27449 : "YQ" , 27481 : "XS" , 27542 : "ZS" , 27663 : "ZS" , 27748 : "TS" , 27784 : "SC" , 27788 : "ZD" , 27795 : "TD" , 27812 : "O" , 27850 : "PB" , 27852 : "MB" , 27895 : "SL" , 27898 : "PL" , 27973 : "QJ" , 27981 : "KH" , 27986 : "HX" , 27994 : "XJ" , 28044 : "YC" , 28065 : "WG" , 28177 : "SM" , 28267 : "QJ" , 28291 : "KH" , 28337 : "ZQ" , 28463 : "TL" , 28548 : "DC" , 28601 : "TD" , 28689 : "PB" , 28805 : "JG" , 28820 : "QG" , 28846 : "PB" , 28952 : "TD" , 28975 : "ZC" , 29100 : "A" , 29325 : "QJ" , 29575 : "SL" , 29602 : "FB" , 30010 : "TD" , 30044 : "CX" , 30058 : "PF" , 30091 : "YSP" , 30111 : "YN" , 30229 : "XJ" , 30427 : "SC" , 30465 : "SX" , 30631 : "YQ" , 30655 : "QJ" , 30684 : "QJG" , 30707 : "SD" , 30729 : "XH" , 30796 : "LG" , 30917 : "PB" , 31074 : "NM" , 31085 : "JZ" , 31109 : "SC" , 31181 : "ZC" , 31192 : "MLB" , 31293 : "JQ" , 31400 : "YX" , 31584 : "YJ" , 31896 : "ZN" , 31909 : "ZY" , 31995 : "XJ" , 32321 : "PF" , 32327 : "ZY" , 32418 : "HG" , 32420 : "XQ" , 32421 : "HG" , 32438 : "LG" , 32473 : "GJ" , 32488 : "TD" , 32521 : "QJ" , 32527 : "PB" , 32562 : "ZSQ" , 32564 : "JZ" , 32735 : "ZD" , 32793 : "PB" , 33071 : "PF" , 33098 : "XL" , 33100 : "YA" , 33152 : "PB" , 33261 : "CX" , 33324 : "BP" , 33333 : "TD" , 33406 : "YA" , 33426 : "WM" , 33432 : "PB" , 33445 : "JG" , 33486 : "ZN" , 33493 : "TS" , 33507 : "QJ" , 33540 : "QJ" , 33544 : "ZC" , 33564 : "XQ" , 33617 : "YT" , 33632 : "QJ" , 33636 : "XH" , 33637 : "YX" , 33694 : "WG" , 33705 : "PF" , 33728 : "YW" , 33882 : "SR" , 34067 : "WM" , 34074 : "YW" , 34121 : "QJ" , 34255 : "ZC" , 34259 : "XL" , 34425 : "JH" , 34430 : "XH" , 34485 : "KH" , 34503 : "YS" , 34532 : "HG" , 34552 : "XS" , 34558 : "YE" , 34593 : "ZL" , 34660 : "YQ" , 34892 : "XH" , 34928 : "SC" , 34999 : "QJ" , 35048 : "PB" , 35059 : "SC" , 35098 : "ZC" , 35203 : "TQ" , 35265 : "JX" , 35299 : "JX" , 35782 : "SZ" , 35828 : "YS" , 35830 : "E" , 35843 : "TD" , 35895 : "YG" , 35977 : "MH" , 36158 : "JG" , 36228 : "QJ" , 36426 : "XQ" , 36466 : "DC" , 36710 : "CJ" , 36711 : "ZYG" , 36767 : "PB" , 36866 : "SK" , 36951 : "YW" , 37034 : "YX" , 37063 : "XH" , 37218 : "ZC" , 37325 : "ZC" , 38063 : "PB" , 38079 : "TD" , 38085 : "QY" , 38107 : "DC" , 38116 : "TD" , 38123 : "YD" , 38224 : "HG" , 38241 : "XTC" , 38271 : "ZC" , 38415 : "YE" , 38426 : "KH" , 38461 : "YD" , 38463 : "AE" , 38466 : "PB" , 38477 : "XJ" , 38518 : "YT" , 38551 : "WK" , 38585 : "ZC" , 38704 : "XS" , 38739 : "LJ" , 38761 : "GJ" , 38808 : "SQ" , 39048 : "JG" , 39049 : "XJ" , 39052 : "HG" , 39076 : "CZ" , 39271 : "XT" , 39534 : "TD" , 39552 : "TD" , 39584 : "PB" , 39647 : "SB" , 39730 : "LG" , 39748 : "TPB" , 40109 : "ZQ" , 40479 : "ND" , 40516 : "HG" , 40536 : "HG" , 40583 : "QJ" , 40765 : "YQ" , 40784 : "QJ" , 40840 : "YK" , 40863 : "QJG" } , _checkPYCh = function ( ch ) { var uni = ch . charCodeAt ( 0 ) ; return uni > 40869 || uni < 19968 ? ch : oMultiDiff [ uni ] ? oMultiDiff [ uni ] : _ChineseFirstPY . charAt ( uni - 19968 ) } , _mkPYRslt = function ( arr , options ) { for ( var ignoreMulti = options . ignoreMulti , splitChar = options . splitChar , arrRslt = [ "" ] , k , multiLen = 0 , i = 0 , len = arr . length ; i < len ; i ++ ) { var str = arr [ i ] , strlen = str . length ; if ( 1 == strlen || multiLen > 14 || ignoreMulti ) { var tmpStr = str . substring ( 0 , 1 ) ; for ( k = 0 ; k < arrRslt . length ; k ++ ) arrRslt [ k ] += tmpStr } else { var tmpArr = arrRslt . slice ( 0 ) ; for ( arrRslt = [ ] , multiLen ++ , k = 0 ; k < strlen ; k ++ ) { for ( var tmp = tmpArr . slice ( 0 ) , j = 0 ; j < tmp . length ; j ++ ) tmp [ j ] += str . charAt ( k ) ; arrRslt = arrRslt . concat ( tmp ) } } } return arrRslt . join ( splitChar || "" ) . toLowerCase ( ) } ; _ . extend ( BI , { makeFirstPY : function ( str , options ) { if ( options = options || { } , "string" != typeof str ) return "" + str ; for ( var arrResult = [ ] , i = 0 , len = str . length ; i < len ; i ++ ) { var ch = str . charAt ( i ) ; arrResult . push ( _checkPYCh ( ch ) ) } return _mkPYRslt ( arrResult , options ) } } ) } ( ) , ! function ( ) { var cancelAnimationFrame = _global . cancelAnimationFrame || _global . webkitCancelAnimationFrame || _global . mozCancelAnimationFrame || _global . oCancelAnimationFrame || _global . msCancelAnimationFrame || _global . clearTimeout , requestAnimationFrame = _global . requestAnimationFrame || _global . webkitRequestAnimationFrame || _global . mozRequestAnimationFrame || _global . oRequestAnimationFrame || _global . msRequestAnimationFrame || _global . setTimeout ; BI . MouseMoveTracker = function ( onMove , onMoveEnd , domNode ) { this . _isDragging = ! 1 , this . _animationFrameID = null , this . _domNode = domNode , this . _onMove = onMove , this . _onMoveEnd = onMoveEnd , this . _onMouseMove = BI . bind ( this . _onMouseMove , this ) , this . _onMouseUp = BI . bind ( this . _onMouseUp , this ) , this . _didMouseMove = BI . bind ( this . _didMouseMove , this ) } , BI . MouseMoveTracker . prototype = { constructor : BI . MouseMoveTracker , captureMouseMoves : function ( event ) { this . _eventMoveToken || this . _eventUpToken || ( this . _eventMoveToken = BI . EventListener . listen ( this . _domNode , "mousemove" , this . _onMouseMove ) , this . _eventUp
( child = self . _children [ self . _getChildName ( i ) ] ) && child . setText ( v ) } ) } , patchItem : function ( oldVnode , vnode , index ) { var shouldUpdate = this . shouldUpdateItem ( index , vnode ) ; if ( shouldUpdate === ! 0 || null === shouldUpdate && ! this . _compare ( oldVnode , vnode ) ) return this . updateItemAt ( index , vnode ) } , updateChildren : function ( oldCh , newCh ) { function sameVnode ( vnode1 , vnode2 , oldIndex , newIndex ) { return vnode1 = self . _getOptions ( vnode1 ) , vnode2 = self . _getOptions ( vnode2 ) , BI . isKey ( vnode1 . key ) ? vnode1 . key === vnode2 . key : oldIndex >= 0 ? oldIndex === newIndex : void 0 } function addNode ( vnode , index ) { var opt = self . _getOptions ( vnode ) , key = null == opt . key ? self . _getChildName ( index ) : opt . key ; return children [ key ] = self . _addElement ( key , vnode ) } function addVnodes ( before , vnodes , startIdx , endIdx ) { for ( ; startIdx <= endIdx ; ++ startIdx ) { var node = addNode ( vnodes [ startIdx ] , startIdx ) ; insertBefore ( node , before , ! 1 , startIdx ) } } function removeVnodes ( vnodes , startIdx , endIdx ) { for ( ; startIdx <= endIdx ; ++ startIdx ) { var ch = vnodes [ startIdx ] ; if ( BI . isNotNull ( ch ) ) { var node = self . _getOptions ( ch ) , key = null == node . key ? self . _getChildName ( startIdx ) : node . key ; delete self . _children [ self . _getChildName ( key ) ] , children [ key ] . _destroy ( ) } } } function insertBefore ( insert , before , isNext , index ) { insert = self . _getOptions ( insert ) , before = before && self . _getOptions ( before ) ; var insertKey = BI . isKey ( insert . key ) ? insert . key : self . _getChildName ( index ) ; if ( before && children [ before . key ] ) { var beforeKey = BI . isKey ( before . key ) ? before . key : self . _getChildName ( index ) , next ; next = isNext ? children [ beforeKey ] . element . next ( ) : children [ beforeKey ] . element , next . length > 0 ? next . before ( children [ insertKey ] . element ) : self . _getWrapper ( ) . append ( children [ insertKey ] . element ) } else self . _getWrapper ( ) . append ( children [ insertKey ] . element ) } function findOldVnode ( vnodes , vNode , beginIdx , endIdx ) { var i , found ; for ( i = beginIdx ; i <= endIdx ; ++ i ) vnodes [ i ] && sameVnode ( vnodes [ i ] , vNode ) && ( found = vnodes [ i ] ) ; return found } var self = this , oldStartIdx = 0 , newStartIdx = 0 , oldEndIdx = oldCh . length - 1 , oldStartVnode = oldCh [ 0 ] , oldEndVnode = oldCh [ oldEndIdx ] , newEndIdx = newCh . length - 1 , newStartVnode = newCh [ 0 ] , newEndVnode = newCh [ newEndIdx ] , before , updated , children = { } ; for ( BI . each ( oldCh , function ( i , child ) { child = self . _getOptions ( child ) ; var key = null == child . key ? i : child . key ; BI . isKey ( key ) && ( children [ key ] = self . _children [ self . _getChildName ( i ) ] ) } ) ; oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx ; ) if ( BI . isNull ( oldStartVnode ) ) oldStartVnode = oldCh [ ++ oldStartIdx ] ; else if ( BI . isNull ( oldEndVnode ) ) oldEndVnode = oldCh [ -- oldEndIdx ] ; else if ( sameVnode ( oldStartVnode , newStartVnode , oldStartIdx , newStartIdx ) ) updated = this . patchItem ( oldStartVnode , newStartVnode , oldStartIdx ) || updated , children [ null == oldStartVnode . key ? this . _getChildName ( oldStartIdx ) : oldStartVnode . key ] = this . _children [ this . _getChildName ( oldStartIdx ) ] , oldStartVnode = oldCh [ ++ oldStartIdx ] , newStartVnode = newCh [ ++ newStartIdx ] ; else if ( sameVnode ( oldEndVnode , newEndVnode , oldEndIdx , newEndIdx ) ) updated = this . patchItem ( oldEndVnode , newEndVnode , oldEndIdx ) || updated , children [ null == oldEndVnode . key ? this . _getChildName ( oldEndIdx ) : oldEndVnode . key ] = this . _children [ this . _getChildName ( oldEndIdx ) ] , oldEndVnode = oldCh [ -- oldEndIdx ] , newEndVnode = newCh [ -- newEndIdx ] ; else if ( sameVnode ( oldStartVnode , newEndVnode ) ) updated = this . patchItem ( oldStartVnode , newEndVnode , oldStartIdx ) || updated , children [ null == oldStartVnode . key ? this . _getChildName ( oldStartIdx ) : oldStartVnode . key ] = this . _children [ this . _getChildName ( oldStartIdx ) ] , insertBefore ( oldStartVnode , oldEndVnode , ! 0 ) , oldStartVnode = oldCh [ ++ oldStartIdx ] , newEndVnode = newCh [ -- newEndIdx ] ; else if ( sameVnode ( oldEndVnode , newStartVnode ) ) updated = this . patchItem ( oldEndVnode , newStartVnode , oldEndIdx ) || updated , children [ null == oldEndVnode . key ? this . _getChildName ( oldEndIdx ) : oldEndVnode . key ] = this . _children [ this . _getChildName ( oldEndIdx ) ] , insertBefore ( oldEndVnode , oldStartVnode ) , oldEndVnode = oldCh [ -- oldEndIdx ] , newStartVnode = newCh [ ++ newStartIdx ] ; else { var sameOldVnode = findOldVnode ( oldCh , newStartVnode , oldStartIdx , oldEndIdx ) ; if ( BI . isNull ( sameOldVnode ) ) { var node = addNode ( newStartVnode ) ; insertBefore ( node , oldStartVnode ) , newStartVnode = newCh [ ++ newStartIdx ] } else BI . each ( oldCh , function ( index , child ) { child && sameVnode ( child , newStartVnode ) && ( updated = self . patchItem ( sameOldV
this . zindexMap [ name ] = this . zindex , this . modal && container . element . _ _buildZIndexMask _ _ ( this . zindex ++ ) , this . get ( name ) . setZindex ( this . zindex ++ ) , this . floatContainer [ name ] . visible ( ) ; var popover = this . get ( name ) ; popover . show && popover . show ( ) ; var W = BI . Widget . _renderEngine . createElement ( this . options . render ) . width ( ) , H = BI . Widget . _renderEngine . createElement ( this . options . render ) . height ( ) , w = popover . element . width ( ) , h = popover . element . height ( ) , left = ( W - w ) / 2 , top = ( H - h ) / 2 ; left < 0 && ( left = 0 ) , top < 0 && ( top = 0 ) , popover . element . css ( { left : left + "px" , top : top + "px" } ) } return this } , close : function ( name ) { return this . _check ( name ) ? ( this . floatOpened [ name ] && ( delete this . floatOpened [ name ] , this . floatContainer [ name ] . invisible ( ) , this . modal && this . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ name ] ) ) , this ) : this } , get : function ( name ) { return this . floatManager [ name ] } , remove : function ( name ) { return this . _check ( name ) ? ( this . floatContainer [ name ] . destroy ( ) , this . modal && this . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ name ] ) , delete this . floatManager [ name ] , delete this . floatLayer [ name ] , delete this . zindexMap [ name ] , delete this . floatContainer [ name ] , delete this . floatOpened [ name ] , this ) : this } , removeAll : function ( ) { var self = this ; return BI . each ( this . floatContainer , function ( name , container ) { container . destroy ( ) , self . modal && self . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( self . zindexMap [ name ] ) } ) , this . floatManager = { } , this . floatLayer = { } , this . floatContainer = { } , this . floatOpened = { } , this . zindexMap = { } , this } } ) , BI . ResizeController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . ResizeController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . ResizeController . superclass . _init . apply ( this , arguments ) ; var self = this ; this . resizerManger = { } ; var fn = BI . debounce ( function ( ev ) { self . _resize ( ev ) } , 30 ) ; BI . Widget . _renderEngine . createElement ( _global ) . resize ( fn ) } , _resize : function ( ev ) { BI . each ( this . resizerManger , function ( key , resizer ) { return resizer instanceof BI . $ ? void ( resizer . is ( ":visible" ) && resizer . trigger ( "__resize__" ) ) : resizer instanceof BI . Layout ? void resizer . resize ( ) : BI . isFunction ( resizer ) ? void resizer ( ev ) : void 0 } ) } , add : function ( name , resizer ) { var self = this ; return this . has ( name ) ? this : ( this . resizerManger [ name ] = resizer , function ( ) { self . remove ( name ) } ) } , get : function ( name ) { return this . resizerManger [ name ] } , has : function ( name ) { return null != this . resizerManger [ name ] } , remove : function ( name ) { return this . has ( name ) ? ( delete this . resizerManger [ name ] , this ) : this } } ) , BI . TooltipsController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . TooltipsController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _const : { height : 18 } , _init : function ( ) { BI . TooltipsController . superclass . _init . apply ( this , arguments ) , this . tooltipsManager = { } , this . showingTips = { } } , _createTooltip : function ( text , level ) { return BI . createWidget ( { type : "bi.tooltip" , text : text , level : level , stopEvent : ! 0 } ) } , hide : function ( name , callback ) { return this . has ( name ) ? ( delete this . showingTips [ name ] , this . get ( name ) . element . hide ( 0 , callback ) , this . get ( name ) . invisible ( ) , this ) : this } , create : function ( name , text , level , context ) { if ( ! this . has ( name ) ) { var tooltip = this . _createTooltip ( text , level ) ; this . add ( name , tooltip ) , BI . createWidget ( { type : "bi.absolute" , element : context || "body" , items : [ { el : tooltip } ] } ) , tooltip . invisible ( ) } return this . get ( name ) } , show : function ( e , name , text , level , context , opt ) { opt || ( opt = { } ) ; var self = this ; if ( BI . each ( this . showingTips , function ( i , tip ) { self . hide ( i ) } ) , this . showingTips = { } , this . has ( name ) || this . create ( name , text , level , opt . container || "body" ) , ! opt . belowMouse ) { var offset = context . element . offset ( ) , bounds = context . element . bounds ( ) ; if ( 0 === bounds . height || 0 === bounds . width ) return ; var top = offset . top + bounds . height + 5 } var tooltip = this . get ( name ) ; tooltip . setText ( text ) , tooltip . element . css ( { left : "0px" , top : "0px" } ) , tooltip . visible ( ) , tooltip . element . height ( tooltip . element [ 0 ] . scrollHeight ) , this . showingTips [ name ] = ! 0 ; var x = ( e . pageX || e . clientX ) + 15 , y = ( e . pageY || e . clientY ) + 15 ; x + tooltip . element . outerWidth ( ) > BI . Widget . _renderEngine . createElement ( "body" ) . outerWidth ( ) && ( x -= tooltip . element . outerWidth ( ) + 15 ) ; var bodyHeight = B
type : "bi.flex_scrollable_horizontal_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_vertical_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_horizontal_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_horizontal_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_vertical_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_center_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.radio" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? BI . extend ( ob , { type : "bi.image_radio" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.checkbox" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? BI . extend ( ob , { type : "bi.image_checkbox" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.half_icon_button" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? ob : BI . extend ( ob , { type : "bi.half_button" } ) } ) } ) , ! function ( ) { var attachEvent = _global . document && _global . document . attachEvent , stylesCreated = ! 1 ; if ( _global . document && ! attachEvent ) { var requestFrame = function ( ) { var raf = _global . requestAnimationFrame || _global . mozRequestAnimationFrame || _global . webkitRequestAnimationFrame || function ( fn ) { return _global . setTimeout ( fn , 20 ) } ; return function ( fn ) { return raf ( fn ) } } ( ) , cancelFrame = function ( ) { var cancel = _global . cancelAnimationFrame || _global . mozCancelAnimationFrame || _global . webkitCancelAnimationFrame || _global . clearTimeout ; return function ( id ) { return cancel ( id ) } } ( ) , resetTriggers = function ( element ) { var triggers = element . _ _resizeTriggers _ _ , expand = triggers . firstElementChild , contract = triggers . lastElementChild , expandChild = expand . firstElementChild ; contract . scrollLeft = contract . scrollWidth , contract . scrollTop = contract . scrollHeight , expandChild . style . width = expand . offsetWidth + 1 + "px" , expandChild . style . height = expand . offsetHeight + 1 + "px" , expand . scrollLeft = expand . scrollWidth , expand . scrollTop = expand . scrollHeight } , checkTriggers = function ( element ) { return element . offsetWidth !== element . _ _resizeLast _ _ . width || element . offsetHeight !== element . _ _resizeLast _ _ . height } , scrollListener = function ( e ) { var element = this ; resetTriggers ( this ) , this . _ _resizeRAF _ _ && cancelFrame ( this . _ _resizeRAF _ _ ) , this . _ _resizeRAF _ _ = requestFrame ( function ( ) { checkTriggers ( element ) && ( element . _ _resizeLast _ _ . width = element . offsetWidth , element . _ _resizeLast _ _ . height = element . offsetHeight , element . _ _resizeListeners _ _ . forEach ( function ( fn ) { fn . call ( element , e ) } ) ) } ) } , animation = ! 1 , animationstring = "animation" , keyframeprefix = "" , animationstartevent = "animationstart" , domPrefixes = "Webkit Moz O ms" . split ( " " ) , startEvents = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart" . split ( " " ) , pfx = "" , elm = document . createElement ( "fakeelement" ) ; if ( void 0 !== elm . style . animationName && ( animation = ! 0 ) , animation === ! 1 ) for ( var i = 0 ; i < domPrefixes . length ; i ++ ) if ( void 0 !== elm . style [ domPrefixes [ i ] + "AnimationName" ] ) { pfx = domPrefixes [ i ] , animationstring = pfx + "Animation" , keyframeprefix = "-" + pfx . toLowerCase ( ) + "-" , animationstartevent = startEvents [ i ] , animation = ! 0 ; break } var animationName = "resizeanim" , animationKeyframes = "@" + keyframeprefix + "keyframes " + animationName + " { from { opacity: 0; } to { opacity: 0; } } " , animationStyle = keyframeprefix + "animation: 1ms " + animationName + "; " } var createStyles = function ( ) { if ( ! stylesCreated ) { var css = ( animationKeyframes ? animationKeyframes : "" ) + ".resize-triggers { " + ( animationStyle ? animationStyle : "" ) + 'visibility: hidden; opacity: 0; } .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%; }' , head = document . head || document . getElementsByTagName ( "head" ) [ 0 ] , style = document . createElement ( "style" ) ; style . type = "text/css" , style . styleSheet ? style . styleS
} function fixDefaultChecked ( elem ) { manipulation _rcheckableType . test ( elem . type ) && ( elem . defaultChecked = elem . checked ) } function vendorPropName ( style , name ) { if ( name in style ) return name ; for ( var capName = name . charAt ( 0 ) . toUpperCase ( ) + name . slice ( 1 ) , origName = name , i = cssPrefixes . length ; i -- ; ) if ( name = cssPrefixes [ i ] + capName , name in style ) return name ; return origName } function isHidden ( elem , el ) { return elem = el || elem , "none" === jQuery . css ( elem , "display" ) || ! jQuery . contains ( elem . ownerDocument , elem ) } function showHide ( elements , show ) { for ( var display , elem , hidden , values = [ ] , index = 0 , length = elements . length ; index < length ; index ++ ) elem = elements [ index ] , elem . style && ( values [ index ] = jQuery . _data ( elem , "olddisplay" ) , display = elem . style . display , show ? ( values [ index ] || "none" !== display || ( elem . style . display = "" ) , "" === elem . style . display && isHidden ( elem ) && ( values [ index ] = jQuery . _data ( elem , "olddisplay" , css _defaultDisplay ( elem . nodeName ) ) ) ) : values [ index ] || ( hidden = isHidden ( elem ) , ( display && "none" !== display || ! hidden ) && jQuery . _data ( elem , "olddisplay" , hidden ? display : jQuery . css ( elem , "display" ) ) ) ) ; for ( index = 0 ; index < length ; index ++ ) elem = elements [ index ] , elem . style && ( show && "none" !== elem . style . display && "" !== elem . style . display || ( elem . style . display = show ? values [ index ] || "" : "none" ) ) ; return elements } function setPositiveNumber ( elem , value , subtract ) { var matches = rnumsplit . exec ( value ) ; return matches ? Math . max ( 0 , matches [ 1 ] - ( subtract || 0 ) ) + ( matches [ 2 ] || "px" ) : value } function augmentWidthOrHeight ( elem , name , extra , isBorderBox , styles ) { for ( var i = extra === ( isBorderBox ? "border" : "content" ) ? 4 : "width" === name ? 1 : 0 , val = 0 ; i < 4 ; i += 2 ) "margin" === extra && ( val += jQuery . css ( elem , extra + cssExpand [ i ] , ! 0 , styles ) ) , isBorderBox ? ( "content" === extra && ( val -= jQuery . css ( elem , "padding" + cssExpand [ i ] , ! 0 , styles ) ) , "margin" !== extra && ( val -= jQuery . css ( elem , "border" + cssExpand [ i ] + "Width" , ! 0 , styles ) ) ) : ( val += jQuery . css ( elem , "padding" + cssExpand [ i ] , ! 0 , styles ) , "padding" !== extra && ( val += jQuery . css ( elem , "border" + cssExpand [ i ] + "Width" , ! 0 , styles ) ) ) ; return val } function getWidthOrHeight ( elem , name , extra ) { var valueIsBorderBox = ! 0 , val = "width" === name ? elem . offsetWidth : elem . offsetHeight , styles = getStyles ( elem ) , isBorderBox = jQuery . support . boxSizing && "border-box" === jQuery . css ( elem , "boxSizing" , ! 1 , styles ) ; if ( val <= 0 || null == val ) { if ( val = curCSS ( elem , name , styles ) , ( val < 0 || null == val ) && ( val = elem . style [ name ] ) , rnumnonpx . test ( val ) ) return val ; valueIsBorderBox = isBorderBox && ( jQuery . support . boxSizingReliable || val === elem . style [ name ] ) , val = parseFloat ( val ) || 0 } return val + augmentWidthOrHeight ( elem , name , extra || ( isBorderBox ? "border" : "content" ) , valueIsBorderBox , styles ) + "px" } function css _defaultDisplay ( nodeName ) { var doc = document , display = elemdisplay [ nodeName ] ; return display || ( display = actualDisplay ( nodeName , doc ) , "none" !== display && display || ( iframe = ( iframe || jQuery ( "<iframe frameborder='0' width='0' height='0'/>" ) . css ( "cssText" , "display:block !important" ) ) . appendTo ( doc . documentElement ) , doc = ( iframe [ 0 ] . contentWindow || iframe [ 0 ] . contentDocument ) . document , doc . write ( "<!doctype html><html><body>" ) , doc . close ( ) , display = actualDisplay ( nodeName , doc ) , iframe . detach ( ) ) , elemdisplay [ nodeName ] = display ) , display } function actualDisplay ( name , doc ) { var elem = jQuery ( doc . createElement ( name ) ) . appendTo ( doc . body ) , display = jQuery . css ( elem [ 0 ] , "display" ) ; return elem . remove ( ) , display } function buildParams ( prefix , obj , traditional , add ) { var name ; if ( jQuery . isArray ( obj ) ) jQuery . each ( obj , function ( i , v ) { traditional || rbracket . test ( prefix ) ? add ( prefix , v ) : buildParams ( prefix + "[" + ( "object" == typeof v ? i : "" ) + "]" , v , traditional , add ) } ) ; else if ( traditional || "object" !== jQuery . type ( obj ) ) add ( prefix , obj ) ; else for ( name in obj ) buildParams ( prefix + "[" + name + "]" , obj [ name ] , traditional , add ) } function addToPrefiltersOrTransports ( structure ) { return function ( dataTypeExpression , func ) { "string" != typeof dataTypeExpression && ( func = dataTypeExpression , dataTypeExpression = "*" ) ; var dataType , i = 0 , dataTypes = dataTypeExpression . toLowerCase ( ) . match ( core _rnotwhite ) || [ ] ; if ( jQuery . isFunction ( func ) ) for ( ; dataType = dataTypes [ i ++ ] ; ) "+" === dataType [ 0 ] ? ( dataType = dataType . slice ( 1 ) || "*" , ( structure [ dataType ] = structure [ dataType ] || [ ] ) . unshift ( func ) ) : ( structure [ dataType ] = structure [ dataType ] || [ ] ) . push ( func ) } } function
if ( this . length && ( data = jQuery . data ( elem ) , 1 === elem . nodeType && ! jQuery . _data ( elem , "parsedAttrs" ) ) ) { for ( attrs = elem . attributes ; i < attrs . length ; i ++ ) name = attrs [ i ] . name , name . indexOf ( "data-" ) || ( name = jQuery . camelCase ( name . slice ( 5 ) ) , dataAttr ( elem , name , data [ name ] ) ) ; jQuery . _data ( elem , "parsedAttrs" , ! 0 ) } return data } return "object" == typeof key ? this . each ( function ( ) { jQuery . data ( this , key ) } ) : jQuery . access ( this , function ( value ) { return value === undefined ? elem ? dataAttr ( elem , key , jQuery . data ( elem , key ) ) : null : void this . each ( function ( ) { jQuery . data ( this , key , value ) } ) } , null , value , arguments . length > 1 , null , ! 0 ) } , removeData : function ( key ) { return this . each ( function ( ) { jQuery . removeData ( this , key ) } ) } } ) , jQuery . extend ( { queue : function ( elem , type , data ) { var queue ; if ( elem ) return type = ( type || "fx" ) + "queue" , queue = jQuery . _data ( elem , type ) , data && ( ! queue || jQuery . isArray ( data ) ? queue = jQuery . _data ( elem , type , jQuery . makeArray ( data ) ) : queue . push ( data ) ) , queue || [ ] } , dequeue : function ( elem , type ) { type = type || "fx" ; var queue = jQuery . queue ( elem , type ) , startLength = queue . length , fn = queue . shift ( ) , hooks = jQuery . _queueHooks ( elem , type ) , next = function ( ) { jQuery . dequeue ( elem , type ) } ; "inprogress" === fn && ( fn = queue . shift ( ) , startLength -- ) , hooks . cur = fn , fn && ( "fx" === type && queue . unshift ( "inprogress" ) , delete hooks . stop , fn . call ( elem , next , hooks ) ) , ! startLength && hooks && hooks . empty . fire ( ) } , _queueHooks : function ( elem , type ) { var key = type + "queueHooks" ; return jQuery . _data ( elem , key ) || jQuery . _data ( elem , key , { empty : jQuery . Callbacks ( "once memory" ) . add ( function ( ) { jQuery . _removeData ( elem , type + "queue" ) , jQuery . _removeData ( elem , key ) } ) } ) } } ) , jQuery . fn . extend ( { queue : function ( type , data ) { var setter = 2 ; return "string" != typeof type && ( data = type , type = "fx" , setter -- ) , arguments . length < setter ? jQuery . queue ( this [ 0 ] , type ) : data === undefined ? this : this . each ( function ( ) { var queue = jQuery . queue ( this , type , data ) ; jQuery . _queueHooks ( this , type ) , "fx" === type && "inprogress" !== queue [ 0 ] && jQuery . dequeue ( this , type ) } ) } , dequeue : function ( type ) { return this . each ( function ( ) { jQuery . dequeue ( this , type ) } ) } , delay : function ( time , type ) { return time = jQuery . fx ? jQuery . fx . speeds [ time ] || time : time , type = type || "fx" , this . queue ( type , function ( next , hooks ) { var timeout = setTimeout ( next , time ) ; hooks . stop = function ( ) { clearTimeout ( timeout ) } } ) } , clearQueue : function ( type ) { return this . queue ( type || "fx" , [ ] ) } , promise : function ( type , obj ) { var tmp , count = 1 , defer = jQuery . Deferred ( ) , elements = this , i = this . length , resolve = function ( ) { -- count || defer . resolveWith ( elements , [ elements ] ) } ; for ( "string" != typeof type && ( obj = type , type = undefined ) , type = type || "fx" ; i -- ; ) tmp = jQuery . _data ( elements [ i ] , type + "queueHooks" ) , tmp && tmp . empty && ( count ++ , tmp . empty . add ( resolve ) ) ; return resolve ( ) , defer . promise ( obj ) } } ) ; var nodeHook , boolHook , rclass = /[\t\r\n]/g , rreturn = /\r/g , rfocusable = /^(?:input|select|textarea|button|object)$/i , rclickable = /^(?:a|area)$/i , rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i , ruseDefault = /^(?:checked|selected)$/i , getSetAttribute = jQuery . support . getSetAttribute , getSetInput = jQuery . support . input ; jQuery . fn . extend ( { attr : function ( name , value ) { return jQuery . access ( this , jQuery . attr , name , value , arguments . length > 1 ) } , removeAttr : function ( name ) { return this . each ( function ( ) { jQuery . removeAttr ( this , name ) } ) } , prop : function ( name , value ) { return jQuery . access ( this , jQuery . prop , name , value , arguments . length > 1 ) } , removeProp : function ( name ) { return name = jQuery . propFix [ name ] || name , this . each ( function ( ) { try { this [ name ] = undefined , delete this [ name ] } catch ( e ) { } } ) } , addClass : function ( value ) { var classes , elem , cur , clazz , j , i = 0 , len = this . length , proceed = "string" == typeof value && value ; if ( jQuery . isFunction ( value ) ) return this . each ( function ( j ) { jQuery ( this ) . addClass ( value . call ( this , j , this . className ) ) } ) ; if ( proceed ) for ( classes = ( value || "" ) . match ( core _rnotwhite ) || [ ] ; i < len ; i ++ ) if ( elem = this [ i ] , cur = 1 === elem . nodeType && ( elem . className ? ( " " + elem . className + " " ) . replace ( rclass , " " ) : " " ) ) { for ( j = 0 ; clazz = classes [ j ++ ] ; ) cur . indexOf ( " " + clazz + " " ) < 0 && ( cur += clazz + " " ) ; elem . className = jQuery . trim ( cur ) } return this } , removeClass : function ( value ) { var classes , elem , cur , clazz , j , i = 0 , len = this . length , proceed = 0 === arguments . length || "string" == t
} else for ( ; elem = elem [ dir ] ; ) if ( 1 === elem . nodeType || checkNonElements ) if ( outerCache = elem [ expando ] || ( elem [ expando ] = { } ) , ( cache = outerCache [ dir ] ) && cache [ 0 ] === dirkey ) { if ( ( data = cache [ 1 ] ) === ! 0 || data === cachedruns ) return data === ! 0 } else if ( cache = outerCache [ dir ] = [ dirkey ] , cache [ 1 ] = matcher ( elem , context , xml ) || cachedruns , cache [ 1 ] === ! 0 ) return ! 0 } } function elementMatcher ( matchers ) { return matchers . length > 1 ? function ( elem , context , xml ) { for ( var i = matchers . length ; i -- ; ) if ( ! matchers [ i ] ( elem , context , xml ) ) return ! 1 ; return ! 0 } : matchers [ 0 ] } function condense ( unmatched , map , filter , context , xml ) { for ( var elem , newUnmatched = [ ] , i = 0 , len = unmatched . length , mapped = null != map ; i < len ; i ++ ) ( elem = unmatched [ i ] ) && ( filter && ! filter ( elem , context , xml ) || ( newUnmatched . push ( elem ) , mapped && map . push ( i ) ) ) ; return newUnmatched } function setMatcher ( preFilter , selector , matcher , postFilter , postFinder , postSelector ) { return postFilter && ! postFilter [ expando ] && ( postFilter = setMatcher ( postFilter ) ) , postFinder && ! postFinder [ expando ] && ( postFinder = setMatcher ( postFinder , postSelector ) ) , markFunction ( function ( seed , results , context , xml ) { var temp , i , elem , preMap = [ ] , postMap = [ ] , preexisting = results . length , elems = seed || multipleContexts ( selector || "*" , context . nodeType ? [ context ] : context , [ ] ) , matcherIn = ! preFilter || ! seed && selector ? elems : condense ( elems , preMap , preFilter , context , xml ) , matcherOut = matcher ? postFinder || ( seed ? preFilter : preexisting || postFilter ) ? [ ] : results : matcherIn ; if ( matcher && matcher ( matcherIn , matcherOut , context , xml ) , postFilter ) for ( temp = condense ( matcherOut , postMap ) , postFilter ( temp , [ ] , context , xml ) , i = temp . length ; i -- ; ) ( elem = temp [ i ] ) && ( matcherOut [ postMap [ i ] ] = ! ( matcherIn [ postMap [ i ] ] = elem ) ) ; if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { for ( temp = [ ] , i = matcherOut . length ; i -- ; ) ( elem = matcherOut [ i ] ) && temp . push ( matcherIn [ i ] = elem ) ; postFinder ( null , matcherOut = [ ] , temp , xml ) } for ( i = matcherOut . length ; i -- ; ) ( elem = matcherOut [ i ] ) && ( temp = postFinder ? indexOf . call ( seed , elem ) : preMap [ i ] ) > - 1 && ( seed [ temp ] = ! ( results [ temp ] = elem ) ) } } else matcherOut = condense ( matcherOut === results ? matcherOut . splice ( preexisting , matcherOut . length ) : matcherOut ) , postFinder ? postFinder ( null , results , matcherOut , xml ) : push . apply ( results , matcherOut ) } ) } function matcherFromTokens ( tokens ) { for ( var checkContext , matcher , j , len = tokens . length , leadingRelative = Expr . relative [ tokens [ 0 ] . type ] , implicitRelative = leadingRelative || Expr . relative [ " " ] , i = leadingRelative ? 1 : 0 , matchContext = addCombinator ( function ( elem ) { return elem === checkContext } , implicitRelative , ! 0 ) , matchAnyContext = addCombinator ( function ( elem ) { return indexOf . call ( checkContext , elem ) > - 1 } , implicitRelative , ! 0 ) , matchers = [ function ( elem , context , xml ) { return ! leadingRelative && ( xml || context !== outermostContext ) || ( ( checkContext = context ) . nodeType ? matchContext ( elem , context , xml ) : matchAnyContext ( elem , context , xml ) ) } ] ; i < len ; i ++ ) if ( matcher = Expr . relative [ tokens [ i ] . type ] ) matchers = [ addCombinator ( elementMatcher ( matchers ) , matcher ) ] ; else { if ( matcher = Expr . filter [ tokens [ i ] . type ] . apply ( null , tokens [ i ] . matches ) , matcher [ expando ] ) { for ( j = ++ i ; j < len && ! Expr . relative [ tokens [ j ] . type ] ; j ++ ) ; return setMatcher ( i > 1 && elementMatcher ( matchers ) , i > 1 && toSelector ( tokens . slice ( 0 , i - 1 ) ) . replace ( rtrim , "$1" ) , matcher , i < j && matcherFromTokens ( tokens . slice ( i , j ) ) , j < len && matcherFromTokens ( tokens = tokens . slice ( j ) ) , j < len && toSelector ( tokens ) ) } matchers . push ( matcher ) } return elementMatcher ( matchers ) } function matcherFromGroupMatchers ( elementMatchers , setMatchers ) { var matcherCachedRuns = 0 , bySet = setMatchers . length > 0 , byElement = elementMatchers . length > 0 , superMatcher = function ( seed , context , xml , results , expandContext ) { var elem , j , matcher , setMatched = [ ] , matchedCount = 0 , i = "0" , unmatched = seed && [ ] , outermost = null != expandContext , contextBackup = outermostContext , elems = seed || byElement && Expr . find . TAG ( "*" , expandContext && context . parentNode || context ) , dirrunsUnique = dirruns += null == contextBackup ? 1 : Math . random ( ) || . 1 ; for ( outermost && ( outermostContext = context !== document && context , cachedruns = matcherCachedRuns ) ; null != ( elem = elems [ i ] ) ; i ++ ) { if ( byElement && elem ) { for ( j = 0 ; matcher = elementMatchers [ j ++ ] ; ) if ( matcher ( elem , context , xml ) ) { results . push ( elem ) ; break } outermost && ( dirruns = dirrunsUnique , cachedruns = ++ matcherCachedRuns ) } bySet && ( ( elem = ! matcher && elem ) && matchedC
value = value . replace ( rxhtmlTag , "<$1></$2>" ) ; try { for ( ; i < l ; i ++ ) elem = this [ i ] || { } , 1 === elem . nodeType && ( jQuery . cleanData ( getAll ( elem , ! 1 ) ) , elem . innerHTML = value ) ; elem = 0 } catch ( e ) { } } elem && this . empty ( ) . append ( value ) } , null , value , arguments . length ) } , replaceWith : function ( value ) { var isFunc = jQuery . isFunction ( value ) ; return isFunc || "string" == typeof value || ( value = jQuery ( value ) . not ( this ) . detach ( ) ) , this . domManip ( [ value ] , ! 0 , function ( elem ) { var next = this . nextSibling , parent = this . parentNode ; parent && ( jQuery ( this ) . remove ( ) , parent . insertBefore ( elem , next ) ) } ) } , detach : function ( selector ) { return this . remove ( selector , ! 0 ) } , domManip : function ( args , table , callback ) { args = core _concat . apply ( [ ] , args ) ; var first , node , hasScripts , scripts , doc , fragment , i = 0 , l = this . length , set = this , iNoClone = l - 1 , value = args [ 0 ] , isFunction = jQuery . isFunction ( value ) ; if ( isFunction || ! ( l <= 1 || "string" != typeof value || jQuery . support . checkClone ) && rchecked . test ( value ) ) return this . each ( function ( index ) { var self = set . eq ( index ) ; isFunction && ( args [ 0 ] = value . call ( this , index , table ? self . html ( ) : undefined ) ) , self . domManip ( args , table , callback ) } ) ; if ( l && ( fragment = jQuery . buildFragment ( args , this [ 0 ] . ownerDocument , ! 1 , this ) , first = fragment . firstChild , 1 === fragment . childNodes . length && ( fragment = first ) , first ) ) { for ( table = table && jQuery . nodeName ( first , "tr" ) , scripts = jQuery . map ( getAll ( fragment , "script" ) , disableScript ) , hasScripts = scripts . length ; i < l ; i ++ ) node = fragment , i !== iNoClone && ( node = jQuery . clone ( node , ! 0 , ! 0 ) , hasScripts && jQuery . merge ( scripts , getAll ( node , "script" ) ) ) , callback . call ( table && jQuery . nodeName ( this [ i ] , "table" ) ? findOrAppend ( this [ i ] , "tbody" ) : this [ i ] , node , i ) ; if ( hasScripts ) for ( doc = scripts [ scripts . length - 1 ] . ownerDocument , jQuery . map ( scripts , restoreScript ) , i = 0 ; i < hasScripts ; i ++ ) node = scripts [ i ] , rscriptType . test ( node . type || "" ) && ! jQuery . _data ( node , "globalEval" ) && jQuery . contains ( doc , node ) && ( node . src ? jQuery . ajax ( { url : node . src , type : "GET" , dataType : "script" , async : ! 1 , global : ! 1 , "throws" : ! 0 } ) : jQuery . globalEval ( ( node . text || node . textContent || node . innerHTML || "" ) . replace ( rcleanScript , "" ) ) ) ; fragment = first = null } return this } } ) , jQuery . each ( { appendTo : "append" , prependTo : "prepend" , insertBefore : "before" , insertAfter : "after" , replaceAll : "replaceWith" } , function ( name , original ) { jQuery . fn [ name ] = function ( selector ) { for ( var elems , i = 0 , ret = [ ] , insert = jQuery ( selector ) , last = insert . length - 1 ; i <= last ; i ++ ) elems = i === last ? this : this . clone ( ! 0 ) , jQuery ( insert [ i ] ) [ original ] ( elems ) , core _push . apply ( ret , elems . get ( ) ) ; return this . pushStack ( ret ) } } ) , jQuery . extend ( { clone : function ( elem , dataAndEvents , deepDataAndEvents ) { var destElements , node , clone , i , srcElements , inPage = jQuery . contains ( elem . ownerDocument , elem ) ; if ( jQuery . support . html5Clone || jQuery . isXMLDoc ( elem ) || ! rnoshimcache . test ( "<" + elem . nodeName + ">" ) ? clone = elem . cloneNode ( ! 0 ) : ( fragmentDiv . innerHTML = elem . outerHTML , fragmentDiv . removeChild ( clone = fragmentDiv . firstChild ) ) , ! ( jQuery . support . noCloneEvent && jQuery . support . noCloneChecked || 1 !== elem . nodeType && 11 !== elem . nodeType || jQuery . isXMLDoc ( elem ) ) ) for ( destElements = getAll ( clone ) , srcElements = getAll ( elem ) , i = 0 ; null != ( node = srcElements [ i ] ) ; ++ i ) destElements [ i ] && fixCloneNodeIssues ( node , destElements [ i ] ) ; if ( dataAndEvents ) if ( deepDataAndEvents ) for ( srcElements = srcElements || getAll ( elem ) , destElements = destElements || getAll ( clone ) , i = 0 ; null != ( node = srcElements [ i ] ) ; i ++ ) cloneCopyEvent ( node , destElements [ i ] ) ; else cloneCopyEvent ( elem , clone ) ; return destElements = getAll ( clone , "script" ) , destElements . length > 0 && setGlobalEval ( destElements , ! inPage && getAll ( elem , "script" ) ) , destElements = srcElements = node = null , clone } , buildFragment : function ( elems , context , scripts , selection ) { for ( var j , elem , contains , tmp , tag , tbody , wrap , l = elems . length , safe = createSafeFragment ( context ) , nodes = [ ] , i = 0 ; i < l ; i ++ ) if ( elem = elems [ i ] , elem || 0 === elem ) if ( "object" === jQuery . type ( elem ) ) jQuery . merge ( nodes , elem . nodeType ? [ elem ] : elem ) ; else if ( rhtml . test ( elem ) ) { for ( tmp = tmp || safe . appendChild ( context . createElement ( "div" ) ) , tag = ( rtagName . exec ( elem ) || [ "" , "" ] ) [ 1 ] . toLowerCase ( ) , wrap = wrapMap [ tag ] || wrapMap . _default , tmp . innerHTML = wrap [ 1 ] + elem . replace ( rxhtmlTag , "<$1></$2>" ) + wrap [ 2 ] , j = wrap [ 0 ] ; j -- ; ) tmp = tmp . lastChild ; if ( ! jQuery . support . leadingWhitespace && rleadingWhitespace . test ( elem ) && nodes . push ( cont
opt . old = opt . complete , opt . complete = function ( ) { jQuery . isFunction ( opt . old ) && opt . old . call ( this ) , opt . queue && jQuery . dequeue ( this , opt . queue ) } , opt } , jQuery . easing = { linear : function ( p ) { return p } , swing : function ( p ) { return . 5 - Math . cos ( p * Math . PI ) / 2 } } , jQuery . timers = [ ] , jQuery . fx = Tween . prototype . init , jQuery . fx . tick = function ( ) { var timer , timers = jQuery . timers , i = 0 ; for ( fxNow = jQuery . now ( ) ; i < timers . length ; i ++ ) timer = timers [ i ] , timer ( ) || timers [ i ] !== timer || timers . splice ( i -- , 1 ) ; timers . length || jQuery . fx . stop ( ) , fxNow = undefined } , jQuery . fx . timer = function ( timer ) { timer ( ) && jQuery . timers . push ( timer ) && jQuery . fx . start ( ) } , jQuery . fx . interval = 13 , jQuery . fx . start = function ( ) { timerId || ( timerId = setInterval ( jQuery . fx . tick , jQuery . fx . interval ) ) } , jQuery . fx . stop = function ( ) { clearInterval ( timerId ) , timerId = null } , jQuery . fx . speeds = { slow : 600 , fast : 200 , _default : 400 } , jQuery . fx . step = { } , jQuery . expr && jQuery . expr . filters && ( jQuery . expr . filters . animated = function ( elem ) { return jQuery . grep ( jQuery . timers , function ( fn ) { return elem === fn . elem } ) . length } ) , jQuery . fn . offset = function ( options ) { if ( arguments . length ) return options === undefined ? this : this . each ( function ( i ) { jQuery . offset . setOffset ( this , options , i ) } ) ; var docElem , win , box = { top : 0 , left : 0 } , elem = this [ 0 ] , doc = elem && elem . ownerDocument ; if ( doc ) return docElem = doc . documentElement , jQuery . contains ( docElem , elem ) ? ( typeof elem . getBoundingClientRect !== core _strundefined && ( box = elem . getBoundingClientRect ( ) ) , win = getWindow ( doc ) , { top : box . top + ( win . pageYOffset || docElem . scrollTop ) - ( docElem . clientTop || 0 ) , left : box . left + ( win . pageXOffset || docElem . scrollLeft ) - ( docElem . clientLeft || 0 ) } ) : box } , jQuery . offset = { setOffset : function ( elem , options , i ) { var position = jQuery . css ( elem , "position" ) ; "static" === position && ( elem . style . position = "relative" ) ; var curElem = jQuery ( elem ) , curOffset = curElem . offset ( ) , curCSSTop = jQuery . css ( elem , "top" ) , curCSSLeft = jQuery . css ( elem , "left" ) , calculatePosition = ( "absolute" === position || "fixed" === position ) && jQuery . inArray ( "auto" , [ curCSSTop , curCSSLeft ] ) > - 1 , props = { } , curPosition = { } , curTop , curLeft ; calculatePosition ? ( curPosition = curElem . position ( ) , curTop = curPosition . top , curLeft = curPosition . left ) : ( curTop = parseFloat ( curCSSTop ) || 0 , curLeft = parseFloat ( curCSSLeft ) || 0 ) , jQuery . isFunction ( options ) && ( options = options . call ( elem , i , curOffset ) ) , null != options . top && ( props . top = options . top - curOffset . top + curTop ) , null != options . left && ( props . left = options . left - curOffset . left + curLeft ) , "using" in options ? options . using . call ( elem , props ) : curElem . css ( props ) } } , jQuery . fn . extend ( { position : function ( ) { if ( this [ 0 ] ) { var offsetParent , offset , parentOffset = { top : 0 , left : 0 } , elem = this [ 0 ] ; return "fixed" === jQuery . css ( elem , "position" ) ? offset = elem . getBoundingClientRect ( ) : ( offsetParent = this . offsetParent ( ) , offset = this . offset ( ) , jQuery . nodeName ( offsetParent [ 0 ] , "html" ) || ( parentOffset = offsetParent . offset ( ) ) , parentOffset . top += jQuery . css ( offsetParent [ 0 ] , "borderTopWidth" , ! 0 ) , parentOffset . left += jQuery . css ( offsetParent [ 0 ] , "borderLeftWidth" , ! 0 ) ) , { top : offset . top - parentOffset . top - jQuery . css ( elem , "marginTop" , ! 0 ) , left : offset . left - parentOffset . left - jQuery . css ( elem , "marginLeft" , ! 0 ) } } } , offsetParent : function ( ) { return this . map ( function ( ) { for ( var offsetParent = this . offsetParent || document . documentElement ; offsetParent && ! jQuery . nodeName ( offsetParent , "html" ) && "static" === jQuery . css ( offsetParent , "position" ) ; ) offsetParent = offsetParent . offsetParent ; return offsetParent || document . documentElement } ) } } ) , jQuery . each ( { scrollLeft : "pageXOffset" , scrollTop : "pageYOffset" } , function ( method , prop ) { var top = /Y/ . test ( prop ) ; jQuery . fn [ method ] = function ( val ) { return jQuery . access ( this , function ( elem , method , val ) { var win = getWindow ( elem ) ; return val === undefined ? win ? prop in win ? win [ prop ] : win . document . documentElement [ method ] : elem [ method ] : void ( win ? win . scrollTo ( top ? jQuery ( win ) . scrollLeft ( ) : val , top ? val : jQuery ( win ) . scrollTop ( ) ) : elem [ method ] = val ) } , method , val , arguments . length , null ) } } ) , jQuery . each ( { Height : "height" , Width : "width" } , function ( name , type ) { jQuery . each ( { padding : "inner" + name , content : type , "" : "outer" + name } , function ( defaultExtra , funcName ) { jQuery . fn [ funcName ] = function ( margin , value ) { var chainable = arguments . length && ( defaultExtra || "boolean" != typeof margin ) , extra = defaultExtra || ( margin === ! 0 || value =
items : o . items } } , resize : function ( ) { } , update : function ( opt ) { return this . wrapper . update ( opt ) } , populate : function ( items ) { this . wrapper . populate ( items ) } } ) , BI . shortcut ( "bi.flex_vertical_adapt" , BI . FlexVerticalCenter ) , BI . shortcut ( "bi.flex_vertical_center_adapt" , BI . FlexVerticalCenter ) , BI . FlexVerticalLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexVerticalLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-vertical-layout" , horizontalAlign : BI . HorizontalAlign . Left , verticalAlign : BI . VerticalAlign . Top , rowSize : [ ] , scrolly : ! 0 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FlexVerticalLayout . superclass . render . apply ( this , arguments ) ; var o = this . options ; this . element . addClass ( "h-" + o . horizontalAlign ) . addClass ( "v-" + o . verticalAlign ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var w = BI . FlexVerticalLayout . superclass . _addElement . apply ( this , arguments ) , o = this . options ; return w . element . css ( { position : "relative" , "flex-shrink" : "0" } ) , o . rowSize [ i ] > 0 && w . element . height ( o . rowSize [ i ] ) , "fill" === o . rowSize [ i ] && w . element . css ( "flex" , "1" ) , o . vgap + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-top" : ( 0 === i ? o . vgap : 0 ) + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , o . hgap + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-left" : o . hgap + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-right" : o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-bottom" : o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , w } , resize : function ( ) { } , populate : function ( items ) { BI . FlexVerticalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_vertical" , BI . FlexVerticalLayout ) , BI . FlexWrapperCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexWrapperCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-scrollable-center-adapt-layout clearfix" , scrollable : ! 0 } ) } , render : function ( ) { BI . FlexWrapperCenterLayout . superclass . render . apply ( this , arguments ) , this . $wrapper = BI . Widget . _renderEngine . createElement ( "<div>" ) . addClass ( "flex-scrollable-center-adapt-layout-wrapper" ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . FlexWrapperCenterLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" , "margin-left" : ( 0 === i ? o . hgap : 0 ) + "px" , "margin-right" : o . hgap + "px" , "margin-top" : o . vgap + "px" , "margin-bottom" : o . vgap + "px" } ) , w } , appendFragment : function ( frag ) { this . $wrapper . append ( frag ) , this . element . append ( this . $wrapper ) } , _getWrapper : function ( ) { return this . $wrapper } , resize : function ( ) { } , populate : function ( items ) { BI . FlexWrapperCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_scrollable_center_adapt" , BI . FlexWrapperCenterLayout ) , BI . FlexWrapperHorizontalCenter = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexWrapperHorizontalCenter . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-scrollable-vertical-center-adapt-layout clearfix" , verticalAlign : BI . VerticalAlign . Top , rowSize : [ ] , scrollable : ! 0 , scrolly : ! 1 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { var self = this , o = this . options ; return { type : "bi.flex_scrollable_vertical" , ref : function ( _ref ) { self . wrapper = _ref } , horizontalAlign : BI . HorizontalAlign . Center , verticalAlign : o . verticalAlign , rowSize : o . rowSize , scrollx : o . scrollx , scrolly : o . scrolly , scrollable : o . scrollable , hgap : o . hgap , vgap : o . vgap , tgap : o . tgap , bgap : o . bgap , items : o . items } } , update : function ( opt ) { return this . wrapper . update ( opt ) } , populate : function ( items ) { this . wrapper . populate ( items ) } } ) , BI . shortcut ( "bi.flex_scrollable_horizontal_adapt" , BI . FlexWrapperHorizontalCenter ) , BI . shortcut ( "bi.flex_scrollable_horizontal_center_adapt" , BI . FlexWrapperHorizontalCenter ) , BI . FlexWrapperHorizontalLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexWrapperHorizontalLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-scrollable-horizontal-layout clearfix" , verticalAlign : BI . VerticalAlign . Top , horiz
if ( o . columnSize && o . columnSize [ i ] ) var width = o . columnSize [ i ] / BI . sum ( o . columnSize ) * 100 + "%" ; else var width = 1 / this . options . items . length * 100 + "%" ; return w . element . css ( { position : "relative" , "float" : "left" , width : width } ) , w } , addItem : function ( item ) { var w = BI . LatticeLayout . superclass . addItem . apply ( this , arguments ) ; return this . resize ( ) , w } , addItemAt : function ( item ) { var w = BI . LatticeLayout . superclass . addItemAt . apply ( this , arguments ) ; return this . resize ( ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( items ) { BI . LatticeLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.lattice" , BI . LatticeLayout ) , BI . TableLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . TableLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-table-layout" , scrolly : ! 0 , columnSize : [ 200 , 200 , "fill" ] , rowSize : 30 , hgap : 0 , vgap : 0 , items : [ [ { el : { text : "label1" } } , { el : { text : "label2" } } , { el : { text : "label3" } } ] ] } ) } , render : function ( ) { BI . TableLayout . superclass . render . apply ( this , arguments ) , this . rows = 0 , this . populate ( this . options . items ) } , _addElement : function ( idx , arr ) { function firstElement ( item , row , col ) { 0 === row && item . addClass ( "first-row" ) , 0 === col && item . addClass ( "first-col" ) , item . addClass ( BI . isOdd ( row + 1 ) ? "odd-row" : "even-row" ) , item . addClass ( BI . isOdd ( col + 1 ) ? "odd-col" : "even-col" ) , item . addClass ( "center-element" ) } function firstObject ( item , row , col ) { var cls = "" ; 0 === row && ( cls += " first-row" ) , 0 === col && ( cls += " first-col" ) , cls += BI . isOdd ( row + 1 ) ? " odd-row" : " even-row" , cls += BI . isOdd ( col + 1 ) ? " odd-col" : " even-col" , item . cls = ( item . cls || "" ) + cls + " center-element" } function first ( item , row , col ) { item instanceof BI . Widget ? firstElement ( item . element , row , col ) : item . el instanceof BI . Widget ? firstElement ( item . el . element , row , col ) : item . el ? firstObject ( item . el , row , col ) : firstObject ( item , row , col ) } var o = this . options , abs = [ ] , left = 0 , right = 0 , i , j ; for ( i = 0 ; i < arr . length && BI . isNumber ( o . columnSize [ i ] ) ; i ++ ) first ( arr [ i ] , this . rows , i ) , abs . push ( BI . extend ( { top : 0 , bottom : 0 , left : o . columnSize [ i ] <= 1 ? 100 * left + "%" : left , width : o . columnSize [ i ] <= 1 ? 100 * o . columnSize [ i ] + "%" : o . columnSize [ i ] } , arr [ i ] ) ) , left += o . columnSize [ i ] + ( o . columnSize [ i ] < 1 ? 0 : o . hgap ) ; for ( j = arr . length - 1 ; j > i ; j -- ) { if ( ! BI . isNumber ( o . columnSize [ j ] ) ) throw new Error ( "item with fill can only be one" ) ; first ( arr [ j ] , this . rows , j ) , abs . push ( BI . extend ( { top : 0 , bottom : 0 , right : o . columnSize [ j ] <= 1 ? 100 * right + "%" : right , width : o . columnSize [ j ] <= 1 ? 100 * o . columnSize [ j ] + "%" : o . columnSize [ j ] } , arr [ j ] ) ) , right += o . columnSize [ j ] + ( o . columnSize [ j ] < 1 ? 0 : o . hgap ) } i >= 0 && i < arr . length && ( first ( arr [ i ] , this . rows , i ) , abs . push ( BI . extend ( { top : 0 , bottom : 0 , left : left <= 1 ? 100 * left + "%" : left , right : right <= 1 ? 100 * right + "%" : right } , arr [ i ] ) ) ) ; var w = BI . createWidget ( { type : "bi.absolute" , height : BI . isArray ( o . rowSize ) ? o . rowSize [ this . rows ] : o . rowSize , items : abs } ) ; return this . rows > 0 && this . getWidgetByName ( this . getName ( ) + ( this . rows - 1 ) ) . element . css ( { "margin-bottom" : o . vgap } ) , w . element . css ( { position : "relative" } ) , this . addWidget ( this . getName ( ) + this . rows ++ , w ) , w } , resize : function ( ) { } , addItem : function ( arr ) { if ( ! BI . isArray ( arr ) ) throw new Error ( "item must be array" ) ; return BI . TableLayout . superclass . addItem . apply ( this , arguments ) } , update : function ( ) { } , populate : function ( items ) { BI . TableLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.table" , BI . TableLayout ) , BI . HTapeLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . HTapeLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-h-tape-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , items : [ { width : 100 , el : { type : "bi.button" , text : "button1" } } , { width : "fill" , el : { type : "bi.button" , text : "button2" } } , { width : 200 , el : { type : "bi.button" , text : "button3" } } ] } ) } , render : function ( ) { BI . HTapeLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( item ) { throw new Error ( "cannot be added" ) } , stroke : function ( items ) { var self = this , o = this . options ; items = BI . compact ( items ) , BI . each ( items , function ( i , item ) { if ( self . hasWidget ( self . getName ( ) + i + "" ) ) w = self . getWidgetByName ( self . getName ( ) + i + "" ) ; else { var w = BI . createWidget ( item ) ; self . addWidget ( self . getName ( ) + i + "" , w ) } w . element . css ( { posit
var p = Promise . resolve ( ) ; timerFunc = function timerFunc ( ) { p . then ( nextTickHandler ) } } else timerFunc = function timerFunc ( ) { setTimeout ( nextTickHandler , 0 ) } ; else { var channel = new MessageChannel , port = channel . port2 ; channel . port1 . onmessage = nextTickHandler , timerFunc = function timerFunc ( ) { port . postMessage ( 1 ) } } return function queueNextTick ( cb , ctx ) { var _resolve = void 0 ; if ( callbacks . push ( function ( ) { if ( cb ) try { cb . call ( ctx ) } catch ( e ) { console . error ( e ) } else _resolve && _resolve ( ctx ) } ) , pending || ( pending = ! 0 , timerFunc ( ) ) , ! cb && "undefined" != typeof Promise ) return new Promise ( function ( resolve , reject ) { _resolve = resolve } ) } } ( ) , SymbolProto = "undefined" != typeof Symbol ? Symbol . prototype : null , ObjProto = Object . prototype , toString = ObjProto . toString , deepEq = function deepEq ( a , b , aStack , bStack ) { a instanceof _$1 && ( a = a . _wrapped ) , b instanceof _$1 && ( b = b . _wrapped ) ; var className = toString . call ( a ) ; if ( className !== toString . call ( b ) ) return ! 1 ; switch ( className ) { case "[object RegExp]" : case "[object String]" : return "" + a == "" + b ; case "[object Number]" : return + a !== + a ? + b !== + b : 0 === + a ? 1 / + a === 1 / b : + a === + b ; case "[object Date]" : case "[object Boolean]" : return + a === + b ; case "[object Symbol]" : return SymbolProto . valueOf . call ( a ) === SymbolProto . valueOf . call ( b ) } var areArrays = "[object Array]" === className ; if ( ! areArrays ) { if ( "object" != typeof a || "object" != typeof b ) return ! 1 ; var aCtor = a . constructor , bCtor = b . constructor ; if ( aCtor !== bCtor && ! ( _$1 . isFunction ( aCtor ) && aCtor instanceof aCtor && _$1 . isFunction ( bCtor ) && bCtor instanceof bCtor ) && "constructor" in a && "constructor" in b ) return ! 1 } aStack = aStack || [ ] , bStack = bStack || [ ] ; for ( var length = aStack . length ; length -- ; ) if ( aStack [ length ] === a ) return bStack [ length ] === b ; if ( aStack . push ( a ) , bStack . push ( b ) , areArrays ) { if ( length = a . length , length !== b . length ) return ! 1 ; for ( ; length -- ; ) if ( ! eq ( a [ length ] , b [ length ] , aStack , bStack ) ) return ! 1 } else { var keys = _$1 . keys ( a ) , key = void 0 ; if ( length = keys . length , _$1 . keys ( b ) . length !== length ) return ! 1 ; for ( ; length -- ; ) { if ( key = keys [ length ] , $$skips . indexOf ( key ) !== - 1 ) return ! 0 ; if ( Object . keys ( b ) . indexOf ( key ) === - 1 || ! eq ( a [ key ] , b [ key ] , aStack , bStack ) ) return ! 1 } } return aStack . pop ( ) , bStack . pop ( ) , ! 0 } , eq = function eq ( a , b , aStack , bStack ) { if ( a === b ) return 0 !== a || 1 / a === 1 / b ; if ( null == a || null == b ) return ! 1 ; if ( a !== a ) return b !== b ; var type = typeof a ; return ( "function" === type || "object" === type || "object" == typeof b ) && ( "function" === type || deepEq ( a , b , aStack , bStack ) ) } , mixinInjection = { } , falsy$1 = void 0 , operators = { "||" : falsy$1 , "&&" : falsy$1 , "(" : falsy$1 , ")" : falsy$1 } , allModelInstances = { } , allDefineModelInstances = { } , emptyFn = function emptyFn ( ) { } , TTL = 10 , Watcher = function ( ) { function Watcher ( _ref ) { var get = _ref . get , last = _ref . last , listener = _ref . listener , sync = _ref . sync , deep = _ref . deep , id = _ref . id ; return _classCallCheck ( this , Watcher ) , this . id = id , this . get = get , this . last = cloneShadow ( last ) , this . listener = listener || emptyFn , this . sync = sync || ! 1 , { id : this . id , get : this . get , last : this . last , listener : this . listener } } return Watcher . prototype . getInstance = function getInstance ( ) { return this } , Watcher } ( ) , nextListener = function ( ) { var callbackMap = { } ; return function queueNextListener ( listener , ctx ) { var id = listener . id , cb = listener . cb ; id && callbackMap [ id ] || ( nextTick ( function ( ) { cb ( ) , callbackMap [ id ] = ! 1 } , ctx ) , callbackMap [ id ] = ! 0 ) } } ( ) , Model = function ( ) { function Model ( ) { _classCallCheck ( this , Model ) } return Model . prototype . _constructor = function _constructor ( model ) { this . alive = ! 0 , this . options = model || { } , this . model = { $vm : this } , this . _modelHashId = makeHashCode ( "model" ) , this . syncListeners = [ ] , this . asyncListeners = [ ] , this . contextListeners = [ ] , this . _parent = Model . target ; var state = _$1 . isFunction ( this . state ) ? this . state ( ) : this . state , computed = this . computed , context = this . context , childContext = this . childContext , watch$$1 = this . watch , actions = this . actions , mixins = this . mixins ; context && defineContext ( this , context ) , initMixins ( this , mixins ) , this . init ( ) , initState ( this , state ) , initComputed ( this , computed ) , digest ( this ) , initWatch ( this , watch$$1 ) , initMethods ( this , actions ) , this . created && this . created ( ) , allModelInstances [ this . _modelHashId ] = this } , Model . prototype . _init = function _init ( ) { } , Model . prototype . init = function init ( ) { this . _init ( ) } , Model . prototype . destroy = function destroy ( ) { this . alive = ! 1 , allModelInstances [ this . _modelHashId ]
var btns = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( btns = btns . concat ( item . getNotSelectedButtons ( ) ) ) : void ( item . isSelected && ! item . isSelected ( ) && btns . push ( item ) ) } ) , btns } , getAllLeaves : function ( ) { var leaves = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( leaves = leaves . concat ( item . getAllLeaves ( ) ) ) : void ( item . isEnabled ( ) && leaves . push ( item ) ) } ) , leaves } , getIndexByValue : function ( value ) { var index = - 1 ; return BI . any ( this . buttons , function ( i , item ) { var vs = item . getValue ( ) ; if ( item . isEnabled ( ) && ( vs === value || BI . contains ( vs , value ) ) ) return index = i , ! 0 } ) , index } , getNodeById : function ( id ) { var node ; return BI . any ( this . buttons , function ( i , item ) { if ( item . isEnabled ( ) ) { if ( item . attr ( "id" ) === id ) return node = item , ! 0 ; if ( BI . isFunction ( item . getNodeById ) && ( node = item . getNodeById ( id ) ) ) return ! 0 } } ) , node } , getNodeByValue : function ( value ) { var node ; return BI . any ( this . buttons , function ( i , item ) { if ( item . isEnabled ( ) ) if ( BI . isFunction ( item . getNodeByValue ) ) { if ( node = item . getNodeByValue ( value ) ) return ! 0 } else if ( item . attr ( "value" ) === value ) return node = item , ! 0 } ) , node } } ) , BI . ButtonTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.button_tree" , BI . ButtonTree ) , BI . TreeView = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . TreeView . superclass . _defaultConfig . apply ( this , arguments ) , { _baseCls : "bi-tree" , paras : { selectedValues : { } } , itemsCreator : BI . emptyFn } ) } , _init : function ( ) { BI . TreeView . superclass . _init . apply ( this , arguments ) ; var o = this . options ; this . _stop = ! 1 , this . _createTree ( ) , this . tip = BI . createWidget ( { type : "bi.loading_bar" , invisible : ! 0 , handler : BI . bind ( this . _loadMore , this ) } ) , BI . createWidget ( { type : "bi.vertical" , scrollable : ! 0 , scrolly : ! 1 , element : this , items : [ this . tip ] } ) , BI . isNotNull ( o . value ) && this . setSelectedValue ( o . value ) , BI . isIE9Below && BI . isIE9Below ( ) && this . element . addClass ( "hack" ) } , _createTree : function ( ) { this . id = "bi-tree" + BI . UUID ( ) , this . nodes && this . nodes . destroy ( ) , this . tree && this . tree . destroy ( ) , this . tree = BI . createWidget ( { type : "bi.layout" , element : "<ul id='" + this . id + "' class='ztree'></ul>" } ) , BI . createWidget ( { type : "bi.default" , element : this . element , items : [ this . tree ] } ) } , _selectTreeNode : function ( treeId , treeNode ) { this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , treeNode , this ) , this . fireEvent ( BI . TreeView . EVENT _CHANGE , treeNode , this ) } , _configSetting : function ( ) { function onClick ( event , treeId , treeNode ) { var checked = treeNode . checked , status = treeNode . getCheckStatus ( ) ; status . half === ! 0 && status . checked === ! 0 && ( checked = ! 1 ) , self . nodes . checkNode ( treeNode , ! checked , ! 0 , ! 0 ) } function getUrl ( treeId , treeNode ) { var parentNode = self . _getParentValues ( treeNode ) ; treeNode . times = treeNode . times || 1 ; var param = "id=" + treeNode . id + "×=" + treeNode . times ++ + "&parentValues= " + _global . encodeURIComponent ( BI . jsonEncode ( parentNode ) ) + "&checkState=" + _global . encodeURIComponent ( BI . jsonEncode ( treeNode . getCheckStatus ( ) ) ) ; return "&" + param } function beforeExpand ( treeId , treeNode ) { return treeNode . isAjaxing ? ( BI . Msg . toast ( "Please Wait。" , "warning" ) , ! 1 ) : ( treeNode . children || ( treeNode . times = 1 , ajaxGetNodes ( treeNode , "refresh" ) ) , ! 0 ) } function onAsyncSuccess ( event , treeId , treeNode , msg ) { if ( treeNode . halfCheck = ! 1 , msg && 0 !== msg . length && ! /^<html>[\s,\S]*<\/html>$/gi . test ( msg ) && ! self . _stop ) { var zTree = self . nodes , totalCount = treeNode . count || 0 ; treeNode . children . length > totalCount ? ( treeNode . count = treeNode . children . length , BI . delay ( function ( ) { ajaxGetNodes ( treeNode ) } , perTime ) ) : ( zTree . updateNode ( treeNode ) , zTree . selectNode ( treeNode . children [ 0 ] ) ) } } function onAsyncError ( event , treeId , treeNode , XMLHttpRequest , textStatus , errorThrown ) { var zTree = self . nodes ; BI . Msg . toast ( "Error!" , "warning" ) } function ajaxGetNodes ( treeNode , reloadType ) { var zTree = self . nodes ; "refresh" == reloadType && zTree . updateNode ( treeNode ) , zTree . reAsyncChildNodes ( treeNode , reloadType , ! 0 ) } function beforeCheck ( treeId , treeNode ) { function track ( children ) { BI . each ( children , function ( i , ch ) { ch . halfCheck === ! 0 && ( ch . halfCheck = ! 1 , track ( ch . children ) ) } ) } if ( treeNode . halfCheck = ! 1 , treeNode . checked === ! 0 ) { track ( treeNode . children ) ; var treeObj = self . nodes , nodes = treeObj . getSelectedNodes ( ) ; BI . $ . each ( nodes , function ( i
} , getMaxScrollTop : function ( ) { return this . _getMaxScrollTop ( ) } , _reRange : function ( ) { this . renderRange = { } } , _clearChildren : function ( ) { this . container . _children = { } , this . container . attr ( "items" , [ ] ) } , restore : function ( ) { BI . each ( this . renderedCells , function ( i , cell ) { cell . el . _destroy ( ) } ) , this . _clearChildren ( ) , this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 } , populate : function ( items ) { items && items !== this . options . items && this . restore ( ) , this . _populate ( items ) } } ) , BI . CollectionView . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.collection_view" , BI . CollectionView ) , BI . Combo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . Combo . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-combo" , trigger : "click" , toggle : ! 0 , direction : "bottom" , logic : { dynamic : ! 0 } , container : null , isDefaultInit : ! 1 , destroyWhenHide : ! 1 , isNeedAdjustHeight : ! 0 , isNeedAdjustWidth : ! 0 , stopEvent : ! 1 , stopPropagation : ! 1 , adjustLength : 0 , adjustXOffset : 0 , adjustYOffset : 0 , hideChecker : BI . emptyFn , offsetStyle : "left" , el : { } , popup : { } , comboClass : "bi-combo-popup" , hoverClass : "bi-combo-hover" } ) } , _init : function ( ) { BI . Combo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . _initCombo ( ) , this . _initPullDownAction ( ) , this . combo . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . isEnabled ( ) && self . isValid ( ) && ( type === BI . Events . EXPAND && self . _popupView ( ) , type === BI . Events . COLLAPSE && self . _hideView ( ) , type === BI . Events . EXPAND && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) , type === BI . Events . COLLAPSE && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . isViewVisible ( ) && self . fireEvent ( BI . Combo . EVENT _COLLAPSE ) ) , type === BI . Events . CLICK && self . fireEvent ( BI . Combo . EVENT _TRIGGER _CHANGE , obj ) ) } ) , self . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && self . element . addClass ( o . hoverClass ) } ) , self . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && self . element . removeClass ( o . hoverClass ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( o . logic , { items : [ { el : this . combo } ] } ) ) ) ) , o . isDefaultInit && this . _assertPopupView ( ) , BI . Resizers . add ( this . getName ( ) , BI . bind ( function ( ) { this . isViewVisible ( ) && this . _hideView ( ) } , this ) ) } , _toggle : function ( ) { this . _assertPopupViewRender ( ) , this . popupView . isVisible ( ) ? this . _hideView ( ) : this . isEnabled ( ) && this . _popupView ( ) } , _initPullDownAction : function ( ) { function hide ( ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && o . toggle === ! 0 && ( self . _hideView ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . COLLAPSE , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _COLLAPSE ) ) , self . popupView && self . popupView . element . off ( "mouseenter." + self . getName ( ) ) . off ( "mouseleave." + self . getName ( ) ) , enterPopup = ! 1 } var self = this , o = this . options , evs = ( this . options . trigger || "" ) . split ( "," ) , st = function ( e ) { o . stopEvent && e . stopEvent ( ) , o . stopPropagation && e . stopPropagation ( ) } , enterPopup = ! 1 ; BI . each ( evs , function ( i , ev ) { switch ( ev ) { case "hover" : self . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && ( self . _popupView ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) } ) , self . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { self . popupView && ( self . popupView . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { enterPopup = ! 0 , self . popupView . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { hide ( ) } ) , self . popupView . element . off ( "mouseenter." + self . getName ( ) ) } ) , BI . defer ( function ( ) { enterPopup || hide ( ) } , 50 ) ) } ) ; break ; case "click" : var debounce = BI . debounce ( function ( e ) { self . combo . element . _ _isMouseInBounds _ _ ( e ) && self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && ( o . toggle ? self . _toggle ( ) : self . _popupView ( ) , self . isViewVisible ( ) ? ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . combo ) , self . fireEvent ( BI . Combo .
if ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK ) { if ( o . isAutoSync ) { var values = o . adapter && o . adapter . getValue ( ) ; if ( obj . isSelected ( ) ) switch ( o . chooseType ) { case BI . ButtonGroup . CHOOSE _TYPE _SINGLE : o . adapter && o . adapter . setValue ( [ obj . getValue ( ) ] ) ; break ; case BI . ButtonGroup . CHOOSE _TYPE _MULTI : values . push ( obj . getValue ( ) ) , o . adapter && o . adapter . setValue ( values ) } else o . adapter && o . adapter . setValue ( BI . deepWithout ( values , obj . getValue ( ) ) ) } self . fireEvent ( BI . Searcher . EVENT _CHANGE , value , obj ) } } ) , BI . nextTick ( function ( ) { self . fireEvent ( BI . Searcher . EVENT _AFTER _INIT ) } ) ) , o . masker && ! BI . Maskers . has ( this . getName ( ) ) && BI . Maskers . create ( this . getName ( ) , o . adapter , BI . extend ( { container : this , render : this . popupView } , o . masker ) , this ) } , _startSearch : function ( ) { this . _assertPopupView ( ) , this . _stop = ! 1 , this . _isSearching = ! 0 , this . fireEvent ( BI . Searcher . EVENT _START ) , this . popupView . startSearch && this . popupView . startSearch ( ) , BI . nextTick ( function ( name ) { BI . Maskers . show ( name ) } , this . getName ( ) ) } , _pauseSearch : function ( ) { var o = this . options , name = this . getName ( ) ; this . _stop = ! 0 , BI . nextTick ( function ( name ) { BI . Maskers . hide ( name ) } , this . getName ( ) ) , this . _isSearching === ! 0 && ( this . popupView && this . popupView . pauseSearch && this . popupView . pauseSearch ( ) , this . fireEvent ( BI . Searcher . EVENT _PAUSE ) ) , this . _isSearching = ! 1 } , _stopSearch : function ( ) { var o = this . options , name = this . getName ( ) ; this . _stop = ! 0 , BI . Maskers . hide ( name ) , this . _isSearching === ! 0 && ( this . popupView && this . popupView . stopSearch && this . popupView . stopSearch ( ) , this . fireEvent ( BI . Searcher . EVENT _STOP ) ) , this . _isSearching = ! 1 } , _search : function ( ) { var self = this , o = this . options , keyword = o . allowSearchBlank ? this . editor . getValue ( ) : this . _getLastSearchKeyword ( ) ; if ( "" !== keyword && ! this . _stop ) { if ( o . isAutoSearch ) { var items = o . adapter && ( o . adapter . getItems && o . adapter . getItems ( ) || o . adapter . attr ( "items" ) ) || [ ] , finding = BI . Func . getSearchResult ( items , keyword ) , match = finding . match , find = finding . find ; return this . popupView . populate ( find , match , keyword ) , o . isAutoSync && o . adapter && o . adapter . getValue && this . popupView . setValue ( o . adapter . getValue ( ) ) , void self . fireEvent ( BI . Searcher . EVENT _SEARCHING ) } this . popupView . loading && this . popupView . loading ( ) , o . onSearch ( { times : 1 , keyword : keyword , selectedValues : o . adapter && o . adapter . getValue ( ) } , function ( searchResult , matchResult ) { if ( ! self . _stop ) { var args = [ ] . slice . call ( arguments ) ; args . length > 0 && args . push ( keyword ) , BI . Maskers . show ( self . getName ( ) ) , self . popupView . populate . apply ( self . popupView , args ) , o . isAutoSync && o . adapter && o . adapter . getValue && self . popupView . setValue ( o . adapter . getValue ( ) ) , self . popupView . loaded && self . popupView . loaded ( ) , self . fireEvent ( BI . Searcher . EVENT _SEARCHING ) } } ) } } , _getLastSearchKeyword : function ( ) { if ( this . isValid ( ) ) { var res = this . editor . getValue ( ) . match ( /[\S]+/g ) ; return BI . isNull ( res ) ? "" : res [ res . length - 1 ] } } , setAdapter : function ( adapter ) { this . options . adapter = adapter , BI . Maskers . remove ( this . getName ( ) ) } , doSearch : function ( ) { this . isSearching ( ) && this . _search ( ) } , stopSearch : function ( ) { this . _stopSearch ( ) ; try { this . editor . blur ( ) } catch ( e ) { if ( ! this . editor . blur ) throw new Error ( "editor没有实现blur方法" ) } finally { this . editor . setValue ( "" ) } } , isSearching : function ( ) { return this . _isSearching } , isViewVisible : function ( ) { return this . editor . isEnabled ( ) && BI . Maskers . isVisible ( this . getName ( ) ) } , getView : function ( ) { return this . popupView } , hasMatched : function ( ) { return this . _assertPopupView ( ) , this . popupView . hasMatched ( ) } , adjustHeight : function ( ) { BI . Maskers . has ( this . getName ( ) ) && BI . Maskers . get ( this . getName ( ) ) . isVisible ( ) && BI . Maskers . show ( this . getName ( ) ) } , adjustView : function ( ) { this . isViewVisible ( ) && BI . Maskers . show ( this . getName ( ) ) } , setValue : function ( v ) { BI . isNull ( this . popupView ) ? this . options . popup . value = v : this . popupView . setValue ( v ) } , getKeyword : function ( ) { return this . _getLastSearchKeyword ( ) } , getKeywords : function ( ) { return this . editor . getKeywords ( ) } , getValue : function ( ) { var o = this . options ; return o . isAutoSync && o . adapter && o . adapter . getValue ? o . adapter . getValue ( ) : this . isSearching ( ) ? this . popupView . getValue ( ) : o . adapter && o . adapter . getValue ? o . adapter . getValue ( ) : BI . isNull ( this . popupView ) ? o . popup . value : this . popupView . getValue ( ) } , populate : function ( result , searchResult , keyword ) { var o
} ) . bind ( { click : fn } ) , this . element . bind ( "mousewheel" , fn ) , o . stopPropagation && this . element . bind ( { mousedown : fn , mouseup : fn , mouseover : fn } ) , o . stopEvent && this . element . bind ( { mousedown : stop , mouseup : stop , mouseover : stop } ) , this . tool = this . _createTool ( ) , this . tab = this . _createTab ( ) , this . view = this . _createView ( ) , this . toolbar = this . _createToolBar ( ) , this . view . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . PopupView . EVENT _CHANGE ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { } , o . logic , { scrolly : ! 1 , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , vgap : o . vgap , hgap : o . hgap , items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , BI . extend ( { cls : "list-view-outer bi-card list-view-shadow" } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . tool , this . tab , this . view , this . toolbar ) } ) ) ) ) } ) ) ) ) } , _createView : function ( ) { var o = this . options ; return this . button _group = BI . createWidget ( o . el , { type : "bi.button_group" , value : o . value } ) , this . button _group . element . css ( { "min-height" : o . minHeight + "px" , "padding-top" : o . innerVGap + "px" , "padding-bottom" : o . innerVGap + "px" } ) , this . button _group } , _createTool : function ( ) { var o = this . options ; if ( ! 1 !== o . tool ) return BI . createWidget ( o . tool ) } , _createTab : function ( ) { var o = this . options ; if ( 0 !== o . tabs . length ) return BI . createWidget ( { type : "bi.center" , cls : "list-view-tab" , height : 25 , items : o . tabs , value : o . value } ) } , _createToolBar : function ( ) { var o = this . options ; if ( 0 !== o . buttons . length ) return BI . createWidget ( { type : "bi.center" , cls : "list-view-toolbar bi-high-light bi-split-top" , height : 24 , items : BI . createItems ( o . buttons , { once : ! 1 , shadow : ! 0 , isShadowShowingOnSelected : ! 0 } ) } ) } , getView : function ( ) { return this . view } , populate : function ( items ) { this . view . populate . apply ( this . view , arguments ) } , resetWidth : function ( w ) { this . options . width = w , this . element . width ( w ) } , resetHeight : function ( h ) { var tbHeight = this . toolbar ? this . toolbar . attr ( "height" ) || 24 : 0 , tabHeight = this . tab ? this . tab . attr ( "height" ) || 24 : 0 , toolHeight = ( this . tool && this . tool . attr ( "height" ) || 24 ) * ( this . tool && this . tool . isVisible ( ) ? 1 : 0 ) , resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this . options . innerVGap ; this . view . resetHeight ? this . view . resetHeight ( resetHeight ) : this . view . element . css ( { "max-height" : resetHeight + "px" } ) } , setValue : function ( selectedValues ) { this . tab && this . tab . setValue ( selectedValues ) , this . view . setValue ( selectedValues ) } , getValue : function ( ) { return this . view . getValue ( ) } } ) , BI . PopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.popup_view" , BI . PopupView ) , BI . SearcherView = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { var conf = BI . SearcherView . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-searcher-view bi-card" , tipText : BI . i18nText ( "BI-No_Select" ) , chooseType : BI . Selection . Single , matcher : { type : "bi.button_group" , behaviors : { redmark : function ( ) { return ! 0 } } , items : [ ] , layouts : [ { type : "bi.vertical" } ] } , searcher : { type : "bi.button_group" , behaviors : { redmark : function ( ) { return ! 0 } } , items : [ ] , layouts : [ { type : "bi.vertical" } ] } } ) } , _init : function ( ) { BI . SearcherView . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . matcher = BI . createWidget ( o . matcher , { type : "bi.button_group" , chooseType : o . chooseType , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . matcher . on ( BI . Controller . EVENT _CHANGE , function ( type , val , ob ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . SearcherView . EVENT _CHANGE , val , ob ) } ) , this . spliter = BI . createWidget ( { type : "bi.vertical" , height : 1 , hgap : 10 , items : [ { type : "bi.layout" , height : 1 , cls : "searcher-view-spliter bi-background" } ] } ) , this . searcher = BI . createWidget ( o . searcher , { type : "bi.button_group" , chooseType : o . chooseType , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . searcher . on ( BI . Controller . EVENT _CHANGE , function ( type , val , ob ) { self . fireEvent ( BI . Controller . EV
this . text . unHighLight . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . IconTextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_icon_item" , BI . IconTextIconItem ) , BI . IconTextItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . IconTextItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-icon-text-item" , direction : BI . Direction . Left , logic : { dynamic : ! 1 } , iconWrapperWidth : null , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextItem . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , hgap : o . textHgap , vgap : o . textVgap , lgap : o . textLgap , rgap : o . textRgap , text : o . text , value : o . value , keyword : o . keyword , height : o . height } ) , this . icon = BI . createWidget ( { type : "bi.icon_label" , width : o . iconWrapperWidth || o . height , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . icon , this . text ) } ) ) ) ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } , doClick : function ( ) { BI . IconTextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } } ) , BI . IconTextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_item" , BI . IconTextItem ) , BI . TextIconItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . TextIconItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-icon-item" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextIconItem . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , hgap : o . textHgap , vgap : o . textVgap , lgap : o . textLgap , rgap : o . textRgap , text : o . text , value : o . value , keyword : o . keyword , height : o . height } ) , this . icon = BI . createWidget ( { type : "bi.icon_label" , width : o . height , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , this . text , this . icon ) } ) ) ) ) } , doClick : function ( ) { BI . TextIconItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextIconItem . EVENT _CHANGE , this . getValue ( ) , this ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } } ) , BI . TextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_icon_item" , BI . TextIconItem ) , BI . TextItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . TextItem . superclass . _defaultConfig . ap
upload . onprogress ( rpe ) ; break ; case 4 : if ( clearInterval ( rpe . interval ) , rpe . interval = 0 , rpe . loaded = rpe . total , upload . onprogress ( rpe ) , 199 < xhr . status && xhr . status < 400 ) { upload . onload ( { } ) ; var attachO = BI . jsonDecode ( xhr . responseText ) ; attachO . filename = handler . file . fileName , handler . file . type . indexOf ( "image" ) != - 1 && ( attachO . attach _type = "image" ) , handler . attach _array . push ( attachO ) } else upload . onerror ( { } ) } } , upload . onloadstart ( rpe ) } var boundary = "AjaxUploadBoundary" + ( new Date ) . getTime ( ) ; if ( xhr . setRequestHeader ( "Content-Type" , "multipart/form-data; boundary=" + boundary ) , handler . file . getAsBinary ) xhr [ xhr . sendAsBinary ? "sendAsBinary" : "send" ] ( multipart ( boundary , handler . name , handler . file ) ) ; else { xhr . setRequestHeader ( "Content-Type" , "multipart/form-data" ) ; var form = new FormData ; form . append ( "FileData" , handler . file ) , xhr . send ( form ) } return handler } : function ( handler , maxSize , width , height ) { var url = handler . url . concat ( - 1 === handler . url . indexOf ( "?" ) ? "?" : "&" , "AjaxUploadFrame=true" ) , rpe = { loaded : 1 , total : 100 , simulation : ! 0 , interval : setInterval ( function ( ) { rpe . loaded < rpe . total && ++ rpe . loaded , isFunction ( handler . onprogress ) && handler . onprogress ( rpe , { } ) } , 100 ) } , onload = function ( ) { iframe . onreadystatechange = iframe . onload = iframe . onerror = null , form . parentNode . removeChild ( form ) , form = null , clearInterval ( rpe . interval ) ; try { var responseText = ( iframe . contentWindow . document || iframe . contentWindow . contentDocument ) . body . innerHTML , attachO = BI . jsonDecode ( responseText ) ; handler . file . type . indexOf ( "image" ) != - 1 && ( attachO . attach _type = "image" ) ; try { attachO . filename = _global . decodeURIComponent ( handler . file . fileName ) } catch ( e ) { attachO . filename = handler . file . fileName } 1 == handler . maxlength ? handler . attach _array [ 0 ] = attachO : handler . attach _array . push ( attachO ) } catch ( e ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , event || _global . event ) } isFunction ( handler . onload ) && handler . onload ( rpe , { responseText : responseText } ) } , target = [ "AjaxUpload" , ( new Date ) . getTime ( ) , String ( Math . random ( ) ) . substring ( 2 ) ] . join ( "_" ) ; try { var form = document . createElement ( '<form enctype="multipart/form-data"></form>' ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( '<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>' ) ) } catch ( e ) { var form = document . createElement ( "form" ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( "iframe" ) ) ; form . setAttribute ( "enctype" , "multipart/form-data" ) , iframe . setAttribute ( "name" , iframe . id = target ) , iframe . setAttribute ( "src" , url ) } with ( iframe . style . position = "absolute" , iframe . style . left = iframe . style . top = "-10000px" , iframe . onload = onload , iframe . onerror = function ( event ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , event || _global . event ) } , iframe . onreadystatechange = function ( ) { /loaded|complete/i . test ( iframe . readyState ) ? onload ( ) : isFunction ( handler . onloadprogress ) && ( rpe . loaded < rpe . total && ++ rpe . loaded , handler . onloadprogress ( rpe , { readyState : { loading : 2 , interactive : 3 , loaded : 4 , complete : 4 } [ iframe . readyState ] || 1 } ) ) } , form . setAttribute ( "action" , handler . url + "&filename=" + _global . encodeURIComponent ( handler . file . fileName ) ) , form . setAttribute ( "target" , iframe . id ) , form . setAttribute ( "method" , "post" ) , form . appendChild ( handler . file ) , form . style . display = "none" , isFunction ( handler . onloadstart ) && handler . onloadstart ( rpe , { } ) , document . body || document . documentElement ) appendChild ( iframe ) , appendChild ( form ) , form . submit ( ) ; return handler } , xhr = null , sendFile } ( Object . prototype . toString ) , sendFiles = function ( handler , maxSize , width , height ) { var length = handler . files . length , i = 0 , onload = handler . onload , onloadstart = handler . onloadstart ; for ( handler . current = 0 , handler . total = 0 , handler . sent = 0 ; handler . current < length ; ) handler . total += handler . files [ handler . current ] . fileSize || handler . files [ handler . current ] . size , handler . current ++ ; return handler . current = 0 , length && handler . files [ 0 ] . fileSize !== - 1 ? ( handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = function ( rpe , xhr ) { handler . onloadstart = null , handler . sent += handler . files [ handler . current ] . fileSize || handler . files [ handler . current ] . size , ++ handler . current < length ? ( handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = arguments . callee ) : onload && ( handler . onl
} , getNodeByValue : function ( id ) { return this . tree && this . tree . getNodeByValue ( id ) } , empty : function ( ) { this . tree . empty ( ) } } ) , BI . CustomTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.custom_tree" , BI . CustomTree ) , function ( $ ) { var settings = { } , roots = { } , caches = { } , _consts = { className : { BUTTON : "button" , LEVEL : "level" , ICO _LOADING : "ico_loading" , SWITCH : "switch" } , event : { NODECREATED : "ztree_nodeCreated" , CLICK : "ztree_click" , EXPAND : "ztree_expand" , COLLAPSE : "ztree_collapse" , ASYNC _SUCCESS : "ztree_async_success" , ASYNC _ERROR : "ztree_async_error" , REMOVE : "ztree_remove" , SELECTED : "ztree_selected" , UNSELECTED : "ztree_unselected" } , id : { A : "_a" , ICON : "_ico" , SPAN : "_span" , SWITCH : "_switch" , UL : "_ul" } , line : { ROOT : "root" , ROOTS : "roots" , CENTER : "center" , BOTTOM : "bottom" , NOLINE : "noline" , LINE : "line" } , folder : { OPEN : "open" , CLOSE : "close" , DOCU : "docu" } , node : { CURSELECTED : "curSelectedNode" } } , _setting = { treeId : "" , treeObj : null , view : { addDiyDom : null , autoCancelSelected : ! 0 , dblClickExpand : ! 0 , expandSpeed : "fast" , fontCss : { } , nameIsHTML : ! 1 , selectedMulti : ! 0 , showIcon : ! 0 , showLine : ! 0 , showTitle : ! 0 , txtSelectedEnable : ! 1 } , data : { key : { children : "children" , name : "name" , title : "" , url : "url" } , simpleData : { enable : ! 1 , idKey : "id" , pIdKey : "pId" , rootPId : null } , keep : { parent : ! 1 , leaf : ! 1 } } , async : { enable : ! 1 , contentType : "application/x-www-form-urlencoded" , type : "post" , dataType : "text" , url : "" , autoParam : [ ] , otherParam : [ ] , dataFilter : null } , callback : { beforeAsync : null , beforeClick : null , beforeDblClick : null , beforeRightClick : null , beforeMouseDown : null , beforeMouseUp : null , beforeExpand : null , beforeCollapse : null , beforeRemove : null , onAsyncError : null , onAsyncSuccess : null , onNodeCreated : null , onClick : null , onDblClick : null , onRightClick : null , onMouseDown : null , onMouseUp : null , onExpand : null , onCollapse : null , onRemove : null } } , _initRoot = function ( setting ) { var r = data . getRoot ( setting ) ; r || ( r = { } , data . setRoot ( setting , r ) ) , r [ setting . data . key . children ] = [ ] , r . expandTriggerFlag = ! 1 , r . curSelectedList = [ ] , r . noSelection = ! 0 , r . createdNodes = [ ] , r . zId = 0 , r . _ver = ( new Date ) . getTime ( ) } , _initCache = function ( setting ) { var c = data . getCache ( setting ) ; c || ( c = { } , data . setCache ( setting , c ) ) , c . nodes = [ ] , c . doms = [ ] } , _bindEvent = function ( setting ) { var o = setting . treeObj , c = consts . event ; o . bind ( c . NODECREATED , function ( event , treeId , node ) { tools . apply ( setting . callback . onNodeCreated , [ event , treeId , node ] ) } ) , o . bind ( c . CLICK , function ( event , srcEvent , treeId , node , clickFlag ) { tools . apply ( setting . callback . onClick , [ srcEvent , treeId , node , clickFlag ] ) } ) , o . bind ( c . EXPAND , function ( event , treeId , node ) { tools . apply ( setting . callback . onExpand , [ event , treeId , node ] ) } ) , o . bind ( c . COLLAPSE , function ( event , treeId , node ) { tools . apply ( setting . callback . onCollapse , [ event , treeId , node ] ) } ) , o . bind ( c . ASYNC _SUCCESS , function ( event , treeId , node , msg ) { tools . apply ( setting . callback . onAsyncSuccess , [ event , treeId , node , msg ] ) } ) , o . bind ( c . ASYNC _ERROR , function ( event , treeId , node , XMLHttpRequest , textStatus , errorThrown ) { tools . apply ( setting . callback . onAsyncError , [ event , treeId , node , XMLHttpRequest , textStatus , errorThrown ] ) } ) , o . bind ( c . REMOVE , function ( event , treeId , treeNode ) { tools . apply ( setting . callback . onRemove , [ event , treeId , treeNode ] ) } ) , o . bind ( c . SELECTED , function ( event , srcEvent , treeId , node ) { tools . apply ( setting . callback . onSelected , [ srcEvent , treeId , node ] ) } ) , o . bind ( c . UNSELECTED , function ( event , srcEvent , treeId , node ) { tools . apply ( setting . callback . onUnSelected , [ srcEvent , treeId , node ] ) } ) } , _unbindEvent = function ( setting ) { var o = setting . treeObj , c = consts . event ; o . unbind ( c . NODECREATED ) . unbind ( c . CLICK ) . unbind ( c . EXPAND ) . unbind ( c . COLLAPSE ) . unbind ( c . ASYNC _SUCCESS ) . unbind ( c . ASYNC _ERROR ) . unbind ( c . REMOVE ) . unbind ( c . SELECTED ) . unbind ( c . UNSELECTED ) } , _eventProxy = function ( event ) { var target = event . target , setting = data . getSetting ( event . data . treeId ) , tId = "" , node = null , nodeEventType = "" , treeEventType = "" , nodeEventCallback = null , treeEventCallback = null , tmp = null ; if ( tools . eqs ( event . type , "mousedown" ) ? treeEventType = "mousedown" : tools . eqs ( event . type , "mouseup" ) ? treeEventType = "mouseup" : tools . eqs ( event . type , "contextmenu" ) ? treeEventType = "contextmenu" : tools . eqs ( event . type , "click" ) ? tools . eqs ( target . tagName , "span" ) && null !== target . getAttribute ( "treeNode" + consts . id . SWITCH ) ? ( tId = tools . getNodeMainDom ( target ) . id , nodeEventType = "switchNode" ) : ( tmp = tools .
view . replaceSwitchClass ( node , tmp _switchObj , consts . folder . DOCU ) , view . replaceIcoClass ( node , tmp _icoObj , consts . folder . DOCU ) , $$ ( node , consts . id . UL , setting ) . remove ( ) } } } } , setFirstNode : function ( setting , parentNode ) { var childKey = setting . data . key . children , childLength = parentNode [ childKey ] . length ; childLength > 0 && ( parentNode [ childKey ] [ 0 ] . isFirstNode = ! 0 ) } , setLastNode : function ( setting , parentNode ) { var childKey = setting . data . key . children , childLength = parentNode [ childKey ] . length ; childLength > 0 && ( parentNode [ childKey ] [ childLength - 1 ] . isLastNode = ! 0 ) } , removeNode : function ( setting , node ) { var root = data . getRoot ( setting ) , childKey = setting . data . key . children , parentNode = node . parentTId ? node . getParentNode ( ) : root ; if ( node . isFirstNode = ! 1 , node . isLastNode = ! 1 , node . getPreNode = function ( ) { return null } , node . getNextNode = function ( ) { return null } , data . getNodeCache ( setting , node . tId ) ) { $$ ( node , setting ) . remove ( ) , data . removeNodeCache ( setting , node ) , data . removeSelectedNode ( setting , node ) ; for ( var i = 0 , l = parentNode [ childKey ] . length ; i < l ; i ++ ) if ( parentNode [ childKey ] [ i ] . tId == node . tId ) { parentNode [ childKey ] . splice ( i , 1 ) ; break } view . setFirstNode ( setting , parentNode ) , view . setLastNode ( setting , parentNode ) ; var tmp _ulObj , tmp _switchObj , tmp _icoObj , childLength = parentNode [ childKey ] . length ; if ( setting . data . keep . parent || 0 != childLength ) { if ( setting . view . showLine && childLength > 0 ) { var newLast = parentNode [ childKey ] [ childLength - 1 ] ; if ( tmp _ulObj = $$ ( newLast , consts . id . UL , setting ) , tmp _switchObj = $$ ( newLast , consts . id . SWITCH , setting ) , tmp _icoObj = $$ ( newLast , consts . id . ICON , setting ) , parentNode == root ) if ( 1 == parentNode [ childKey ] . length ) view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . ROOT ) ; else { var tmp _first _switchObj = $$ ( parentNode [ childKey ] [ 0 ] , consts . id . SWITCH , setting ) ; view . replaceSwitchClass ( parentNode [ childKey ] [ 0 ] , tmp _first _switchObj , consts . line . ROOTS ) , view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . BOTTOM ) } else view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . BOTTOM ) ; tmp _ulObj . removeClass ( consts . line . LINE ) } } else parentNode . isParent = ! 1 , parentNode . open = ! 1 , tmp _ulObj = $$ ( parentNode , consts . id . UL , setting ) , tmp _switchObj = $$ ( parentNode , consts . id . SWITCH , setting ) , tmp _icoObj = $$ ( parentNode , consts . id . ICON , setting ) , view . replaceSwitchClass ( parentNode , tmp _switchObj , consts . folder . DOCU ) , view . replaceIcoClass ( parentNode , tmp _icoObj , consts . folder . DOCU ) , tmp _ulObj . css ( "display" , "none" ) } } , replaceIcoClass : function ( node , obj , newName ) { if ( obj && ! node . isAjaxing ) { var tmpName = obj . attr ( "class" ) ; if ( void 0 != tmpName ) { var tmpList = tmpName . split ( "_" ) ; switch ( newName ) { case consts . folder . OPEN : case consts . folder . CLOSE : case consts . folder . DOCU : tmpList [ tmpList . length - 1 ] = newName } obj . attr ( "class" , tmpList . join ( "_" ) ) } } } , replaceSwitchClass : function ( node , obj , newName ) { if ( obj ) { var tmpName = obj . attr ( "class" ) ; if ( void 0 != tmpName ) { var tmpList = tmpName . split ( "_" ) ; switch ( newName ) { case consts . line . ROOT : case consts . line . ROOTS : case consts . line . CENTER : case consts . line . BOTTOM : case consts . line . NOLINE : tmpList [ 0 ] = view . makeNodeLineClassEx ( node ) + newName ; break ; case consts . folder . OPEN : case consts . folder . CLOSE : case consts . folder . DOCU : tmpList [ 1 ] = newName } obj . attr ( "class" , tmpList . join ( "_" ) ) , newName !== consts . folder . DOCU ? obj . removeAttr ( "disabled" ) : obj . attr ( "disabled" , "disabled" ) } } } , selectNode : function ( setting , node , addFlag ) { addFlag || view . cancelPreSelectedNode ( setting , null , node ) , $$ ( node , consts . id . A , setting ) . addClass ( consts . node . CURSELECTED ) , data . addSelectedNode ( setting , node ) , setting . treeObj . trigger ( consts . event . SELECTED , [ event , setting . treeId , node ] ) } , setNodeFontCss : function ( setting , treeNode ) { var aObj = $$ ( treeNode , consts . id . A , setting ) , fontCss = view . makeNodeFontCss ( setting , treeNode ) ; fontCss && aObj . css ( fontCss ) } , setNodeLineIcos : function ( setting , node ) { if ( node ) { var switchObj = $$ ( node , consts . id . SWITCH , setting ) , ulObj = $$ ( node , consts . id . UL , setting ) , icoObj = $$ ( node , consts . id . ICON , setting ) , ulLine = view . makeUlLineClass ( setting , node ) ; 0 == ulLine . length ? ulObj . removeClass ( consts . line . LINE ) : ulObj . addClass ( ulLine ) , switchObj . attr ( "class" , view . makeNodeLineClass ( setting , node ) ) , node . isParent ? switchObj . removeAttr ( "disabled" ) : switchObj . attr ( "disabled" , "disabled" ) , icoObj . removeAttr ( "style" ) , icoObj . attr ( "style" , vie
self . fireEvent ( BI . IconChangeButton . EVENT _CHANGE , arguments ) } ) } , isSelected : function ( ) { return this . button . isSelected ( ) } , setSelected : function ( b ) { this . button . setSelected ( b ) } , setIcon : function ( cls ) { var o = this . options ; o . iconCls !== cls && ( this . element . removeClass ( o . iconCls ) . addClass ( cls ) , o . iconCls = cls ) } } ) , BI . IconChangeButton . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_change_button" , BI . IconChangeButton ) , BI . TriggerIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var conf = BI . TriggerIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-trigger-icon-button" , extraCls : "pull-down-font" } ) } } ) , BI . TriggerIconButton . EVENT _CHANGE = BI . IconButton . EVENT _CHANGE , BI . shortcut ( "bi.trigger_icon_button" , BI . TriggerIconButton ) , BI . HalfIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var conf = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-half-icon-button check-half-select-icon" , height : 16 , width : 16 , iconWidth : 16 , iconHeight : 16 , selected : ! 1 } ) } } ) , BI . HalfIconButton . EVENT _CHANGE = BI . IconButton . EVENT _CHANGE , BI . shortcut ( "bi.half_icon_button" , BI . HalfIconButton ) , BI . HalfButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-half-button bi-high-light-border" , height : 14 , width : 14 , selected : ! 1 } ) } , _init : function ( ) { BI . HalfButton . superclass . _init . apply ( this , arguments ) , BI . createWidget ( { type : "bi.center_adapt" , element : this . element , items : [ { type : "bi.layout" , cls : "bi-high-light-background" , width : 8 , height : 8 } ] } ) } , doClick : function ( ) { BI . HalfButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . HalfButton . EVENT _CHANGE ) } } ) , BI . HalfButton . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.half_button" , BI . HalfButton ) , BI . MultiSelectItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-multi-select-item" , height : 24 , logic : { dynamic : ! 1 } , iconWrapperWidth : 26 } ) } , _init : function ( ) { BI . MultiSelectItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , rgap : o . rgap , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( type ) { type === BI . Events . CLICK && self . setSelected ( self . isSelected ( ) ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , { type : "bi.center_adapt" , items : [ this . checkbox ] , width : o . iconWrapperWidth } , this . text ) } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . MultiSelectItem . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) , this . isValid ( ) && this . fireEvent ( BI . MultiSelectItem . EVENT _CHANGE , this . getValue ( ) , this ) } , setSelected : function ( v ) { BI . MultiSelectItem . superclass . setSelected . apply ( this , arguments ) , this . checkbox . setSelected ( v ) } } ) , BI . MultiSelectItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_item" , BI . MultiSelectItem ) , BI . SingleSelectIconTextItem = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectIconTextItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-single-select-icon-text-item bi-list-item-active" , iconCls : "" , height : 24 } ) } , _init : function ( ) { BI . SingleSelectIconTextItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . text = BI . createWidget ( { type : "bi.icon_text_item" , element : this , cls : o . iconCls , once : o . once , iconWrapperWidth : o . iconWrapperWidth , selected : o . selected , height : o . height , iconHeight : o . iconHeight , iconWidth : o . iconWidth , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , this . text . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fire
BI . isNotEmptyString ( o . max ) && ( o . max = maxDate , this . _populate ( ) ) } , setValue : function ( ob ) { this . days . setValue ( [ ob . year + "-" + ob . month + "-" + ob . day ] ) } , getValue : function ( ) { var date = this . days . getValue ( ) [ 0 ] . match ( /\d+/g ) ; return { year : 0 | date [ 0 ] , month : 0 | date [ 1 ] , day : 0 | date [ 2 ] } } } ) , BI . extend ( BI . Calendar , { getPageByDateJSON : function ( json ) { var year = BI . getDate ( ) . getFullYear ( ) , month = BI . getDate ( ) . getMonth ( ) , page = 12 * ( json . year - year ) ; return page += json . month - 1 - month } , getDateJSONByPage : function ( v ) { var months = BI . getDate ( ) . getMonth ( ) , page = v ; page += months ; var year = BI . parseInt ( page / 12 ) ; page < 0 && page % 12 !== 0 && year -- ; var month = page >= 0 ? page % 12 : ( 12 + page % 12 ) % 12 ; return { year : BI . getDate ( ) . getFullYear ( ) + year , month : month + 1 } } } ) , BI . shortcut ( "bi.calendar" , BI . Calendar ) , BI . YearCalendar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . YearCalendar . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-year-calendar" , behaviors : { } , logic : { dynamic : ! 1 } , min : "1900-01-01" , max : "2099-12-31" , year : null } ) } , _yearCreator : function ( Y ) { var o = this . options ; Y = 0 | Y ; var start = BI . YearCalendar . getStartYear ( Y ) , items = [ ] , startDate = BI . parseDateTime ( o . min , "%Y-%X-%d" ) , endDate = BI . parseDateTime ( o . max , "%Y-%X-%d" ) ; return BI . each ( BI . range ( BI . YearCalendar . INTERVAL ) , function ( i ) { var td = { } ; 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 ] && ( td . disabled = ! 0 ) , td . text = start + i , items . push ( td ) } ) , items } , _init : function ( ) { BI . YearCalendar . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . currentYear = BI . getDate ( ) . getFullYear ( ) , this . years = BI . createWidget ( { type : "bi.button_group" , behaviors : o . behaviors , items : BI . createItems ( this . _getItems ( ) , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , o . logic , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 24 } ) ) , { type : "bi.center_adapt" , vgap : 1 } ] } ) , this . years . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( { } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , this . years ) } ) ) ) ) } , isFrontYear : function ( ) { var o = this . options , Y = o . year ; return Y = 0 | Y , ! ! BI . checkDateVoid ( BI . YearCalendar . getStartYear ( Y ) - 1 , 1 , 1 , o . min , o . max ) [ 0 ] } , isFinalYear : function ( ) { var o = this . options , c = this . _const , Y = o . year ; return Y = 0 | Y , ! ! BI . checkDateVoid ( BI . YearCalendar . getEndYear ( Y ) + 1 , 1 , 1 , o . min , o . max ) [ 0 ] } , _getItems : function ( ) { var o = this . options , years = this . _yearCreator ( o . year || this . currentYear ) , len = years . length , tyears = BI . makeArray ( len , "" ) , map = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] ; BI . each ( years , function ( i , y ) { tyears [ i ] = years [ map [ i ] ] } ) ; var items = [ ] ; return items . push ( tyears . slice ( 0 , 2 ) ) , items . push ( tyears . slice ( 2 , 4 ) ) , items . push ( tyears . slice ( 4 , 6 ) ) , items . push ( tyears . slice ( 6 , 8 ) ) , items . push ( tyears . slice ( 8 , 10 ) ) , items . push ( tyears . slice ( 10 , 12 ) ) , BI . map ( items , function ( i , item ) { return BI . map ( item , function ( j , td ) { return BI . extend ( td , { type : "bi.text_item" , cls : "bi-list-item-select" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 24 , width : 45 , value : td . text , disabled : td . disabled } ) } ) } ) } , _populate : function ( ) { this . years . populate ( this . _getItems ( ) ) } , setMinDate : function ( minDate ) { var o = this . options ; BI . isNotEmptyString ( o . min ) && ( o . min = minDate , this . _populate ( ) ) } , setMaxDate : function ( maxDate ) { var o = this . options ; BI . isNotEmptyString ( this . options . max ) && ( o . max = maxDate , this . _populate ( ) ) } , setValue : function ( val ) { this . years . setValue ( [ val ] ) } , getValue : function ( ) { return this . years . getValue ( ) [ 0 ] } } ) , BI . extend ( BI . YearCalendar , { INTERVAL : 12 , getStartYear : function ( year ) { var cur = BI . getDate ( ) . getFullYear ( ) ; return year - ( ( year - cur + 3 ) % BI . YearCalendar . INTERVAL + 12 ) % BI . YearCalendar . INTERVAL } , getEndYear : function ( year ) { return BI . YearCalendar . getStartYear ( year ) + BI . YearCalendar . INTERVAL - 1 } , getPageByYear : function ( year ) { var cur = BI . getDate ( ) . getFullYear ( ) ; return year = BI . YearCalendar . getStartYear ( year ) , ( year - cur + 3 ) / BI . YearCalendar . INTERVAL } } ) , BI . shortcut ( "bi.year_calendar" , BI . YearCalendar ) , BI . ArrowTreeGroupNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return B
} ) , this . slMarker . element . css ( { left : Math . round ( this . constants . SQUARE * ( . 5 - this . hsl [ 1 ] ) + this . constants . WIDTH / 2 ) + "px" , top : Math . round ( this . constants . SQUARE * ( . 5 - this . hsl [ 2 ] ) + this . constants . WIDTH / 2 ) + "px" } ) , this . colorWrapper . element . css ( "backgroundColor" , this . _pack ( this . _HSLToRGB ( [ this . hsl [ 0 ] , 1 , . 5 ] ) ) ) , this . fireEvent ( BI . Farbtastic . EVENT _CHANGE , this . getValue ( ) , this ) } , _absolutePosition : function ( el ) { var r = { x : el . offsetLeft , y : el . offsetTop } ; if ( el . offsetParent ) { var tmp = this . _absolutePosition ( el . offsetParent ) ; r . x += tmp . x , r . y += tmp . y } return r } , _widgetCoords : function ( event ) { var x , y , el = event . target || event . srcElement , reference = this . wheel . element [ 0 ] ; if ( "undefined" != typeof event . offsetX ) { for ( var pos = { x : event . offsetX , y : event . offsetY } , e = el ; e ; ) e . mouseX = pos . x , e . mouseY = pos . y , pos . x += e . offsetLeft , pos . y += e . offsetTop , e = e . offsetParent ; for ( var e = reference , offset = { x : 0 , y : 0 } ; e ; ) { if ( "undefined" != typeof e . mouseX ) { x = e . mouseX - offset . x , y = e . mouseY - offset . y ; break } offset . x += e . offsetLeft , offset . y += e . offsetTop , e = e . offsetParent } for ( e = el ; e ; ) e . mouseX = void 0 , e . mouseY = void 0 , e = e . offsetParent } else { var pos = this . _absolutePosition ( reference ) ; x = ( event . pageX || 0 ) - pos . x , y = ( event . pageY || 0 ) - pos . y } return { x : x - this . constants . WIDTH / 2 , y : y - this . constants . WIDTH / 2 } } , _doMouseMove : function ( event ) { var pos = this . _widgetCoords ( event ) ; if ( this . circleDrag ) { var hue = Math . atan2 ( pos . x , - pos . y ) / 6.28 ; hue < 0 && ( hue += 1 ) , this . _setHSL ( [ hue , this . hsl [ 1 ] , this . hsl [ 2 ] ] ) } else { var sat = Math . max ( 0 , Math . min ( 1 , - ( pos . x / this . constants . SQUARE ) + . 5 ) ) , lum = Math . max ( 0 , Math . min ( 1 , - ( pos . y / this . constants . SQUARE ) + . 5 ) ) ; this . _setHSL ( [ this . hsl [ 0 ] , sat , lum ] ) } } , doClick : function ( event ) { var pos = this . _widgetCoords ( event ) ; return this . circleDrag = 2 * Math . max ( Math . abs ( pos . x ) , Math . abs ( pos . y ) ) > this . constants . SQUARE , this . _doMouseMove ( event ) , ! 1 } , setValue : function ( color ) { this . _setColor ( color ) } , getValue : function ( ) { return this . value } } ) , BI . Farbtastic . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.farbtastic" , BI . Farbtastic ) , BI . BubbleCombo = BI . inherit ( BI . Widget , { _const : { TRIANGLE _LENGTH : 6 } , _defaultConfig : function ( ) { return BI . extend ( BI . BubbleCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-bubble-combo" , trigger : "click" , toggle : ! 0 , direction : "bottom,left" , isDefaultInit : ! 1 , destroyWhenHide : ! 1 , isNeedAdjustHeight : ! 0 , isNeedAdjustWidth : ! 0 , stopPropagation : ! 1 , adjustLength : 0 , hideChecker : BI . emptyFn , offsetStyle : "left" , el : { } , popup : { } } ) } , _init : function ( ) { BI . BubbleCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . combo = BI . createWidget ( { type : "bi.combo" , element : this , trigger : o . trigger , toggle : o . toggle , container : o . container , direction : o . direction , isDefaultInit : o . isDefaultInit , destroyWhenHide : o . destroyWhenHide , isNeedAdjustHeight : o . isNeedAdjustHeight , isNeedAdjustWidth : o . isNeedAdjustWidth , adjustLength : this . _getAdjustLength ( ) , stopPropagation : o . stopPropagation , adjustXOffset : 0 , adjustYOffset : 0 , hideChecker : o . hideChecker , offsetStyle : o . offsetStyle , el : o . el , popup : BI . extend ( { type : "bi.bubble_popup_view" } , o . popup ) } ) , this . combo . on ( BI . Combo . EVENT _TRIGGER _CHANGE , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _TRIGGER _CHANGE , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _CHANGE , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _EXPAND , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _EXPAND , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _COLLAPSE , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _COLLAPSE , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _INIT , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _INIT , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _BEFORE _POPUPVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _POPUPVIEW , function ( ) { self . _showTriangle ( ) , self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _POPUPVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _HIDEVIEW , function ( ) { self . _hideTriangle ( ) , self . fireEvent ( BI . BubbleCombo . EVENT _BEFORE _HIDEVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _HIDEVIEW , arguments ) } ) } , _getAdjustLength : function ( ) { return this . _const . TRIANGLE _LENGTH + this . options . adjustLength } , _
self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . SmallTextValueCombo = BI . createWidget ( { type : "bi.combo" , element : this , container : o . container , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 240 , minHeight : 25 } } ) } , setValue : function ( v ) { this . trigger . setValue ( v ) , this . popup . setValue ( v ) } , getValue : function ( ) { return this . popup . getValue ( ) } , populate : function ( items ) { this . options . items = items , this . SmallTextValueCombo . populate ( items ) } } ) , BI . SmallTextValueCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.small_text_value_combo" , BI . SmallTextValueCombo ) , BI . TextValueComboPopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueComboPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-text-icon-popup" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . TextValueComboPopup . superclass . _init . apply ( this , arguments ) ; var o = this . options , self = this ; this . popup = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( o . items , { type : "bi.single_select_item" , textAlign : o . textAlign , height : 24 } ) , chooseType : o . chooseType , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( type , val , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . TextValueComboPopup . EVENT _CHANGE , val , obj ) } ) , this . check ( ) , BI . createWidget ( { type : "bi.vertical" , element : this , vgap : 5 , items : [ this . popup ] } ) } , populate : function ( items ) { BI . TextValueComboPopup . superclass . populate . apply ( this , arguments ) , items = BI . createItems ( items , { type : "bi.single_select_item" , height : 24 } ) , this . popup . populate ( items ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( v ) { this . popup . setValue ( v ) } } ) , BI . TextValueComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_combo_popup" , BI . TextValueComboPopup ) , BI . ClearEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . ClearEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-clear-editor" , height : 24 , errorText : "" , watermark : "" , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn } ) } , _init : function ( ) { BI . ClearEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : o . height , watermark : o . watermark , allowBlank : ! 0 , errorText : o . errorText , validationChecker : o . validationChecker , quitChecker : o . quitChecker , value : o . value } ) , this . clear = BI . createWidget ( { type : "bi.icon_button" , stopEvent : ! 0 , cls : "search-close-h-font" } ) , this . clear . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . setValue ( "" ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . STOPEDIT ) , self . fireEvent ( BI . ClearEditor . EVENT _CLEAR ) } ) , BI . createWidget ( { element : this , type : "bi.htape" , items : [ { el : this . editor } , { el : this . clear , width : 24 } ] } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _FOCUS ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _BLUR ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _CLICK ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { self . _checkClear ( ) , self . fireEvent ( BI . ClearEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( v ) { self . fireEvent ( BI . ClearEditor . EVENT _KEY _DOWN , v ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _SPACE ) } ) , this . editor . on ( BI . Editor . EVENT _BACKSPACE , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _BACKSPACE ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _VALID ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _ERROR ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _ENTER ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _RESTRICT ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . _checkClear ( ) , self . fireEvent ( BI . ClearEditor . EVENT _EMPTY ) } ) , this . editor . on ( BI . Editor . EVENT _REMOVE , function ( ) { self . fire
_defaultConfig : function ( ) { var conf = BI . PopupPanel . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-popup-panel" , title : "" } ) } , _init : function ( ) { BI . PopupPanel . superclass . _init . apply ( this , arguments ) } , _createTool : function ( ) { var self = this , o = this . options , close = BI . createWidget ( { type : "bi.icon_button" , cls : "close-h-font" , width : 25 , height : 25 } ) ; return close . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . setVisible ( ! 1 ) , self . fireEvent ( BI . PopupPanel . EVENT _CLOSE ) } ) , BI . createWidget ( { type : "bi.htape" , cls : "popup-panel-title bi-header-background" , height : 25 , items : [ { el : { type : "bi.label" , textAlign : "left" , text : o . title , height : 25 , lgap : 10 } } , { el : close , width : 25 } ] } ) } } ) , BI . PopupPanel . EVENT _CHANGE = "EVENT_CHANGE" , BI . PopupPanel . EVENT _CLOSE = "EVENT_CLOSE" , BI . PopupPanel . EVENT _CLICK _TOOLBAR _BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON" , BI . shortcut ( "bi.popup_panel" , BI . PopupPanel ) , BI . ListPane = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { var conf = BI . ListPane . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-list-pane" , logic : { dynamic : ! 0 } , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , vgap : 0 , hgap : 0 , items : [ ] , itemsCreator : BI . emptyFn , hasNext : BI . emptyFn , onLoaded : BI . emptyFn , el : { type : "bi.button_group" } } ) } , _init : function ( ) { BI . ListPane . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . button _group = BI . createWidget ( o . el , { type : "bi.button_group" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , behaviors : { } , items : o . items , itemsCreator : function ( op , calback ) { 1 === op . times && ( self . empty ( ) , BI . nextTick ( function ( ) { self . loading ( ) } ) ) , o . itemsCreator ( op , function ( ) { calback . apply ( self , arguments ) , 1 === op . times && BI . nextTick ( function ( ) { self . loaded ( ) , self . check ( ) } ) } ) } , hasNext : o . hasNext , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . ListPane . EVENT _CHANGE , value , obj ) } ) , this . check ( ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Top ) , BI . extend ( { scrolly : ! 0 , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , vgap : o . vgap , hgap : o . hgap } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Top , this . button _group ) } ) ) ) ) } , hasPrev : function ( ) { return this . button _group . hasPrev && this . button _group . hasPrev ( ) } , hasNext : function ( ) { return this . button _group . hasNext && this . button _group . hasNext ( ) } , prependItems : function ( items ) { this . options . items = items . concat ( this . options . items ) , this . button _group . prependItems . apply ( this . button _group , arguments ) , this . check ( ) } , addItems : function ( items ) { this . options . items = this . options . items . concat ( items ) , this . button _group . addItems . apply ( this . button _group , arguments ) , this . check ( ) } , removeItemAt : function ( indexes ) { indexes = indexes || [ ] , BI . removeAt ( this . options . items , indexes ) , this . button _group . removeItemAt . apply ( this . button _group , arguments ) , this . check ( ) } , populate : function ( items ) { var self = this , o = this . options ; return 0 === arguments . length && BI . isFunction ( this . button _group . attr ( "itemsCreator" ) ) ? void this . button _group . attr ( "itemsCreator" ) . apply ( this , [ { times : 1 } , function ( ) { if ( 0 === arguments . length ) throw new Error ( "参数不能为空" ) ; self . populate . apply ( self , arguments ) } ] ) : ( BI . ListPane . superclass . populate . apply ( this , arguments ) , void this . button _group . populate . apply ( this . button _group , arguments ) ) } , empty : function ( ) { this . button _group . empty ( ) } , setNotSelectedValue : function ( ) { this . button _group . setNotSelectedValue . apply ( this . button _group , arguments ) } , getNotSelectedValue : function ( ) { return this . button _group . getNotSelectedValue ( ) } , setValue : function ( ) { this . button _group . setValue . apply ( this . button _group , arguments ) } , getValue : function ( ) { return this . button _group . getValue . apply ( this . button _group , arguments ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . button _group . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . button _group . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . button _group . getNotSelectedButtons ( ) } , getIndexBy
self . currPage = 1 ; break ; case "last" : self . currPage = pages ; break ; case "prev" : self . currPage -- ; break ; case "next" : self . currPage ++ ; break ; default : self . currPage = v } o . jump . apply ( self , [ { pages : pages , curr : self . currPage } ] ) , self . _populate ( ) , self . fireEvent ( BI . DetailPager . EVENT _CHANGE , obj ) } self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } ) , this . fireEvent ( BI . DetailPager . EVENT _AFTER _POPULATE ) } , getCurrentPage : function ( ) { return this . currPage } , setAllPages : function ( pages ) { this . options . pages = pages } , hasPrev : function ( v ) { v || ( v = 1 ) ; var o = this . options , pages = this . options . pages ; return pages === ! 1 ? o . hasPrev ( v ) : v > 1 } , hasNext : function ( v ) { v || ( v = 1 ) ; var o = this . options , pages = this . options . pages ; return pages === ! 1 ? o . hasNext ( v ) : v < pages } , setValue : function ( v ) { var o = this . options ; if ( v = v || 0 , v = v < 1 ? 1 : v , o . pages === ! 1 ) { var lastPage = BI . result ( o , "lastPage" ) , firstPage = 1 ; this . currPage = v > lastPage ? lastPage : ( firstPage = BI . result ( o , "firstPage" ) , v < firstPage ? firstPage : v ) } else v = v > o . pages ? o . pages : v , this . currPage = v ; this . _populate ( ) } , getValue : function ( ) { var val = this . button _group . getValue ( ) [ 0 ] ; switch ( val ) { case "prev" : return - 1 ; case "next" : return 1 ; case "first" : return BI . MIN ; case "last" : return BI . MAX ; default : return val } } , attr : function ( key , value ) { BI . DetailPager . superclass . attr . apply ( this , arguments ) , "curr" === key && ( this . currPage = BI . result ( this . options , "curr" ) ) } , populate : function ( ) { this . _populate ( ) } } ) , BI . DetailPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . DetailPager . EVENT _AFTER _POPULATE = "EVENT_AFTER_POPULATE" , BI . shortcut ( "bi.detail_pager" , BI . DetailPager ) , BI . SegmentButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . SegmentButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-segment-button bi-list-item-select" , shadow : ! 0 , readonly : ! 0 , hgap : 5 } ) } , _init : function ( ) { BI . SegmentButton . superclass . _init . apply ( this , arguments ) ; var opts = this . options , self = this ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textHeight : opts . height , whiteSpace : opts . whiteSpace , text : opts . text , value : opts . value , hgap : opts . hgap } ) } , setSelected : function ( ) { BI . SegmentButton . superclass . setSelected . apply ( this , arguments ) } , setText : function ( text ) { BI . SegmentButton . superclass . setText . apply ( this , arguments ) , this . text . setText ( text ) } , destroy : function ( ) { BI . SegmentButton . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.segment_button" , BI . SegmentButton ) , BI . Segment = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Segment . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-segment" , items : [ ] , height : 24 } ) } , _init : function ( ) { BI . Segment . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . buttonGroup = BI . createWidget ( { element : this , type : "bi.button_group" , value : o . value , items : BI . createItems ( o . items , { type : "bi.segment_button" , height : o . height - 2 , whiteSpace : o . whiteSpace } ) , layout : [ { type : "bi.center" } ] } ) , this . buttonGroup . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . buttonGroup . on ( BI . ButtonGroup . EVENT _CHANGE , function ( value , obj ) { self . fireEvent ( BI . Segment . EVENT _CHANGE , value , obj ) } ) } , _setEnable : function ( enable ) { BI . Segment . superclass . _setEnable . apply ( this , arguments ) , enable === ! 0 ? this . element . removeClass ( "base-disabled disabled" ) : enable === ! 1 && this . element . addClass ( "base-disabled disabled" ) } , setValue : function ( v ) { this . buttonGroup . setValue ( v ) } , setEnabledValue : function ( v ) { this . buttonGroup . setEnabledValue ( v ) } , getValue : function ( ) { return this . buttonGroup . getValue ( ) } } ) , BI . Segment . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.segment" , BI . Segment ) , BI . MultiSelectBar = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectBar . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-multi-select-bar" , height : 25 , text : BI . i18nText ( "BI-Select_All" ) , isAllCheckedBySelectedValue : BI . emptyFn , disableSelected : ! 0 , isHalfCheckedBySelectedValue : function ( selectedValues ) { return selectedValues . length > 0 } , halfSelected : ! 1 , iconWrapperWidth : 26 } ) } , _init : function ( ) { BI . MultiSelectBar . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , isSelect = o . selected === ! 0 , isHalfSelect = ! o . selected && o . half
min : o . min , max : o . max } ) , this . calendar = BI . createWidget ( { direction : "top" , logic : { dynamic : ! 0 } , type : "bi.navigation" , tab : this . datePicker , cardCreator : BI . bind ( this . _createNav , this ) , afterCardCreated : function ( ) { } , afterCardShow : function ( ) { this . setValue ( self . selectedTime ) } } ) , this . datePicker . on ( BI . DatePicker . EVENT _CHANGE , function ( ) { self . selectedTime = self . datePicker . getValue ( ) , self . selectedTime . day = 1 , self . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( self . selectedTime ) ) } ) , this . calendar . on ( BI . Navigation . EVENT _CHANGE , function ( ) { self . selectedTime = self . calendar . getValue ( ) , self . setValue ( self . selectedTime ) , self . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . calendar , left : 5 , right : 5 } , { el : { type : "bi.layout" , cls : "bi-split-top" } , height : 1 , top : 40 , left : 0 , right : 0 } ] } ) } , _checkMin : function ( ) { var calendar = this . calendar . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && calendar . setMinDate ( this . options . min ) } , _checkMax : function ( ) { var calendar = this . calendar . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && calendar . setMaxDate ( this . options . max ) } , setMinDate : function ( minDate ) { BI . isNotEmptyString ( this . options . min ) && ( this . options . min = minDate , this . datePicker . setMinDate ( minDate ) , this . _checkMin ( ) ) } , setMaxDate : function ( maxDate ) { BI . isNotEmptyString ( this . options . max ) && ( this . options . max = maxDate , this . datePicker . setMaxDate ( maxDate ) , this . _checkMax ( ) ) } , setValue : function ( timeOb ) { this . datePicker . setValue ( timeOb ) , this . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( timeOb ) ) , this . calendar . setValue ( timeOb ) , this . selectedTime = timeOb } , getValue : function ( ) { return this . selectedTime } } ) , BI . DateCalendarPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.date_calendar_popup" , BI . DateCalendarPopup ) , BI . MonthPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-popup" , behaviors : { } } ) } , _init : function ( ) { BI . MonthPopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , month = [ 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 , 6 , 12 ] , items = [ ] ; items . push ( month . slice ( 0 , 2 ) ) , items . push ( month . slice ( 2 , 4 ) ) , items . push ( month . slice ( 4 , 6 ) ) , items . push ( month . slice ( 6 , 8 ) ) , items . push ( month . slice ( 8 , 10 ) ) , items . push ( month . slice ( 10 , 12 ) ) , items = BI . map ( items , function ( i , item ) { return BI . map ( item , function ( j , td ) { return { type : "bi.text_item" , cls : "bi-list-item-select" , textAlign : "center" , whiteSpace : "nowrap" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : td , text : td } } ) } ) , this . month = BI . createWidget ( { type : "bi.button_group" , element : this , behaviors : o . behaviors , items : BI . createItems ( items , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { dynamic : ! 0 } , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 , hgap : 2 } ] , value : o . value } ) , this . month . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . MonthPopup . EVENT _CHANGE ) } ) } , getValue : function ( ) { return this . month . getValue ( ) [ 0 ] } , setValue : function ( v ) { v = BI . parseInt ( v ) , this . month . setValue ( [ v ] ) } } ) , BI . MonthPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.month_popup" , BI . MonthPopup ) , BI . YearPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . YearPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-year-popup" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" } ) } , _createYearCalendar : function ( v ) { var o = this . options , y = this . _year , calendar = BI . createWidget ( { type : "bi.year_calendar" , behaviors : o . behaviors , min : o . min , max : o . max , logic : { dynamic : ! 0 } , year : y + 12 * v } ) ; return calendar . setValue ( this . _year ) , calendar } , _init : function ( ) { BI . YearPopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . selectedYear = this . _year = BI . getDate ( ) . getFullYear ( ) , this . backBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "pre-page-h-font" , width : 24 , height : 24 , value : - 1 } ) , this . preBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "next-page-h-font" , width : 24 , height : 24 , value : 1 } ) , this . navigation = BI . createWidget ( { type : "bi.navigation" , element : this , single : ! 0 , logic : { dynamic : ! 0 } , tab : { cls : "year-popup-navigation bi-high-light bi-split-top" , height : 24 , items
element : this , items : [ this . popup ] , vgap : 5 } ) } , _createChildren : function ( items ) { var self = this , result = [ ] ; return BI . each ( items , function ( i , it ) { var item _done = { type : "bi.down_list_group" , items : [ ] } ; if ( BI . each ( it , function ( i , item ) { BI . isNotEmptyArray ( item . children ) && ! BI . isEmpty ( item . el ) ? ( item . type = "bi.combo_group" , item . isDefaultInit = ! 0 , item . cls = "down-list-group" , item . trigger = "hover" , item . isNeedAdjustWidth = ! 1 , item . el . title = item . el . title || item . el . text , item . el . type = "bi.down_list_group_item" , item . el . logic = { dynamic : ! 0 } , item . el . height = self . constants . height , item . el . iconCls2 = self . constants . nextIcon , item . popup = { lgap : 1 , el : { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } , innerVGap : 5 , maxHeight : 378 } , item . el . childValues = [ ] , BI . each ( item . children , function ( i , child ) { var fatherValue = BI . deepClone ( item . el . value ) , childValue = BI . deepClone ( child . value ) ; self . singleValues . push ( child . value ) , child . type = "bi.down_list_item" , child . extraCls = " child-down-list-item" , child . title = child . title || child . text , child . textRgap = 10 , child . isNeedAdjustWidth = ! 1 , child . logic = { dynamic : ! 0 } , child . father = fatherValue , self . fatherValueMap [ self . _createChildValue ( fatherValue , childValue ) ] = fatherValue , self . childValueMap [ self . _createChildValue ( fatherValue , childValue ) ] = childValue , child . value = self . _createChildValue ( fatherValue , childValue ) , item . el . childValues . push ( child . value ) } ) ) : ( item . type = "bi.down_list_item" , item . title = item . title || item . text , item . textRgap = 10 , item . isNeedAdjustWidth = ! 1 , item . logic = { dynamic : ! 0 } ) ; var el _done = { } ; el _done . el = item , item _done . items . push ( el _done ) } ) , self . _isGroup ( item _done . items ) && BI . each ( item _done . items , function ( i , item ) { self . singleValues . push ( item . el . value ) } ) , result . push ( item _done ) , self . _needSpliter ( i , items . length ) ) { var spliter _container = BI . createWidget ( { type : "bi.vertical" , items : [ { el : { type : "bi.layout" , cls : "bi-down-list-spliter bi-split-top cursor-pointer" , height : 0 } } ] , cls : "bi-down-list-spliter-container cursor-pointer" , vgap : 5 , lgap : 10 , rgap : 0 } ) ; result . push ( spliter _container ) } } ) , result } , _isGroup : function ( i ) { return i . length > 1 } , _needSpliter : function ( i , itemLength ) { return i < itemLength - 1 } , _createChildValue : function ( fatherValue , childValue ) { return fatherValue + "_" + childValue } , _digest : function ( valueItem ) { var self = this , valueArray = [ ] ; return BI . each ( valueItem , function ( i , item ) { var value ; value = BI . isNotNull ( item . childValue ) ? self . _createChildValue ( item . value , item . childValue ) : item . value , valueArray . push ( value ) } ) , valueArray } , _checkValues : function ( values ) { function joinValue ( sources , targets ) { var value = "" ; return BI . some ( sources , function ( idx , s ) { return BI . some ( targets , function ( id , t ) { if ( s === t ) return value = s , ! 0 } ) } ) , value } var value = [ ] ; return BI . each ( this . items , function ( idx , itemGroup ) { BI . each ( itemGroup , function ( id , item ) { if ( BI . isNotNull ( item . children ) ) { var childValues = BI . map ( item . children , "value" ) , v = joinValue ( childValues , values [ idx ] ) ; BI . isNotEmptyString ( v ) && value . push ( v ) } else item . value === values [ idx ] [ 0 ] && value . push ( values [ idx ] [ 0 ] ) } ) } ) , value } , populate : function ( items ) { BI . DownListPopup . superclass . populate . apply ( this , arguments ) , this . items = BI . deepClone ( items ) , this . childValueMap = { } , this . fatherValueMap = { } , this . singleValues = [ ] ; var children = this . _createChildren ( this . items ) , popupItem = BI . createItems ( children , { } , { adjustLength : - 2 } ) ; this . popup . populate ( popupItem ) } , setValue : function ( valueItem ) { this . popup . setValue ( this . _digest ( valueItem ) ) } , _getValue : function ( ) { var v = [ ] ; return BI . each ( this . popup . getAllButtons ( ) , function ( i , item ) { i % 2 === 0 && v . push ( item . getValue ( ) ) } ) , v } , getValue : function ( ) { var self = this , result = [ ] , values = this . _checkValues ( this . _getValue ( ) ) ; return BI . each ( values , function ( i , value ) { var valueItem = { } ; if ( BI . isNotNull ( self . childValueMap [ value ] ) ) { var fartherValue = self . fatherValueMap [ value ] ; valueItem . childValue = self . childValueMap [ value ] , valueItem . value = fartherValue } else valueItem . value = value ; result . push ( valueItem ) } ) , result } } ) , BI . DownListPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . DownListPopup . EVENT _SON _VALUE _CHANGE = "EVENT_SON_VALUE_CHANGE" , BI . shortcut ( "bi.down_list_popup" , BI . DownListPopup ) , ! function ( ) { BI . DynamicDateHelper = { } , BI . extend ( BI . DynamicDateHelper , { getCalculation : function ( obj ) { var date = BI . getDate ( ) ; return
BI . isNotNull ( obj . month ) && ( 0 !== BI . parseInt ( obj . month ) && ( value += Math . abs ( obj . month ) + BI . i18nText ( "BI-Basic_Month" ) + ( obj . month < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Month" ) , obj . position ) ) , BI . isNotNull ( obj . week ) && ( 0 !== BI . parseInt ( obj . week ) && ( value += Math . abs ( obj . week ) + BI . i18nText ( "BI-Basic_Week" ) + ( obj . week < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Week" ) , obj . position ) ) , BI . isNotNull ( obj . day ) && ( 0 !== BI . parseInt ( obj . day ) && ( value += Math . abs ( obj . day ) + BI . i18nText ( "BI-Basic_Day" ) + ( obj . day < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = 1 === BI . size ( obj ) ? getPositionText ( BI . i18nText ( "BI-Basic_Month" ) , obj . position ) : "" ) , BI . isNotNull ( obj . workDay ) && 0 !== BI . parseInt ( obj . workDay ) && ( value += Math . abs ( obj . workDay ) + BI . i18nText ( "BI-Basic_Work_Day" ) + ( obj . workDay < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , value + endText } , setValue : function ( v ) { var type , value , self = this , date = BI . getDate ( ) ; switch ( this . storeValue = v , BI . isNotNull ( v ) && ( type = v . type || BI . DynamicDateCombo . Static , value = v . value || v ) , type ) { case BI . DynamicDateCombo . Dynamic : var text = this . _getText ( value ) ; date = BI . DynamicDateHelper . getCalculation ( value ) , this . _setInnerValue ( date , text ) ; break ; case BI . DynamicDateCombo . Static : default : if ( BI . isNull ( value ) || BI . isNull ( value . day ) ) this . editor . setState ( "" ) , this . editor . setValue ( "" ) ; else { var dateStr = BI . print ( BI . getDate ( value . year , value . month - 1 , value . day ) , this . _getFormatString ( ) ) ; this . editor . setState ( dateStr ) , this . editor . setValue ( dateStr ) } } } , setMinDate : function ( minDate ) { BI . isNotEmptyString ( this . options . min ) && ( this . options . min = minDate ) } , setMaxDate : function ( maxDate ) { BI . isNotEmptyString ( this . options . max ) && ( this . options . max = maxDate ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . storeValue } } ) , BI . DynamicDateTrigger . EVENT _BLUR = "EVENT_BLUR" , BI . DynamicDateTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicDateTrigger . EVENT _START = "EVENT_START" , BI . DynamicDateTrigger . EVENT _STOP = "EVENT_STOP" , BI . DynamicDateTrigger . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicDateTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . DynamicDateTrigger . EVENT _VALID = "EVENT_VALID" , BI . DynamicDateTrigger . EVENT _ERROR = "EVENT_ERROR" , BI . DynamicDateTrigger . EVENT _TRIGGER _CLICK = "EVENT_TRIGGER_CLICK" , BI . DynamicDateTrigger . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . shortcut ( "bi.dynamic_date_trigger" , BI . DynamicDateTrigger ) , BI . DynamicDateTimeCombo = BI . inherit ( BI . Single , { constants : { popupHeight : 259 , popupWidth : 270 , comboAdjustHeight : 1 , border : 1 } , props : { baseCls : "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius" , height : 22 , minDate : "1900-01-01" , maxDate : "2099-12-31" , format : "" , allowEdit : ! 0 } , render : function ( ) { var self = this , opts = this . options ; this . storeTriggerValue = "" ; var date = BI . getDate ( ) ; return this . storeValue = opts . value , { type : "bi.htape" , items : [ { el : { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-change-h-font" , width : opts . height , height : opts . height , ref : function ( ) { self . changeIcon = this } } , width : opts . height } , { type : "bi.absolute" , items : [ { el : { type : "bi.combo" , destroyWhenHide : ! 0 , container : opts . container , ref : function ( ) { self . combo = this } , toggle : ! 1 , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : { type : "bi.dynamic_date_time_trigger" , min : opts . minDate , max : opts . maxDate , allowEdit : opts . allowEdit , watermark : opts . watermark , format : opts . format , height : opts . height , value : opts . value , ref : function ( ) { self . trigger = this } , listeners : [ { eventName : BI . DynamicDateTimeTrigger . EVENT _KEY _DOWN , action : function ( ) { self . combo . isViewVisible ( ) && self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _KEY _DOWN , arguments ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _STOP , action : function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _TRIGGER _CLICK , action : function ( ) { self . combo . toggle ( ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _FOCUS , action : function ( ) { self . storeTriggerValue = self . trigger . getKey ( ) , self . combo . isViewVisible ( ) || self . combo . showView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _FOCUS ) } } , { eventName : BI . DynamicDa
return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-small-search-editor" , height : 20 } ) } , _init : function ( ) { BI . SmallSearchEditor . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.small_search_editor" , BI . SmallSearchEditor ) , BI . TextEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . TextEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-text-editor bi-border bi-focus-shadow" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 , watermark : "" , errorText : "" , height : 24 } ) } , _init : function ( ) { BI . TextEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNumber ( o . height ) && this . element . css ( { height : o . height - 2 } ) , BI . isNumber ( o . width ) && this . element . css ( { width : o . width - 2 } ) , this . editor = BI . createWidget ( { type : "bi.editor" , height : o . height - 2 , hgap : o . hgap , vgap : o . vgap , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , value : o . value , title : o . title , tipType : o . tipType , validationChecker : o . validationChecker , quitChecker : o . quitChecker , allowBlank : o . allowBlank , watermark : o . watermark , errorText : o . errorText } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _FOCUS ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _BLUR ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CLICK ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _KEY _DOWN ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _SPACE ) } ) , this . editor . on ( BI . Editor . EVENT _BACKSPACE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _BACKSPACE ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _VALID ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE _CONFIRM , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CHANGE _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _REMOVE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _REMOVE ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _START ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _PAUSE ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _STOP ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _ENTER ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _RESTRICT ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _EMPTY ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) } , setWaterMark : function ( v ) { this . options . watermark = v , this . editor . setWaterMark ( v ) } , focus : function ( ) { this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) } , setErrorText : function ( text ) { this . editor . setErrorText ( text ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setValue : function ( v ) { this . editor . setValue ( v ) } , getValue : function ( ) { return this . editor . getValue ( ) } } ) , BI . TextEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . TextEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . TextEditor . EVENT _BLUR = "EVENT_BLUR" , BI . TextEditor . EVENT _CLICK = "EVENT_CLICK" , BI . TextEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . TextEditor . EVENT _SPACE = "EVENT_SPACE" , BI . TextEditor . EVENT _BACKSPACE = "EVENT_BACKSPACE" , BI . TextEditor . EVENT _START = "EVENT_START" , BI . TextEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . TextEditor . EVENT _STOP = "EVENT_STOP" , BI . TextEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . TextEditor . EVENT _CHANGE _CONFIRM = "EVENT_CHANGE_CONFIRM" , BI . TextEditor . EVENT _VALID = "EVENT_VALID" , BI . TextEditor . EVENT _ERROR = "EVENT_ERROR" , BI . TextEditor . EVENT _ENTER = "EVENT_ENTER" , BI . TextEditor . EVENT _R
var self = this , o = this . options ; return { el : { type : "bi.multilayer_select_tree_trigger" , container : o . container , allowInsertValue : o . allowInsertValue , allowSearchValue : o . allowSearchValue , allowEdit : o . allowEdit , cls : "multilayer-select-tree-trigger" , ref : function ( _ref ) { self . trigger = _ref } , items : o . items , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , watermark : o . watermark , height : o . height - 2 , text : o . text , value : o . value , tipType : o . tipType , warningTitle : o . warningTitle , title : o . title , listeners : [ { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _CHANGE , action : function ( ) { self . setValue ( this . getValue ( ) ) , self . combo . hideView ( ) , self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _CHANGE ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _BLUR ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _SEARCHING , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _SEARCHING ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _ADD _ITEM , action : function ( ) { var value = self . trigger . getSearcher ( ) . getKeyword ( ) ; self . combo . setValue ( [ value ] ) , self . combo . hideView ( ) } } ] } , toggle : ! o . allowEdit , hideChecker : function ( e ) { return ! ( o . container && self . trigger . getSearcher ( ) . isSearching ( ) && self . trigger . getSearcher ( ) . getView ( ) . element . find ( e . target ) . length > 0 ) && 0 === self . triggerBtn . element . find ( e . target ) . length } , listeners : [ { eventName : BI . Combo . EVENT _AFTER _HIDEVIEW , action : function ( ) { self . trigger . stopEditing ( ) } } , { eventName : BI . Combo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _BEFORE _POPUPVIEW ) } } ] } } , _getSyncConfig : function ( ) { var o = this . options , baseConfig = this . _getBaseConfig ( ) ; return BI . extend ( baseConfig , o . allowEdit ? this . _getSearchConfig ( ) : { el : { type : "bi.single_tree_trigger" , text : o . text , height : o . height , items : o . items , value : o . value } } ) } , _getAsyncConfig : function ( ) { var config = this . _getBaseConfig ( ) ; return BI . extend ( config , this . _getSearchConfig ( ) ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , this . combo . setValue ( v ) } , getValue : function ( ) { return this . combo . getValue ( ) } , populate : function ( items ) { this . combo . populate ( items ) } } ) , BI . MultiLayerSelectTreeCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiLayerSelectTreeCombo . EVENT _BLUR = "EVENT_BLUR" , BI . MultiLayerSelectTreeCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiLayerSelectTreeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiLayerSelectTreeCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multilayer_select_tree_combo" , BI . MultiLayerSelectTreeCombo ) , BI . MultiLayerSelectTreeInsertSearchPane = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-multilayer-select-tree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] , value : "" } } , render : function ( ) { var self = this , o = this . options ; return this . tree = BI . createWidget ( { type : "bi.multilayer_select_level_tree" , isDefaultInit : o . isDefaultInit , items : o . items , itemsCreator : o . itemsCreator === BI . emptyFn ? BI . emptyFn : function ( op , callback ) { o . itemsCreator ( op , function ( res ) { callback ( res ) , self . setKeyword ( o . keywordGetter ( ) ) } ) } , keywordGetter : o . keywordGetter , value : o . value , scrollable : null , listeners : [ { eventName : BI . Controller . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } , { eventName : BI . MultiLayerSelectLevelTree . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeInsertSearchPane . EVENT _CHANGE ) } } ] } ) , { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , vgap : 5 , items : [ { type : "bi.text_button" , invisible : ! 0 , text : BI . i18nText ( "BI-Basic_Click_To_Add_Text" , "" ) , height : 24 , cls : "bi-high-light" , hgap : 5 , ref : function ( _ref ) { self . addNotMatchTip = _ref } , handler : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeInsertSearchPane . EVENT _ADD _ITEM , o . keywordGetter ( ) ) } } , this . tree ] } } , setKeyword : function ( keyword ) { var showTip = BI . isEmptyArray ( this . tree . getAllLeaves ( ) ) ; this . addNotMatchTip . setVisible ( showTip ) , showTip && this . addNotMatchTip . setText ( BI . i18nText ( "BI-Basic_Click_To_Add_Text" , keyword ) ) } , getValue : function ( ) { return this . tree . getVa
return BI . extend ( BI . MultiLayerSingleTreePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-singletree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] , onLoaded : BI . emptyFn , minHeight : 240 } ) } , _init : function ( ) { BI . MultiLayerSingleTreePopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . tree = BI . createWidget ( { type : "bi.multilayer_single_level_tree" , isDefaultInit : o . isDefaultInit , items : o . items , itemsCreator : o . itemsCreator , keywordGetter : o . keywordGetter , value : o . value , scrollable : null , onLoaded : function ( ) { self . tree . check ( ) , o . onLoaded ( ) } } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , element : this , vgap : 5 , items : [ this . tree ] } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . tree . on ( BI . MultiLayerSingleLevelTree . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiLayerSingleTreePopup . EVENT _CHANGE ) } ) , this . tree . css ( "min-height" , o . minHeight - 10 ) } , getValue : function ( ) { return this . tree . getValue ( ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , this . tree . setValue ( v ) } , populate : function ( items ) { this . tree . populate ( items ) } } ) , BI . MultiLayerSingleTreePopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_single_tree_popup" , BI . MultiLayerSingleTreePopup ) , BI . MultiLayerSingleTreeTrigger = BI . inherit ( BI . Trigger , { props : function ( ) { return { extraCls : "bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius" , height : 24 , valueFormatter : function ( v ) { return v } , itemsCreator : BI . emptyFn , watermark : BI . i18nText ( "BI-Basic_Search" ) , allowSearchValue : ! 1 , title : BI . bind ( this . _getShowText , this ) } } , render : function ( ) { var self = this , o = this . options ; o . itemsCreator === BI . emptyFn && this . _initData ( ) ; var content = { type : "bi.htape" , items : [ { el : { type : "bi.searcher" , ref : function ( ) { self . searcher = this } , masker : BI . isNotNull ( o . container ) ? { offset : { } , container : o . container } : { offset : { } } , isAutoSearch : ! 1 , el : { type : "bi.state_editor" , ref : function ( ) { self . editor = this } , defaultText : o . text , text : this . _digest ( o . value ) , value : o . value , height : o . height , tipText : "" , watermark : o . watermark , listeners : [ { eventName : BI . StateEditor . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _FOCUS ) } } , { eventName : BI . StateEditor . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _BLUR ) } } , { eventName : BI . StateEditor . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _SEARCHING ) } } ] } , popup : { type : o . allowInsertValue ? "bi.multilayer_single_tree_insert_search_pane" : "bi.multilayer_single_tree_popup" , itemsCreator : o . itemsCreator === BI . emptyFn ? BI . emptyFn : function ( op , callback ) { op . keyword = self . editor . getValue ( ) , o . itemsCreator ( op , callback ) } , keywordGetter : function ( ) { return self . editor . getValue ( ) } , cls : "bi-card" , listeners : [ { eventName : BI . MultiLayerSingleTreeInsertSearchPane . EVENT _ADD _ITEM , action : function ( ) { self . options . text = self . getSearcher ( ) . getKeyword ( ) , self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _ADD _ITEM ) } } ] , ref : function ( _ref ) { self . popup = _ref } } , onSearch : function ( obj , callback ) { var keyword = obj . keyword ; o . itemsCreator === BI . emptyFn ? ( callback ( self . _getSearchItems ( keyword ) ) , o . allowInsertValue && self . popup . setKeyword ( keyword ) ) : callback ( ) } , listeners : [ { eventName : BI . Searcher . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _CHANGE ) } } ] } } , { el : { type : "bi.layout" , width : 24 } , width : 24 } ] } ; return o . allowEdit ? content : { type : "bi.absolute" , items : [ { el : content , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : { type : "bi.layout" } , left : 0 , right : 24 , top : 0 , bottom : 0 } ] } } , _initData : function ( ) { var o = this . options ; this . tree = new BI . Tree , this . nodes = BI . Tree . treeFormat ( BI . deepClone ( o . items ) ) , this . tree . initTree ( this . nodes ) } , _getSearchItems : function ( keyword ) { var self = this , o = this . options , items = [ ] ; return this . tree . traverse ( function ( node ) { var find = BI . Func . getSearchResult ( self . tree . isRoot ( node ) ? [ ] : BI . concat ( [ node . text ] , o . allowSearchValue ? [ node . value ] : [ ] ) , keyword ) ; if ( find . find . length > 0 || find . match . length > 0 ) return items . push ( node ) , ! 0 } ) , this . _fillTreeStructure4Search ( items , "id" ) } , _createJson : function ( node , open ) { return { i
BI . remove ( self . storeValue . assist , self . _startValue ) ) ) , self . trigger . getSearcher ( ) . setState ( self . storeValue ) , self . numberCounter . setButtonChecked ( self . storeValue ) } ; this . storeValue = { type : BI . Selection . Multi , value : o . value || [ ] } , this . requesting = ! 1 , this . trigger = BI . createWidget ( { type : "bi.multi_select_trigger" , height : o . height , text : o . text , masker : { offset : { left : 0 , top : 0 , right : 0 , bottom : 25 } } , valueFormatter : o . valueFormatter , itemsCreator : BI . bind ( this . _itemsCreator4Trigger , this ) , value : { type : BI . Selection . Multi , value : o . value } } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { self . _setStartValue ( "" ) , this . getSearcher ( ) . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { self . _setStartValue ( "" ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( keywords ) { var last = BI . last ( keywords ) ; keywords = BI . initial ( keywords || [ ] ) , keywords . length > 0 && self . _joinKeywords ( keywords , function ( ) { BI . isEndWithBlank ( last ) ? ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) , self . combo . populate ( ) , self . _setStartValue ( "" ) ) : ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( value , obj ) { obj instanceof BI . MultiSelectBar ? self . _joinAll ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) : self . _join ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CLICK _ITEM ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { self . numberCounter . updateSelectedValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , container : o . container , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_select_no_bar_popup_view" , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) , self . numberCounter . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiSelectPopupView . EVENT _CHANGE , action : function ( ) { self . storeValue = this . getValue ( ) , self . _adjust ( function ( ) { assertShowValue ( ) } ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM , action : function ( ) { self . _defaultState ( ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CLEAR , action : function ( ) { self . setValue ( ) , self . _defaultState ( ) } } ] , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . combo . adjustWidth ( ) , self . combo . adjustHeight ( ) , self . numberCounter . adjustView ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , value : { type : BI . Selection . Multi , value : o . value } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length && 0 === self . numberCounter . element . find ( e . target ) . length } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { self . _populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { self . _stopEditing ( ) , self . requesting === ! 0 ? self . wants2Quit = ! 0 : self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CONFIRM ) } ) ; var triggerBtn = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . height , height : o . height , cls : "multi-select-trigger-icon-button" } ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . numberCounter . hideView ( ) , self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , this . numberCounter = BI . createWidget ( { type : "bi.multi_select_check_selected_switcher" , masker : { offset : { left : 0 , top : 0 , right : 0 , bottom : 25 } } , valueFormatter : o . valueFormatter , itemsCreator : BI . bind ( this . _itemsCreator4Trigger , this ) , value : { type : BI . Selection . Multi , value : o . value } } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwit
baseCls : "bi-multi-select-loader" , logic : { dynamic : ! 0 } , el : { height : 400 } , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectLoader . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options , hasNext = ! 1 ; this . storeValue = opts . value || { } , this . _assertValue ( this . storeValue ) , this . button _group = BI . createWidget ( { type : "bi.select_list" , logic : opts . logic , toolbar : { type : "bi.multi_select_bar" , cls : "bi-list-item-active" , iconWrapperWidth : 36 } , el : BI . extend ( { onLoaded : opts . onLoaded , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } } , opts . el ) , itemsCreator : function ( op , callback ) { var startValue = self . _startValue ; self . storeValue && ( op = BI . extend ( op || { } , { selectedValues : BI . isKey ( startValue ) && self . storeValue . type === BI . Selection . Multi ? self . storeValue . value . concat ( startValue ) : self . storeValue . value } ) ) , opts . itemsCreator ( op , function ( ob ) { hasNext = ob . hasNext ; var firstItems = [ ] ; if ( 1 === op . times && self . storeValue ) { var json = BI . map ( self . storeValue . value , function ( i , v ) { var txt = opts . valueFormatter ( v ) || v ; return { text : txt , value : v , title : txt , selected : self . storeValue . type === BI . Selection . Multi } } ) ; if ( BI . isKey ( self . _startValue ) && ! BI . contains ( self . storeValue . value , self . _startValue ) ) { var txt = opts . valueFormatter ( startValue ) || startValue ; json . unshift ( { text : txt , value : startValue , title : txt , selected : ! 0 } ) } firstItems = self . _createItems ( json ) } callback ( firstItems . concat ( self . _createItems ( ob . items ) ) , ob . keyword || "" ) , 1 === op . times && self . storeValue && ( BI . isKey ( startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , startValue ) : BI . pushDistinct ( self . storeValue . value , startValue ) ) , self . setValue ( self . storeValue ) ) , 1 === op . times && self . _scrollToTop ( ) } ) } , hasNext : function ( ) { return hasNext } , value : this . storeValue } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Top ) , BI . extend ( { scrolly : ! 0 , vgap : 5 } , opts . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Top , this . button _group ) } ) ) ) ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . SelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( items ) { return BI . createItems ( items , { type : "bi.multi_select_item" , logic : this . options . logic , cls : "bi-list-item-active" , height : 24 , selected : this . isAllSelected ( ) , iconWrapperWidth : 36 } ) } , _scrollToTop : function ( ) { var self = this ; BI . delay ( function ( ) { self . button _group . element . scrollTop ( 0 ) } , 30 ) } , isAllSelected : function ( ) { return this . button _group . isAllSelected ( ) } , _assertValue : function ( val ) { val || ( val = { } ) , val . type || ( val . type = BI . Selection . Multi ) , val . value || ( val . value = [ ] ) } , setStartValue : function ( v ) { this . _startValue = v } , setValue : function ( v ) { this . storeValue = v || { } , this . _assertValue ( this . storeValue ) , this . button _group . setValue ( this . storeValue ) } , getValue : function ( ) { return this . button _group . getValue ( ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { arguments [ 0 ] = this . _createItems ( items ) , this . button _group . populate . apply ( this . button _group , arguments ) } , resetHeight : function ( h ) { this . button _group . resetHeight ( h - 10 ) } , resetWidth : function ( w ) { this . button _group . resetWidth ( w ) } } ) , BI . MultiSelectLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_loader" , BI . MultiSelectLoader ) , BI . MultiSelectNoBarLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectNoBarLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-loader" , logic : { dynamic : ! 0 } , el : { height : 400 } , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectNoBarLoader . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options , hasNext = ! 1 ; this . storeValue = opts . value || { } , this . _assertValue ( this . storeValue ) , this . button _group = BI . createWidget ( BI . extend ( { type : " bi
} , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( items ) { this . searcher . populate . apply ( this . searcher , arguments ) } } ) , BI . MultiSelectSearcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . MultiSelectSearcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiSelectSearcher . EVENT _START = "EVENT_START" , BI . MultiSelectSearcher . EVENT _STOP = "EVENT_STOP" , BI . MultiSelectSearcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . MultiSelectSearcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiSelectSearcher . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiSelectSearcher . EVENT _BLUR = "EVENT_BLUR" , BI . shortcut ( "bi.multi_select_searcher" , BI . MultiSelectSearcher ) , BI . MultiSelectCheckSelectedSwitcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCheckSelectedSwitcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-check-selected-switcher" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , el : { } , popup : { } , adapter : null , masker : { } } ) } , _init : function ( ) { BI . MultiSelectCheckSelectedSwitcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . button = BI . createWidget ( o . el , { type : "bi.multi_select_check_selected_button" , itemsCreator : o . itemsCreator , value : o . value } ) , this . button . on ( BI . Events . VIEW , function ( ) { self . fireEvent ( BI . Events . VIEW , arguments ) } ) , this . switcher = BI . createWidget ( { type : "bi.switcher" , toggle : ! 1 , element : this , el : this . button , popup : BI . extend ( { type : "bi.multi_select_check_pane" , valueFormatter : o . valueFormatter , itemsCreator : o . itemsCreator , onClickContinueSelect : function ( ) { self . switcher . hideView ( ) } , ref : function ( _ref ) { self . checkPane = _ref } , value : o . value } , o . popup ) , adapter : o . adapter , masker : o . masker } ) , this . switcher . on ( BI . Switcher . EVENT _TRIGGER _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE ) } ) , this . switcher . on ( BI . Switcher . EVENT _BEFORE _POPUPVIEW , function ( ) { self . fireEvent ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW ) } ) , this . switcher . on ( BI . Switcher . EVENT _AFTER _POPUPVIEW , function ( ) { var me = this ; BI . nextTick ( function ( ) { me . populate ( ) } ) } ) } , adjustView : function ( ) { this . switcher . adjustView ( ) } , hideView : function ( ) { this . switcher . empty ( ) , this . switcher . hideView ( ) } , setAdapter : function ( adapter ) { this . switcher . setAdapter ( adapter ) } , setValue : function ( v ) { this . switcher . setValue ( v ) } , updateSelectedValue : function ( v ) { this . checkPane . setValue ( v ) } , setButtonChecked : function ( v ) { this . button . setValue ( v ) } , getValue : function ( ) { } , populate : function ( items ) { this . switcher . populate . apply ( this . switcher , arguments ) } , populateSwitcher : function ( ) { this . button . populate . apply ( this . button , arguments ) } } ) , BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE = "EVENT_TRIGGER_CHANGE" , BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multi_select_check_selected_switcher" , BI . MultiSelectCheckSelectedSwitcher ) , BI . MultiSelectInsertList = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-insert-list" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectInsertList . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . storeValue = o . value || { } ; var assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , self . _startValue ) : BI . pushDistinct ( self . storeValue . value , self . _startValue ) ) } ; this . adapter = BI . createWidget ( { type : "bi.multi_select_loader" , cls : "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom" , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , logic : { dynamic : ! 0 } , el : { } , value : o . value } ) , this . adapter . on ( BI . MultiSelectLoader . EVENT _CHANGE , function ( ) { self . storeValue = this . getValue ( ) , assertShowValue ( ) , self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) , this . searcherPane = BI . createWidget ( { type : "bi.multi_select_search_insert_pane" , cls : "bi-border-left bi-border-right bi-border-bottom" , valueFormatter : o . valueFormatter , keywordGetter : function ( ) { return self . trigger . getKeyword ( ) } , itemsCreat
self . fireEvent ( BI . MultiTreeCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiTreeCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { self . storeValue = { value : self . combo . getValue ( ) } , this . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { self . storeValue = { value : this . getValue ( ) } , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { isPopupView ( ) && self . combo . populate ( ) } ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( ) { self . fireEvent ( BI . MultiTreeCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _TRIGGER _CLICK , function ( ) { self . combo . toggle ( ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( ) { var checked = this . getSearcher ( ) . hasChecked ( ) , val = { type : BI . Selection . Multi , value : checked ? { 1 : 1 } : { } } ; this . getSearcher ( ) . setState ( checked ? BI . Selection . Multi : BI . Selection . None ) , self . numberCounter . setButtonChecked ( val ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CLICK _ITEM , self . combo . getValue ( ) ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { isSearching ( ) || ( change === ! 0 && ( self . storeValue = { value : self . combo . getValue ( ) } , change = ! 1 ) , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , self . populate ( ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _BEFORE _POPUPVIEW ) ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _HIDEVIEW , function ( ) { isSearching ( ) ? ( self . _stopEditing ( ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CONFIRM ) ) : isPopupView ( ) && ( self . _stopEditing ( ) , self . storeValue = { value : self . combo . getValue ( ) } , clear === ! 0 && ( self . storeValue = { value : { } } ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CONFIRM ) ) , clear = ! 1 , change = ! 1 } ) ; var triggerBtn = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . height , height : o . height , cls : "multi-select-trigger-icon-button" } ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . numberCounter . hideView ( ) , self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , this . numberCounter = BI . createWidget ( { type : "bi.multi_select_check_selected_switcher" , el : { type : "bi.multi_tree_check_selected_button" } , popup : { type : "bi.multi_tree_check_pane" } , masker : { offset : this . constants . offset } , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , value : { value : o . value || { } } } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW , function ( ) { want2showCounter === ! 1 && ( want2showCounter = ! 0 ) , isInit === ! 0 && ( want2showCounter = null , showCounter ( ) ) } ) , this . numberCounter . on ( BI . Events . VIEW , function ( b ) { BI . nextTick ( function ( ) { self . trigger . refreshPlaceHolderWidth ( b === ! 0 ? self . numberCounter . element . outerWidth ( ) + 8 : 0 ) } ) } ) , this . trigger . element . click ( function ( e ) { self . trigger . element . find ( e . target ) . length > 0 && self . numberCounter . hideView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : triggerBtn , right : 0 , top : 0 , bottom : 0 } , { el : { type : "bi.vertical_adapt" , items : [ this . numberCounter ] } , right : o . height , top : 0 , height : o . height } ] } ) } , _stopEditing : function ( ) { this . trigger . stopEditing ( ) , this . numberCounter . hideView ( ) } , _defaultState : function ( ) { this . _stopEditing ( ) , this . combo . hideView ( ) } , setValue : function ( v ) { this . storeValue . value = v || { } , this . combo . setValue ( { value : v || { } } ) , this . numberCounter . setValue ( { value : v || { } } ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue . value ) } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . MultiTreeCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiTreeCombo . EVENT _BLUR = "EVENT_BLUR" , BI . MultiTreeCombo . EVENT _STOP = "EVENT_STOP" , BI . MultiTreeCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiTreeCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . MultiTreeCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . Multi
BI . MultiTreeSearcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . shortcut ( "bi.multi_tree_searcher" , BI . MultiTreeSearcher ) , BI . NumberEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . NumberEditor . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-number-editor bi-border bi-focus-shadow" , validationChecker : function ( ) { return ! 0 } , valueFormatter : function ( v ) { return v } , value : 0 , allowBlank : ! 1 , errorText : "" , step : 1 } ) } , _init : function ( ) { BI . NumberEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : o . height - 2 , allowBlank : o . allowBlank , value : o . valueFormatter ( o . value ) , validationChecker : o . validationChecker , errorText : o . errorText } ) , this . editor . on ( BI . TextEditor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . TextEditor . EVENT _ERROR , function ( ) { o . value = BI . parseFloat ( this . getLastValidValue ( ) ) } ) , this . editor . on ( BI . TextEditor . EVENT _VALID , function ( ) { o . value = BI . parseFloat ( this . getValue ( ) ) } ) , this . editor . on ( BI . TextEditor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . topBtn = BI . createWidget ( { type : "bi.icon_button" , forceNotSelected : ! 0 , trigger : "lclick," , cls : "add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12" } ) , this . topBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . _finetuning ( o . step ) , self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . bottomBtn = BI . createWidget ( { type : "bi.icon_button" , trigger : "lclick," , forceNotSelected : ! 0 , cls : "minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12" } ) , this . bottomBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . _finetuning ( - o . step ) , self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , BI . createWidget ( { type : "bi.htape" , height : o . height - 2 , element : this , items : [ this . editor , { el : { type : "bi.grid" , columns : 1 , rows : 2 , items : [ { column : 0 , row : 0 , el : this . topBtn } , { column : 0 , row : 1 , el : this . bottomBtn } ] } , width : 23 } ] } ) } , focus : function ( ) { this . editor . focus ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , _finetuning : function ( add ) { var v = BI . parseFloat ( this . getValue ( ) ) ; this . setValue ( BI . add ( v , add ) ) } , setUpEnable : function ( v ) { this . topBtn . setEnable ( ! ! v ) } , setDownEnable : function ( v ) { this . bottomBtn . setEnable ( ! ! v ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , getLastChangedValue : function ( ) { return this . editor . getLastChangedValue ( ) } , getValue : function ( ) { return this . options . value } , setValue : function ( v ) { var o = this . options ; o . value = v , this . editor . setValue ( o . valueFormatter ( v ) ) } } ) , BI . NumberEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . NumberEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.number_editor" , BI . NumberEditor ) , BI . NumberInterval = BI . inherit ( BI . Single , { constants : { typeError : "typeBubble" , numberError : "numberBubble" , signalError : "signalBubble" , editorWidth : 114 , columns : 5 , width : 24 , rows : 1 , numberErrorCls : "number-error" , border : 1 , less : 0 , less _equal : 1 , numTip : "" , adjustYOffset : 2 } , _defaultConfig : function ( ) { var conf = BI . NumberInterval . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-number-interval" + ( BI . isIE ( ) && BI . getIEVersion ( ) < 10 ? " hack" : "" ) , height : 24 , validation : "valid" , closeMin : ! 0 , allowBlank : ! 0 , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) } ) } , _init : function ( ) { var self = this , c = this . constants , o = this . options ; BI . NumberInterval . superclass . _init . apply ( this , arguments ) , this . smallEditor = BI . createWidget ( { type : "bi.number_interval_single_editor" , height : o . height - 2 , watermark : o . watermark , allowBlank : o . allowBlank , value : o . min , level : "warning" , tipType : "success" , title : function ( ) { return self . smallEditor && self . smallEditor . getValue ( ) } , quitChecker : function ( ) { return ! 1 } , validationChecker : function ( v ) { return ! ! BI . isNumeric ( v ) || ( self . smallEditorBubbleType = c . typeError , ! 1 ) } , cls : "number-interval-small-editor bi-border" } ) , this . smallTip = BI . createWidget ( { type : "bi.label" , text : o . numTip , height : o . height - 2 , invisible : ! 0 } ) , BI . createWidget ( { type : "bi.absolute" , element : this . smallEditor . element , items : [ { el : this . smallTip , top : 0 , right : 5 } ] } ) , this . bigEditor = BI . createWidget ( { type : " bi . num
} , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { arguments [ 0 ] = this . _createItems ( items ) , this . button _group . populate . apply ( this . button _group , arguments ) } , resetHeight : function ( h ) { this . button _group . resetHeight ( h ) } , resetWidth : function ( w ) { this . button _group . resetWidth ( w ) } } ) , BI . SearchMultiSelectLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.search_multi_select_loader" , BI . SearchMultiSelectLoader ) , BI . SearchMultiSelectPopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SearchMultiSelectPopupView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-popup-view" , maxWidth : "auto" , minWidth : 135 , maxHeight : 400 , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . SearchMultiSelectPopupView . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . loader = BI . createWidget ( { type : "bi.search_multi_select_loader" , itemsCreator : opts . itemsCreator , valueFormatter : opts . valueFormatter , onLoaded : opts . onLoaded , value : opts . value } ) , this . popupView = BI . createWidget ( { type : "bi.multi_popup_view" , stopPropagation : ! 1 , maxWidth : opts . maxWidth , minWidth : opts . minWidth , maxHeight : opts . maxHeight , element : this , buttons : [ BI . i18nText ( "BI-Basic_Clears" ) , BI . i18nText ( "BI-Basic_Sure" ) ] , el : this . loader , value : opts . value } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CHANGE ) } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , function ( index ) { switch ( index ) { case 0 : self . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CLICK _CLEAR ) ; break ; case 1 : self . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CLICK _CONFIRM ) } } ) } , isAllSelected : function ( ) { return this . loader . isAllSelected ( ) } , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : function ( v ) { this . popupView . setValue ( v ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( items ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( h ) { this . popupView . resetHeight ( h ) } , resetWidth : function ( w ) { this . popupView . resetWidth ( w ) } } ) , BI . SearchMultiSelectPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . SearchMultiSelectPopupView . EVENT _CLICK _CONFIRM = "EVENT_CLICK_CONFIRM" , BI . SearchMultiSelectPopupView . EVENT _CLICK _CLEAR = "EVENT_CLICK_CLEAR" , BI . shortcut ( "bi.search_multi_select_popup_view" , BI . SearchMultiSelectPopupView ) , BI . SearchMultiSelectSearcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SearchMultiSelectSearcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-searcher" , itemsCreator : BI . emptyFn , el : { } , popup : { } , valueFormatter : BI . emptyFn , adapter : null , masker : { } } ) } , _init : function ( ) { BI . SearchMultiSelectSearcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( o . el , { type : "bi.multi_select_editor" , height : o . height , text : o . text , tipType : o . tipType , warningTitle : o . warningTitle } ) , this . searcher = BI . createWidget ( { type : "bi.searcher" , allowSearchBlank : ! 1 , element : this , height : o . height , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( op , callback ) { callback ( ) } , el : this . editor , popup : BI . extend ( { type : "bi.multi_select_search_pane" , valueFormatter : o . valueFormatter , keywordGetter : function ( ) { return self . editor . getValue ( ) } , itemsCreator : function ( op , callback ) { var keyword = self . editor . getValue ( ) ; op . keywords = [ keyword ] , this . setKeyword ( keyword ) , o . itemsCreator ( op , callback ) } , value : o . value } , o . popup ) , adapter : o . adapter , masker : o . masker } ) , this . searcher . on ( BI . Searcher . EVENT _START , function ( ) { self . fireEvent ( BI . SearchMultiSelectSearcher . EVENT _START ) } ) , this . searcher . on ( BI . Searcher . EVENT _PAUSE , function ( ) { this . hasMatched ( ) , self . fireEvent ( BI . SearchMultiSelectSearcher . EVENT _PAUSE ) } ) , this . searcher . on ( BI . Searcher . EVENT _STOP , function ( ) { self . fireEvent ( BI . SearchMultiSelectSearcher . EVENT _STOP ) } ) , this . searcher . on ( BI . Searcher . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SearchMultiSelectSearcher . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . Searcher . EVENT _SEARCHING , function ( ) { var keywords = this . getKeywords ( ) ; self . fireEvent ( BI . SearchMu
assertShowValue ( ) , self . populate ( ) , self . _setStartValue ( ) } } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _SEARCHING , function ( keywords ) { var last = BI . last ( keywords ) ; keywords = BI . initial ( keywords || [ ] ) , keywords . length > 0 && self . _joinKeywords ( keywords , function ( ) { BI . isEndWithBlank ( last ) ? ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) , self . combo . populate ( ) , self . _setStartValue ( ) ) : ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) ) } ) , self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _CHANGE , function ( value , obj ) { self . storeValue = this . getValue ( ) , assertShowValue ( ) , self . _defaultState ( ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , container : o . container , toggle : ! 1 , el : this . trigger , adjustLength : 1 , popup : { type : "bi.single_select_popup_view" , allowNoSelect : o . allowNoSelect , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) } , listeners : [ { eventName : BI . SingleSelectPopupView . EVENT _CHANGE , action : function ( ) { self . storeValue = this . getValue ( ) , self . _adjust ( function ( ) { assertShowValue ( ) , self . _defaultState ( ) } ) , self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CLICK _ITEM ) } } ] , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . combo . adjustWidth ( ) , self . combo . adjustHeight ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length } , value : o . value } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { self . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { self . trigger . stopEditing ( ) , self . requesting === ! 0 ? self . wants2Quit = ! 0 : self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CONFIRM ) } ) ; var triggerBtn = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . height , height : o . height , cls : "single-select-trigger-icon-button" } ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : triggerBtn , right : 0 , top : 0 , bottom : 0 } ] } ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( val ) { } , _makeMap : function ( values ) { return BI . makeObject ( values || [ ] ) } , _joinKeywords : function ( keywords , callback ) { function digest ( items ) { var selectedMap = self . _makeMap ( items ) ; BI . each ( keywords , function ( i , val ) { BI . isNotNull ( selectedMap [ val ] ) && BI . remove ( self . storeValue . value , val ) } ) , self . _adjust ( callback ) } var self = this , o = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , o . itemsCreator ( { type : BI . SingleSelectInsertCombo . REQ _GET _ALL _DATA , keywords : keywords } , function ( ob ) { var values = BI . map ( ob . items , "value" ) ; digest ( values ) } ) } , _adjust : function ( callback ) { function adjust ( ) { self . wants2Quit === ! 0 && ( self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CONFIRM ) , self . wants2Quit = ! 1 ) , self . requesting = ! 1 } var self = this , o = this . options ; adjust ( ) , callback ( ) } , _setStartValue : function ( value ) { this . _startValue = value , this . popup . setStartValue ( value ) } , setValue : function ( v ) { this . storeValue = v , this . _assertValue ( this . storeValue ) , this . combo . setValue ( this . storeValue ) } , getValue : function ( ) { return this . storeValue } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . extend ( BI . SingleSelectInsertCombo , { REQ _GET _DATA _LENGTH : 0 , REQ _GET _ALL _DATA : - 1 } ) , BI . SingleSelectInsertCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . SingleSelectInsertCombo . EVENT _BLUR = "EVENT_BLUR" , BI . SingleSelectInsertCombo . EVENT _STOP = "EVENT_STOP" , BI . SingleSelectInsertCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . SingleSelectInsertCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . SingleSelectInsertCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.single_select_insert_combo" , BI . SingleSelectInsertCombo ) , BI . SingleSelectComboItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectComboItem . superclass . _defaultConfig . apply ( this , arguments ) , { extr
} ] , height : c . EDITOR _HEIGHT } , top : 0 , left : 0 , width : "100%" } ] } } , _draggable : function ( widget ) { function optimizeSize ( s ) { return BI . clamp ( s , 0 , self . _getGrayTrackLength ( ) ) } var self = this , o = this . options , startDrag = ! 1 , size = 0 , offset = 0 , defaultSize = 0 , mouseMoveTracker = new BI . MouseMoveTracker ( function ( deltaX ) { if ( mouseMoveTracker . isDragging ( ) ) { startDrag = ! 0 , offset += deltaX , size = optimizeSize ( defaultSize + offset ) , widget . element . addClass ( "dragging" ) ; var percent = 100 * size / self . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setBlueTrack ( significantPercent ) , self . _setLabelPosition ( significantPercent ) , self . _setSliderPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . label . setValue ( v ) , self . value = v } } , function ( ) { if ( startDrag === ! 0 ) { size = optimizeSize ( size ) ; var percent = 100 * size / self . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setSliderPosition ( significantPercent ) , size = 0 , offset = 0 , defaultSize = size , startDrag = ! 1 } widget . element . removeClass ( "dragging" ) , mouseMoveTracker . releaseMouseMoves ( ) , self . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } , window ) ; widget . element . on ( "mousedown" , function ( event ) { widget . isEnabled ( ) && ( defaultSize = this . offsetLeft , optimizeSize ( defaultSize ) , mouseMoveTracker . captureMouseMoves ( event ) ) } ) } , _createTrackWrapper : function ( ) { return BI . createWidget ( { type : "bi.absolute" , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . grayTrack , top : 0 , left : 0 , width : "100%" } , { el : this . blueTrack , top : 0 , left : 0 , width : "0%" } ] } ] , hgap : 8 , height : 8 } , top : 8 , left : 0 , width : "100%" } ] } ) } , _checkValidation : function ( v ) { var o = this . options , valid = ! 1 ; if ( BI . isNumeric ( v ) && ! ( BI . isNull ( v ) || v < this . min || v > this . max ) ) if ( o . digit === ! 1 ) valid = ! 0 ; else { var dotText = ( v + "" ) . split ( "." ) [ 1 ] || "" ; valid = dotText . length === o . digit } return valid } , _setBlueTrack : function ( percent ) { this . blueTrack . element . css ( { width : percent + "%" } ) } , _setLabelPosition : function ( percent ) { } , _setSliderPosition : function ( percent ) { this . slider . element . css ( { left : percent + "%" } ) } , _setAllPosition : function ( percent ) { this . _setSliderPosition ( percent ) , this . _setLabelPosition ( percent ) , this . _setBlueTrack ( percent ) } , _setVisible : function ( visible ) { this . slider . setVisible ( visible ) , this . label . setVisible ( visible ) } , _getGrayTrackLength : function ( ) { return this . grayTrack . element [ 0 ] . scrollWidth } , _getValueByPercent : function ( percent ) { var thousandth = BI . parseInt ( 10 * percent ) ; return ( this . max - this . min ) * thousandth / 1e3 + this . min } , _getPercentByValue : function ( v ) { return 100 * ( v - this . min ) / ( this . max - this . min ) } , getValue : function ( ) { return this . value } , setValue : function ( v ) { var o = this . options ; v = BI . parseFloat ( v ) , v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , isNaN ( v ) || ( this . _checkValidation ( v ) && ( this . value = v ) , v > this . max && ( this . value = this . max ) , v < this . min && ( this . value = this . min ) ) } , _setEnable : function ( b ) { BI . SingleSlider . superclass . _setEnable . apply ( this , [ b ] ) , b ? this . blueTrack . element . removeClass ( "disabled-blue-track" ) . addClass ( "blue-track" ) : this . blueTrack . element . removeClass ( "blue-track" ) . addClass ( "disabled-blue-track" ) } , setMinAndMax : function ( v ) { var minNumber = BI . parseFloat ( v . min ) , maxNumber = BI . parseFloat ( v . max ) ; ! isNaN ( minNumber ) && ! isNaN ( maxNumber ) && maxNumber > minNumber && ( this . min = minNumber , this . max = maxNumber ) } , reset : function ( ) { this . _setVisible ( ! 1 ) , this . enable = ! 1 , this . value = "" , this . min = 0 , this . max = 0 , this . _setBlueTrack ( 0 ) } , populate : function ( ) { isNaN ( this . min ) || isNaN ( this . max ) || ( this . _setVisible ( ! 0 ) , this . enable = ! 0 , this . label . setErrorText ( BI . i18nText ( "BI-Basic_Please_Enter_Number_Between" , this . min , this . max ) ) , BI . isNumeric ( this . value ) || BI . isNotEmptyString ( this . value ) ? ( this . label . setValue ( this . value ) , this . _setAllPosition ( this . _getPercentByValue ( this . value ) ) ) : ( this . label . setValue ( this . max ) , this . _setAllPosition ( 100 ) ) ) } } ) , BI . SingleSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_slider" , BI . SingleSlider ) , BI . SingleSliderLabel = BI . inherit ( BI . Single , { _constant : { EDITOR _WIDTH : 90 , EDITOR _HEIGHT : 20 , HEIGHT : 20 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 , TRACK _GAP _HALF : 7 , TRACK _GAP : 14 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSliderLabel . superclass . _d
BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , self , { offsetStyle : "center" } ) , self . fireEvent ( BI . DateInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) ) } ) , combo . on ( BI . DynamicDateCombo . EVENT _CONFIRM , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . DateInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . DateInterval . EVENT _CHANGE ) ) } ) , combo } , _dateCheck : function ( date ) { return BI . print ( BI . parseDateTime ( date , "%Y-%x-%d" ) , "%Y-%x-%d" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%d" ) , "%Y-%X-%d" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%x-%e" ) , "%Y-%x-%e" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%e" ) , "%Y-%X-%e" ) === date } , _checkVoid : function ( obj ) { var o = this . options ; return ! BI . checkDateVoid ( obj . year , obj . month , obj . day , o . minDate , o . maxDate ) [ 0 ] } , _check : function ( smallDate , bigDate ) { var smallObj = smallDate . match ( /\d+/g ) , bigObj = bigDate . match ( /\d+/g ) ; return this . _dateCheck ( smallDate ) && BI . checkDateLegal ( smallDate ) && this . _checkVoid ( { year : smallObj [ 0 ] , month : smallObj [ 1 ] , day : smallObj [ 2 ] } ) && this . _dateCheck ( bigDate ) && BI . checkDateLegal ( bigDate ) && this . _checkVoid ( { year : bigObj [ 0 ] , month : bigObj [ 1 ] , day : bigObj [ 2 ] } ) } , _compare : function ( smallDate , bigDate ) { return smallDate = BI . print ( BI . parseDateTime ( smallDate , "%Y-%X-%d" ) , "%Y-%X-%d" ) , bigDate = BI . print ( BI . parseDateTime ( bigDate , "%Y-%X-%d" ) , "%Y-%X-%d" ) , BI . isNotNull ( smallDate ) && BI . isNotNull ( bigDate ) && smallDate > bigDate } , _setTitle : function ( v ) { this . left . setTitle ( v ) , this . right . setTitle ( v ) , this . label . setTitle ( v ) } , _clearTitle : function ( ) { this . left . setTitle ( "" ) , this . right . setTitle ( "" ) , this . label . setTitle ( "" ) } , setValue : function ( date ) { date = date || { } , this . left . setValue ( date . start ) , this . right . setValue ( date . end ) } , getValue : function ( ) { return { start : this . left . getValue ( ) , end : this . right . getValue ( ) } } } ) , BI . DateInterval . EVENT _VALID = "EVENT_VALID" , BI . DateInterval . EVENT _ERROR = "EVENT_ERROR" , BI . DateInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.date_interval" , BI . DateInterval ) , BI . TimeInterval = BI . inherit ( BI . Single , { constants : { height : 24 , width : 24 , lgap : 15 , offset : 0 , timeErrorCls : "time-error" } , _defaultConfig : function ( ) { var conf = BI . TimeInterval . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-time-interval" , minDate : "1900-01-01" , maxDate : "2099-12-31" } ) } , _init : function ( ) { var self = this , o = this . options ; BI . TimeInterval . superclass . _init . apply ( this , arguments ) , o . value = o . value || { } , this . left = this . _createCombo ( o . value . start ) , this . right = this . _createCombo ( o . value . end ) , this . label = BI . createWidget ( { type : "bi.label" , height : this . constants . height , width : this . constants . width , text : "-" } ) , BI . createWidget ( { element : self , type : "bi.center" , height : this . constants . height , items : [ { type : "bi.absolute" , items : [ { el : self . left , left : this . constants . offset , right : this . constants . width / 2 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : self . right , left : this . constants . width / 2 , right : this . constants . offset , top : 0 , bottom : 0 } ] } ] } ) , BI . createWidget ( { type : "bi.horizontal_auto" , element : this , items : [ self . label ] } ) } , _createCombo : function ( v ) { var self = this , o = this . options , combo = BI . createWidget ( { type : "bi.dynamic_date_time_combo" , behaviors : o . behaviors , value : v } ) ; return combo . on ( BI . DynamicDateTimeCombo . EVENT _ERROR , function ( ) { self . _clearTitle ( ) , BI . Bubbles . hide ( "error" ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . TimeInterval . EVENT _ERROR ) } ) , combo . on ( BI . DynamicDateTimeCombo . EVENT _VALID , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . left . isValid ( ) && self . right . isValid ( ) && self . _check ( small
BI . DynamicYearMonthCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.dynamic_year_month_combo" , BI . DynamicYearMonthCombo ) , BI . extend ( BI . DynamicYearMonthCombo , { Static : 1 , Dynamic : 2 } ) , BI . DynamicYearMonthPopup = BI . inherit ( BI . Widget , { constants : { tabHeight : 30 , buttonHeight : 24 } , props : { baseCls : "bi-year-month-popup" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , width : 180 , height : 240 } , render : function ( ) { var self = this , opts = this . options , c = this . constants ; return this . storeValue = { type : BI . DynamicYearMonthCombo . Static } , { type : "bi.vtape" , items : [ { el : this . _getTabJson ( ) } , { el : { type : "bi.grid" , items : [ [ { type : "bi.text_button" , cls : "bi-split-top bi-high-light" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Clear" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . BUTTON _CLEAR _EVENT _CHANGE ) } } ] } , { type : "bi.text_button" , cls : "bi-split-left bi-split-right bi-high-light bi-split-top" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Current_Month" ) , ref : function ( ) { self . textButton = this } , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . BUTTON _lABEL _EVENT _CHANGE ) } } ] } , { type : "bi.text_button" , cls : "bi-split-top bi-high-light" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_OK" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . BUTTON _OK _EVENT _CHANGE ) } } ] } ] ] } , height : 24 } ] } } , _setInnerValue : function ( ) { if ( this . dateTab . getSelect ( ) === BI . DynamicDateCombo . Static ) this . textButton . setValue ( BI . i18nText ( "BI-Basic_Current_Month" ) ) , this . textButton . setEnable ( ! 0 ) ; else { var date = BI . DynamicDateHelper . getCalculation ( this . dynamicPane . getValue ( ) ) ; date = BI . print ( date , "%Y-%x" ) , this . textButton . setValue ( date ) , this . textButton . setEnable ( ! 1 ) } } , _getTabJson : function ( ) { var self = this , o = this . options ; return { type : "bi.tab" , ref : function ( ) { self . dateTab = this } , tab : { type : "bi.linear_segment" , cls : "bi-split-bottom" , height : this . constants . tabHeight , items : BI . createItems ( [ { text : BI . i18nText ( "BI-Basic_Year_Month" ) , value : BI . DynamicYearCombo . Static } , { text : BI . i18nText ( "BI-Basic_Dynamic_Title" ) , value : BI . DynamicYearCombo . Dynamic } ] , { textAlign : "center" } ) } , cardCreator : function ( v ) { switch ( v ) { case BI . DynamicYearCombo . Dynamic : return { type : "bi.dynamic_year_month_card" , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { self . _setInnerValue ( self . year , v ) } } ] , ref : function ( ) { self . dynamicPane = this } } ; case BI . DynamicYearCombo . Static : default : return { type : "bi.static_year_month_card" , behaviors : o . behaviors , min : self . options . min , max : self . options . max , listeners : [ { eventName : BI . StaticYearMonthCard . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . EVENT _CHANGE ) } } ] , ref : function ( ) { self . year = this } } } } , listeners : [ { eventName : BI . Tab . EVENT _CHANGE , action : function ( ) { var v = self . dateTab . getSelect ( ) ; switch ( v ) { case BI . DynamicYearCombo . Static : var date = BI . DynamicDateHelper . getCalculation ( self . dynamicPane . getValue ( ) ) ; self . year . setValue ( { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 } ) , self . _setInnerValue ( ) ; break ; case BI . DynamicYearCombo . Dynamic : default : self . storeValue && self . storeValue . type === BI . DynamicYearCombo . Dynamic ? self . dynamicPane . setValue ( self . storeValue . value ) : self . dynamicPane . setValue ( { year : 0 } ) , self . _setInnerValue ( ) } } } ] } } , setMinDate : function ( minDate ) { this . options . min !== minDate && ( this . options . min = minDate , this . year . setMinDate ( minDate ) ) } , setMaxDate : function ( maxDate ) { this . options . max !== maxDate && ( this . options . max = maxDate , this . year . setMaxDate ( maxDate ) ) } , setValue : function ( v ) { this . storeValue = v ; var self = this , type , value ; switch ( v = v || { } , type = v . type || BI . DynamicDateCombo . Static , value = v . value || v , this . dateTab . setSelect ( type ) , type ) { case BI . DynamicDateCombo . Dynamic : this . dynamicPane . setValue ( value ) , self . _setInnerValue ( ) ; break ; case BI . DynamicDateCombo . Static : default : this . year . setValue ( value ) , this . textButton . setValue ( BI . i18nText ( "BI-Basic_Current_Month" ) ) , this . textButton . setEnable ( ! 0 ) } } , getValue : function ( ) { return { type : this . dateTab . getSelect ( ) , value : this . dateTab . getValue ( ) } } } ) , BI . DynamicYearMonthPopup . BUTTON _CLEAR _EVENT _CHANGE
items : resultItems } ) : options . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void callback ( { count : resultItems . length } ) : void callback ( { items : resultItems , hasNext : ! 1 } ) } var self = this , o = this . options ; o . cache && this . items ? call ( this . items ) : o . itemsCreator ( { } , function ( items ) { self . items = items , call ( items ) } ) } } ) , BI . AllValueChooserCombo = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . AllValueChooserCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-all-value-chooser-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , text : o . text , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , value : { type : BI . Selection . Multi , value : o . value || [ ] } } ) , this . combo . on ( BI . MultiSelectCombo . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . AllValueChooserCombo . EVENT _CONFIRM ) } ) } , setValue : function ( v ) { this . combo . setValue ( { type : BI . Selection . Multi , value : v || [ ] } ) } , getValue : function ( ) { var val = this . combo . getValue ( ) || { } ; return val . type === BI . Selection . All ? val . assist : val . value || [ ] } , populate : function ( items ) { this . items = items , this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . AllValueChooserCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.all_value_chooser_combo" , BI . AllValueChooserCombo ) , BI . AllValueChooserPane = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . AllValueChooserPane . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-all-value-chooser-pane" , width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserPane . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . list = BI . createWidget ( { type : "bi.multi_select_list" , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height } ) , this . list . on ( BI . MultiSelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . AllValueChooserPane . EVENT _CHANGE ) } ) } , setValue : function ( v ) { this . list . setValue ( { type : BI . Selection . Multi , value : v || [ ] } ) } , getValue : function ( ) { var val = this . list . getValue ( ) || { } ; return val . type === BI . Selection . All ? val . assist : val . value || [ ] } , populate : function ( items ) { this . items = items , this . list . populate . apply ( this . list , arguments ) } } ) , BI . AllValueChooserPane . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.all_value_chooser_pane" , BI . AllValueChooserPane ) , BI . AllValueMultiTextValueCombo = BI . inherit ( BI . Widget , { props : { baseCls : "bi-all-value-multi-text-value-combo" , width : 200 , height : 24 , items : [ ] } , render : function ( ) { var self = this , o = this . options , value = this . _digestValue ( o . value ) ; return { type : "bi.search_multi_text_value_combo" , text : o . text , height : o . height , items : o . items , value : value , numOfPage : 100 , valueFormatter : o . valueFormatter , warningTitle : o . warningTitle , listeners : [ { eventName : BI . SearchMultiTextValueCombo . EVENT _CONFIRM , action : function ( ) { self . fireEvent ( BI . AllValueMultiTextValueCombo . EVENT _CONFIRM ) } } ] , ref : function ( ) { self . combo = this } } } , setValue : function ( v ) { var value = this . _digestValue ( v ) ; this . combo . setValue ( value ) } , getValue : function ( ) { var obj = this . combo . getValue ( ) || { } ; if ( obj . value = obj . value || [ ] , obj . type === BI . Selection . All ) { var values = [ ] ; return BI . each ( this . options . items , function ( idx , item ) { ! BI . contains ( obj . value , item . value ) && values . push ( item . value ) } ) , values } return obj . value || [ ] } , populate : function ( items ) { this . options . items = items , this . combo . populate . apply ( this . combo , arguments ) } , _digestValue : function ( v ) { return { type : BI . Selection . Multi , value : v || [ ] } } } ) , BI . AllValueMultiTextValueCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.all_value_multi_text_value_combo" , BI . AllValueMultiTextValueCombo ) , BI . AbstractTreeValueChooser = BI . inherit ( BI . Widget , { _const : { perPage : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . AbstractTreeValueChooser . superclass . _defaultConfig . apply ( this , arguments ) , { items : null , it
for ( var res = [ ] , i = ( times - 1 ) * this . _const . perPage ; items [ i ] && i < times * this . _const . perPage ; i ++ ) res . push ( items [ i ] ) ; return res } , _hasNextByTimes : function ( items , times ) { return times * this . _const . perPage < items . length } , _itemsCreator : function ( options , callback ) { function call ( items ) { var keywords = ( options . keywords || [ ] ) . slice ( ) , resultItems = items ; if ( BI . isNotEmptyArray ( keywords ) && ( resultItems = [ ] , BI . each ( keywords , function ( i , kw ) { var search = BI . Func . getSearchResult ( items , kw ) ; resultItems = resultItems . concat ( search . match ) . concat ( search . find ) } ) , resultItems = BI . uniq ( resultItems ) ) , options . selectedValues ) { var filter = BI . makeObject ( options . selectedValues , ! 0 ) ; resultItems = BI . filter ( resultItems , function ( i , ob ) { return ! filter [ ob . value ] } ) } return options . type === BI . MultiSelectCombo . REQ _GET _ALL _DATA ? void callback ( { items : resultItems } ) : options . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void callback ( { count : resultItems . length } ) : void callback ( { items : self . _getItemsByTimes ( resultItems , options . times ) , hasNext : self . _hasNextByTimes ( resultItems , options . times ) } ) } var self = this , o = this . options ; o . cache && this . items ? call ( this . items ) : o . itemsCreator ( { } , function ( items ) { self . items = items , call ( items ) } ) } } ) , BI . ValueChooserInsertCombo = BI . inherit ( BI . AbstractValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . ValueChooserInsertCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-value-chooser-insert-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . ValueChooserInsertCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_insert_combo" , element : this , allowEdit : o . allowEdit , text : o . text , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , listeners : [ { eventName : BI . MultiSelectCombo . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiSelectCombo . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _BLUR ) } } , { eventName : BI . MultiSelectCombo . EVENT _STOP , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _STOP ) } } , { eventName : BI . MultiSelectCombo . EVENT _CLICK _ITEM , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiSelectCombo . EVENT _SEARCHING , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _SEARCHING ) } } , { eventName : BI . MultiSelectCombo . EVENT _CONFIRM , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _CONFIRM ) } } ] } ) } , setValue : function ( v ) { this . combo . setValue ( v ) } , getValue : function ( ) { var val = this . combo . getValue ( ) || { } ; return { type : val . type , value : val . value } } , populate : function ( items ) { this . items = items , this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . ValueChooserInsertCombo . EVENT _BLUR = "EVENT_BLUR" , BI . ValueChooserInsertCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . ValueChooserInsertCombo . EVENT _STOP = "EVENT_STOP" , BI . ValueChooserInsertCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . ValueChooserInsertCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . ValueChooserInsertCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.value_chooser_insert_combo" , BI . ValueChooserInsertCombo ) , BI . ValueChooserCombo = BI . inherit ( BI . AbstractValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . ValueChooserCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-value-chooser-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . ValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , element : this , allowEdit : o . allowEdit , text : o . text , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , listeners : [ { eventName : BI . MultiSelectCombo . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiSelectCombo . EVENT _BLUR , action : function ( ) { self . fireEve
! function ( r ) { var n = { } ; function o ( e ) { if ( n [ e ] ) return n [ e ] . exports ; var t = n [ e ] = { i : e , l : ! 1 , exports : { } } ; return r [ e ] . call ( t . exports , t , t . exports , o ) , t . l = ! 0 , t . exports } o . m = r , o . c = n , o . d = function ( e , t , r ) { o . o ( e , t ) || Object . defineProperty ( e , t , { enumerable : ! 0 , get : r } ) } , o . r = function ( e ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( e , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) } , o . t = function ( t , e ) { if ( 1 & e && ( t = o ( t ) ) , 8 & e ) return t ; if ( 4 & e && "object" == typeof t && t && t . _ _esModule ) return t ; var r = Object . create ( null ) ; if ( o . r ( r ) , Object . defineProperty ( r , "default" , { enumerable : ! 0 , value : t } ) , 2 & e && "string" != typeof t ) for ( var n in t ) o . d ( r , n , function ( e ) { return t [ e ] } . bind ( null , n ) ) ; return r } , o . n = function ( e ) { var t = e && e . _ _esModule ? function ( ) { return e [ "default" ] } : function ( ) { return e } ; return o . d ( t , "a" , t ) , t } , o . o = function ( e , t ) { return Object . prototype . hasOwnProperty . call ( e , t ) } , o . p = "" , o ( o . s = 148 ) } ( { 148 : function ( e , t , r ) { e . exports = r ( 149 ) } , 149 : function ( e , t , r ) { "use strict" ; var n , o = ( n = r ( 150 ) ) && n . _ _esModule ? n : { "default" : n } ; BI . extend ( BI , o [ "default" ] ) } , 150 : function ( e , t , r ) { "use strict" ; function i ( e ) { return ( i = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e } ) ( e ) } function c ( ) { if ( "function" != typeof WeakMap ) return null ; var e = new WeakMap ; return c = function ( ) { return e } , e } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t [ "default" ] = void 0 ; var n = { Decorators : function ( e ) { if ( e && e . _ _esModule ) return e ; if ( null === e || "object" !== i ( e ) && "function" != typeof e ) return { "default" : e } ; var t = c ( ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var r = { } , n = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var o in e ) { var u ; Object . prototype . hasOwnProperty . call ( e , o ) && ( ( u = n ? Object . getOwnPropertyDescriptor ( e , o ) : null ) && ( u . get || u . set ) ? Object . defineProperty ( r , o , u ) : r [ o ] = e [ o ] ) } r [ "default" ] = e , t && t . set ( e , r ) ; return r } ( r ( 151 ) ) } ; t [ "default" ] = n } , 151 : function ( e , t , r ) { "use strict" ; function u ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; return e } function i ( e , t , r ) { return t in e ? Object . defineProperty ( e , t , { value : r , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = r , e } function c ( e , t ) { e . prototype = Object . create ( t . prototype ) , function ( e , t ) { for ( var r = Object . getOwnPropertyNames ( t ) , n = 0 ; n < r . length ; n ++ ) { var o = r [ n ] , u = Object . getOwnPropertyDescriptor ( t , o ) ; u && u . configurable && e [ o ] === undefined && Object . defineProperty ( e , o , u ) } } ( e . prototype . constructor = e , t ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . shortcut = function ( ) { return function ( e ) { BI . shortcut ( e . xtype , e ) } } , t . model = function ( ) { return function ( e ) { BI . model ( e . xtype , e ) } } , t . store = function ( r ) { var n = 1 < arguments . length && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ; return function ( e ) { return function ( e ) { function t ( ) { return e . apply ( this , arguments ) || this } return c ( t , e ) , t . prototype . _store = function ( ) { var e = n . props ? n . props . apply ( this ) : undefined ; return BI . Models . getModel ( r . xtype , e ) } , t } ( e ) } } , t . Model = void 0 ; var n = function ( o ) { function e ( ) { for ( var e , t = arguments . length , r = new Array ( t ) , n = 0 ; n < t ; n ++ ) r [ n ] = arguments [ n ] ; return i ( u ( e = o . call . apply ( o , [ this ] . concat ( r ) ) || this ) , "model" , void 0 ) , i ( u ( e ) , "store" , void 0 ) , i ( u ( e ) , "context" , void 0 ) , i ( u ( e ) , "actions" , void 0 ) , i ( u ( e ) , "childContext" , void 0 ) , i ( u ( e ) , "TYPE" , void 0 ) , i ( u ( e ) , "computed" , void 0 ) , e } return c ( e , o ) , e . prototype . state = function ( ) { return { } } , e } ( Fix . Model ) ; t . Model = n } } ) ;