/*! fineui */
function accAdd ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } if ( f = Math . abs ( c - d ) , e = Math . pow ( 10 , Math . max ( c , d ) ) , f > 0 ) { var h = Math . pow ( 10 , f ) ; c > d ? ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) * h ) : ( a = Number ( a . toString ( ) . replace ( "." , "" ) ) * h , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ) } else a = Number ( a . toString ( ) . replace ( "." , "" ) ) , b = Number ( b . toString ( ) . replace ( "." , "" ) ) ; return ( a + b ) / e } function accSub ( a , b ) { var c , d , e , f ; try { c = a . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { c = 0 } try { d = b . toString ( ) . split ( "." ) [ 1 ] . length } catch ( g ) { d = 0 } return e = Math . pow ( 10 , Math . max ( c , d ) ) , f = c >= d ? c : d , ( ( a * e - b * e ) / e ) . toFixed ( f ) } function accMul ( a , b ) { var c = 0 , d = a . toString ( ) , e = b . toString ( ) ; try { c += d . split ( "." ) [ 1 ] . length } catch ( f ) { } try { c += e . split ( "." ) [ 1 ] . length } catch ( f ) { } return Number ( d . replace ( "." , "" ) ) * Number ( e . replace ( "." , "" ) ) / Math . pow ( 10 , c ) } function accDiv ( arg1 , arg2 ) { var t1 = 0 , t2 = 0 , r1 , r2 ; try { t1 = arg1 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } try { t2 = arg2 . toString ( ) . split ( "." ) [ 1 ] . length } catch ( e ) { } with ( Math ) return r1 = Number ( arg1 . toString ( ) . replace ( "." , "" ) ) , r2 = Number ( arg2 . toString ( ) . replace ( "." , "" ) ) , t2 > t1 ? r1 / r2 * pow ( 10 , t2 - t1 ) : r1 / r2 / pow ( 10 , t1 - t2 ) } function _classCallCheck ( a , b ) { if ( ! ( a instanceof b ) ) throw new TypeError ( "Cannot call a class as a function" ) } Array . prototype . indexOf || ( Array . prototype . indexOf = function ( a , b ) { var c ; if ( null == this ) throw new TypeError ( '"this" is null or not defined' ) ; var d = Object ( this ) , e = d . length >>> 0 ; if ( 0 === e ) return - 1 ; var f = 0 | b ; if ( f >= e ) return - 1 ; for ( c = Math . max ( f >= 0 ? f : e - Math . abs ( f ) , 0 ) ; c < e ; ) { if ( c in d && d [ c ] === a ) return c ; c ++ } return - 1 } ) , Array . prototype . lastIndexOf || ( Array . prototype . lastIndexOf = function ( a ) { "use strict" ; if ( void 0 === this || null === this ) throw new TypeError ; var b , c , d = Object ( this ) , e = d . length >>> 0 ; if ( 0 === e ) return - 1 ; for ( b = e - 1 , arguments . length > 1 && ( b = Number ( arguments [ 1 ] ) , b != b ? b = 0 : 0 != b && b != 1 / 0 && b != - ( 1 / 0 ) && ( b = ( b > 0 || - 1 ) * Math . floor ( Math . abs ( b ) ) ) ) , c = b >= 0 ? Math . min ( b , e - 1 ) : e - Math . abs ( b ) ; c >= 0 ; c -- ) if ( c in d && d [ c ] === a ) return c ; return - 1 } ) , window . console = window . console || function ( ) { var a = { } ; return a . log = a . warn = a . debug = a . info = a . error = a . time = a . dir = a . profile = a . clear = a . exception = a . trace = a . assert = function ( ) { } , a } ( ) , Function . prototype . bind || ( Function . prototype . bind = function ( a ) { if ( "function" != typeof this ) throw new TypeError ( "Function.prototype.bind - what is trying to be bound is not callable" ) ; var b = Array . prototype . slice . call ( arguments , 1 ) , c = this , d = function ( ) { } , e = function ( ) { return c . apply ( this instanceof d ? this : a , b . concat ( Array . prototype . slice . call ( arguments ) ) ) } ; return this . prototype && ( d . prototype = this . prototype ) , e . prototype = new d , e } ) , window . localStorage || ( window . localStorage = { items : { } , setItem : function ( a , b ) { BI . Cache . addCookie ( a , b ) } , getItem : function ( a ) { return BI . Cache . getCookie ( a ) } , removeItem : function ( a ) { BI . Cache . deleteCookie ( a ) } , key : function ( ) { } , clear : function ( ) { this . items = { } } } ) , Object . keys || ( Object . keys = function ( a ) { if ( a !== Object ( a ) ) throw new TypeError ( "Object.keys called on a non-object" ) ; var b , c , d = { _ _ob _ _ : b , $accessors : b , $vbthis : b , $vbsetter : b } , e = [ ] ; for ( c in a ) c in d || Object . prototype . hasOwnProperty . call ( a , c ) && e . push ( c ) ; return e } ) , Array . isArray || ( Array . isArray = function ( a ) { return "[object Array]" === Object . prototype . toString . call ( a ) } ) , "function" != typeof Object . getPrototypeOf && ( Object . getPrototypeOf = "" . _ _proto _ _ === String . prototype ? function ( a ) { return a . _ _proto _ _ } : function ( a ) { return a . constructor . prototype } ) , "undefined" != typeof Set && Set . toString ( ) . match ( /native code/ ) || ( Set = function ( ) { this . set = { } } , Set . prototype . has = function ( a ) { return void 0 !== this . set [ a ] } , Set . prototype . add = function ( a ) { this . set [ a ] = 1 } , Set . prototype . clear = function ( ) { this . set = { } } ) , ! function ( a ) { var b = a . navigator . userAgent . toLowerCase ( ) , c = /msie|applewebkit.+safari/ ; if ( c . test ( b ) ) { var d = Array . prototype . sort ; Array . prototype . sort = function ( a ) { if ( a && "function" == typeof a ) { if ( this . length < 2 ) return this ; for ( var b , c = 0 , e = c + 1 , f = this . length , g = ! 1 , h = 0 ; c < f ; c ++ ) for ( e = c + 1 ; e < f ; e ++ ) h = a . call ( this , this [ c ] , this [ e ] ) , g = ( "number" == typeof h ? h : h ? 1 : 0 ) > 0 , g === ! 0 && ( b = this [ c ] , this [ c ] = this [ e ] , this [ e ] = b ) ; return this } return d . call ( this ) } } } ( window ) , function ( a , b ) { fu
c . className = ia . trim ( d ) } return this } , removeClass : function ( a ) { var b , c , d , e , f , g = 0 , h = this . length , i = 0 === arguments . length || "string" == typeof a && a ; if ( ia . isFunction ( a ) ) return this . each ( function ( b ) { ia ( this ) . removeClass ( a . call ( this , b , this . className ) ) } ) ; if ( i ) for ( b = ( a || "" ) . match ( ka ) || [ ] ; g < h ; g ++ ) if ( c = this [ g ] , d = 1 === c . nodeType && ( c . className ? ( " " + c . className + " " ) . replace ( Ca , " " ) : "" ) ) { for ( f = 0 ; e = b [ f ++ ] ; ) for ( ; d . indexOf ( " " + e + " " ) >= 0 ; ) d = d . replace ( " " + e + " " , " " ) ; c . className = a ? ia . trim ( d ) : "" } return this } , toggleClass : function ( a , b ) { var c = typeof a , d = "boolean" == typeof b ; return ia . isFunction ( a ) ? this . each ( function ( c ) { ia ( this ) . toggleClass ( a . call ( this , c , this . className , b ) , b ) } ) : this . each ( function ( ) { if ( "string" === c ) for ( var e , f = 0 , g = ia ( this ) , h = b , i = a . match ( ka ) || [ ] ; e = i [ f ++ ] ; ) h = d ? h : ! g . hasClass ( e ) , g [ h ? "addClass" : "removeClass" ] ( e ) ; else c !== V && "boolean" !== c || ( this . className && ia . _data ( this , "__className__" , this . className ) , this . className = this . className || a === ! 1 ? "" : ia . _data ( this , "__className__" ) || "" ) } ) } , hasClass : function ( a ) { for ( var b = " " + a + " " , c = 0 , d = this . length ; c < d ; c ++ ) if ( 1 === this [ c ] . nodeType && ( " " + this [ c ] . className + " " ) . replace ( Ca , " " ) . indexOf ( b ) >= 0 ) return ! 0 ; return ! 1 } , val : function ( a ) { var c , d , e , f = this [ 0 ] ; { if ( arguments . length ) return e = ia . isFunction ( a ) , this . each ( function ( c ) { var f , g = ia ( this ) ; 1 === this . nodeType && ( f = e ? a . call ( this , c , g . val ( ) ) : a , null == f ? f = "" : "number" == typeof f ? f += "" : ia . isArray ( f ) && ( f = ia . map ( f , function ( a ) { return null == a ? "" : a + "" } ) ) , d = ia . valHooks [ this . type ] || ia . valHooks [ this . nodeName . toLowerCase ( ) ] , d && "set" in d && d . set ( this , f , "value" ) !== b || ( this . value = f ) ) } ) ; if ( f ) return d = ia . valHooks [ f . type ] || ia . valHooks [ f . nodeName . toLowerCase ( ) ] , d && "get" in d && ( c = d . get ( f , "value" ) ) !== b ? c : ( c = f . value , "string" == typeof c ? c . replace ( Da , "" ) : null == c ? "" : c ) } } } ) , ia . extend ( { valHooks : { option : { get : function ( a ) { var b = a . attributes . value ; return ! b || b . specified ? a . value : a . text } } , select : { get : function ( a ) { for ( var b , c , d = a . options , e = a . selectedIndex , f = "select-one" === a . type || e < 0 , g = f ? null : [ ] , h = f ? e + 1 : d . length , i = e < 0 ? h : f ? e : 0 ; i < h ; i ++ ) if ( c = d [ i ] , ( c . selected || i === e ) && ( ia . support . optDisabled ? ! c . disabled : null === c . getAttribute ( "disabled" ) ) && ( ! c . parentNode . disabled || ! ia . nodeName ( c . parentNode , "optgroup" ) ) ) { if ( b = ia ( c ) . val ( ) , f ) return b ; g . push ( b ) } return g } , set : function ( a , b ) { var c = ia . makeArray ( b ) ; return ia ( a ) . find ( "option" ) . each ( function ( ) { this . selected = ia . inArray ( ia ( this ) . val ( ) , c ) >= 0 } ) , c . length || ( a . selectedIndex = - 1 ) , c } } } , attr : function ( a , c , d ) { var e , f , g , h = a . nodeType ; if ( a && 3 !== h && 8 !== h && 2 !== h ) return typeof a . getAttribute === V ? ia . prop ( a , c , d ) : ( f = 1 !== h || ! ia . isXMLDoc ( a ) , f && ( c = c . toLowerCase ( ) , e = ia . attrHooks [ c ] || ( Ga . test ( c ) ? Ba : Aa ) ) , d === b ? e && f && "get" in e && null !== ( g = e . get ( a , c ) ) ? g : ( typeof a . getAttribute !== V && ( g = a . getAttribute ( c ) ) , null == g ? b : g ) : null !== d ? e && f && "set" in e && ( g = e . set ( a , d , c ) ) !== b ? g : ( a . setAttribute ( c , d + "" ) , d ) : void ia . removeAttr ( a , c ) ) } , removeAttr : function ( a , b ) { var c , d , e = 0 , f = b && b . match ( ka ) ; if ( f && 1 === a . nodeType ) for ( ; c = f [ e ++ ] ; ) d = ia . propFix [ c ] || c , Ga . test ( c ) ? ! Ia && Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] = a [ d ] = ! 1 : a [ d ] = ! 1 : ia . attr ( a , c , "" ) , a . removeAttribute ( Ia ? c : d ) } , attrHooks : { type : { set : function ( a , b ) { if ( ! ia . support . radioValue && "radio" === b && ia . nodeName ( a , "input" ) ) { var c = a . value ; return a . setAttribute ( "type" , b ) , c && ( a . value = c ) , b } } } } , propFix : { tabindex : "tabIndex" , readonly : "readOnly" , "for" : "htmlFor" , "class" : "className" , maxlength : "maxLength" , cellspacing : "cellSpacing" , cellpadding : "cellPadding" , rowspan : "rowSpan" , colspan : "colSpan" , usemap : "useMap" , frameborder : "frameBorder" , contenteditable : "contentEditable" } , prop : function ( a , c , d ) { var e , f , g , h = a . nodeType ; if ( a && 3 !== h && 8 !== h && 2 !== h ) return g = 1 !== h || ! ia . isXMLDoc ( a ) , g && ( c = ia . propFix [ c ] || c , f = ia . propHooks [ c ] ) , d !== b ? f && "set" in f && ( e = f . set ( a , d , c ) ) !== b ? e : a [ c ] = d : f && "get" in f && null !== ( e = f . get ( a , c ) ) ? e : a [ c ] } , propHooks : { tabIndex : { get : function ( a ) { var c = a . getAttributeNode ( "tabindex" ) ; return c && c . specified ? parseInt ( c . value , 10 ) : Ea . test ( a . nodeName ) || Fa . test ( a . nodeName ) && a . href ? 0 : b } } } } ) , Ba = { get : function ( a , c ) { var d = ia . prop ( a , c ) , e = "boolean" == typeof d && a . getAttribute ( c ) , f = "boolean" == typeof d ? Ja && Ia ? null != e : Ha . test ( c ) ? a [ ia . camelCase ( "default-" + c ) ] : ! ! e : a . getAttributeNode ( c ) ; return f && f . value !== ! 1 ? c . toLowerCase ( ) : b } , set : function ( a , b ,
} } ) , lang : e ( function ( a ) { return la . test ( a || "" ) || g . error ( "unsupported lang: " + a ) , a = a . replace ( ua , va ) . toLowerCase ( ) , function ( b ) { var c ; do if ( c = H ? b . getAttribute ( "xml:lang" ) || b . getAttribute ( "lang" ) : b . lang ) return c = c . toLowerCase ( ) , c === a || 0 === c . indexOf ( a + "-" ) ; while ( ( b = b . parentNode ) && 1 === b . nodeType ) ; return ! 1 } } ) , target : function ( b ) { var c = a . location && a . location . hash ; return c && c . slice ( 1 ) === b . id } , root : function ( a ) { return a === G } , focus : function ( a ) { return a === F . activeElement && ( ! F . hasFocus || F . hasFocus ( ) ) && ! ! ( a . type || a . href || ~ a . tabIndex ) } , enabled : function ( a ) { return a . disabled === ! 1 } , disabled : function ( a ) { return a . disabled === ! 0 } , checked : function ( a ) { var b = a . nodeName . toLowerCase ( ) ; return "input" === b && ! ! a . checked || "option" === b && ! ! a . selected } , selected : function ( a ) { return a . parentNode && a . parentNode . selectedIndex , a . selected === ! 0 } , empty : function ( a ) { for ( a = a . firstChild ; a ; a = a . nextSibling ) if ( a . nodeName > "@" || 3 === a . nodeType || 4 === a . nodeType ) return ! 1 ; return ! 0 } , parent : function ( a ) { return ! y . pseudos . empty ( a ) } , header : function ( a ) { return ra . test ( a . nodeName ) } , input : function ( a ) { return qa . test ( a . nodeName ) } , button : function ( a ) { var b = a . nodeName . toLowerCase ( ) ; return "input" === b && "button" === a . type || "button" === b } , text : function ( a ) { var b ; return "input" === a . nodeName . toLowerCase ( ) && "text" === a . type && ( null == ( b = a . getAttribute ( "type" ) ) || b . toLowerCase ( ) === a . type ) } , first : k ( function ( ) { return [ 0 ] } ) , last : k ( function ( a , b ) { return [ b - 1 ] } ) , eq : k ( function ( a , b , c ) { return [ c < 0 ? c + b : c ] } ) , even : k ( function ( a , b ) { for ( var c = 0 ; c < b ; c += 2 ) a . push ( c ) ; return a } ) , odd : k ( function ( a , b ) { for ( var c = 1 ; c < b ; c += 2 ) a . push ( c ) ; return a } ) , lt : k ( function ( a , b , c ) { for ( var d = c < 0 ? c + b : c ; -- d >= 0 ; ) a . push ( d ) ; return a } ) , gt : k ( function ( a , b , c ) { for ( var d = c < 0 ? c + b : c ; ++ d < b ; ) a . push ( d ) ; return a } ) } } ; for ( w in { radio : ! 0 , checkbox : ! 0 , file : ! 0 , password : ! 0 , image : ! 0 } ) y . pseudos [ w ] = i ( w ) ; for ( w in { submit : ! 0 , reset : ! 0 } ) y . pseudos [ w ] = j ( w ) ; B = g . compile = function ( a , b ) { var c , d = [ ] , e = [ ] , f = U [ a + " " ] ; if ( ! f ) { for ( b || ( b = l ( a ) ) , c = b . length ; c -- ; ) f = r ( b [ c ] ) , f [ N ] ? d . push ( f ) : e . push ( f ) ; f = U ( a , s ( e , d ) ) } return f } , y . pseudos . nth = y . pseudos . eq , y . filters = v . prototype = y . pseudos , y . setFilters = new v , E ( ) , g . attr = ia . attr , ia . find = g , ia . expr = g . selectors , ia . expr [ ":" ] = ia . expr . pseudos , ia . unique = g . uniqueSort , ia . text = g . getText , ia . isXMLDoc = g . isXML , ia . contains = g . contains } ( a ) ; var Pa = /Until$/ , Qa = /^(?:parents|prev(?:Until|All))/ , Ra = /^.[^:#\[\.,]*$/ , Sa = ia . expr . match . needsContext , Ta = { children : ! 0 , contents : ! 0 , next : ! 0 , prev : ! 0 } ; ia . fn . extend ( { find : function ( a ) { var b , c , d , e = this . length ; if ( "string" != typeof a ) return d = this , this . pushStack ( ia ( a ) . filter ( function ( ) { for ( b = 0 ; b < e ; b ++ ) if ( ia . contains ( d [ b ] , this ) ) return ! 0 } ) ) ; for ( c = [ ] , b = 0 ; b < e ; b ++ ) ia . find ( a , this [ b ] , c ) ; return c = this . pushStack ( e > 1 ? ia . unique ( c ) : c ) , c . selector = ( this . selector ? this . selector + " " : "" ) + a , c } , has : function ( a ) { var b , c = ia ( a , this ) , d = c . length ; return this . filter ( function ( ) { for ( b = 0 ; b < d ; b ++ ) if ( ia . contains ( this , c [ b ] ) ) return ! 0 } ) } , not : function ( a ) { return this . pushStack ( l ( this , a , ! 1 ) ) } , filter : function ( a ) { return this . pushStack ( l ( this , a , ! 0 ) ) } , is : function ( a ) { return ! ! a && ( "string" == typeof a ? Sa . test ( a ) ? ia ( a , this . context ) . index ( this [ 0 ] ) >= 0 : ia . filter ( a , this ) . length > 0 : this . filter ( a ) . length > 0 ) } , closest : function ( a , b ) { for ( var c , d = 0 , e = this . length , f = [ ] , g = Sa . test ( a ) || "string" != typeof a ? ia ( a , b || this . context ) : 0 ; d < e ; d ++ ) for ( c = this [ d ] ; c && c . ownerDocument && c !== b && 11 !== c . nodeType ; ) { if ( g ? g . index ( c ) > - 1 : ia . find . matchesSelector ( c , a ) ) { f . push ( c ) ; break } c = c . parentNode } return this . pushStack ( f . length > 1 ? ia . unique ( f ) : f ) } , index : function ( a ) { return a ? "string" == typeof a ? ia . inArray ( this [ 0 ] , ia ( a ) ) : ia . inArray ( a . jquery ? a [ 0 ] : a , this ) : this [ 0 ] && this [ 0 ] . parentNode ? this . first ( ) . prevAll ( ) . length : - 1 } , add : function ( a , b ) { var c = "string" == typeof a ? ia ( a , b ) : ia . makeArray ( a && a . nodeType ? [ a ] : a ) , d = ia . merge ( this . get ( ) , c ) ; return this . pushStack ( ia . unique ( d ) ) } , addBack : function ( a ) { return this . add ( null == a ? this . prevObject : this . prevObject . filter ( a ) ) } } ) , ia . fn . andSelf = ia . fn . addBack , ia . each ( { parent : function ( a ) { var b = a . parentNode ; return b && 11 !== b . nodeType ? b : null } , parents : function ( a ) { return ia . dir ( a , "parentNode" ) } , parentsUntil : function ( a , b , c ) { return ia . dir ( a , "parentNode" , c ) } , next : function ( a ) { return k ( a , "nextSibling" ) } , prev : function ( a ) { return k ( a , "previousSibling" ) } , n
{ top : b . top - c . top - ia . css ( d , "marginTop" , ! 0 ) , left : b . left - c . left - ia . css ( d , "marginLeft" , ! 0 ) } } } , offsetParent : function ( ) { return this . map ( function ( ) { for ( var a = this . offsetParent || W . documentElement ; a && ! ia . nodeName ( a , "html" ) && "static" === ia . css ( a , "position" ) ; ) a = a . offsetParent ; return a || W . documentElement } ) } } ) , ia . each ( { scrollLeft : "pageXOffset" , scrollTop : "pageYOffset" } , function ( a , c ) { var d = /Y/ . test ( c ) ; ia . fn [ a ] = function ( e ) { return ia . access ( this , function ( a , e , f ) { var g = S ( a ) ; return f === b ? g ? c in g ? g [ c ] : g . document . documentElement [ e ] : a [ e ] : void ( g ? g . scrollTo ( d ? ia ( g ) . scrollLeft ( ) : f , d ? f : ia ( g ) . scrollTop ( ) ) : a [ e ] = f ) } , a , e , arguments . length , null ) } } ) , ia . each ( { Height : "height" , Width : "width" } , function ( a , c ) { ia . each ( { padding : "inner" + a , content : c , "" : "outer" + a } , function ( d , e ) { ia . fn [ e ] = function ( e , f ) { var g = arguments . length && ( d || "boolean" != typeof e ) , h = d || ( e === ! 0 || f === ! 0 ? "margin" : "border" ) ; return ia . access ( this , function ( c , d , e ) { var f ; return ia . isWindow ( c ) ? c . document . documentElement [ "client" + a ] : 9 === c . nodeType ? ( f = c . documentElement , Math . max ( c . body [ "scroll" + a ] , f [ "scroll" + a ] , c . body [ "offset" + a ] , f [ "offset" + a ] , f [ "client" + a ] ) ) : e === b ? ia . css ( c , d , h ) : ia . style ( c , d , e , h ) } , c , g ? e : b , g , null ) } } ) } ) , a . jQuery = a . $ = ia , "function" == typeof define && define . amd && define . amd . jQuery && define ( "jquery" , [ ] , function ( ) { return ia } ) } ( window ) , function ( ) { function a ( a , b , c ) { switch ( c . length ) { case 0 : return a . call ( b ) ; case 1 : return a . call ( b , c [ 0 ] ) ; case 2 : return a . call ( b , c [ 0 ] , c [ 1 ] ) ; case 3 : return a . call ( b , c [ 0 ] , c [ 1 ] , c [ 2 ] ) } return a . apply ( b , c ) } function b ( a , b , c , d ) { for ( var e = - 1 , f = null == a ? 0 : a . length ; ++ e < f ; ) { var g = a [ e ] ; b ( d , g , c ( g ) , a ) } return d } function c ( a , b ) { for ( var c = - 1 , d = null == a ? 0 : a . length ; ++ c < d && b ( a [ c ] , c , a ) !== ! 1 ; ) ; return a } function d ( a , b ) { for ( var c = - 1 , d = null == a ? 0 : a . length ; ++ c < d ; ) if ( ! b ( a [ c ] , c , a ) ) return ! 1 ; return ! 0 } function e ( a , b ) { for ( var c = - 1 , d = null == a ? 0 : a . length , e = 0 , f = [ ] ; ++ c < d ; ) { var g = a [ c ] ; b ( g , c , a ) && ( f [ e ++ ] = g ) } return f } function f ( a , b ) { var c = null == a ? 0 : a . length ; return ! ! c && o ( a , b , 0 ) > - 1 } function g ( a , b , c ) { for ( var d = - 1 , e = null == a ? 0 : a . length ; ++ d < e ; ) if ( c ( b , a [ d ] ) ) return ! 0 ; return ! 1 } function h ( a , b ) { for ( var c = - 1 , d = null == a ? 0 : a . length , e = Array ( d ) ; ++ c < d ; ) e [ c ] = b ( a [ c ] , c , a ) ; return e } function i ( a , b ) { for ( var c = - 1 , d = b . length , e = a . length ; ++ c < d ; ) a [ e + c ] = b [ c ] ; return a } function j ( a , b , c , d ) { var e = - 1 , f = null == a ? 0 : a . length ; for ( d && f && ( c = a [ ++ e ] ) ; ++ e < f ; ) c = b ( c , a [ e ] , e , a ) ; return c } function k ( a , b ) { for ( var c = - 1 , d = null == a ? 0 : a . length ; ++ c < d ; ) if ( b ( a [ c ] , c , a ) ) return ! 0 ; return ! 1 } function l ( a ) { return a . split ( "" ) } function m ( a , b , c ) { var d ; return c ( a , function ( a , c , e ) { if ( b ( a , c , e ) ) return d = c , ! 1 } ) , d } function n ( a , b , c , d ) { for ( var e = a . length , f = c + ( d ? 1 : - 1 ) ; d ? f -- : ++ f < e ; ) if ( b ( a [ f ] , f , a ) ) return f ; return - 1 } function o ( a , b , c ) { return b === b ? G ( a , b , c ) : n ( a , p , c ) } function p ( a ) { return a !== a } function q ( a ) { return function ( b ) { return null == b ? ye : b [ a ] } } function r ( a ) { return function ( b ) { return null == a ? ye : a [ b ] } } function s ( a , b , c , d , e ) { return e ( a , function ( a , e , f ) { c = d ? ( d = ! 1 , a ) : b ( c , a , e , f ) } ) , c } function t ( a , b ) { var c = a . length ; for ( a . sort ( b ) ; c -- ; ) a [ c ] = a [ c ] . value ; return a } function u ( a , b ) { for ( var c = - 1 , d = Array ( a ) ; ++ c < a ; ) d [ c ] = b ( c ) ; return d } function v ( a ) { return function ( b ) { return a ( b ) } } function w ( a , b ) { return h ( b , function ( b ) { return a [ b ] } ) } function x ( a , b ) { return a . has ( b ) } function y ( a , b ) { for ( var c = a . length , d = 0 ; c -- ; ) a [ c ] === b && ++ d ; return d } function z ( a , b ) { return null == a ? ye : a [ b ] } function A ( a ) { return sg . test ( a ) } function B ( a ) { for ( var b , c = [ ] ; ! ( b = a . next ( ) ) . done ; ) c . push ( b . value ) ; return c } function C ( a ) { var b = - 1 , c = Array ( a . size ) ; return a . forEach ( function ( a , d ) { c [ ++ b ] = [ d , a ] } ) , c } function D ( a , b ) { return function ( c ) { return a ( b ( c ) ) } } function E ( a , b ) { for ( var c = - 1 , d = a . length , e = 0 , f = [ ] ; ++ c < d ; ) { var g = a [ c ] ; g !== b && g !== Ee || ( a [ c ] = Ee , f [ e ++ ] = c ) } return f } function F ( a ) { var b = - 1 , c = Array ( a . size ) ; return a . forEach ( function ( a ) { c [ ++ b ] = a } ) , c } function G ( a , b , c ) { for ( var d = c - 1 , e = a . length ; ++ d < e ; ) if ( a [ d ] === b ) return d ; return - 1 } function H ( a ) { return A ( a ) ? J ( a ) : Lg ( a ) } function I ( a ) { return A ( a ) ? K ( a ) : l ( a ) } function J ( a ) { for ( var b = rg . lastIndex = 0 ; rg . test ( a ) ; ) ++ b ; return b } function K ( a ) { return a . match ( rg ) || [ ] } function L ( a ) { if ( Ld ( a ) && ! ii ( a ) && ! ( a instanceof O ) ) { if ( a instanceof N ) return a ; if ( Sg . call ( a , "__wrapped__" ) ) return Pc ( a ) } return new N ( a ) } function M ( ) { } function N ( a , b ) { this . _ _wrapped _ _ = a ,
return null != a && oc ( a , b , Oa ) } function be ( a , b ) { return null != a && oc ( a , b , Pa ) } function ce ( a ) { return Cd ( a ) ? ra ( a ) : cb ( a ) } function de ( a ) { return Cd ( a ) ? ra ( a , ! 0 ) : db ( a ) } function ee ( a , b ) { return fe ( a , vd ( bb ( b ) ) ) } function fe ( a , b ) { if ( null == a ) return { } ; var c = h ( fc ( a ) , function ( a ) { return [ a ] } ) ; return b = bb ( b ) , kb ( a , c , function ( a , c ) { return b ( a , c [ 0 ] ) } ) } function ge ( a , b , c ) { b = yb ( b , a ) ; var d = - 1 , e = b . length ; for ( e || ( e = 1 , a = ye ) ; ++ d < e ; ) { var f = null == a ? ye : a [ Mc ( b [ d ] ) ] ; f === ye && ( d = e , f = c ) , a = Id ( f ) ? f . call ( a ) : f } return a } function he ( a ) { return null == a ? [ ] : w ( a , ce ( a ) ) } function ie ( a , b , c ) { return c === ye && ( c = b , b = ye ) , c !== ye && ( c = Wd ( c ) , c = c === c ? c : 0 ) , b !== ye && ( b = Wd ( b ) , b = b === b ? b : 0 ) , za ( Wd ( a ) , b , c ) } function je ( a , b , c ) { if ( c && "boolean" != typeof c && vc ( a , b , c ) && ( b = c = ye ) , c === ye && ( "boolean" == typeof b ? ( c = b , b = ye ) : "boolean" == typeof a && ( c = a , a = ye ) ) , a === ye && b === ye ? ( a = 0 , b = 1 ) : ( a = Ud ( a ) , b === ye ? ( b = a , a = 0 ) : b = Ud ( b ) ) , a > b ) { var d = a ; a = b , b = d } if ( c || a % 1 || b % 1 ) { var e = sh ( ) ; return qh ( a + e * ( b - a + wg ( "1e-" + ( ( e + "" ) . length - 1 ) ) ) , b ) } return mb ( a , b ) } function ke ( a ) { return a = Xd ( a ) , a && Kf . test ( a ) ? a . replace ( Jf , Mg ) : a } function le ( a ) { return function ( ) { return a } } function me ( a ) { return a } function ne ( a ) { return bb ( "function" == typeof a ? a : Aa ( a , Fe ) ) } function oe ( a ) { return gb ( Aa ( a , Fe ) ) } function pe ( a , b , d ) { var e = ce ( b ) , f = Ja ( b , e ) ; null != d || Kd ( b ) && ( f . length || ! e . length ) || ( d = b , b = a , a = this , f = Ja ( b , ce ( b ) ) ) ; var g = ! ( Kd ( d ) && "chain" in d && ! d . chain ) , h = Id ( a ) ; return c ( f , function ( c ) { var d = b [ c ] ; a [ c ] = d , h && ( a . prototype [ c ] = function ( ) { var b = this . _ _chain _ _ ; if ( g || b ) { var c = a ( this . _ _wrapped _ _ ) , e = c . _ _actions _ _ = Jb ( this . _ _actions _ _ ) ; return e . push ( { func : d , args : arguments , thisArg : a } ) , c . _ _chain _ _ = b , c } return d . apply ( a , i ( [ this . value ( ) ] , arguments ) ) } ) } ) , a } function qe ( ) { return Ag . _ === this && ( Ag . _ = Xg ) , this } function re ( ) { } function se ( a ) { return wc ( a ) ? q ( Mc ( a ) ) : lb ( a ) } function te ( ) { return [ ] } function ue ( ) { return ! 1 } function ve ( a ) { var b = ++ Tg ; return Xd ( a ) + b } function we ( a ) { return a && a . length ? Ea ( a , me , Na ) : ye } function xe ( a ) { return a && a . length ? Ea ( a , me , eb ) : ye } var ye , ze = "4.17.5" , Ae = 200 , Be = "Expected a function" , Ce = "__lodash_hash_undefined__" , De = 500 , Ee = "__lodash_placeholder__" , Fe = 1 , Ge = 2 , He = 4 , Ie = 1 , Je = 2 , Ke = 1 , Le = 2 , Me = 4 , Ne = 8 , Oe = 16 , Pe = 32 , Qe = 64 , Re = 128 , Se = 256 , Te = 512 , Ue = 800 , Ve = 16 , We = 1 , Xe = 2 , Ye = 3 , Ze = 1 / 0 , $e = 9007199254740991 , _e = 1.7976931348623157 e308 , af = NaN , bf = 4294967295 , cf = [ [ "ary" , Re ] , [ "bind" , Ke ] , [ "bindKey" , Le ] , [ "curry" , Ne ] , [ "curryRight" , Oe ] , [ "flip" , Te ] , [ "partial" , Pe ] , [ "partialRight" , Qe ] , [ "rearg" , Se ] ] , df = "[object Arguments]" , ef = "[object Array]" , ff = "[object AsyncFunction]" , gf = "[object Boolean]" , hf = "[object Date]" , jf = "[object Error]" , kf = "[object Function]" , lf = "[object GeneratorFunction]" , mf = "[object Map]" , nf = "[object Number]" , of = "[object Null]" , pf = "[object Object]" , qf = "[object Promise]" , rf = "[object Proxy]" , sf = "[object RegExp]" , tf = "[object Set]" , uf = "[object String]" , vf = "[object Symbol]" , wf = "[object Undefined]" , xf = "[object WeakMap]" , yf = "[object ArrayBuffer]" , zf = "[object DataView]" , Af = "[object Float32Array]" , Bf = "[object Float64Array]" , Cf = "[object Int8Array]" , Df = "[object Int16Array]" , Ef = "[object Int32Array]" , Ff = "[object Uint8Array]" , Gf = "[object Uint8ClampedArray]" , Hf = "[object Uint16Array]" , If = "[object Uint32Array]" , Jf = /[&<>"']/g , Kf = RegExp ( Jf . source ) , Lf = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/ , Mf = /^\w*$/ , Nf = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g , Of = /[\\^$.*+?()[\]{}|]/g , Pf = /^\s+|\s+$/g , Qf = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ , Rf = /\{\n\/\* \[wrapped with (.+)\] \*/ , Sf = /,? & / , Tf = /\\(\\)?/g , Uf = /\w*$/ , Vf = /^[-+]0x[0-9a-f]+$/i , Wf = /^0b[01]+$/i , Xf = /^\[object .+?Constructor\]$/ , Yf = /^0o[0-7]+$/i , Zf = /^(?:0|[1-9]\d*)$/ , $f = "\\ud800-\\udfff" , _f = "\\u0300-\\u036f" , ag = "\\ufe20-\\ufe2f" , bg = "\\u20d0-\\u20ff" , cg = _f + ag + bg , dg = "\\ufe0e\\ufe0f" , eg = "[" + $f + "]" , fg = "[" + cg + "]" , gg = "\\ud83c[\\udffb-\\udfff]" , hg = "(?:" + fg + "|" + gg + ")" , ig = "[^" + $f + "]" , jg = "(?:\\ud83c[\\udde6-\\uddff]){2}" , kg = "[\\ud800-\\udbff][\\udc00-\\udfff]" , lg = "\\u200d" , mg = hg + "?" , ng = "[" + dg + "]?" , og = "(?:" + lg + "(?:" + [ ig , jg , kg ] . join ( "|" ) + ")" + ng + mg + ")*" , pg = ng + mg + og , qg = "(?:" + [ ig + fg + "?" , fg , jg , kg , eg ] . join ( "|" ) + ")" , rg = RegExp ( gg + "(?=" + gg + ")|" + qg + pg , "g" ) , sg = RegExp ( "[" + lg + $f + cg + dg + "]" ) , tg = { } ; tg [ Af ] = tg [ Bf ] = tg [ Cf ] = tg [ Df ] = tg [ Ef ] = tg [ Ff ]
} } ) } } ) } ( ) , BI . OB = function ( a ) { var b = this . props ; BI . isFunction ( this . props ) && ( b = this . props ( a ) ) , this . options = ( window . $ || window . _ ) . extend ( this . _defaultConfig ( a ) , b , a ) , this . _init ( ) , this . _initRef ( ) } , _ . extend ( BI . OB . prototype , { props : { } , init : null , destroyed : null , _defaultConfig : function ( a ) { return { } } , _init : function ( ) { this . _initListeners ( ) , this . init && this . init ( ) } , _initListeners : function ( ) { var a = this ; null != this . options . listeners && ( _ . each ( this . options . listeners , function ( b ) { ( b . target ? b . target : a ) [ b . once ? "once" : "on" ] ( b . eventName , _ . bind ( b . action , a ) ) } ) , delete this . options . listeners ) } , _initRef : function ( ) { this . options . ref && this . options . ref . call ( this , this ) } , _purgeRef : function ( ) { this . options . ref && this . options . ref . call ( null ) } , _getEvents : function ( ) { return _ . isArray ( this . events ) || ( this . events = [ ] ) , this . events } , on : function ( a , b ) { a = a . toLowerCase ( ) ; var c = this . _getEvents ( ) [ a ] ; _ . isArray ( c ) || ( c = [ ] , this . _getEvents ( ) [ a ] = c ) , c . push ( b ) } , once : function ( a , b ) { var c = function ( ) { b . apply ( this , arguments ) , this . un ( a , c ) } ; this . on ( a , c ) } , un : function ( a , b ) { if ( a = a . toLowerCase ( ) , null == b ) delete this . _getEvents ( ) [ a ] ; else { var c = this . _getEvents ( ) [ a ] ; if ( _ . isArray ( c ) ) { var d = [ ] ; _ . each ( c , function ( a ) { a != b && d . push ( a ) } ) , this . _getEvents ( ) [ a ] = d } } } , purgeListeners : function ( ) { this . events = [ ] } , fireEvent : function ( ) { var a = arguments [ 0 ] . toLowerCase ( ) , b = this . _getEvents ( ) [ a ] ; if ( BI . isArray ( b ) ) if ( BI . isArguments ( arguments [ 1 ] ) ) { for ( var c = 0 ; c < b . length ; c ++ ) if ( b [ c ] . apply ( this , arguments [ 1 ] ) === ! 1 ) return ! 1 } else for ( var d = Array . prototype . slice . call ( arguments , 1 ) , c = 0 ; c < b . length ; c ++ ) if ( b [ c ] . apply ( this , d ) === ! 1 ) return ! 1 ; return ! 0 } , destroy : function ( ) { this . destroyed && this . destroyed ( ) , this . _purgeRef ( ) , this . purgeListeners ( ) } } ) , BI . Widget = BI . inherit ( BI . OB , { _defaultConfig : function ( ) { return BI . extend ( BI . Widget . superclass . _defaultConfig . apply ( this ) , { root : ! 1 , tagName : "div" , attributes : null , data : null , tag : null , disabled : ! 1 , invisible : ! 1 , invalid : ! 1 , baseCls : "" , extraCls : "" , cls : "" } ) } , beforeInit : null , beforeCreate : null , created : null , render : null , beforeMount : null , mounted : null , shouldUpdate : null , update : function ( ) { } , beforeDestroy : null , destroyed : null , _init : function ( ) { BI . Widget . superclass . _init . apply ( this , arguments ) , this . _initRoot ( ) , this . _initElementWidth ( ) , this . _initElementHeight ( ) , this . _initVisual ( ) , this . _initState ( ) , this . beforeInit ? ( this . _ _asking = ! 0 , this . beforeInit ( BI . bind ( this . _render , this ) ) , this . _ _asking === ! 0 && ( this . _ _async = ! 0 ) ) : this . _render ( ) } , _render : function ( ) { this . _ _asking = ! 1 , this . beforeCreate && this . beforeCreate ( ) , this . _initElement ( ) , this . _initEffects ( ) , this . created && this . created ( ) } , _initRoot : function ( ) { var a = this . options ; this . widgetName = a . widgetName || BI . uniqueId ( "widget" ) , this . _isRoot = a . root , BI . isWidget ( a . element ) ? ( a . element instanceof BI . Widget ? ( this . _parent = a . element , this . _parent . addWidget ( this . widgetName , this ) ) : this . _isRoot = ! 0 , this . element = this . options . element . element ) : a . element ? ( this . element = $ ( a . element ) , this . _isRoot = ! 0 ) : this . element = $ ( document . createElement ( a . tagName ) ) , this . element . _isWidget = ! 0 , ( a . baseCls || a . extraCls || a . cls ) && this . element . addClass ( ( a . baseCls || "" ) + " " + ( a . extraCls || "" ) + " " + ( a . cls || "" ) ) , a . attributes && this . element . attr ( a . attributes ) , a . data && this . element . data ( a . data ) , this . _children = { } } , _initElementWidth : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . width ) && this . element . css ( "width" , a . width ) } , _initElementHeight : function ( ) { var a = this . options ; BI . isWidthOrHeight ( a . height ) && this . element . css ( "height" , a . height ) } , _initVisual : function ( ) { var a = this . options ; a . invisible && this . element . css ( "display" , "none" ) } , _initEffects : function ( ) { var a = this . options ; ( a . disabled || a . invalid ) && ( this . options . disabled && this . setEnable ( ! 1 ) , this . options . invalid && this . setValid ( ! 1 ) ) } , _initState : function ( ) { this . _isMounted = ! 1 } , _initElement : function ( ) { var a = this , b = this . render && this . render ( ) ; BI . isPlainObject ( b ) && ( b = [ b ] ) , BI . isArray ( b ) && BI . each ( b , function ( b , c ) { BI . createWidget ( c , { element : a } ) } ) , this . _mount ( ) } , _setParent : function ( a ) { this . _parent = a } , _mount : function ( ) { var a = this , b = this . _isMounted ; ! b && this . isVisible ( ) && this . _ _asking !== ! 0 && ( this . _isRoot === ! 0 ? b = ! 0 : this . _parent && this . _parent . _isMounted === ! 0 && ( b = ! 0 ) , b && ( this . beforeMount && this . beforeMount ( ) , this . _isMounted = ! 0 ,
19969 : "DZ" , 19975 : "WM" , 19988 : "QJ" , 20048 : "YL" , 20056 : "SC" , 20060 : "NM" , 20094 : "QG" , 20127 : "QJ" , 20167 : "QC" , 20193 : "YG" , 20250 : "KH" , 20256 : "ZC" , 20282 : "SC" , 20285 : "QJG" , 20291 : "TD" , 20314 : "YD" , 20315 : "BF" , 20340 : "NE" , 20375 : "TD" , 20389 : "YJ" , 20391 : "CZ" , 20415 : "PB" , 20446 : "YS" , 20447 : "SQ" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 20985 : "AW" , 21032 : "PB" , 21048 : "XQ" , 21049 : "SC" , 21089 : "YS" , 21119 : "JC" , 21242 : "SB" , 21273 : "SC" , 21305 : "YP" , 21306 : "QO" , 21330 : "ZC" , 21333 : "SDC" , 21345 : "QK" , 21378 : "CA" , 21397 : "SC" , 21414 : "XS" , 21442 : "SC" , 21477 : "JG" , 21480 : "TD" , 21484 : "ZS" , 21494 : "YX" , 21505 : "YX" , 21512 : "HG" , 21523 : "XH" , 21537 : "PB" , 21542 : "PF" , 21549 : "KH" , 21571 : "E" , 21574 : "DA" , 21588 : "TD" , 21589 : "O" , 21618 : "ZC" , 21621 : "KHA" , 21632 : "ZJ" , 21654 : "KG" , 21679 : "LKG" , 21683 : "KH" , 21710 : "A" , 21719 : "YH" , 21734 : "WOE" , 21769 : "A" , 21780 : "WN" , 21804 : "XH" , 21834 : "A" , 21899 : "ZD" , 21903 : "RN" , 21908 : "WO" , 21939 : "ZC" , 21956 : "SA" , 21964 : "YA" , 21970 : "TD" , 22003 : "A" , 22031 : "JG" , 22040 : "XS" , 22060 : "ZC" , 22066 : "ZC" , 22079 : "MH" , 22129 : "XJ" , 22179 : "XA" , 22237 : "NJ" , 22244 : "TD" , 22280 : "JQ" , 22300 : "YH" , 22313 : "XW" , 22331 : "YQ" , 22343 : "YJ" , 22351 : "PH" , 22395 : "DC" , 22412 : "TD" , 22484 : "PB" , 22500 : "PB" , 22534 : "ZD" , 22549 : "DH" , 22561 : "PB" , 22612 : "TD" , 22771 : "KQ" , 22831 : "HB" , 22841 : "JG" , 22855 : "QJ" , 22865 : "XQ" , 23013 : "ML" , 23081 : "WM" , 23487 : "SX" , 23558 : "QJ" , 23561 : "YW" , 23586 : "YW" , 23614 : "YW" , 23615 : "SN" , 23631 : "PB" , 23646 : "ZS" , 23663 : "ZT" , 23673 : "YG" , 23762 : "TD" , 23769 : "ZS" , 23780 : "QJ" , 23884 : "QK" , 24055 : "XH" , 24113 : "DC" , 24162 : "ZC" , 24191 : "GA" , 24273 : "QJ" , 24324 : "NL" , 24377 : "TD" , 24378 : "QJ" , 24439 : "PF" , 24554 : "ZS" , 24683 : "TD" , 24694 : "WE" , 24733 : "LK" , 24925 : "TN" , 25094 : "ZG" , 25100 : "XQ" , 25103 : "XH" , 25153 : "PB" , 25170 : "PB" , 25179 : "KG" , 25203 : "PB" , 25240 : "ZS" , 25282 : "FB" , 25303 : "NA" , 25324 : "KG" , 25341 : "ZY" , 25373 : "WZ" , 25375 : "XJ" , 25384 : "A" , 25457 : "A" , 25528 : "SD" , 25530 : "SC" , 25552 : "TD" , 25774 : "ZC" , 25874 : "ZC" , 26044 : "YW" , 26080 : "WM" , 26292 : "PB" , 26333 : "PB" , 26355 : "ZY" , 26366 : "CZ" , 26397 : "ZC" , 26399 : "QJ" , 26415 : "ZS" , 26451 : "SB" , 26526 : "ZC" , 26552 : "JG" , 26561 : "TD" , 26588 : "JG" , 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 : "JC" , 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" } , c = function (
} , equals : function ( a ) { return this === a || this . id === a . id } , clear : function ( ) { this . parent = null , this . left = null , this . right = null , this . children = [ ] } } , BI . extend ( BI . Tree , { transformToArrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = BI . clone ( a [ d ] ) ; f . pId = null == f . pId ? b : f . pId , delete f . children , c . push ( f ) , a [ d ] . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a [ d ] . children , f . id ) ) ) } else { var g = BI . clone ( a ) ; g . pId = null == g . pId ? b : g . pId , delete g . children , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . transformToArrayFormat ( a . children , g . id ) ) ) } return c } , arrayFormat : function ( a , b ) { if ( ! a ) return [ ] ; var c = [ ] ; if ( BI . isArray ( a ) ) for ( var d = 0 , e = a . length ; d < e ; d ++ ) { var f = a [ d ] ; f . pId = null == f . pId ? b : f . pId , c . push ( f ) , a [ d ] . children && ( c = c . concat ( BI . Tree . arrayFormat ( a [ d ] . children , f . id ) ) ) } else { var g = a ; g . pId = null == g . pId ? b : g . pId , c . push ( g ) , a . children && ( c = c . concat ( BI . Tree . arrayFormat ( a . children , g . id ) ) ) } return c } , transformToTreeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; e [ a [ b ] . id ] = BI . clone ( a [ b ] ) } for ( b = 0 , c = a . length ; b < c ; b ++ ) e [ a [ b ] . pId ] && a [ b ] . id !== a [ b ] . pId ? ( e [ a [ b ] . pId ] . children || ( e [ a [ b ] . pId ] . children = [ ] ) , e [ a [ b ] . pId ] . children . push ( e [ a [ b ] . id ] ) ) : d . push ( e [ a [ b ] . id ] ) , delete e [ a [ b ] . id ] . pId ; return d } return [ a ] } , treeFormat : function ( a ) { var b , c ; if ( ! a ) return [ ] ; if ( BI . isArray ( a ) ) { var d = [ ] , e = [ ] ; for ( b = 0 , c = a . length ; b < c ; b ++ ) { if ( BI . isNull ( a [ b ] . id ) ) return a ; e [ a [ b ] . id ] = a [ b ] } for ( b = 0 , c = a . length ; b < c ; b ++ ) e [ a [ b ] . pId ] && a [ b ] . id !== a [ b ] . pId ? ( e [ a [ b ] . pId ] . children || ( e [ a [ b ] . pId ] . children = [ ] ) , e [ a [ b ] . pId ] . children . push ( e [ a [ b ] . id ] ) ) : d . push ( e [ a [ b ] . id ] ) ; return d } return [ a ] } , traversal : function ( a , b ) { if ( ! BI . isNull ( a ) ) { var c = this ; BI . any ( a , function ( a , d ) { return b ( a , d ) === ! 1 || void c . traversal ( d . children , b ) } ) } } } ) } ( ) , BI . Vector = function ( a , b ) { this . x = a , this . y = b } , BI . Vector . prototype = { constructor : BI . Vector , cross : function ( a ) { return this . x * a . y - this . y * a . x } , length : function ( a ) { return Math . sqrt ( this . x * a . x + this . y * a . y ) } } , BI . Region = function ( a , b , c , d ) { this . x = a , this . y = b , this . w = c , this . h = d } , BI . Region . prototype = { constructor : BI . Region , isIntersects : function ( a ) { if ( this . isPointInside ( a . x , a . y ) || this . isPointInside ( a . x + a . w , a . y ) || this . isPointInside ( a . x , a . y + a . h ) || this . isPointInside ( a . x + a . w , a . y + a . h ) ) return ! 0 ; if ( a . isPointInside ( this . x , this . y ) || a . isPointInside ( this . x + this . w , this . y ) || a . isPointInside ( this . x , this . y + this . h ) || a . isPointInside ( this . x + this . w , this . y + this . h ) ) return ! 0 ; if ( null != a . x && null != a . y ) { var b = new BI . Vector ( this . w , this . h ) , c = new BI . Vector ( a . x - this . x , a . y - this . y ) , d = new BI . Vector ( c . x + a . w , c . y + a . h ) ; if ( b . cross ( c ) * b . cross ( d ) < 0 ) return ! 0 } return ! 1 } , isPointInside : function ( a , b ) { return null != this . x && null != this . y && ( a >= this . x && a <= this . x + this . w && b >= this . y && b <= this . y + this . h ) } , getPosition : function ( ) { var a = [ ] ; return a . push ( this . x + this . w / 2 ) , a . push ( this . y + this . h / 2 ) , a } } , BI . BehaviorFactory = { createBehavior : function ( a , b ) { var c ; switch ( a ) { case "highlight" : c = BI . HighlightBehavior ; break ; case "redmark" : c = BI . RedMarkBehavior } return new c ( b ) } } , BI . Behavior = BI . inherit ( BI . OB , { _defaultConfig : function ( ) { return BI . extend ( BI . Behavior . superclass . _defaultConfig . apply ( this , arguments ) , { rule : function ( ) { return ! 0 } } ) } , _init : function ( ) { BI . Behavior . superclass . _init . apply ( this , arguments ) } , doBehavior : function ( ) { } } ) , BI . Layout = BI . inherit ( BI . Widget , { props : function ( ) { return { scrollable : null , scrollx : ! 1 , scrolly : ! 1 , items : [ ] } } , render : function ( ) { this . _init4Margin ( ) , this . _init4Scroll ( ) } , _init4Margin : function ( ) { this . options . top && this . element . css ( "top" , this . options . top ) , this . options . left && this . element . css ( "left" , this . options . left ) , this . options . bottom && this . element . css ( "bottom" , this . options . bottom ) , this . options . right && this . element . css ( "right" , this . options . right ) } , _init4Scroll : function ( ) { switch ( this . options . scrollable ) { case ! 0 : this . element . css ( "overflow" , "auto" ) ; break ; case ! 1 : this . element . css ( "overflow" , "hidden" ) } this . options . scrollx && this . element . css ( { "overflow-x" : "auto" , "overflow-y" : "hidden" } ) , this . options . scrolly && this . element . css ( { "overflow-x" : "hidden" , "overflow-y" : "auto" } ) } , _mountChildren : function ( ) { var a = this , b = document . createDocumentFragment ( ) , c = ! 1 ; BI . each ( this . _children , func
h < 0 && ( h = 0 ) , i < 0 && ( i = 0 ) , c . element . css ( { left : h + "px" , top : i + "px" } ) } return this } , close : function ( a ) { return this . _check ( a ) ? ( this . floatOpened [ a ] && ( delete this . floatOpened [ a ] , this . floatContainer [ a ] . invisible ( ) , this . modal && this . floatContainer [ a ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ a ] ) ) , this ) : this } , get : function ( a ) { return this . floatManager [ a ] } , remove : function ( a ) { return this . _check ( a ) ? ( this . floatContainer [ a ] . destroy ( ) , this . modal && this . floatContainer [ a ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ a ] ) , delete this . floatManager [ a ] , delete this . floatLayer [ a ] , delete this . zindexMap [ a ] , delete this . floatContainer [ a ] , delete this . floatOpened [ a ] , this ) : 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 a = this ; this . resizerManger = { } ; var b = BI . debounce ( function ( b ) { a . _resize ( b ) } , 30 ) ; $ ( window ) . resize ( b ) } , _resize : function ( a ) { BI . each ( this . resizerManger , function ( b , c ) { return c instanceof $ ? void ( c . is ( ":visible" ) && c . trigger ( "__resize__" ) ) : c instanceof BI . Layout ? void c . resize ( ) : BI . isFunction ( c ) ? void c ( a ) : void 0 } ) } , add : function ( a , b ) { var c = this ; return this . has ( a ) ? this : ( this . resizerManger [ a ] = b , function ( ) { c . remove ( a ) } ) } , get : function ( a ) { return this . resizerManger [ a ] } , has : function ( a ) { return null != this . resizerManger [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( delete this . resizerManger [ a ] , this ) : this } } ) , BI . TooltipsController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . TooltipsController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _const : { height : 20 } , _init : function ( ) { BI . TooltipsController . superclass . _init . apply ( this , arguments ) , this . tooltipsManager = { } , this . showingTips = { } } , _createTooltip : function ( a , b ) { return BI . createWidget ( { type : "bi.tooltip" , text : a , level : b , stopEvent : ! 0 , height : this . _const . height } ) } , hide : function ( a , b ) { return this . has ( a ) ? ( delete this . showingTips [ a ] , this . get ( a ) . element . hide ( 0 , b ) , this . get ( a ) . invisible ( ) , this ) : this } , create : function ( a , b , c , d ) { if ( ! this . has ( a ) ) { var e = this . _createTooltip ( b , c ) ; this . add ( a , e ) , BI . createWidget ( { type : "bi.absolute" , element : d || "body" , items : [ { el : e } ] } ) , e . invisible ( ) } return this . get ( a ) } , show : function ( a , b , c , d , e , f ) { f || ( f = { } ) ; var g = this ; if ( BI . each ( this . showingTips , function ( a , b ) { g . hide ( a ) } ) , this . showingTips = { } , this . has ( b ) || this . create ( b , c , d , f . container || e ) , ! f . belowMouse ) { var h = e . element . offset ( ) , i = e . element . bounds ( ) ; if ( 0 === i . height || 0 === i . width ) return ; var j = h . top + i . height + 5 } var k = this . get ( b ) ; k . setText ( c ) , k . element . css ( { left : "0px" , top : "0px" } ) , k . visible ( ) , k . element . height ( k . element [ 0 ] . scrollHeight ) , this . showingTips [ b ] = ! 0 ; var l = ( a . pageX || a . clientX ) + 15 , m = ( a . pageY || a . clientY ) + 15 ; return l + k . element . outerWidth ( ) > $ ( "body" ) . outerWidth ( ) && ( l -= k . element . outerWidth ( ) + 15 ) , m + k . element . outerHeight ( ) > $ ( "body" ) . outerHeight ( ) ? ( m -= k . element . outerHeight ( ) + 15 , ! f . belowMouse && ( m = Math . min ( m , h . top - k . element . outerHeight ( ) - 5 ) ) ) : ! f . belowMouse && ( m = Math . max ( m , j ) ) , k . element . css ( { left : l < 0 ? 0 : l + "px" , top : m < 0 ? 0 : m + "px" } ) , k . element . hover ( function ( ) { g . remove ( b ) , e . element . trigger ( "mouseleave.title" + e . getName ( ) ) } ) , this } , add : function ( a , b ) { return this . has ( a ) ? this : ( this . set ( a , b ) , this ) } , get : function ( a ) { return this . tooltipsManager [ a ] } , set : function ( a , b ) { this . tooltipsManager [ a ] = b } , has : function ( a ) { return null != this . tooltipsManager [ a ] } , remove : function ( a ) { return this . has ( a ) ? ( this . tooltipsManager [ a ] . destroy ( ) , delete this . tooltipsManager [ a ] , this ) : this } } ) , _ . extend ( BI , { Events : { KEYDOWN : "_KEYDOWN" , BACKSPACE : "_BACKSPACE" , SPACE : "_SPACE" , ENTER : "_ENTER" , CONFIRM : "_CONFIRM" , ERROR : "_ERROR" , PAUSE : "_PAUSE" , DESTROY : "_DESTROY" , UNMOUNT : "_UNMOUNT" , CLEAR : "_CLEAR" , ADD : "_ADD" , EDITING : "_EDITING" , EMPTY : "_EMPTY" , VIEW : "_VIEW" , RESIZE : "_RESIZE" , BEFOREEDIT : "_BEFOREEDIT" , AFTEREDIT : "_AFTEREDIT" , STARTEDIT : "_STARTEDIT" , STOPEDIT : "_STOPEDIT" , CHANGE : "_CHANGE" , EXPAND : "_EXPAND" , COLLAPSE : "_COLLAPSE" , CALLBACK : "_CALLBACK" , CLICK : "_CLICK" , STATECHANGE : "_STATECHANGE" , BEFORESTATECHANGE : "_BEFORESTATECHANGE" , INIT : "_INIT" , AFTERINIT : "_AFTERINIT" , SCROLL : "_SCROLL" , STARTLOAD : "_STARTLOAD" , AFTERLOAD : "_AFTERLOAD"
function a ( a , b ) { for ( var c = - 1 ; ++ c < g ; ) b += a * h [ c ] , h [ c ] = b % f , b = Math . floor ( b / f ) } function b ( a ) { for ( var b = g , c = 0 ; -- b >= 0 ; ) c += h [ b ] , h [ b ] = Math . floor ( c / a ) , c = c % a * f } function c ( ) { for ( var a = g , b = "" ; -- a >= 0 ; ) if ( "" !== b || 0 === a || 0 !== h [ a ] ) { var c = String ( h [ a ] ) ; "" === b ? b = c : b += "0000000" . slice ( 0 , 7 - c . length ) + c } return b } function d ( a , b , c ) { return 0 === b ? c : b % 2 === 1 ? d ( a , b - 1 , c * a ) : d ( a * a , b / 2 , c ) } function e ( a ) { for ( var b = 0 ; a >= 4096 ; ) b += 12 , a /= 4096 ; for ( ; a >= 2 ; ) b += 1 , a /= 2 ; return b } var f , g , h ; f = 1e7 , g = 6 , h = [ 0 , 0 , 0 , 0 , 0 , 0 ] , Number . prototype . toFixed = function ( f ) { var g , h , i , j , k , l , m , n ; if ( g = Number ( f ) , g = g !== g ? 0 : Math . floor ( g ) , g < 0 || g > 20 ) throw new RangeError ( "Number.toFixed called with invalid number of decimals" ) ; if ( h = Number ( this ) , h !== h ) return "NaN" ; if ( h <= - 1e21 || h > 1e21 ) return String ( h ) ; if ( i = "" , h < 0 && ( i = "-" , h = - h ) , j = "0" , h > 1e-21 ) if ( k = e ( h * d ( 2 , 69 , 1 ) ) - 69 , l = k < 0 ? h * d ( 2 , - k , 1 ) : h / d ( 2 , k , 1 ) , l *= 4503599627370496 , k = 52 - k , k > 0 ) { for ( a ( 0 , l ) , m = g ; m >= 7 ; ) a ( 1e7 , 0 ) , m -= 7 ; for ( a ( d ( 10 , m , 1 ) , 0 ) , m = k - 1 ; m >= 23 ; ) b ( 1 << 23 ) , m -= 23 ; b ( 1 << m ) , a ( 1 , 1 ) , b ( 2 ) , j = c ( ) } else a ( 0 , l ) , a ( 1 << - k , 0 ) , j = c ( ) + "0.00000000000000000000" . slice ( 2 , 2 + g ) ; return g > 0 ? ( n = j . length , j = n <= g ? i + "0.0000000000000000000" . slice ( 0 , g - n + 2 ) + j : i + j . slice ( 0 , n - g ) + "." + j . slice ( n - g ) ) : j = i + j , j } } ( ) , Number . prototype . add = function ( a ) { return accAdd ( a , this ) } , Number . prototype . sub = function ( a ) { return accSub ( this , a ) } , Number . prototype . mul = function ( a ) { return accMul ( a , this ) } , Number . prototype . div = function ( a ) { return accDiv ( this , a ) } , _ . extend ( String . prototype , { startWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substr ( 0 , a . length ) == a } , endWith : function ( a ) { return ! ( null == a || "" == a || 0 === this . length || a . length > this . length ) && this . substring ( this . length - a . length ) == a } , getQuery : function ( a ) { var b = new RegExp ( "(^|&)" + a + "=([^&]*)(&|$)" ) , c = this . substr ( this . indexOf ( "?" ) + 1 ) . match ( b ) ; return c ? unescape ( c [ 2 ] ) : null } , appendQuery : function ( a ) { if ( ! a ) return this ; var b = this ; return b . indexOf ( "?" ) === - 1 && ( b += "?" ) , b . endWith ( "?" ) !== ! 1 || ( b += "&" ) , _ . each ( a , function ( a , c ) { "string" == typeof c && ( b += c + "=" + a + "&" ) } ) , b = b . substr ( 0 , b . length - 1 ) } , replaceAll : function ( a , b ) { return this . replace ( new RegExp ( a , "gm" ) , b ) } , perfectStart : function ( a ) { return this . startWith ( a ) ? this : a + this } , allIndexOf : function ( a ) { if ( "string" != typeof a ) return [ ] ; for ( var b = this , c = [ ] , d = 0 ; b . length > 0 ; ) { var e = b . indexOf ( a ) ; if ( e === - 1 ) break ; c . push ( d + e ) , b = b . substring ( e + a . length , b . length ) , d += e + a . length } return c } } ) , BI . EventListener = { listen : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 1 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 1 ) } } ) : a . attachEvent ? ( a . attachEvent ( "on" + b , c ) , { remove : function ( ) { a . detachEvent ( "on" + b , c ) } } ) : void 0 } , capture : function ( a , b , c ) { return a . addEventListener ? ( a . addEventListener ( b , c , ! 0 ) , { remove : function ( ) { a . removeEventListener ( b , c , ! 0 ) } } ) : { remove : BI . emptyFn } } , registerDefault : function ( ) { } } , ! function ( ) { var a = window . cancelAnimationFrame || window . webkitCancelAnimationFrame || window . mozCancelAnimationFrame || window . oCancelAnimationFrame || window . msCancelAnimationFrame || window . clearTimeout , b = window . requestAnimationFrame || window . webkitRequestAnimationFrame || window . mozRequestAnimationFrame || window . oRequestAnimationFrame || window . msRequestAnimationFrame || window . setTimeout ; BI . MouseMoveTracker = function ( a , b , c ) { this . _isDragging = ! 1 , this . _animationFrameID = null , this . _domNode = c , this . _onMove = a , this . _onMoveEnd = b , 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 ( a ) { this . _eventMoveToken || this . _eventUpToken || ( this . _eventMoveToken = BI . EventListener . listen ( this . _domNode , "mousemove" , this . _onMouseMove ) , this . _eventUpToken = BI . EventListener . listen ( this . _domNode , "mouseup" , this . _onMouseUp ) ) , this . _isDragging || ( this . _deltaX = 0 , this . _deltaY = 0 , this . _isDragging = ! 0 , this . _x = a . clientX , this . _y = a . clientY ) , a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 } , releaseMouseMoves : function ( ) { this . _eventMoveToken && this . _eventUpToken && ( this . _eventMoveToken . remove ( ) , this . _eventMoveToken = null , this . _eventUpToken . remove ( ) , this . _eventUpToken = null ) , null !== this . _animationFrameID && ( a ( this . _animationF
d . element . css ( { left : e } ) ) , BI . isNotNull ( c . rgap ) && ( f += c . rgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . tgap ) && ( g += c . tgap , d . element . css ( { top : g } ) ) , BI . isNotNull ( c . bgap ) && ( h += c . bgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( b . width ) && d . element . css ( { width : b . width } ) , BI . isNotNull ( b . height ) && d . element . css ( { height : b . height } ) , d . element . css ( { position : "absolute" } ) , d } , resize : function ( ) { this . stroke ( this . options . items ) } , stroke : function ( a ) { this . options . items = a || [ ] ; var b = this ; BI . each ( a , function ( a , c ) { if ( c ) { if ( ! BI . isWidget ( c ) && ! c . el ) throw new Error ( "el must be exist" ) ; b . _addElement ( a , c ) } } ) } , populate : function ( a ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.absolute" , BI . AbsoluteLayout ) , BI . AdaptiveLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AdaptiveLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-adaptive-layout" , hgap : null , vgap : null , lgap : null , rgap : null , tgap : null , bgap : null } ) } , render : function ( ) { BI . AdaptiveLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( a , b ) { var c = this . options , d = BI . AdaptiveLayout . superclass . _addElement . apply ( this , arguments ) ; d . element . css ( { position : "relative" } ) ; var e = 0 , f = 0 , g = 0 , h = 0 ; return BI . isNotNull ( b . left ) && d . element . css ( { "margin-left" : b . left } ) , BI . isNotNull ( b . right ) && d . element . css ( { "margin-right" : b . right } ) , BI . isNotNull ( b . top ) && d . element . css ( { "margin-top" : b . top } ) , BI . isNotNull ( b . bottom ) && d . element . css ( { "margin-bottom" : b . bottom } ) , BI . isNotNull ( c . hgap ) && ( e += c . hgap , d . element . css ( { left : e } ) , f += c . hgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . vgap ) && ( g += c . vgap , d . element . css ( { top : g } ) , h += c . vgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( c . lgap ) && ( e += c . lgap , d . element . css ( { left : e } ) ) , BI . isNotNull ( c . rgap ) && ( f += c . rgap , d . element . css ( { right : f } ) ) , BI . isNotNull ( c . tgap ) && ( g += c . tgap , d . element . css ( { top : g } ) ) , BI . isNotNull ( c . bgap ) && ( h += c . bgap , d . element . css ( { bottom : h } ) ) , BI . isNotNull ( b . width ) && d . element . css ( { width : b . width } ) , BI . isNotNull ( b . height ) && d . element . css ( { height : b . height } ) , d } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( a ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.adaptive" , BI . AdaptiveLayout ) , BI . BorderLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . BorderLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-border-layout" , items : { } } ) } , render : function ( ) { BI . BorderLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b , c = 0 , d = 0 , e = 0 , f = 0 ; if ( "north" in a && ( b = a . north , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "north" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "north" , g ) } this . getWidgetByName ( this . getName ( ) + "north" ) . element . height ( b . height ) . css ( { position : "absolute" , top : b . top || 0 , left : b . left || 0 , right : b . right || 0 , bottom : "initial" } ) } c = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "south" in a && ( b = a . south , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "south" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "south" , g ) } this . getWidgetByName ( this . getName ( ) + "south" ) . element . height ( b . height ) . css ( { position : "absolute" , bottom : b . bottom || 0 , left : b . left || 0 , right : b . right || 0 , top : "initial" } ) } d = ( b . height || 0 ) + ( b . top || 0 ) + ( b . bottom || 0 ) } if ( "west" in a && ( b = a . west , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "west" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "west" , g ) } this . getWidgetByName ( this . getName ( ) + "west" ) . element . width ( b . width ) . css ( { position : "absolute" , left : b . left || 0 , top : c , bottom : d , right : "initial" } ) } e = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "east" in a && ( b = a . east , null != b ) ) { if ( b . el ) { if ( ! this . hasWidget ( this . getName ( ) + "east" ) ) { var g = BI . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "east" , g ) } this . getWidgetByName ( this . getName ( ) + "east" ) . element . width ( b . width ) . css ( { position : "absolute" , right : b . right || 0 , top : c , bottom : d , left : "initial" } ) } f = ( b . width || 0 ) + ( b . left || 0 ) + ( b . right || 0 ) } if ( "center" in a && ( b = a . center , null != b ) ) { if ( ! this . hasWidget ( this . getName ( ) + "center" ) ) { var g = BI
m . element . css ( { left : q , width : h } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . columnSize [ g ] ) ) break } for ( var g = e . columns - 1 ; g >= 0 ; g -- ) { for ( var f = 0 ; f < e . rows ; f ++ ) { var m = this . getWidgetByName ( this . getName ( ) + f + "_" + g ) ; BI . isNull ( j [ g ] ) && ( j [ g ] = j [ g + 1 ] + ( e . columnSize [ g + 1 ] < 1 ? e . columnSize [ g + 1 ] : e . columnSize [ g + 1 ] + e . hgap + e . lgap ) ) ; var r = j [ g ] <= 1 ? 100 * j [ g ] + "%" : j [ g ] + e . hgap + e . rgap + "px" , h = "" ; BI . isNumber ( e . columnSize [ g ] ) && ( h = e . columnSize [ g ] <= 1 ? 100 * e . columnSize [ g ] + "%" : e . columnSize [ g ] + "px" ) , m . element . css ( { right : r , width : h } ) , d ( m , f , g ) } if ( ! BI . isNumber ( e . columnSize [ g ] ) ) break } } , populate : function ( a ) { BI . WindowLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.window" , BI . WindowLayout ) , BI . CenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . CenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . CenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : b , row : 0 , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : c . length , rows : 1 , items : c } ) } , populate : function ( a ) { BI . CenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.center" , BI . CenterLayout ) , BI . FloatCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FloatCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-float-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FloatCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] , d = 100 / a . length ; BI . each ( a , function ( b ) { var e = BI . createWidget ( { type : "bi.default" } ) ; e . element . addClass ( "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) ) . css ( { width : d + "%" , height : "100%" } ) , c . push ( { el : e } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.left" , element : this , items : c } ) } , populate : function ( a ) { BI . FloatCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.float_center" , BI . FloatCenterLayout ) , BI . HorizontalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . HorizontalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-horizontal-center-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . HorizontalCenterLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , addItem : function ( a ) { throw new Error ( "cannot be added" ) } , stroke : function ( a ) { var b = this . options , c = [ ] ; BI . each ( a , function ( b ) { c . push ( { column : b , row : 0 , el : BI . createWidget ( { type : "bi.default" , cls : "center-element " + ( 0 === b ? "first-element " : "" ) + ( b === a . length - 1 ? "last-element" : "" ) } ) } ) } ) , BI . each ( a , function ( a , d ) { if ( d ) { var e = BI . createWidget ( d ) ; e . element . css ( { position : "absolute" , left : b . hgap + b . lgap , right : b . hgap + b . rgap , top : b . vgap + b . tgap , bottom : b . vgap + b . bgap , width : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : c . length , rows : 1 , items : c } ) } , populate : function ( a ) { BI . HorizontalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.horizontal_center" , BI . HorizontalCenterLayout ) , BI . VerticalCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . VerticalCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-vertical-center-layout" , hgap : 0 ,
a . _hover || b . isShadowShowingOnSelected || ( c ( ) , a . $mask . invisible ( ) ) } ) , this . element . on ( "mouseenter." + this . getName ( ) , function ( d ) { a . element . _ _isMouseInBounds _ _ ( d ) && ( ! a . isEnabled ( ) || a . _hover || ! b . isShadowShowingOnSelected && a . isSelected ( ) || ( c ( ) , a . $mask . visible ( ) ) ) } ) , this . element . on ( "mousemove." + this . getName ( ) , function ( b ) { a . element . _ _isMouseInBounds _ _ ( b ) || a . isEnabled ( ) && ! a . _hover && ( c ( ) , a . $mask . invisible ( ) ) } ) , this . element . on ( "mouseleave." + this . getName ( ) , function ( ) { a . isEnabled ( ) && ! a . _hover && ( c ( ) , a . $mask . invisible ( ) ) } ) } , bindEvent : function ( ) { function a ( a ) { e . stopEvent && a . stopEvent ( ) , e . stopPropagation && a . stopPropagation ( ) } function b ( b ) { if ( a ( b ) , ! ( ! d . isEnabled ( ) || d . isOnce ( ) && d . isSelected ( ) ) ) { if ( BI . isKey ( e . bubble ) || BI . isFunction ( e . bubble ) ) { if ( BI . isNull ( d . combo ) ) { var f ; BI . createWidget ( { type : "bi.absolute" , element : d , items : [ { el : { type : "bi.bubble_combo" , trigger : "" , ref : function ( ) { d . combo = this } , el : { type : "bi.layout" , height : "100%" } , popup : { type : "bi.text_bubble_bar_popup_view" , text : c ( ) , ref : function ( ) { f = this } , listeners : [ { eventName : BI . BubblePopupBarView . EVENT _CLICK _TOOLBAR _BUTTON , action : function ( a ) { d . combo . hideView ( ) , a && h . apply ( d , arguments ) } } ] } , listeners : [ { eventName : BI . BubbleCombo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { f . populate ( c ( ) ) } } ] } , left : 0 , right : 0 , bottom : 0 , top : 0 } ] } ) } return void ( d . combo . isViewVisible ( ) ? d . combo . hideView ( ) : d . combo . showView ( ) ) } h . apply ( d , arguments ) } } function c ( ) { var a = d . options . bubble ; return BI . isFunction ( a ) ? a ( ) : a } var d = this , e = this . options , f = this . handle ( ) ; if ( f ) { f = f . element ; var g = ( e . trigger || "" ) . split ( "," ) ; BI . each ( g , function ( c , g ) { switch ( g ) { case "mouseup" : var h = ! 1 ; f . mousedown ( function ( ) { h = ! 0 } ) , f . mouseup ( function ( c ) { h === ! 0 && b ( c ) , h = ! 1 , a ( c ) } ) ; break ; case "mousedown" : var h = ! 1 , i = ! 1 ; f . mousedown ( function ( c ) { $ ( document ) . bind ( "mouseup." + d . getName ( ) , function ( a ) { ! BI . DOM . isExist ( d ) || f . _ _isMouseInBounds _ _ ( a ) || h !== ! 0 || i || d . _trigger ( ) , h = ! 1 , $ ( document ) . unbind ( "mouseup." + d . getName ( ) ) } ) , h !== ! 0 && ( d . isSelected ( ) ? i = ! 0 : b ( c ) , h = ! 0 , a ( c ) ) } ) , f . mouseup ( function ( a ) { BI . DOM . isExist ( d ) && h === ! 0 && i === ! 0 && b ( a ) , h = ! 1 , i = ! 1 , $ ( document ) . unbind ( "mouseup." + d . getName ( ) ) } ) ; break ; case "dblclick" : f . dblclick ( b ) ; break ; case "lclick" : var j , h = ! 1 ; f . mousedown ( function ( b ) { $ ( document ) . bind ( "mouseup." + d . getName ( ) , function ( a ) { j && clearInterval ( j ) , j = null , h = ! 1 , $ ( document ) . unbind ( "mouseup." + d . getName ( ) ) } ) , h !== ! 0 && ( ! d . isEnabled ( ) || d . isOnce ( ) && d . isSelected ( ) || ( j = setInterval ( function ( ) { d . isEnabled ( ) && d . doClick ( ) } , 100 ) , h = ! 0 , a ( b ) ) ) } ) ; break ; default : ( e . stopEvent || e . stopPropagation ) && f . mousedown ( function ( b ) { a ( b ) } ) , f . click ( b ) } } ) ; var h = BI . debounce ( this . _doClick , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) } } , _trigger : function ( ) { var a = this . options ; if ( this . isEnabled ( ) && ( this . isDisableSelected ( ) || ( this . isForceSelected ( ) ? this . setSelected ( ! 0 ) : this . isForceNotSelected ( ) ? this . setSelected ( ! 1 ) : this . setSelected ( ! this . isSelected ( ) ) ) , this . isValid ( ) ) ) { a . handler . call ( this , this . getValue ( ) , this ) ; var b = this . getValue ( ) ; this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , b , this ) , this . fireEvent ( BI . BasicButton . EVENT _CHANGE , b , this ) , a . action && BI . Actions . runAction ( a . action , a ) } } , _doClick : function ( a ) { this . isValid ( ) && this . beforeClick ( a ) , this . _trigger ( ) , this . isValid ( ) && this . doClick ( a ) } , beforeClick : function ( ) { } , doClick : function ( ) { } , handle : function ( ) { return this } , hover : function ( ) { this . _hover = ! 0 , this . handle ( ) . element . addClass ( "hover" ) , this . options . shadow && this . $mask && this . $mask . setVisible ( ! 0 ) } , dishover : function ( ) { this . _hover = ! 1 , this . handle ( ) . element . removeClass ( "hover" ) , this . options . shadow && this . $mask && this . $mask . setVisible ( ! 1 ) } , setSelected : function ( a ) { var b = this . options ; b . selected = a , a ? this . handle ( ) . element . addClass ( "active" ) : this . handle ( ) . element . removeClass ( "active" ) , b . shadow && ! b . isShadowShowingOnSelected && this . $mask && this . $mask . setVisible ( ! 1 ) } , isSelected : function ( ) { return this . options . selected } , isOnce : function ( ) { return this . options . once } , isForceSelected : function ( ) { return this . options . forceSelected } , isForceNotSelected : function ( ) { return this . options . forceNotSelected } , isDisableSelected : function ( ) { return this . options . disableSelected } , setText : function ( a ) { this . options . text = a } , getText : function ( ) { return this . options . text } , _setEnable : fun
_left : q . x , _top : q . y } ) ) , j . push ( { el : z , left : q . x , top : q . y , _left : q . x , _top : q . y , _width : q . width , _height : q . height } ) ) ; for ( var B = 0 | s [ q . y ] , C = 0 | s [ q . y + q . height ] , D = B ; D <= C ; D ++ ) { var E = n [ D ] ; x ( t , E ) , y ( u , E ) , t [ E ] = Math . min ( t [ E ] , q . x ) , u [ E ] = Math . max ( u [ E ] , q . x + q . width ) } for ( var F = 0 | r [ q . x ] , G = 0 | r [ q . x + q . width ] , D = F ; D <= G ; D ++ ) { var H = m [ D ] ; x ( v , H ) , y ( w , H ) , v [ H ] = Math . min ( v [ H ] , q . y ) , w [ H ] = Math . max ( w [ H ] , q . y + q . height ) } k [ q . index ] = [ q . index , o ] , l [ o ] = z } var I = { } , J = { } , K = [ ] ; BI . each ( k , function ( b , c ) { a . renderedKeys [ b ] ? I [ b ] = c : J [ b ] = c } ) , BI . each ( this . renderedKeys , function ( a , b ) { I [ a ] || J [ a ] || K . push ( b [ 1 ] ) } ) , BI . each ( K , function ( b , c ) { a . renderedCells [ c ] . el . _destroy ( ) } ) ; var L = [ ] ; BI . each ( J , function ( a , b ) { L . push ( j [ b [ 1 ] ] ) } ) , this . container . addItems ( L ) , this . container . _children = l , this . container . attr ( "items" , j ) , this . renderedCells = j , this . renderedKeys = k ; var M = BI . min ( t ) , N = BI . max ( u ) , O = BI . max ( v ) , P = BI . min ( w ) ; this . renderRange = { minX : M , minY : O , maxX : N , maxY : P } } } , _getMaxScrollLeft : function ( ) { return Math . max ( 0 , this . _width - this . options . width + ( this . options . overflowX ? BI . DOM . getScrollWidth ( ) : 0 ) ) } , _getMaxScrollTop : function ( ) { return Math . max ( 0 , this . _height - this . options . height + ( this . options . overflowY ? BI . DOM . getScrollWidth ( ) : 0 ) ) } , _populate : function ( a ) { var b = this . options ; if ( this . _reRange ( ) , a && a !== this . options . items && ( this . options . items = a , this . _calculateSizeAndPositionData ( ) ) , b . items . length > 0 ) { this . container . setWidth ( this . _width ) , this . container . setHeight ( this . _height ) , this . _calculateChildrenToRender ( ) ; try { this . element . scrollTop ( b . scrollTop ) , this . element . scrollLeft ( b . scrollLeft ) } catch ( c ) { } } } , setScrollLeft : function ( a ) { this . options . scrollLeft !== a && ( this . _scrollLock = ! 0 , this . options . scrollLeft = BI . clamp ( a || 0 , 0 , this . _getMaxScrollLeft ( ) ) , this . _debounceRelease ( ) , this . _calculateChildrenToRender ( ) , this . element . scrollLeft ( this . options . scrollLeft ) ) } , setScrollTop : function ( a ) { this . options . scrollTop !== a && ( this . _scrollLock = ! 0 , this . options . scrollTop = BI . clamp ( a || 0 , 0 , this . _getMaxScrollTop ( ) ) , this . _debounceRelease ( ) , this . _calculateChildrenToRender ( ) , this . element . scrollTop ( this . options . scrollTop ) ) } , setOverflowX : function ( a ) { var b = this ; this . options . overflowX !== ! ! a && ( this . options . overflowX = ! ! a , BI . nextTick ( function ( ) { b . element . css ( { overflowX : a ? "auto" : "hidden" } ) } ) ) } , setOverflowY : function ( a ) { var b = this ; this . options . overflowY !== ! ! a && ( this . options . overflowY = ! ! a , BI . nextTick ( function ( ) { b . element . css ( { overflowY : a ? "auto" : "hidden" } ) } ) ) } , getScrollLeft : function ( ) { return this . options . scrollLeft } , getScrollTop : function ( ) { return this . options . scrollTop } , getMaxScrollLeft : function ( ) { return this . _getMaxScrollLeft ( ) } , 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 ( a , b ) { b . el . _destroy ( ) } ) , this . _clearChildren ( ) , this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 } , populate : function ( a ) { a && a !== this . options . items && this . restore ( ) , this . _populate ( a ) } } ) , BI . CollectionView . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.collection_view" , BI . CollectionView ) , BI . Combo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . Combo . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-combo" , trigger : "click" , toggle : ! 0 , direction : "bottom" , 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 a = this , b = this . options ; this . _initCombo ( ) , this . _initPullDownAction ( ) , this . combo . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { a . isEnabled ( ) && a . isValid ( ) && ( b === BI . Events . EXPAND && a . _popupView ( ) , b === BI . Events . COLLAPSE && a . _hideView ( ) , b === BI . Events . EXPAND && ( a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a . fireEvent ( BI . Combo . EVENT _EXPAND ) ) , b === BI . Events . COLLAPSE && ( a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a . isViewVisible ( ) && a . fireEvent ( BI . Co
container : this , render : this . popupView } , b . 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 ( a ) { BI . Maskers . show ( a ) } , this . getName ( ) ) } , _pauseSearch : function ( ) { this . options , this . getName ( ) ; this . _stop = ! 0 , BI . nextTick ( function ( a ) { BI . Maskers . hide ( a ) } , 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 a = ( this . options , this . getName ( ) ) ; this . _stop = ! 0 , BI . Maskers . hide ( a ) , this . _isSearching === ! 0 && ( this . popupView && this . popupView . stopSearch && this . popupView . stopSearch ( ) , this . fireEvent ( BI . Searcher . EVENT _STOP ) ) , this . _isSearching = ! 1 } , _search : function ( ) { var a = this , b = this . options , c = this . editor . getValue ( ) ; if ( "" !== c && ! this . _stop ) { if ( b . isAutoSearch ) { var d = b . adapter && ( b . adapter . getItems && b . adapter . getItems ( ) || b . adapter . attr ( "items" ) ) || [ ] , e = BI . Func . getSearchResult ( d , c ) , f = e . match , g = e . find ; return this . popupView . populate ( g , f , c ) , b . isAutoSync && b . adapter && b . adapter . getValue && this . popupView . setValue ( b . adapter . getValue ( ) ) , void a . fireEvent ( BI . Searcher . EVENT _SEARCHING ) } this . popupView . loading && this . popupView . loading ( ) , b . onSearch ( { times : 1 , keyword : c , selectedValues : b . adapter && b . adapter . getValue ( ) } , function ( d , e ) { if ( ! a . _stop ) { var f = [ ] . slice . call ( arguments ) ; f . length > 0 && f . push ( c ) , BI . Maskers . show ( a . getName ( ) ) , a . popupView . populate . apply ( a . popupView , f ) , b . isAutoSync && b . adapter && b . adapter . getValue && a . popupView . setValue ( b . adapter . getValue ( ) ) , a . popupView . loaded && a . popupView . loaded ( ) , a . fireEvent ( BI . Searcher . EVENT _SEARCHING ) } } ) } } , setAdapter : function ( a ) { this . options . adapter = a , BI . Maskers . remove ( this . getName ( ) ) } , doSearch : function ( ) { this . isSearching ( ) && this . _search ( ) } , stopSearch : function ( ) { this . _stopSearch ( ) ; try { this . editor . blur ( ) } catch ( a ) { 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 ( a ) { BI . isNull ( this . popupView ) ? this . options . popup . value = a : this . popupView . setValue ( a ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , getKeywords : function ( ) { return this . editor . getKeywords ( ) } , getValue : function ( ) { var a = this . options ; return a . isAutoSync && a . adapter && a . adapter . getValue ? a . adapter . getValue ( ) : this . isSearching ( ) ? this . popupView . getValue ( ) : a . adapter && a . adapter . getValue ? a . adapter . getValue ( ) : BI . isNull ( this . popupView ) ? a . popup . value : this . popupView . getValue ( ) } , populate : function ( a , b , c ) { var d = this . options ; this . _assertPopupView ( ) , this . popupView . populate . apply ( this . popupView , arguments ) , d . isAutoSync && d . adapter && d . adapter . getValue && this . popupView . setValue ( d . adapter . getValue ( ) ) } , empty : function ( ) { this . popupView && this . popupView . empty ( ) } , destroy : function ( ) { BI . Maskers . remove ( this . getName ( ) ) , BI . Searcher . superclass . destroy . apply ( this , arguments ) } } ) , BI . Searcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . Searcher . EVENT _START = "EVENT_START" , BI . Searcher . EVENT _STOP = "EVENT_STOP" , BI . Searcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . Searcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . Searcher . EVENT _AFTER _INIT = "EVENT_AFTER_INIT" , BI . shortcut ( "bi.searcher" , BI . Searcher ) , BI . Switcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Switcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-switcher" , direction : BI . Direction . Top , trigger : "click" , toggle : ! 0 , el : { } , popup : { } , adapter : null , masker : { } , switcherClass : "bi-switcher-popup" , hoverClass : "bi-switcher-hover" } ) } , _init : function ( ) { BI . Switcher . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . _initSwitcher ( ) , thi
var d ; if ( b == a . display . lineDiv ) { if ( d = a . display . lineDiv . childNodes [ c ] , ! d ) return ha ( a . clipPos ( Ff ( a . display . viewTo - 1 ) ) , ! 0 ) ; b = null , c = 0 } else for ( d = b ; ; d = d . parentNode ) { if ( ! d || d == a . display . lineDiv ) return null ; if ( d . parentNode && d . parentNode == a . display . lineDiv ) break } for ( var e = 0 ; e < a . display . view . length ; e ++ ) { var f = a . display . view [ e ] ; if ( f . node == d ) return ja ( f , b , c ) } } function ja ( a , b , c ) { function d ( b , c , d ) { for ( var e = - 1 ; e < ( k ? k . length : 0 ) ; e ++ ) for ( var f = e < 0 ? j . map : k [ e ] , g = 0 ; g < f . length ; g += 3 ) { var h = f [ g + 2 ] ; if ( h == b || h == c ) { var i = Zd ( e < 0 ? a . line : a . rest [ e ] ) , l = f [ g ] + d ; return ( d < 0 || h != b ) && ( l = f [ g + ( d ? 1 : 0 ) ] ) , Ff ( i , l ) } } } var e = a . text . firstChild , f = ! 1 ; if ( ! b || ! Ng ( e , b ) ) return ha ( Ff ( Zd ( a . line ) , 0 ) , ! 0 ) ; if ( b == e && ( f = ! 0 , b = e . childNodes [ c ] , c = 0 , ! b ) ) { var g = a . rest ? Ce ( a . rest ) : a . line ; return ha ( Ff ( Zd ( g ) , g . text . length ) , f ) } var h = 3 == b . nodeType ? b : null , i = b ; for ( h || 1 != b . childNodes . length || 3 != b . firstChild . nodeType || ( h = b . firstChild , c && ( c = h . nodeValue . length ) ) ; i . parentNode != e ; ) i = i . parentNode ; var j = a . measure , k = j . maps , l = d ( h , i , c ) ; if ( l ) return ha ( l , f ) ; for ( var m = i . nextSibling , n = h ? h . nodeValue . length - c : 0 ; m ; m = m . nextSibling ) { if ( l = d ( m , m . firstChild , 0 ) ) return ha ( Ff ( l . line , l . ch - n ) , f ) ; n += m . textContent . length } for ( var o = i . previousSibling , n = c ; o ; o = o . previousSibling ) { if ( l = d ( o , o . firstChild , - 1 ) ) return ha ( Ff ( l . line , l . ch + n ) , f ) ; n += m . textContent . length } } function ka ( a , b , c , d , e ) { function f ( a ) { return function ( b ) { return b . id == a } } function g ( b ) { if ( 1 == b . nodeType ) { var c = b . getAttribute ( "cm-text" ) ; if ( null != c ) return "" == c && ( c = b . textContent . replace ( /\u200b/g , "" ) ) , void ( h += c ) ; var j , k = b . getAttribute ( "cm-marker" ) ; if ( k ) { var l = a . findMarks ( Ff ( d , 0 ) , Ff ( e + 1 , 0 ) , f ( + k ) ) ; return void ( l . length && ( j = l [ 0 ] . find ( ) ) && ( h += Wd ( a . doc , j . from , j . to ) . join ( "\n" ) ) ) } if ( "false" == b . getAttribute ( "contenteditable" ) ) return ; for ( var m = 0 ; m < b . childNodes . length ; m ++ ) g ( b . childNodes [ m ] ) ; /^(pre|div|p)$/i . test ( b . nodeName ) && ( i = ! 0 ) } else if ( 3 == b . nodeType ) { var n = b . nodeValue ; if ( ! n ) return ; i && ( h += "\n" , i = ! 1 ) , h += n } } for ( var h = "" , i = ! 1 ; g ( b ) , b != c ; ) b = b . nextSibling ; return h } function la ( a , b ) { this . ranges = a , this . primIndex = b } function ma ( a , b ) { this . anchor = a , this . head = b } function na ( a , b ) { var c = a [ b ] ; a . sort ( function ( a , b ) { return Gf ( a . from ( ) , b . from ( ) ) } ) , b = De ( a , c ) ; for ( var d = 1 ; d < a . length ; d ++ ) { var e = a [ d ] , f = a [ d - 1 ] ; if ( Gf ( f . to ( ) , e . from ( ) ) >= 0 ) { var g = X ( f . from ( ) , e . from ( ) ) , h = W ( f . to ( ) , e . to ( ) ) , i = f . empty ( ) ? e . from ( ) == e . head : f . from ( ) == f . head ; d <= b && -- b , a . splice ( -- d , 2 , new ma ( i ? h : g , i ? g : h ) ) } } return new la ( a , b ) } function oa ( a , b ) { return new la ( [ new ma ( a , b || a ) ] , 0 ) } function pa ( a , b ) { return Math . max ( a . first , Math . min ( b , a . first + a . size - 1 ) ) } function qa ( a , b ) { if ( b . line < a . first ) return Ff ( a . first , 0 ) ; var c = a . first + a . size - 1 ; return b . line > c ? Ff ( c , Vd ( a , c ) . text . length ) : ra ( b , Vd ( a , b . line ) . text . length ) } function ra ( a , b ) { var c = a . ch ; return null == c || c > b ? Ff ( a . line , b ) : c < 0 ? Ff ( a . line , 0 ) : a } function sa ( a , b ) { return b >= a . first && b < a . first + a . size } function ta ( a , b ) { for ( var c = [ ] , d = 0 ; d < b . length ; d ++ ) c [ d ] = qa ( a , b [ d ] ) ; return c } function ua ( a , b , c , d ) { if ( a . cm && a . cm . display . shift || a . extend ) { var e = b . anchor ; if ( d ) { var f = Gf ( c , e ) < 0 ; f != Gf ( d , e ) < 0 ? ( e = c , c = d ) : f != Gf ( c , d ) < 0 && ( c = d ) } return new ma ( e , c ) } return new ma ( d || c , c ) } function va ( a , b , c , d ) { Ba ( a , new la ( [ ua ( a , a . sel . primary ( ) , b , c ) ] , 0 ) , d ) } function wa ( a , b , c ) { for ( var d = [ ] , e = 0 ; e < a . sel . ranges . length ; e ++ ) d [ e ] = ua ( a , a . sel . ranges [ e ] , b [ e ] , null ) ; var f = na ( d , a . sel . primIndex ) ; Ba ( a , f , c ) } function xa ( a , b , c , d ) { var e = a . sel . ranges . slice ( 0 ) ; e [ b ] = c , Ba ( a , na ( e , a . sel . primIndex ) , d ) } function ya ( a , b , c , d ) { Ba ( a , oa ( b , c ) , d ) } function za ( a , b ) { var c = { ranges : b . ranges , update : function ( b ) { this . ranges = [ ] ; for ( var c = 0 ; c < b . length ; c ++ ) this . ranges [ c ] = new ma ( qa ( a , b [ c ] . anchor ) , qa ( a , b [ c ] . head ) ) } } ; return zg ( a , "beforeSelectionChange" , a , c ) , a . cm && zg ( a . cm , "beforeSelectionChange" , a . cm , c ) , c . ranges != b . ranges ? na ( c . ranges , c . ranges . length - 1 ) : b } function Aa ( a , b , c ) { var d = a . history . done , e = Ce ( d ) ; e && e . ranges ? ( d [ d . length - 1 ] = b , Ca ( a , b , c ) ) : Ba ( a , b , c ) } function Ba ( a , b , c ) { Ca ( a , b , c ) , he ( a , a . sel , a . cm ? a . cm . curOp . id : NaN , c ) } function Ca ( a , b , c ) { ( xe ( a , "beforeSelectionChange" ) || a . cm && xe ( a . cm , "beforeSelectionChange" ) ) && ( b = za ( a , b ) ) ; var d = c && c . bias || ( Gf ( b . primary ( ) . head , a . sel . primary ( ) . head ) < 0 ? - 1 : 1 ) ; Da ( a , Fa ( a , b , d , ! 0 ) ) , c && c . scroll === ! 1 || ! a . cm || Ic ( a . cm ) } function Da ( a , b ) { b . equals ( a . sel ) || ( a . sel = b , a . cm && ( a . cm . curOp . updateInput
a . doc . scrollLeft = b , v ( a ) , a . display . scroller . scrollLeft != b && ( a . display . scroller . scrollLeft = b ) , a . display . scrollbars . setScrollLeft ( b ) ) } function cc ( a , b ) { var c = Rf ( b ) , d = c . x , e = c . y , f = a . display , g = f . scroller ; if ( d && g . scrollWidth > g . clientWidth || e && g . scrollHeight > g . clientHeight ) { if ( e && yf && pf ) a : for ( var h = b . target , i = f . view ; h != g ; h = h . parentNode ) for ( var j = 0 ; j < i . length ; j ++ ) if ( i [ j ] . node == h ) { a . display . currentWheelTarget = h ; break a } if ( d && ! kf && ! sf && null != Qf ) return e && ac ( a , Math . max ( 0 , Math . min ( g . scrollTop + e * Qf , g . scrollHeight - g . clientHeight ) ) ) , bc ( a , Math . max ( 0 , Math . min ( g . scrollLeft + d * Qf , g . scrollWidth - g . clientWidth ) ) ) , ug ( b ) , void ( f . wheelStartX = null ) ; if ( e && null != Qf ) { var k = e * Qf , l = a . doc . scrollTop , m = l + f . wrapper . clientHeight ; k < 0 ? l = Math . max ( 0 , l + k - 50 ) : m = Math . min ( a . doc . height , m + k + 50 ) , D ( a , { top : l , bottom : m } ) } Pf < 20 && ( null == f . wheelStartX ? ( f . wheelStartX = g . scrollLeft , f . wheelStartY = g . scrollTop , f . wheelDX = d , f . wheelDY = e , setTimeout ( function ( ) { if ( null != f . wheelStartX ) { var a = g . scrollLeft - f . wheelStartX , b = g . scrollTop - f . wheelStartY , c = b && f . wheelDY && b / f . wheelDY || a && f . wheelDX && a / f . wheelDX ; f . wheelStartX = f . wheelStartY = null , c && ( Qf = ( Qf * Pf + c ) / ( Pf + 1 ) , ++ Pf ) } } , 200 ) ) : ( f . wheelDX += d , f . wheelDY += e ) ) } } function dc ( a , b , c ) { if ( "string" == typeof b && ( b = dg [ b ] , ! b ) ) return ! 1 ; a . display . input . ensurePolled ( ) ; var d = a . display . shift , e = ! 1 ; try { Z ( a ) && ( a . state . suppressEdits = ! 0 ) , c && ( a . display . shift = ! 1 ) , e = b ( a ) != Cg } finally { a . display . shift = d , a . state . suppressEdits = ! 1 } return e } function ec ( a , b , c ) { for ( var d = 0 ; d < a . state . keyMaps . length ; d ++ ) { var e = fg ( b , a . state . keyMaps [ d ] , c , a ) ; if ( e ) return e } return a . options . extraKeys && fg ( b , a . options . extraKeys , c , a ) || fg ( b , a . options . keyMap , c , a ) } function fc ( a , b , c , d ) { var e = a . state . keySeq ; if ( e ) { if ( gg ( b ) ) return "handled" ; Sf . set ( 50 , function ( ) { a . state . keySeq == e && ( a . state . keySeq = null , a . display . input . reset ( ) ) } ) , b = e + " " + b } var f = ec ( a , b , d ) ; return "multi" == f && ( a . state . keySeq = b ) , "handled" == f && te ( a , "keyHandled" , a , b , c ) , "handled" != f && "multi" != f || ( ug ( c ) , La ( a ) ) , e && ! f && /\'$/ . test ( b ) ? ( ug ( c ) , ! 0 ) : ! ! f } function gc ( a , b ) { var c = hg ( b , ! 0 ) ; return ! ! c && ( b . shiftKey && ! a . state . keySeq ? fc ( a , "Shift-" + c , b , function ( b ) { return dc ( a , b , ! 0 ) } ) || fc ( a , c , b , function ( b ) { if ( "string" == typeof b ? /^go[A-Z]/ . test ( b ) : b . motion ) return dc ( a , b ) } ) : fc ( a , c , b , function ( b ) { return dc ( a , b ) } ) ) } function hc ( a , b , c ) { return fc ( a , "'" + c + "'" , b , function ( b ) { return dc ( a , b , ! 0 ) } ) } function ic ( a ) { var b = this ; if ( b . curOp . focus = Pe ( ) , ! ve ( b , a ) ) { nf && of < 11 && 27 == a . keyCode && ( a . returnValue = ! 1 ) ; var c = a . keyCode ; b . display . shift = 16 == c || a . shiftKey ; var d = gc ( b , a ) ; sf && ( Tf = d ? c : null , ! d && 88 == c && ! Wg && ( yf ? a . metaKey : a . ctrlKey ) && b . replaceSelection ( "" , null , "cut" ) ) , 18 != c || /\bCodeMirror-crosshair\b/ . test ( b . display . lineDiv . className ) || jc ( b ) } } function jc ( a ) { function b ( a ) { 18 != a . keyCode && a . altKey || ( Qg ( c , "CodeMirror-crosshair" ) , yg ( document , "keyup" , b ) , yg ( document , "mouseover" , b ) ) } var c = a . display . lineDiv ; Rg ( c , "CodeMirror-crosshair" ) , xg ( document , "keyup" , b ) , xg ( document , "mouseover" , b ) } function kc ( a ) { 16 == a . keyCode && ( this . doc . sel . shift = ! 1 ) , ve ( this , a ) } function lc ( a ) { var b = this ; if ( ! ( Sb ( b . display , a ) || ve ( b , a ) || a . ctrlKey && ! a . altKey || yf && a . metaKey ) ) { var c = a . keyCode , d = a . charCode ; if ( sf && c == Tf ) return Tf = null , void ug ( a ) ; if ( ! sf || a . which && ! ( a . which < 10 ) || ! gc ( b , a ) ) { var e = String . fromCharCode ( null == d ? c : d ) ; hc ( b , a , e ) || b . display . input . onKeyPress ( a ) } } } function mc ( a ) { a . state . delayingBlurEvent = ! 0 , setTimeout ( function ( ) { a . state . delayingBlurEvent && ( a . state . delayingBlurEvent = ! 1 , oc ( a ) ) } , 100 ) } function nc ( a ) { a . state . delayingBlurEvent && ( a . state . delayingBlurEvent = ! 1 ) , "nocursor" != a . options . readOnly && ( a . state . focused || ( zg ( a , "focus" , a ) , a . state . focused = ! 0 , Rg ( a . display . wrapper , "CodeMirror-focused" ) , a . curOp || a . display . selForContextMenu == a . doc . sel || ( a . display . input . reset ( ) , pf && setTimeout ( function ( ) { a . display . input . reset ( ! 0 ) } , 20 ) ) , a . display . input . receivedFocus ( ) ) , La ( a ) ) } function oc ( a ) { a . state . delayingBlurEvent || ( a . state . focused && ( zg ( a , "blur" , a ) , a . state . focused = ! 1 , Qg ( a . display . wrapper , "CodeMirror-focused" ) ) , clearInterval ( a . display . blinker ) , setTimeout ( function ( ) { a . state . focused || ( a . display . shift = ! 1 ) } , 150 ) ) } function pc ( a , b ) { Sb ( a . display , b ) || qc ( a , b ) || a . display . input . onContextMenu ( b ) } function qc ( a , b ) { return ! ! xe ( a , "gutterContextMenu" ) && Yb ( a , b , "gutterContextMenu" , ! 1 ,
} e . done . push ( c ) , e . generation = ++ e . maxGeneration , e . lastModTime = e . lastSelTime = g , e . lastOp = e . lastSelOp = d , e . lastOrigin = e . lastSelOrigin = b . origin , h || zg ( a , "historyAdded" ) } function ge ( a , b , c , d ) { var e = b . charAt ( 0 ) ; return "*" == e || "+" == e && c . ranges . length == d . ranges . length && c . somethingSelected ( ) == d . somethingSelected ( ) && new Date - a . history . lastSelTime <= ( a . cm ? a . cm . options . historyEventDelay : 500 ) } function he ( a , b , c , d ) { var e = a . history , f = d && d . origin ; c == e . lastSelOp || f && e . lastSelOrigin == f && ( e . lastModTime == e . lastSelTime && e . lastOrigin == f || ge ( a , f , Ce ( e . done ) , b ) ) ? e . done [ e . done . length - 1 ] = b : ie ( b , e . done ) , e . lastSelTime = + new Date , e . lastSelOrigin = f , e . lastSelOp = c , d && d . clearRedo !== ! 1 && de ( e . undone ) } function ie ( a , b ) { var c = Ce ( b ) ; c && c . ranges && c . equals ( a ) || b . push ( a ) } function je ( a , b , c , d ) { var e = b [ "spans_" + a . id ] , f = 0 ; a . iter ( Math . max ( a . first , c ) , Math . min ( a . first + a . size , d ) , function ( c ) { c . markedSpans && ( ( e || ( e = b [ "spans_" + a . id ] = { } ) ) [ f ] = c . markedSpans ) , ++ f } ) } function ke ( a ) { if ( ! a ) return null ; for ( var b , c = 0 ; c < a . length ; ++ c ) a [ c ] . marker . explicitlyCleared ? b || ( b = a . slice ( 0 , c ) ) : b && b . push ( a [ c ] ) ; return b ? b . length ? b : null : a } function le ( a , b ) { var c = b [ "spans_" + a . id ] ; if ( ! c ) return null ; for ( var d = 0 , e = [ ] ; d < b . text . length ; ++ d ) e . push ( ke ( c [ d ] ) ) ; return e } function me ( a , b , c ) { for ( var d = 0 , e = [ ] ; d < a . length ; ++ d ) { var f = a [ d ] ; if ( f . ranges ) e . push ( c ? la . prototype . deepCopy . call ( f ) : f ) ; else { var g = f . changes , h = [ ] ; e . push ( { changes : h } ) ; for ( var i = 0 ; i < g . length ; ++ i ) { var j , k = g [ i ] ; if ( h . push ( { from : k . from , to : k . to , text : k . text } ) , b ) for ( var l in k ) ( j = l . match ( /^spans_(\d+)$/ ) ) && De ( b , Number ( j [ 1 ] ) ) > - 1 && ( Ce ( h ) [ l ] = k [ l ] , delete k [ l ] ) } } } return e } function ne ( a , b , c , d ) { c < a . line ? a . line += d : b < a . line && ( a . line = b , a . ch = 0 ) } function oe ( a , b , c , d ) { for ( var e = 0 ; e < a . length ; ++ e ) { var f = a [ e ] , g = ! 0 ; if ( f . ranges ) { f . copied || ( f = a [ e ] = f . deepCopy ( ) , f . copied = ! 0 ) ; for ( var h = 0 ; h < f . ranges . length ; h ++ ) ne ( f . ranges [ h ] . anchor , b , c , d ) , ne ( f . ranges [ h ] . head , b , c , d ) } else { for ( var h = 0 ; h < f . changes . length ; ++ h ) { var i = f . changes [ h ] ; if ( c < i . from . line ) i . from = Ff ( i . from . line + d , i . from . ch ) , i . to = Ff ( i . to . line + d , i . to . ch ) ; else if ( b <= i . to . line ) { g = ! 1 ; break } } g || ( a . splice ( 0 , e + 1 ) , e = 0 ) } } } function pe ( a , b ) { var c = b . from . line , d = b . to . line , e = b . text . length - ( d - c ) - 1 ; oe ( a . done , c , d , e ) , oe ( a . undone , c , d , e ) } function qe ( a ) { return null != a . defaultPrevented ? a . defaultPrevented : 0 == a . returnValue } function re ( a ) { return a . target || a . srcElement } function se ( a ) { var b = a . which ; return null == b && ( 1 & a . button ? b = 1 : 2 & a . button ? b = 3 : 4 & a . button && ( b = 2 ) ) , yf && a . ctrlKey && 1 == b && ( b = 3 ) , b } function te ( a , b ) { function c ( a ) { return function ( ) { a . apply ( null , f ) } } var d = a . _handlers && a . _handlers [ b ] ; if ( d ) { var e , f = Array . prototype . slice . call ( arguments , 2 ) ; Mf ? e = Mf . delayedCallbacks : Ag ? e = Ag : ( e = Ag = [ ] , setTimeout ( ue , 0 ) ) ; for ( var g = 0 ; g < d . length ; ++ g ) e . push ( c ( d [ g ] ) ) } } function ue ( ) { var a = Ag ; Ag = null ; for ( var b = 0 ; b < a . length ; ++ b ) a [ b ] ( ) } function ve ( a , b , c ) { return "string" == typeof b && ( b = { type : b , preventDefault : function ( ) { this . defaultPrevented = ! 0 } } ) , zg ( a , c || b . type , a , b ) , qe ( b ) || b . codemirrorIgnore } function we ( a ) { var b = a . _handlers && a . _handlers . cursorActivity ; if ( b ) for ( var c = a . curOp . cursorActivityHandlers || ( a . curOp . cursorActivityHandlers = [ ] ) , d = 0 ; d < b . length ; ++ d ) De ( c , b [ d ] ) == - 1 && c . push ( b [ d ] ) } function xe ( a , b ) { var c = a . _handlers && a . _handlers [ b ] ; return c && c . length > 0 } function ye ( a ) { a . prototype . on = function ( a , b ) { xg ( this , a , b ) } , a . prototype . off = function ( a , b ) { yg ( this , a , b ) } } function ze ( ) { this . id = null } function Ae ( a , b , c ) { for ( var d = 0 , e = 0 ; ; ) { var f = a . indexOf ( "\t" , d ) ; f == - 1 && ( f = a . length ) ; var g = f - d ; if ( f == a . length || e + g >= b ) return d + Math . min ( g , b - e ) ; if ( e += f - d , e += c - e % c , d = f + 1 , e >= b ) return d } } function Be ( a ) { for ( ; Hg . length <= a ; ) Hg . push ( Ce ( Hg ) + " " ) ; return Hg [ a ] } function Ce ( a ) { return a [ a . length - 1 ] } function De ( a , b ) { for ( var c = 0 ; c < a . length ; ++ c ) if ( a [ c ] == b ) return c ; return - 1 } function Ee ( a , b ) { for ( var c = [ ] , d = 0 ; d < a . length ; d ++ ) c [ d ] = b ( a [ d ] , d ) ; return c } function Fe ( ) { } function Ge ( a , b ) { var c ; return Object . create ? c = Object . create ( a ) : ( Fe . prototype = a , c = new Fe ) , b && He ( b , c ) , c } function He ( a , b , c ) { b || ( b = { } ) ; for ( var d in a ) ! a . hasOwnProperty ( d ) || c === ! 1 && b . hasOwnProperty ( d ) || ( b [ d ] = a [ d ] ) ; return b } function Ie ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) ; return function ( ) { return a . apply ( null , b ) } } function Je ( a , b ) { return b ? ! ! ( b . source . indexOf ( "\\w" ) > - 1 && Lg ( a ) ) || b . te
} , getWrapperElement : function ( ) { return this . display . wrapper } , getScrollerElement : function ( ) { return this . display . scroller } , getGutterElement : function ( ) { return this . display . gutters } } , ye ( a ) ; var Vf = a . defaults = { } , Wf = a . optionHandlers = { } , Xf = a . Init = { toString : function ( ) { return "CodeMirror.Init" } } ; Pc ( "value" , "" , function ( a , b ) { a . setValue ( b ) } , ! 0 ) , Pc ( "mode" , null , function ( a , b ) { a . doc . modeOption = b , c ( a ) } , ! 0 ) , Pc ( "indentUnit" , 2 , c , ! 0 ) , Pc ( "indentWithTabs" , ! 1 ) , Pc ( "smartIndent" , ! 0 ) , Pc ( "tabSize" , 4 , function ( a ) { d ( a ) , gb ( a ) , Ib ( a ) } , ! 0 ) , Pc ( "specialChars" , /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g , function ( b , c , d ) { b . state . specialChars = new RegExp ( c . source + ( c . test ( "\t" ) ? "" : "|\t" ) , "g" ) , d != a . Init && b . refresh ( ) } ) , Pc ( "specialCharPlaceholder" , Jd , function ( a ) { a . refresh ( ) } , ! 0 ) , Pc ( "electricChars" , ! 0 ) , Pc ( "inputStyle" , xf ? "contenteditable" : "textarea" , function ( ) { throw new Error ( "inputStyle can not (yet) be changed in a running editor" ) } , ! 0 ) , Pc ( "rtlMoveVisually" , ! zf ) , Pc ( "wholeLineUpdateBefore" , ! 0 ) , Pc ( "theme" , "default" , function ( a ) { h ( a ) , i ( a ) } , ! 0 ) , Pc ( "keyMap" , "default" , function ( b , c , d ) { var e = Rc ( c ) , f = d != a . Init && Rc ( d ) ; f && f . detach && f . detach ( b , e ) , e . attach && e . attach ( b , f || null ) } ) , Pc ( "extraKeys" , null ) , Pc ( "lineWrapping" , ! 1 , e , ! 0 ) , Pc ( "gutters" , [ ] , function ( a ) { n ( a . options ) , i ( a ) } , ! 0 ) , Pc ( "fixedGutter" , ! 0 , function ( a , b ) { a . display . gutters . style . left = b ? y ( a . display ) + "px" : "0" , a . refresh ( ) } , ! 0 ) , Pc ( "coverGutterNextToScrollbar" , ! 1 , function ( a ) { s ( a ) } , ! 0 ) , Pc ( "scrollbarStyle" , "native" , function ( a ) { r ( a ) , s ( a ) , a . display . scrollbars . setScrollTop ( a . doc . scrollTop ) , a . display . scrollbars . setScrollLeft ( a . doc . scrollLeft ) } , ! 0 ) , Pc ( "lineNumbers" , ! 1 , function ( a ) { n ( a . options ) , i ( a ) } , ! 0 ) , Pc ( "firstLineNumber" , 1 , i , ! 0 ) , Pc ( "lineNumberFormatter" , function ( a ) { return a } , i , ! 0 ) , Pc ( "showCursorWhenSelecting" , ! 1 , Ha , ! 0 ) , Pc ( "resetSelectionOnContextMenu" , ! 0 ) , Pc ( "lineWiseCopyCut" , ! 0 ) , Pc ( "readOnly" , ! 1 , function ( a , b ) { "nocursor" == b ? ( oc ( a ) , a . display . input . blur ( ) , a . display . disabled = ! 0 ) : ( a . display . disabled = ! 1 , b || a . display . input . reset ( ) ) } ) , Pc ( "disableInput" , ! 1 , function ( a , b ) { b || a . display . input . reset ( ) } , ! 0 ) , Pc ( "dragDrop" , ! 0 , Qb ) , Pc ( "cursorBlinkRate" , 530 ) , Pc ( "cursorScrollMargin" , 0 ) , Pc ( "cursorHeight" , 1 , Ha , ! 0 ) , Pc ( "singleCursorHeightPerLine" , ! 0 , Ha , ! 0 ) , Pc ( "workTime" , 100 ) , Pc ( "workDelay" , 100 ) , Pc ( "flattenSpans" , ! 0 , d , ! 0 ) , Pc ( "addModeClass" , ! 1 , d , ! 0 ) , Pc ( "pollInterval" , 100 ) , Pc ( "undoDepth" , 200 , function ( a , b ) { a . doc . history . undoDepth = b } ) , Pc ( "historyEventDelay" , 1250 ) , Pc ( "viewportMargin" , 10 , function ( a ) { a . refresh ( ) } , ! 0 ) , Pc ( "maxHighlightLength" , 1e4 , d , ! 0 ) , Pc ( "moveInputWithCursor" , ! 0 , function ( a , b ) { b || a . display . input . resetPosition ( ) } ) , Pc ( "tabindex" , null , function ( a , b ) { a . display . input . getField ( ) . tabIndex = b || "" } ) , Pc ( "autofocus" , null ) ; var Yf = a . modes = { } , Zf = a . mimeModes = { } ; a . defineMode = function ( b , c ) { a . defaults . mode || "null" == b || ( a . defaults . mode = b ) , arguments . length > 2 && ( c . dependencies = Array . prototype . slice . call ( arguments , 2 ) ) , Yf [ b ] = c } , a . defineMIME = function ( a , b ) { Zf [ a ] = b } , a . resolveMode = function ( b ) { if ( "string" == typeof b && Zf . hasOwnProperty ( b ) ) b = Zf [ b ] ; else if ( b && "string" == typeof b . name && Zf . hasOwnProperty ( b . name ) ) { var c = Zf [ b . name ] ; "string" == typeof c && ( c = { name : c } ) , b = Ge ( c , b ) , b . name = c . name } else if ( "string" == typeof b && /^[\w\-]+\/[\w\-]+\+xml$/ . test ( b ) ) return a . resolveMode ( "application/xml" ) ; return "string" == typeof b ? { name : b } : b || { name : "null" } } , a . getMode = function ( b , c ) { var c = a . resolveMode ( c ) , d = Yf [ c . name ] ; if ( ! d ) return a . getMode ( b , "text/plain" ) ; var e = d ( b , c ) ; if ( $f . hasOwnProperty ( c . name ) ) { var f = $f [ c . name ] ; for ( var g in f ) f . hasOwnProperty ( g ) && ( e . hasOwnProperty ( g ) && ( e [ "_" + g ] = e [ g ] ) , e [ g ] = f [ g ] ) } if ( e . name = c . name , c . helperType && ( e . helperType = c . helperType ) , c . modeProps ) for ( var g in c . modeProps ) e [ g ] = c . modeProps [ g ] ; return e } , a . defineMode ( "null" , function ( ) { return { token : function ( a ) { a . skipToEnd ( ) } } } ) , a . defineMIME ( "text/plain" , "null" ) ; var $f = a . modeExtensions = { } ; a . extendMode = function ( a , b ) { var c = $f . hasOwnProperty ( a ) ? $f [ a ] : $f [ a ] = { } ; He ( b , c ) } , a . defineExtension = function ( b , c ) { a . prototype [ b ] = c } , a . defineDocExtension = function ( a , b ) { rg . prototype [ a ] = b } , a . defineOption = Pc ; var _f = [ ] ; a . defineInitHook = function ( a ) { _f . push ( a ) } ; var ag = a . helpers = { } ; a . registerHelper = function ( b , c , d ) { ag . hasOwnProperty ( b ) || ( ag [ b ] = a [ b ] = { _global : [ ] } )
var c = a . className ; Qe ( b ) . test ( c ) || ( a . className += ( c ? " " : "" ) + b ) } , Sg = ! 1 , Tg = function ( ) { if ( nf && of < 9 ) return ! 1 ; var a = Me ( "div" ) ; return "draggable" in a || "dragDrop" in a } ( ) , Ug = a . splitLines = 3 != "\n\nb" . split ( /\n/ ) . length ? function ( a ) { for ( var b = 0 , c = [ ] , d = a . length ; b <= d ; ) { var e = a . indexOf ( "\n" , b ) ; e == - 1 && ( e = a . length ) ; var f = a . slice ( b , "\r" == a . charAt ( e - 1 ) ? e - 1 : e ) , g = f . indexOf ( "\r" ) ; g != - 1 ? ( c . push ( f . slice ( 0 , g ) ) , b += g + 1 ) : ( c . push ( f ) , b = e + 1 ) } return c } : function ( a ) { return a . split ( /\r\n?|\n/ ) } , Vg = window . getSelection ? function ( a ) { try { return a . selectionStart != a . selectionEnd } catch ( b ) { return ! 1 } } : function ( a ) { try { var b = a . ownerDocument . selection . createRange ( ) } catch ( c ) { } return ! ( ! b || b . parentElement ( ) != a ) && 0 != b . compareEndPoints ( "StartToEnd" , b ) } , Wg = function ( ) { var a = Me ( "div" ) ; return "oncopy" in a || ( a . setAttribute ( "oncopy" , "return;" ) , "function" == typeof a . oncopy ) } ( ) , Xg = null , Yg = { 3 : "Enter" , 8 : "Backspace" , 9 : "Tab" , 13 : "Enter" , 16 : "Shift" , 17 : "Ctrl" , 18 : "Alt" , 19 : "Pause" , 20 : "CapsLock" , 27 : "Esc" , 32 : "Space" , 33 : "PageUp" , 34 : "PageDown" , 35 : "End" , 36 : "Home" , 37 : "Left" , 38 : "Up" , 39 : "Right" , 40 : "Down" , 44 : "PrintScrn" , 45 : "Insert" , 46 : "Delete" , 59 : ";" , 61 : "=" , 91 : "Mod" , 92 : "Mod" , 93 : "Mod" , 107 : "=" , 109 : "-" , 127 : "Delete" , 173 : "-" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'" , 63232 : "Up" , 63233 : "Down" , 63234 : "Left" , 63235 : "Right" , 63272 : "Delete" , 63273 : "Home" , 63275 : "End" , 63276 : "PageUp" , 63277 : "PageDown" , 63302 : "Insert" } ; a . keyNames = Yg , function ( ) { for ( var a = 0 ; a < 10 ; a ++ ) Yg [ a + 48 ] = Yg [ a + 96 ] = String ( a ) ; for ( var a = 65 ; a <= 90 ; a ++ ) Yg [ a ] = String . fromCharCode ( a ) ; for ( var a = 1 ; a <= 12 ; a ++ ) Yg [ a + 111 ] = Yg [ a + 63235 ] = "F" + a } ( ) ; var Zg , $g = function ( ) { function a ( a ) { return a <= 247 ? c . charAt ( a ) : 1424 <= a && a <= 1524 ? "R" : 1536 <= a && a <= 1773 ? d . charAt ( a - 1536 ) : 1774 <= a && a <= 2220 ? "r" : 8192 <= a && a <= 8203 ? "w" : 8204 == a ? "b" : "L" } function b ( a , b , c ) { this . level = a , this . from = b , this . to = c } var c = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN" , d = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm" , e = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/ , f = /[stwN]/ , g = /[LRr]/ , h = /[Lb1n]/ , i = /[1n]/ , j = "L" ; return function ( c ) { if ( ! e . test ( c ) ) return ! 1 ; for ( var d , k = c . length , l = [ ] , m = 0 ; m < k ; ++ m ) l . push ( d = a ( c . charCodeAt ( m ) ) ) ; for ( var m = 0 , n = j ; m < k ; ++ m ) { var d = l [ m ] ; "m" == d ? l [ m ] = n : n = d } for ( var m = 0 , o = j ; m < k ; ++ m ) { var d = l [ m ] ; "1" == d && "r" == o ? l [ m ] = "n" : g . test ( d ) && ( o = d , "r" == d && ( l [ m ] = "R" ) ) } for ( var m = 1 , n = l [ 0 ] ; m < k - 1 ; ++ m ) { var d = l [ m ] ; "+" == d && "1" == n && "1" == l [ m + 1 ] ? l [ m ] = "1" : "," != d || n != l [ m + 1 ] || "1" != n && "n" != n || ( l [ m ] = n ) , n = d } for ( var m = 0 ; m < k ; ++ m ) { var d = l [ m ] ; if ( "," == d ) l [ m ] = "N" ; else if ( "%" == d ) { for ( var p = m + 1 ; p < k && "%" == l [ p ] ; ++ p ) ; for ( var q = m && "!" == l [ m - 1 ] || p < k && "1" == l [ p ] ? "1" : "N" , r = m ; r < p ; ++ r ) l [ r ] = q ; m = p - 1 } } for ( var m = 0 , o = j ; m < k ; ++ m ) { var d = l [ m ] ; "L" == o && "1" == d ? l [ m ] = "L" : g . test ( d ) && ( o = d ) } for ( var m = 0 ; m < k ; ++ m ) if ( f . test ( l [ m ] ) ) { for ( var p = m + 1 ; p < k && f . test ( l [ p ] ) ; ++ p ) ; for ( var s = "L" == ( m ? l [ m - 1 ] : j ) , t = "L" == ( p < k ? l [ p ] : j ) , q = s || t ? "L" : "R" , r = m ; r < p ; ++ r ) l [ r ] = q ; m = p - 1 } for ( var u , v = [ ] , m = 0 ; m < k ; ) if ( h . test ( l [ m ] ) ) { var w = m ; for ( ++ m ; m < k && h . test ( l [ m ] ) ; ++ m ) ; v . push ( new b ( 0 , w , m ) ) } else { var x = m , y = v . length ; for ( ++ m ; m < k && "L" != l [ m ] ; ++ m ) ; for ( var r = x ; r < m ; ) if ( i . test ( l [ r ] ) ) { x < r && v . splice ( y , 0 , new b ( 1 , x , r ) ) ; var z = r ; for ( ++ r ; r < m && i . test ( l [ r ] ) ; ++ r ) ; v . splice ( y , 0 , new b ( 2 , z , r ) ) , x = r } else ++ r ; x < m && v . splice ( y , 0 , new b ( 1 , x , m ) ) } return 1 == v [ 0 ] . level && ( u = c . match ( /^\s+/ ) ) && ( v [ 0 ] . from = u [ 0 ] . length , v . unshift ( new b ( 0 , 0 , u [ 0 ] . length ) ) ) , 1 == Ce ( v ) . level && ( u = c . match ( /\s+$/ ) ) && ( Ce ( v ) . to -= u [ 0 ] . length , v . push ( new b ( 0 , k - u [ 0 ] . length , k ) ) ) , 2 == v [ 0 ] . level && v . unshift ( new b ( 1 , v [ 0 ] . to , v [ 0 ] . to ) ) , v [ 0 ] . level != Ce ( v ) . level && v . push ( new b ( v [ 0 ] . level , k , k ) ) , v } } ( ) ; return a . version = "5.4.1" , a } ) , function ( a ) { a ( CodeMirror ) } ( function ( a ) { function b ( a , b ) { for ( var c = 0 , d = a . length ; c < d ; ++ c ) b ( a [ c ] ) } function c ( a , b ) { if ( ! Array . prototype . indexOf ) { for ( var c = a . length ; c -- ; ) if ( a [ c ] === b ) return ! 0 ; return ! 1 } return a . indexOf ( b ) != - 1 } function d ( b , c , d , e ) { var f = b . ge
} } , b . el ) ] , element : this } } , mounted : function ( ) { var a = this , b = this . options ; this . _populate ( ) , this . element . scroll ( function ( c ) { b . scrollTop = a . element . scrollTop ( ) , a . _calculateBlocksToRender ( ) } ) , BI . ResizeDetector . addResizeListener ( this , function ( ) { a . _calculateBlocksToRender ( ) } ) } , _renderMoreIf : function ( ) { for ( var a , b = this , c = this . options , d = this . element . height ( ) , e = c . scrollTop + d + c . overscanHeight , f = this . cache [ this . renderedIndex ] && this . cache [ this . renderedIndex ] . index + c . blockSize || 0 , g = this . renderedIndex + 1 , h = function ( ) { return b . container . element . height ( ) } ; ( a = h ( ) ) < e && f < c . items . length ; ) { var i = c . items . slice ( f , f + c . blockSize ) ; this . container . addItems ( i ) ; var j = h ( ) - a ; this . cache [ g ] = { index : f , scrollTop : a , height : j } , this . renderedIndex = g , g ++ , f += c . blockSize } } , _calculateBlocksToRender : function ( ) { this . options ; this . _renderMoreIf ( ) } , _populate : function ( a ) { var b = this . options ; a && this . options . items !== a && ( this . options . items = a ) , this . _calculateBlocksToRender ( ) , this . element . scrollTop ( b . scrollTop ) } , restore : function ( ) { this . renderedIndex = - 1 , this . container . empty ( ) , this . cache = { } } , populate : function ( a ) { a && this . options . items !== a && this . restore ( ) , this . _populate ( a ) } , destroyed : function ( ) { this . restore ( ) } } ) , BI . shortcut ( "bi.list_view" , BI . ListView ) , BI . VirtualList = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-virtual-list" , overscanHeight : 100 , blockSize : 10 , scrollTop : 0 , items : [ ] } } , init : function ( ) { this . renderedIndex = - 1 , this . cache = { } } , render : function ( ) { var a = this ; this . options ; return { type : "bi.vertical" , items : [ { type : "bi.layout" , ref : function ( ) { a . topBlank = this } } , { type : "bi.vertical" , scrolly : ! 1 , ref : function ( ) { a . container = this } } , { type : "bi.layout" , ref : function ( ) { a . bottomBlank = this } } ] , element : this } } , mounted : function ( ) { var a = this , b = this . options ; this . _populate ( ) , this . element . scroll ( function ( c ) { b . scrollTop = a . element . scrollTop ( ) , a . _calculateBlocksToRender ( ) } ) , BI . ResizeDetector . addResizeListener ( this , function ( ) { a . _calculateBlocksToRender ( ) } ) } , _renderMoreIf : function ( ) { for ( var a , b = this , c = this . options , d = this . element . height ( ) , e = c . scrollTop + d + c . overscanHeight , f = this . cache [ this . renderedIndex ] && this . cache [ this . renderedIndex ] . index + c . blockSize || 0 , g = this . renderedIndex + 1 , h = function ( ) { return b . container . element . height ( ) + b . topBlank . element . height ( ) + b . bottomBlank . element . height ( ) } ; ( a = h ( ) ) < e && f < c . items . length ; ) { var i = c . items . slice ( f , f + c . blockSize ) ; this . container . addItems ( i ) ; var j = h ( ) - a ; this . cache [ g ] = { index : f , scrollTop : a , height : j } , this . tree . set ( g , j ) , this . renderedIndex = g , g ++ , f += c . blockSize } } , _calculateBlocksToRender : function ( ) { var a = this . options ; this . _renderMoreIf ( ) ; for ( var b = this . element . height ( ) , c = a . scrollTop - a . overscanHeight , d = a . scrollTop + b + a . overscanHeight , e = this . tree . greatestLowerBound ( c ) , f = this . tree . leastUpperBound ( d ) , g = [ ] , h = 0 ; h < e ; h ++ ) { var i = this . cache [ h ] . index ; if ( ! this . cache [ h ] . destroyed ) { for ( var j = i ; j < i + a . blockSize && j < a . items . length ; j ++ ) g . push ( this . container . _children [ j ] ) , this . container . _children [ j ] = null ; this . cache [ h ] . destroyed = ! 0 } } for ( var h = f + 1 ; h <= this . renderedIndex ; h ++ ) { var i = this . cache [ h ] . index ; if ( ! this . cache [ h ] . destroyed ) { for ( var j = i ; j < i + a . blockSize && j < a . items . length ; j ++ ) g . push ( this . container . _children [ j ] ) , this . container . _children [ j ] = null ; this . cache [ h ] . destroyed = ! 0 } } for ( var k = document . createDocumentFragment ( ) , l = document . createDocumentFragment ( ) , m = k , h = e < 0 ? 0 : e ; h <= f && h <= this . renderedIndex ; h ++ ) { var i = this . cache [ h ] . index ; if ( this . cache [ h ] . destroyed || ( m = l ) , this . cache [ h ] . destroyed === ! 0 ) { for ( var j = i ; j < i + a . blockSize && j < a . items . length ; j ++ ) { var n = this . container . _addElement ( j , BI . extend ( { root : ! 0 } , BI . stripEL ( a . items [ j ] ) ) ) ; m . appendChild ( n . element [ 0 ] ) } this . cache [ h ] . destroyed = ! 1 } } this . container . element . prepend ( k ) , this . container . element . append ( l ) , this . topBlank . setHeight ( this . cache [ e < 0 ? 0 : e ] . scrollTop ) ; var o = this . cache [ Math . min ( f , this . renderedIndex ) ] ; this . bottomBlank . setHeight ( this . tree . sumTo ( this . renderedIndex ) - o . scrollTop - o . height ) , BI . each ( g , function ( a , b ) { b && b . _destroy ( ) } ) } , _populate : function ( a ) { var b = this . options ; a && this . options . items !== a && ( this . options . items = a ) , this . tree = BI . PrefixIntervalTree . empty ( Math . ceil ( b . items . length / b . blockSize ) ) , this . _calculateBlocksToRender ( ) , this . element . scrollTop ( b . scrollTop ) } , _clearC
var a = BI . IconTextNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-icon-text-node" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextNode . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , hgap : a . textHgap , vgap : a . textVgap , lgap : a . textLgap , rgap : a . textRgap , text : a . text , value : a . value , keyword : a . keyword , height : a . height } ) , this . icon = BI . createWidget ( { type : "bi.center_adapt" , width : b . commonWidth , height : a . height , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , 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 . IconTextNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextNode . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } } ) , BI . IconTextNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_node" , BI . IconTextNode ) , BI . TextIconNode = BI . inherit ( BI . NodeButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . TextIconNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-text-icon-node" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextIconNode . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , hgap : a . textHgap , vgap : a . textVgap , lgap : a . textLgap , rgap : a . textRgap , text : a . text , value : a . value , keyword : a . keyword , height : a . height } ) , this . icon = BI . createWidget ( { type : "bi.center_adapt" , width : b . commonWidth , height : a . height , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , this . text , this . icon ) } ) ) ) ) } , doClick : function ( ) { BI . TextIconNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextIconNode . 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 ) } } ) , BI . TextIconNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_icon_node" , BI . TextIconNode ) , BI . TextNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . TextNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-text-node" , textAlign : "left" , whiteSpace : "nowrap" , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextNode . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textAlign : a . textAlign , whiteSpace : a . whiteSpace , textHeight : "nowrap" == a . whiteSpace ? a . height : a . textHeight , height : a . height , hgap : a . textHgap , vgap : a . textVgap , lgap : a . textLgap , rgap : a . textRgap , text : a . text , value : a . value , keyword : a . keyword , py : a . py } ) } , doClick : function ( ) { BI . TextNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextNode . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark .
this . _checkValidationOnValueChange ( ) , this . _isEditing = ! 0 , "" == this . getValue ( ) && ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EMPTY , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _EMPTY ) ) , this . fireEvent ( BI . Input . EVENT _FOCUS ) } , _blur : function ( ) { function a ( ) { b . isValid ( ) || b . options . quitChecker . apply ( b , [ BI . trim ( b . getValue ( ) ) ] ) === ! 1 || ( b . element . val ( b . _lastValidValue ? b . _lastValidValue : "" ) , b . _checkValidationOnValueChange ( ) , b . _defaultState ( ) ) , b . element . removeClass ( "bi-input-focus" ) , b . _isEditing = ! 1 , b . _start = ! 1 , b . isValid ( ) && ( b . _lastValidValue = b . getValue ( ) , b . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CONFIRM , b . getValue ( ) , b ) , b . fireEvent ( BI . Input . EVENT _CONFIRM ) ) , b . fireEvent ( BI . Input . EVENT _BLUR ) } var b = this ; b . _keydown _ === ! 0 ? BI . delay ( a , 300 ) : a ( ) } , _click : function ( ) { this . _isEditing !== ! 0 && ( this . _focus ( ) , this . selectAll ( ) , this . fireEvent ( BI . Input . EVENT _CLICK ) ) } , onClick : function ( ) { this . _click ( ) } , onKeyDown : function ( a , b ) { this . isValid ( ) && BI . trim ( this . _lastValidValue ) === BI . trim ( this . getValue ( ) ) || this . _checkValidationOnValueChange ( ) , this . isValid ( ) && "" !== BI . trim ( this . getValue ( ) ) && ( ( BI . trim ( this . getValue ( ) ) === this . _lastValue || this . _start && null != this . _lastValue && "" !== this . _lastValue ) && ( this . _pause !== ! 0 || /(\s|\u00A0)$/ . test ( this . getValue ( ) ) ) || ( this . _start = ! 0 , this . _pause = ! 1 , this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . STARTEDIT , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _START ) ) ) , b === ! 0 && 86 === a ? this . _valueChange ( ) : ( a == BI . KeyCode . ENTER && ( this . isValid ( ) || this . options . quitChecker . apply ( this , [ BI . trim ( this . getValue ( ) ) ] ) !== ! 1 ? ( this . blur ( ) , this . fireEvent ( BI . Input . EVENT _ENTER ) ) : this . fireEvent ( BI . Input . EVENT _RESTRICT ) ) , a == BI . KeyCode . SPACE && this . fireEvent ( BI . Input . EVENT _SPACE ) , a == BI . KeyCode . BACKSPACE && "" == this . _lastValue && this . fireEvent ( BI . Input . EVENT _REMOVE ) , a != BI . KeyCode . BACKSPACE && a != BI . KeyCode . DELETE || this . fireEvent ( BI . Input . EVENT _BACKSPACE ) ) , this . fireEvent ( BI . Input . EVENT _KEY _DOWN ) , BI . isEndWithBlank ( this . getValue ( ) ) ? ( this . _pause = ! 0 , this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . PAUSE , "" , this ) , this . fireEvent ( BI . Input . EVENT _PAUSE ) , this . _defaultState ( ) ) : a !== BI . KeyCode . BACKSPACE && a !== BI . KeyCode . DELETE || "" !== BI . trim ( this . getValue ( ) ) || null === this . _lastValue || "" === BI . trim ( this . _lastValue ) ? this . _valueChange ( ) : ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . STOPEDIT , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _STOP ) , this . _valueChange ( ) ) } , _defaultState : function ( ) { "" == this . getValue ( ) && ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EMPTY , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _EMPTY ) ) , this . _lastValue = this . getValue ( ) , this . _lastSubmitValue = null } , _valueChange : function ( ) { this . isValid ( ) && BI . trim ( this . getValue ( ) ) !== this . _lastSubmitValue && ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CHANGE , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _CHANGE ) , this . _lastSubmitValue = BI . trim ( this . getValue ( ) ) ) , "" == this . getValue ( ) && ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EMPTY , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _EMPTY ) ) , this . _lastValue = this . getValue ( ) } , _checkValidationOnValueChange : function ( ) { var a = this . options , b = this . getValue ( ) ; this . setValid ( a . allowBlank === ! 0 && "" == BI . trim ( b ) || BI . isNotEmptyString ( BI . trim ( b ) ) && ( b === this . _lastValidValue || a . validationChecker . apply ( this , [ BI . trim ( b ) ] ) !== ! 1 ) ) } , focus : function ( ) { if ( ! this . element . is ( ":visible" ) ) throw new Error ( "input输入框在不可见下不能focus" ) ; ! this . _isEditing == ! 0 && ( this . element . focus ( ) , this . _focus ( ) , this . selectAll ( ) ) } , blur : function ( ) { if ( ! this . element . is ( ":visible" ) ) throw new Error ( "input输入框在不可见下不能blur" ) ; this . _isEditing === ! 0 && ( this . element . blur ( ) , this . _blurDebounce ( ) ) } , selectAll : function ( ) { if ( ! this . element . is ( ":visible" ) ) throw new Error ( "input输入框在不可见下不能select" ) ; this . element . select ( ) , this . _isEditing = ! 0 } , setValue : function ( a ) { this . element . val ( a ) , BI . nextTick ( BI . bind ( function ( ) { this . _checkValidationOnValueChange ( ) , this . _defaultState ( ) , this . isValid ( ) && ( this . _lastValidValue = this . _lastSubmitValue = this . getValue ( ) ) } , this ) ) } , getValue : function ( ) { return this . element . val ( ) || "" } , isEditing : function ( ) { return this . _isEditing
} function i ( a , b , c , d , e , f , g , i , j ) { null == j && ( j = 1 ) , j = j > 1 ? 1 : j < 0 ? 0 : j ; for ( var k = j / 2 , l = 12 , m = [ - . 1252 , . 1252 , - . 3678 , . 3678 , - . 5873 , . 5873 , - . 7699 , . 7699 , - . 9041 , . 9041 , - . 9816 , . 9816 ] , n = [ . 2491 , . 2491 , . 2335 , . 2335 , . 2032 , . 2032 , . 1601 , . 1601 , . 1069 , . 1069 , . 0472 , . 0472 ] , o = 0 , p = 0 ; p < l ; p ++ ) { var q = k * m [ p ] + k , r = h ( q , a , c , e , g ) , s = h ( q , b , d , f , i ) , t = r * r + s * s ; o += n [ p ] * M . sqrt ( t ) } return k * o } function j ( a , b , c , d , e , f , g , h , j ) { if ( ! ( j < 0 || i ( a , b , c , d , e , f , g , h ) < j ) ) { var k , l = 1 , m = l / 2 , n = l - m , o = . 01 ; for ( k = i ( a , b , c , d , e , f , g , h , n ) ; P ( k - j ) > o ; ) m /= 2 , n += ( k < j ? 1 : - 1 ) * m , k = i ( a , b , c , d , e , f , g , h , n ) ; return n } } function k ( a , b , c , d , e , f , g , h ) { if ( ! ( N ( a , c ) < O ( e , g ) || O ( a , c ) > N ( e , g ) || N ( b , d ) < O ( f , h ) || O ( b , d ) > N ( f , h ) ) ) { var i = ( a * d - b * c ) * ( e - g ) - ( a - c ) * ( e * h - f * g ) , j = ( a * d - b * c ) * ( f - h ) - ( b - d ) * ( e * h - f * g ) , k = ( a - c ) * ( f - h ) - ( b - d ) * ( e - g ) ; if ( k ) { var l = i / k , m = j / k , n = + l . toFixed ( 2 ) , o = + m . toFixed ( 2 ) ; if ( ! ( n < + O ( a , c ) . toFixed ( 2 ) || n > + N ( a , c ) . toFixed ( 2 ) || n < + O ( e , g ) . toFixed ( 2 ) || n > + N ( e , g ) . toFixed ( 2 ) || o < + O ( b , d ) . toFixed ( 2 ) || o > + N ( b , d ) . toFixed ( 2 ) || o < + O ( f , h ) . toFixed ( 2 ) || o > + N ( f , h ) . toFixed ( 2 ) ) ) return { x : l , y : m } } } } function l ( a , c , d ) { var e = b . bezierBBox ( a ) , f = b . bezierBBox ( c ) ; if ( ! b . isBBoxIntersect ( e , f ) ) return d ? 0 : [ ] ; for ( var g = i . apply ( 0 , a ) , h = i . apply ( 0 , c ) , j = N ( ~ ~ ( g / 5 ) , 1 ) , l = N ( ~ ~ ( h / 5 ) , 1 ) , m = [ ] , n = [ ] , o = { } , p = d ? 0 : [ ] , q = 0 ; q < j + 1 ; q ++ ) { var r = b . findDotsAtSegment . apply ( b , a . concat ( q / j ) ) ; m . push ( { x : r . x , y : r . y , t : q / j } ) } for ( q = 0 ; q < l + 1 ; q ++ ) r = b . findDotsAtSegment . apply ( b , c . concat ( q / l ) ) , n . push ( { x : r . x , y : r . y , t : q / l } ) ; for ( q = 0 ; q < j ; q ++ ) for ( var s = 0 ; s < l ; s ++ ) { var t = m [ q ] , u = m [ q + 1 ] , v = n [ s ] , w = n [ s + 1 ] , x = P ( u . x - t . x ) < . 001 ? "y" : "x" , y = P ( w . x - v . x ) < . 001 ? "y" : "x" , z = k ( t . x , t . y , u . x , u . y , v . x , v . y , w . x , w . y ) ; if ( z ) { if ( o [ z . x . toFixed ( 4 ) ] == z . y . toFixed ( 4 ) ) continue ; o [ z . x . toFixed ( 4 ) ] = z . y . toFixed ( 4 ) ; var A = t . t + P ( ( z [ x ] - t [ x ] ) / ( u [ x ] - t [ x ] ) ) * ( u . t - t . t ) , B = v . t + P ( ( z [ y ] - v [ y ] ) / ( w [ y ] - v [ y ] ) ) * ( w . t - v . t ) ; A >= 0 && A <= 1.001 && B >= 0 && B <= 1.001 && ( d ? p ++ : p . push ( { x : z . x , y : z . y , t1 : O ( A , 1 ) , t2 : O ( B , 1 ) } ) ) } } return p } function m ( a , c , d ) { a = b . _path2curve ( a ) , c = b . _path2curve ( c ) ; for ( var e , f , g , h , i , j , k , m , n , o , p = d ? 0 : [ ] , q = 0 , r = a . length ; q < r ; q ++ ) { var s = a [ q ] ; if ( "M" == s [ 0 ] ) e = i = s [ 1 ] , f = j = s [ 2 ] ; else { "C" == s [ 0 ] ? ( n = [ e , f ] . concat ( s . slice ( 1 ) ) , e = n [ 6 ] , f = n [ 7 ] ) : ( n = [ e , f , e , f , i , j , i , j ] , e = i , f = j ) ; for ( var t = 0 , u = c . length ; t < u ; t ++ ) { var v = c [ t ] ; if ( "M" == v [ 0 ] ) g = k = v [ 1 ] , h = m = v [ 2 ] ; else { "C" == v [ 0 ] ? ( o = [ g , h ] . concat ( v . slice ( 1 ) ) , g = o [ 6 ] , h = o [ 7 ] ) : ( o = [ g , h , g , h , k , m , k , m ] , g = k , h = m ) ; var w = l ( n , o , d ) ; if ( d ) p += w ; else { for ( var x = 0 , y = w . length ; x < y ; x ++ ) w [ x ] . segment1 = q , w [ x ] . segment2 = t , w [ x ] . bez1 = n , w [ x ] . bez2 = o ; p = p . concat ( w ) } } } } } return p } function n ( a , b , c , d , e , f ) { null != a ? ( this . a = + a , this . b = + b , this . c = + c , this . d = + d , this . e = + e , this . f = + f ) : ( this . a = 1 , this . b = 0 , this . c = 0 , this . d = 1 , this . e = 0 , this . f = 0 ) } function o ( ) { return this . x + G + this . y + G + this . width + " × " + this . height } function p ( a , b , c , d , e , f ) { function g ( a ) { return ( ( l * a + k ) * a + j ) * a } function h ( a , b ) { var c = i ( a , b ) ; return ( ( o * c + n ) * c + m ) * c } function i ( a , b ) { var c , d , e , f , h , i ; for ( e = a , i = 0 ; i < 8 ; i ++ ) { if ( f = g ( e ) - a , P ( f ) < b ) return e ; if ( h = ( 3 * l * e + 2 * k ) * e + j , P ( h ) < 1e-6 ) break ; e -= f / h } if ( c = 0 , d = 1 , e = a , e < c ) return c ; if ( e > d ) return d ; for ( ; c < d ; ) { if ( f = g ( e ) , P ( f - a ) < b ) return e ; a > f ? c = e : d = e , e = ( d - c ) / 2 + c } return e } var j = 3 * b , k = 3 * ( d - b ) - j , l = 1 - j - k , m = 3 * c , n = 3 * ( e - c ) - m , o = 1 - m - n ; return h ( a , 1 / ( 200 * f ) ) } function q ( a , b ) { var c = [ ] , d = { } ; if ( this . ms = b , this . times = 1 , a ) { for ( var e in a ) a [ y ] ( e ) && ( d [ $ ( e ) ] = a [ e ] , c . push ( $ ( e ) ) ) ; c . sort ( ka ) } this . anim = d , this . top = c [ c . length - 1 ] , this . percents = c } function r ( c , d , e , f , g , h ) { e = $ ( e ) ; var i , j , k , l , m , o , q = c . ms , r = { } , s = { } , t = { } ; if ( f ) for ( w = 0 , x = fb . length ; w < x ; w ++ ) { var u = fb [ w ] ; if ( u . el . id == d . id && u . anim == c ) { u . percent != e ? ( fb . splice ( w , 1 ) , k = 1 ) : j = u , d . attr ( u . totalOrigin ) ; break } } else f = + s ; for ( var w = 0 , x = c . percents . length ; w < x ; w ++ ) { if ( c . percents [ w ] == e || c . percents [ w ] > f * c . top ) { e = c . percents [ w ] , m = c . percents [ w - 1 ] || 0 , q = q / c . top * ( e - m ) , l = c . percents [ w + 1 ] , i = c . anim [ e ] ; break } f && d . attr ( c . anim [ c . percents [ w ] ] ) } if ( i ) { if ( j ) j . initstatus = f , j . start = new Date - j . ms * f ; else { for ( var z in i ) if ( i [ y ] ( z ) && ( ca [ y ] ( z ) || d . paper . customAttributes [ y ] ( z ) ) ) switch ( r [ z ] = d . attr ( z ) , null == r [ z ] && ( r [ z ] = ba [ z ] ) , s [ z ] = i [ z ] , ca [ z ] ) { case S : t [ z ] = ( s [ z ] - r [ z ] ) / q ; break ; case "colour" : r [ z ] = b . getRGB ( r [ z ] ) ; var A = b . getRGB ( s [ z ] ) ; t [ z ] = { r : ( A . r - r [ z ] . r ) / q , g : ( A . g - r [ z ] . g ) / q , b : ( A . b - r [ z ] . b ) / q } ; break ; case "path" : var B = Ia ( r [ z ] , s [ z ] ) , C = B [ 1 ] ; for ( r [ z ] = B [ 0 ] , t [ z ] = [ ] , w = 0 , x = r [ z ] . length ; w < x ; w ++ ) { t [ z ] [ w ] = [ 0 ] ; for ( var E = 1 , F = r [ z ] [ w ] . length ; E < F ; E ++ ) t [ z ] [ w ] [ E ] = ( C [ w ] [ E ] - r [ z ] [ w ] [ E ] ) / q } break ; case " tra
b = b . targetTouches [ g ] , b . originalEvent = f , b . preventDefault = Pa , b . stopPropagation = Ra ; break } return c . call ( d , b , e . x , e . y ) } ; a . addEventListener ( K [ b ] , f , ! 1 ) } return function ( ) { return a . removeEventListener ( b , e , ! 1 ) , E && K [ b ] && a . removeEventListener ( K [ b ] , f , ! 1 ) , ! 0 } } : z . doc . attachEvent ? function ( a , b , c , d ) { var e = function ( a ) { a = a || z . win . event ; var b = z . doc . documentElement . scrollTop || z . doc . body . scrollTop , e = z . doc . documentElement . scrollLeft || z . doc . body . scrollLeft , f = a . clientX + e , g = a . clientY + b ; return a . preventDefault = a . preventDefault || Oa , a . stopPropagation = a . stopPropagation || Qa , c . call ( d , a , f , g ) } ; a . attachEvent ( "on" + b , e ) ; var f = function ( ) { return a . detachEvent ( "on" + b , e ) , ! 0 } ; return f } : void 0 } ( ) , Ua = [ ] , Va = function ( b ) { for ( var c , d = b . clientX , e = b . clientY , f = z . doc . documentElement . scrollTop || z . doc . body . scrollTop , g = z . doc . documentElement . scrollLeft || z . doc . body . scrollLeft , h = Ua . length ; h -- ; ) { if ( c = Ua [ h ] , E && b . touches ) { for ( var i , j = b . touches . length ; j -- ; ) if ( i = b . touches [ j ] , i . identifier == c . el . _drag . id ) { d = i . clientX , e = i . clientY , ( b . originalEvent ? b . originalEvent : b ) . preventDefault ( ) ; break } } else b . preventDefault ( ) ; var k , l = c . el . node , m = l . nextSibling , n = l . parentNode , o = l . style . display ; z . win . opera && n . removeChild ( l ) , l . style . display = "none" , k = c . el . paper . getElementByPoint ( d , e ) , l . style . display = o , z . win . opera && ( m ? n . insertBefore ( l , m ) : n . appendChild ( l ) ) , k && a ( "raphael.drag.over." + c . el . id , c . el , k ) , d += g , e += f , a ( "raphael.drag.move." + c . el . id , c . move _scope || c . el , d - c . el . _drag . x , e - c . el . _drag . y , d , e , b ) } } , Wa = function ( c ) { b . unmousemove ( Va ) . unmouseup ( Wa ) ; for ( var d , e = Ua . length ; e -- ; ) d = Ua [ e ] , d . el . _drag = { } , a ( "raphael.drag.end." + d . el . id , d . end _scope || d . start _scope || d . move _scope || d . el , c ) ; Ua = [ ] } , Xa = b . el = { } , Ya = J . length ; Ya -- ; ) ! function ( a ) { b [ a ] = Xa [ a ] = function ( c , d ) { return b . is ( c , "function" ) && ( this . events = this . events || [ ] , this . events . push ( { name : a , f : c , unbind : Ta ( this . shape || this . node || z . doc , a , c , d || this ) } ) ) , this } , b [ "un" + a ] = Xa [ "un" + a ] = function ( c ) { for ( var d = this . events || [ ] , e = d . length ; e -- ; ) d [ e ] . name != a || ! b . is ( c , "undefined" ) && d [ e ] . f != c || ( d [ e ] . unbind ( ) , d . splice ( e , 1 ) , ! d . length && delete this . events ) ; return this } } ( J [ Ya ] ) ; Xa . data = function ( c , d ) { var e = ja [ this . id ] = ja [ this . id ] || { } ; if ( 0 == arguments . length ) return e ; if ( 1 == arguments . length ) { if ( b . is ( c , "object" ) ) { for ( var f in c ) c [ y ] ( f ) && this . data ( f , c [ f ] ) ; return this } return a ( "raphael.data.get." + this . id , this , e [ c ] , c ) , e [ c ] } return e [ c ] = d , a ( "raphael.data.set." + this . id , this , d , c ) , this } , Xa . datum = function ( ) { return 0 == arguments . length ? this . _bindData : ( this . _bindData = arguments [ 0 ] , this ) } , Xa . removeData = function ( a ) { return null == a ? ja [ this . id ] = { } : ja [ this . id ] && delete ja [ this . id ] [ a ] , this } , Xa . getData = function ( ) { return c ( ja [ this . id ] || { } ) } , Xa . hover = function ( a , b , c , d ) { return this . mouseover ( a , c ) . mouseout ( b , d || c ) } , Xa . unhover = function ( a , b ) { return this . unmouseover ( a ) . unmouseout ( b ) } ; var Za = [ ] ; Xa . drag = function ( c , d , e , f , g , h ) { function i ( i ) { ( i . originalEvent || i ) . preventDefault ( ) ; var j = i . clientX , k = i . clientY , l = z . doc . documentElement . scrollTop || z . doc . body . scrollTop , m = z . doc . documentElement . scrollLeft || z . doc . body . scrollLeft ; if ( this . _drag . id = i . identifier , E && i . touches ) for ( var n , o = i . touches . length ; o -- ; ) if ( n = i . touches [ o ] , this . _drag . id = n . identifier , n . identifier == this . _drag . id ) { j = n . clientX , k = n . clientY ; break } this . _drag . x = j + m , this . _drag . y = k + l , ! Ua . length && b . mousemove ( Va ) . mouseup ( Wa ) , Ua . push ( { el : this , move _scope : f , start _scope : g , end _scope : h } ) , d && a . on ( "raphael.drag.start." + this . id , d ) , c && a . on ( "raphael.drag.move." + this . id , c ) , e && a . on ( "raphael.drag.end." + this . id , e ) , a ( "raphael.drag.start." + this . id , g || f || this , i . clientX + m , i . clientY + l , i ) } return this . _drag = { } , Za . push ( { el : this , start : i } ) , this . mousedown ( i ) , this } , Xa . onDragOver = function ( b ) { b ? a . on ( "raphael.drag.over." + this . id , b ) : a . unbind ( "raphael.drag.over." + this . id ) } , Xa . undrag = function ( ) { for ( var c = Za . length ; c -- ; ) Za [ c ] . el == this && ( this . unmousedown ( Za [ c ] . start ) , Za . splice ( c , 1 ) , a . unbind ( "raphael.drag.*." + this . id ) ) ; ! Za . length && b . unmousemove ( Va ) . unmouseup ( Wa ) , Ua = [ ] } , u . circle = function ( a , c , d ) { var e = b . _engine . circle ( this , a || 0 , c || 0 , d || 0 ) ; return this . _ _set _ _ && this . _ _set _ _ . push ( e ) , e } , u . rect = function ( a , c , d , e , f ) { var g = b . _engine . rect ( this , a || 0 , c || 0 , d || 0 , e || 0 , f || 0 ) ; return this . _ _set _ _ && this . _ _set _ _ . push ( g ) , g } , u . ellipse = function ( a , c , d , e ) { var
e . transform = this . _ . transform , e } if ( null == d && a . is ( c , "string" ) ) { if ( "fill" == c && "none" == this . attrs . fill && this . attrs . gradient ) return this . attrs . gradient ; if ( "transform" == c ) return this . _ . transform ; for ( var g = c . split ( j ) , h = { } , i = 0 , l = g . length ; i < l ; i ++ ) c = g [ i ] , c in this . attrs ? h [ c ] = this . attrs [ c ] : a . is ( this . paper . customAttributes [ c ] , "function" ) ? h [ c ] = this . paper . customAttributes [ c ] . def : h [ c ] = a . _availableAttrs [ c ] ; return l - 1 ? h : h [ g [ 0 ] ] } if ( null == d && a . is ( c , "array" ) ) { for ( h = { } , i = 0 , l = c . length ; i < l ; i ++ ) h [ c [ i ] ] = this . attr ( c [ i ] ) ; return h } if ( null != d ) { var m = { } ; m [ c ] = d } else null != c && a . is ( c , "object" ) && ( m = c ) ; for ( var n in m ) k ( "raphael.attr." + n + "." + this . id , this , m [ n ] ) ; for ( n in this . paper . customAttributes ) if ( this . paper . customAttributes [ b ] ( n ) && m [ b ] ( n ) && a . is ( this . paper . customAttributes [ n ] , "function" ) ) { var o = this . paper . customAttributes [ n ] . apply ( this , [ ] . concat ( m [ n ] ) ) ; this . attrs [ n ] = m [ n ] ; for ( var p in o ) o [ b ] ( p ) && ( m [ p ] = o [ p ] ) } return w ( this , m ) , this } , B . toFront = function ( ) { if ( this . removed ) return this ; var b = z ( this . node ) ; b . parentNode . appendChild ( b ) ; var c = this . paper ; return c . top != this && a . _tofront ( this , c ) , this } , B . toBack = function ( ) { if ( this . removed ) return this ; var b = z ( this . node ) , c = b . parentNode ; c . insertBefore ( b , c . firstChild ) , a . _toback ( this , this . paper ) ; this . paper ; return this } , B . insertAfter = function ( b ) { if ( this . removed || ! b ) return this ; var c = z ( this . node ) , d = z ( b . node || b [ b . length - 1 ] . node ) ; return d . nextSibling ? d . parentNode . insertBefore ( c , d . nextSibling ) : d . parentNode . appendChild ( c ) , a . _insertafter ( this , b , this . paper ) , this } , B . insertBefore = function ( b ) { if ( this . removed || ! b ) return this ; var c = z ( this . node ) , d = z ( b . node || b [ 0 ] . node ) ; return d . parentNode . insertBefore ( c , d ) , a . _insertbefore ( this , b , this . paper ) , this } , B . blur = function ( b ) { var c = this ; if ( 0 !== + b ) { var d = q ( "filter" ) , e = q ( "feGaussianBlur" ) ; c . attrs . blur = b , d . id = a . createUUID ( ) , q ( e , { stdDeviation : + b || 1.5 } ) , d . appendChild ( e ) , c . paper . defs . appendChild ( d ) , c . _blur = d , q ( c . node , { filter : "url(#" + d . id + ")" } ) } else c . _blur && ( c . _blur . parentNode . removeChild ( c . _blur ) , delete c . _blur , delete c . attrs . blur ) , c . node . removeAttribute ( "filter" ) ; return c } , a . _engine . circle = function ( a , b , c , d ) { var e = q ( "circle" ) ; a . canvas && a . canvas . appendChild ( e ) ; var f = new A ( e , a ) ; return f . attrs = { cx : b , cy : c , r : d , fill : "none" , stroke : "#000" } , f . type = "circle" , q ( e , f . attrs ) , f } , a . _engine . rect = function ( a , b , c , d , e , f ) { var g = q ( "rect" ) ; a . canvas && a . canvas . appendChild ( g ) ; var h = new A ( g , a ) ; return h . attrs = { x : b , y : c , width : d , height : e , rx : f || 0 , ry : f || 0 , fill : "none" , stroke : "#000" } , h . type = "rect" , q ( g , h . attrs ) , h } , a . _engine . ellipse = function ( a , b , c , d , e ) { var f = q ( "ellipse" ) ; a . canvas && a . canvas . appendChild ( f ) ; var g = new A ( f , a ) ; return g . attrs = { cx : b , cy : c , rx : d , ry : e , fill : "none" , stroke : "#000" } , g . type = "ellipse" , q ( f , g . attrs ) , g } , a . _engine . image = function ( a , b , c , d , e , f ) { var g = q ( "image" ) ; q ( g , { x : c , y : d , width : e , height : f , preserveAspectRatio : "none" } ) , g . setAttributeNS ( n , "href" , b ) , a . canvas && a . canvas . appendChild ( g ) ; var h = new A ( g , a ) ; return h . attrs = { x : c , y : d , width : e , height : f , src : b } , h . type = "image" , h } , a . _engine . text = function ( b , c , d , e ) { var f = q ( "text" ) ; b . canvas && b . canvas . appendChild ( f ) ; var g = new A ( f , b ) ; return g . attrs = { x : c , y : d , "text-anchor" : "middle" , text : e , "font-family" : a . _availableAttrs [ "font-family" ] , "font-size" : a . _availableAttrs [ "font-size" ] , stroke : "none" , fill : "#000" } , g . type = "text" , w ( g , g . attrs ) , g } , a . _engine . setSize = function ( a , b ) { return this . width = a || this . width , this . height = b || this . height , this . canvas . setAttribute ( "width" , this . width ) , this . canvas . setAttribute ( "height" , this . height ) , this . _viewBox && this . setViewBox . apply ( this , this . _viewBox ) , this } , a . _engine . create = function ( ) { var b = a . _getContainer . apply ( 0 , arguments ) , c = b && b . container , d = b . x , e = b . y , f = b . width , g = b . height ; if ( ! c ) throw new Error ( "SVG container not found." ) ; var h , i = q ( "svg" ) , j = "overflow:hidden;" ; return d = d || 0 , e = e || 0 , f = f || 512 , g = g || 342 , q ( i , { height : g , version : 1.1 , width : f , xmlns : "http://www.w3.org/2000/svg" , "xmlns:xlink" : "http://www.w3.org/1999/xlink" } ) , 1 == c ? ( i . style . cssText = j + "position:absolute;left:" + d + "px;top:" + e + "px" , a . _g . doc . body . appendChild ( i ) , h = 1 ) : ( i . style . cssText = j + "position:relative" , c . firstChild ? c . insertBefore ( i , c . firstChild ) : c . appendChild ( i ) ) , c = new a . _Paper , c . width = f , c . height = g , c . canvas = i , c . clear ( ) , c . _left = c . _top = 0 , h && ( c . render
width : BI . GridTableScrollbar . SIZE } ) , this . topScrollbar . on ( BI . GridTableScrollbar . EVENT _SCROLL , function ( b ) { a . bottomLeftCollection . setScrollTop ( b ) , a . bottomRightCollection . setScrollTop ( b ) , a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . leftScrollbar = BI . createWidget ( { type : "bi.grid_table_horizontal_scrollbar" , height : BI . GridTableScrollbar . SIZE } ) , this . leftScrollbar . on ( BI . GridTableScrollbar . EVENT _SCROLL , function ( b ) { a . topLeftCollection . setScrollLeft ( b ) , a . bottomLeftCollection . setScrollLeft ( b ) , a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . rightScrollbar = BI . createWidget ( { type : "bi.grid_table_horizontal_scrollbar" , height : BI . GridTableScrollbar . SIZE } ) , this . rightScrollbar . on ( BI . GridTableScrollbar . EVENT _SCROLL , function ( b ) { a . topRightCollection . setScrollLeft ( b ) , a . bottomRightCollection . setScrollLeft ( b ) , a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . scrollBarLayout = BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . topScrollbar , right : 0 , top : 0 } , { el : this . leftScrollbar , left : 0 } , { el : this . rightScrollbar } ] } ) , this . _width = b . width - BI . GridTableScrollbar . SIZE , this . _height = b . height - BI . GridTableScrollbar . SIZE } , mounted : function ( ) { var a = this . options ; ( a . items . length > 0 || a . header . length > 0 ) && ( this . _digest ( ) , this . _populate ( ) ) } , _getFreezeColLength : function ( ) { var a = this . options ; return a . isNeedFreeze === ! 0 ? BI . clamp ( a . freezeCols . length , 0 , a . columnSize . length ) : 0 } , _getFreezeHeaderHeight : function ( ) { var a = this . options ; return a . header . length * a . headerRowSize >= this . _height ? 0 : a . header . length * a . headerRowSize } , _getActualItems : function ( ) { var a = this . options ; return a . header . length * a . headerRowSize >= this . _height ? a . header . concat ( a . items ) : a . items } , _populateScrollbar : function ( ) { var a = this . options , b = this . getRegionSize ( ) , c = 0 , d = 0 , e = 0 , f = [ ] ; BI . each ( a . columnSize , function ( b , g ) { a . isNeedFreeze === ! 0 && a . freezeCols . contains ( b ) ? c += g : d += g , e += g , 0 === b ? f [ b ] = g : f [ b ] = f [ b - 1 ] + g } ) , this . topScrollbar . setContentSize ( this . _getActualItems ( ) . length * a . rowSize ) , this . topScrollbar . setSize ( this . _height - this . _getFreezeHeaderHeight ( ) ) , this . topScrollbar . setPosition ( this . bottomRightCollection . getScrollTop ( ) ) , this . topScrollbar . populate ( ) , this . leftScrollbar . setContentSize ( c ) , this . leftScrollbar . setSize ( b ) , this . leftScrollbar . setPosition ( this . bottomLeftCollection . getScrollLeft ( ) ) , this . leftScrollbar . populate ( ) , this . rightScrollbar . setContentSize ( d ) , this . rightScrollbar . setSize ( this . _width - b ) , this . rightScrollbar . setPosition ( this . bottomRightCollection . getScrollLeft ( ) ) , this . rightScrollbar . populate ( ) ; var g = this . scrollBarLayout . attr ( "items" ) ; g [ 0 ] . top = this . _getFreezeHeaderHeight ( ) , g [ 1 ] . top = this . _height , g [ 2 ] . top = this . _height , g [ 2 ] . left = b , this . scrollBarLayout . attr ( "items" , g ) , this . scrollBarLayout . resize ( ) } , _populateTable : function ( ) { var a = this . options , b = this . getRegionSize ( ) , c = 0 , d = 0 , e = 0 , f = [ ] ; BI . each ( a . columnSize , function ( b , g ) { a . isNeedFreeze === ! 0 && a . freezeCols . contains ( b ) ? c += g : d += g , e += g , 0 === b ? f [ b ] = g : f [ b ] = f [ b - 1 ] + g } ) ; var g = b , h = this . _getFreezeHeaderHeight ( ) , i = this . _width - b , j = this . _getFreezeHeaderHeight ( ) , k = b , l = this . _height - h , m = this . _width - b , n = this . _height - j , o = g + this . _scrollBarSize , p = h + this . _scrollBarSize , q = i + this . _scrollBarSize , r = j + this . _scrollBarSize , s = k + this . _scrollBarSize , t = l + this . _scrollBarSize , u = m + this . _scrollBarSize , v = n + this . _scrollBarSize , w = function ( a ) { a . element . css ( { overflow : "scroll" , overflowX : "scroll" , overflowY : "scroll" } ) } ; this . topLeft . setWidth ( g ) , this . topLeft . setHeight ( h ) , this . topRight . setWidth ( i ) , this . topRight . setHeight ( j ) , this . bottomLeft . setWidth ( k ) , this . bottomLeft . setHeight ( l ) , this . bottomRight . setWidth ( m ) , this . bottomRight . setHeight ( n ) , this . topLeftCollection . setWidth ( o ) , this . topLeftCollection . setHeight ( p ) , this . topRightCollection . setWidth ( q ) , this . topRightCollection . setHeight ( r ) , this . bottomLeftCollection . setWidth ( s ) , this . bottomLeftCollection . setHeight ( t ) , this . bottomRightCollection . setWidth ( u ) , this . bottomRightCollection . setHeight ( v ) , w ( this . topLeftCollection ) , w ( this . topRightCollection ) , w ( this . bottomLeftCollection ) , w ( this . bottomRightCollection ) ; var x = this . contextLayout . attr ( "items" ) ; x [ 1 ] . left = b , x [ 2 ] . top = this . _getFreezeHeaderHeight ( ) , x [ 3 ] . left = b , x [ 3 ] . top = this . _getFreezeHeaderHeight ( ) , this . contextLa
this . fireEvent ( BI . GridTableScrollbar . EVENT _SCROLL , this . options . position ) } else this . _mouseMoveTracker . captureMouseMoves ( a ) ; try { this . element [ 0 ] . focus ( ) } catch ( a ) { } } , _onMouseMove : function ( a , b ) { var c = this . _isHorizontal ( ) ? a : b ; c /= this . _getScale ( ) , this . options . position = BI . clamp ( this . options . position + c , 0 , this . options . contentSize - this . options . size ) , this . isDragging = this . _mouseMoveTracker . isDragging ( ) , this . _populate ( ) , this . fireEvent ( BI . GridTableScrollbar . EVENT _SCROLL , this . options . position ) } , _onMouseMoveEnd : function ( a ) { this . _mouseMoveTracker . releaseMouseMoves ( ) , this . isDragging === ! 0 && ( this . isDragging = ! 1 , this . _populate ( ) ) } , _onKeyDown : function ( a ) { var b = { BACKSPACE : 8 , TAB : 9 , RETURN : 13 , ALT : 18 , ESC : 27 , SPACE : 32 , PAGE _UP : 33 , PAGE _DOWN : 34 , END : 35 , HOME : 36 , LEFT : 37 , UP : 38 , RIGHT : 39 , DOWN : 40 , DELETE : 46 , COMMA : 188 , PERIOD : 190 , A : 65 , Z : 90 , ZERO : 48 , NUMPAD _0 : 96 , NUMPAD _9 : 105 } , c = a . keyCode ; if ( c !== b . TAB ) { var d = 40 , e = 0 ; if ( this . _isHorizontal ( ) ) switch ( c ) { case b . HOME : e = - 1 , d = this . options . contentSize ; break ; case b . LEFT : e = - 1 ; break ; case b . RIGHT : e = 1 ; break ; default : return } if ( ! this . _isHorizontal ( ) ) switch ( c ) { case b . SPACE : e = a . shiftKey ? - 1 : 1 ; break ; case b . HOME : e = - 1 , d = this . options . contentSize ; break ; case b . UP : e = - 1 ; break ; case b . DOWN : e = 1 ; break ; case b . PAGE _UP : e = - 1 , d = this . options . size ; break ; case b . PAGE _DOWN : e = 1 , d = this . options . size ; break ; default : return } this . options . position = BI . clamp ( this . options . position + d * e , 0 , this . options . contentSize - this . options . size ) , a . preventDefault ( ) , this . _populate ( ) , this . fireEvent ( BI . GridTableScrollbar . EVENT _SCROLL , this . options . position ) } } , _populate : function ( ) { var a = this . options ; if ( a . size < 1 || a . contentSize <= a . size ) return void this . setVisible ( ! 1 ) ; this . setVisible ( ! 0 ) ; var b = a . size , c = this . _isHorizontal ( ) , d = this . focused || this . isDragging , e = this . _getFaceSize ( ) , f = a . isOpaque ; this . element [ f === ! 0 ? "addClass" : "removeClass" ] ( "public-scrollbar-main-opaque" ) , this . element [ d === ! 0 ? "addClass" : "removeClass" ] ( "public-scrollbar-main-active" ) , this . face . element [ d === ! 0 ? "addClass" : "removeClass" ] ( "public-scrollbar-face-active" ) ; var g = a . position * this . _getScale ( ) + this . _const . FACE _MARGIN , h = this . contextLayout . attr ( "items" ) ; c ? ( this . setWidth ( b ) , this . face . setWidth ( e - this . _const . FACE _MARGIN _2 ) , h [ 0 ] . left = g , h [ 0 ] . top = 0 ) : ( this . setHeight ( b ) , this . face . setHeight ( e - this . _const . FACE _MARGIN _2 ) , h [ 0 ] . left = 0 , h [ 0 ] . top = g ) , this . contextLayout . attr ( "items" , h ) , this . contextLayout . resize ( ) } , setContentSize : function ( a ) { this . options . contentSize = a } , setPosition : function ( a ) { this . options . position = a } , setSize : function ( a ) { this . options . size = a } , populate : function ( ) { this . _populate ( ) } } ) , BI . GridTableScrollbar . SIZE = 10 , BI . GridTableScrollbar . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.grid_table_scrollbar" , BI . GridTableScrollbar ) , BI . GridTableHorizontalScrollbar = BI . inherit ( BI . Widget , { _const : { FACE _MARGIN : 4 , FACE _MARGIN _2 : 8 , FACE _SIZE _MIN : 30 , KEYBOARD _SCROLL _AMOUNT : 40 } , _defaultConfig : function ( ) { return BI . extend ( BI . GridTableHorizontalScrollbar . superclass . _defaultConfig . apply ( this , arguments ) , { attributes : { tabIndex : 0 } , contentSize : 0 , position : 0 , size : 0 } ) } , _init : function ( ) { BI . GridTableHorizontalScrollbar . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . scrollbar = BI . createWidget ( { type : "bi.grid_table_scrollbar" , orientation : "horizontal" , isOpaque : ! 0 , position : b . position , contentSize : b . contentSize , size : b . size } ) , this . scrollbar . on ( BI . GridTableScrollbar . EVENT _SCROLL , function ( ) { a . fireEvent ( BI . GridTableHorizontalScrollbar . EVENT _SCROLL , arguments ) } ) , BI . createWidget ( { type : "bi.absolute" , cls : "horizontal-scrollbar" , element : this , width : b . size , height : BI . GridTableScrollbar . SIZE , items : [ { el : { type : "bi.absolute" , scrollable : ! 1 , height : BI . GridTableScrollbar . SIZE , items : [ { el : this . scrollbar , left : 0 , top : 0 } ] } , top : 0 , left : 0 , right : 0 } ] } ) } , setContentSize : function ( a ) { this . options . contentSize = a , this . scrollbar . setContentSize ( a ) } , setPosition : function ( a ) { this . options . position = a , this . scrollbar . setPosition ( a ) } , setSize : function ( a ) { this . setWidth ( a ) , this . options . size = a , this . scrollbar . setSize ( a ) } , populate : function ( ) { this . scrollbar . populate ( ) ; var a = this . options ; return a . size < 1 || a . contentSize <= a . size ? void this . setVisible ( ! 1 ) : void this . setVisible ( ! 0 ) } } ) , BI . GridTableHorizontalScrollbar . EVENT _SCR
this . scrollTopRight . element [ 0 ] . scrollLeft !== a && ( this . scrollTopRight . element [ 0 ] . scrollLeft = a ) ) : this . scrollBottomRight . element [ 0 ] . scrollLeft !== a && ( this . scrollBottomRight . element [ 0 ] . scrollLeft = a ) } , getVerticalScroll : function ( ) { var a = this . options ; return a . isNeedFreeze ? this . scrollBottomRight . element [ 0 ] . scrollTop || this . scrollBottomLeft . element [ 0 ] . scrollTop : this . scrollBottomRight . element [ 0 ] . scrollTop } , getLeftHorizontalScroll : function ( ) { var a = this . options ; return a . isNeedFreeze ? this . scrollBottomLeft . element [ 0 ] . scrollLeft : this . scrollBottomRight . element [ 0 ] . scrollLeft } , getRightHorizontalScroll : function ( ) { var a = this . options ; return a . isNeedFreeze ? this . scrollBottomRight . element [ 0 ] . scrollLeft : this . scrollBottomRight . element [ 0 ] . scrollLeft } , getColumns : function ( ) { var a = this . options ; return a . isNeedFreeze ? { topLeft : this . topLeftBodyItems , topRight : this . topRightBodyItems , bottomLeft : this . bottomLeftBodyItems , bottomRight : this . bottomRightBodyItems } : { header : this . headerItems , body : this . bodyItems , footer : this . footerItems } } , _empty : function ( ) { this . scrollBottomRight && this . scrollBottomRight . destroy ( ) , BI . each ( this . partitions && this . partitions . _children , function ( a , b ) { b && b . destroy ( ) } ) } , populate : function ( a , b ) { this . options . items = a || [ ] , b && ( this . options . header = b ) , this . _empty ( ) , this . options . isNeedFreeze ? this . _createFreezeTable ( ) : this . _createNormalTable ( ) } } ) , BI . Table . EVENT _TABLE _AFTER _INIT = "EVENT_TABLE_AFTER_INIT" , BI . Table . EVENT _TABLE _RESIZE = "EVENT_TABLE_RESIZE" , BI . Table . EVENT _TABLE _SCROLL = "EVENT_TABLE_SCROLL" , BI . Table . EVENT _TABLE _BEFORE _COLUMN _RESIZE = "EVENT_TABLE_BEFORE_COLUMN_RESIZE" , BI . Table . EVENT _TABLE _COLUMN _RESIZE = "EVENT_TABLE_COLUMN_RESIZE" , BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE" , BI . Table . EVENT _TABLE _BEFORE _REGION _RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE" , BI . Table . EVENT _TABLE _REGION _RESIZE = "EVENT_TABLE_REGION_RESIZE" , BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE" , BI . shortcut ( "bi.table_view" , BI . Table ) , BI . ResizableTableCell = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ResizableTableCell . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-resizable-table-cell" , cell : { } , minSize : 15 , maxSize : Number . MAX _VALUE , start : BI . emptyFn , resize : BI . emptyFn , stop : BI . emptyFn } ) } , _init : function ( ) { function a ( a ) { var b = BI . clamp ( a , c . minSize , c . maxSize || Number . MAX _VALUE ) ; return b } BI . ResizableTableCell . superclass . _init . apply ( this , arguments ) ; var b = this , c = this . options ; this . cell = BI . createWidget ( BI . extend ( { type : "bi.label" } , c . cell , { width : c . width , height : c . height } ) ) ; var d = ! 1 , e = 0 , f = 0 , g = c . width , h = new BI . MouseMoveTracker ( function ( i , j ) { h . isDragging ( ) && ( d = ! 0 , f += i , e = a ( g + f ) , b . handler . element . addClass ( "dragging" ) , c . resize ( e ) ) } , function ( ) { d === ! 0 && ( e = a ( e ) , c . stop ( e ) , e = 0 , f = 0 , g = c . width , d = ! 1 ) , b . handler . element . removeClass ( "dragging" ) , b . handler . element . removeClass ( "suitable" ) , h . releaseMouseMoves ( ) } , document ) ; this . handler = BI . createWidget ( { type : "bi.absolute" , cls : "resizable-table-cell-resizer-container" , width : 6 , items : [ { el : { type : "bi.layout" , cls : "resizable-table-cell-resizer-knob" , width : 4 } , right : 0 , top : 0 , bottom : 0 } ] } ) , this . handler . element . on ( "mousedown" , function ( b ) { g = c . width , a ( g ) , h . captureMouseMoves ( b ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . cell , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : this . handler , right : 0 , top : 0 , bottom : 0 } ] } ) } , setWidth : function ( a ) { BI . ResizableTableCell . superclass . setWidth . apply ( this , arguments ) ; var b = this . options ; this . cell . setWidth ( b . width ) } , setHeight : function ( a ) { BI . ResizableTableCell . superclass . setHeight . apply ( this , arguments ) ; var b = this . options ; this . cell . setHeight ( b . height ) } } ) , BI . shortcut ( "bi.resizable_table_cell" , BI . ResizableTableCell ) , BI . ResizableTable = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ResizableTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-resizable-table" , el : { type : "bi.grid_table" } , isNeedFreeze : ! 1 , isNeedResize : ! 0 , isResizeAdapt : ! 1 , headerRowSize : 25 , rowSize : 25 , isNeedMerge : ! 0 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , freezeCols : [ ] , header : [ ] , items : [ ] , regionColumnSize : [ ] } ) } , _init : function ( ) { BI . ResizableT
b . isParent ? ( b . open = ! b . open , b . iconOpen && b . iconClose && k . attr ( "style" , view . makeNodeIcoStyle ( a , b ) ) , b . open ? ( view . replaceSwitchClass ( b , j , consts . folder . OPEN ) , view . replaceIcoClass ( b , k , consts . folder . OPEN ) , 0 == d || "" == a . view . expandSpeed ? ( i . show ( ) , tools . apply ( e , [ ] ) ) : b [ g ] && b [ g ] . length > 0 ? i . slideDown ( a . view . expandSpeed , e ) : ( i . show ( ) , tools . apply ( e , [ ] ) ) ) : ( view . replaceSwitchClass ( b , j , consts . folder . CLOSE ) , view . replaceIcoClass ( b , k , consts . folder . CLOSE ) , 0 != d && "" != a . view . expandSpeed && b [ g ] && b [ g ] . length > 0 ? i . slideUp ( a . view . expandSpeed , e ) : ( i . hide ( ) , tools . apply ( e , [ ] ) ) ) ) : tools . apply ( e , [ ] ) } , expandCollapseParentNode : function ( a , b , c , d , e ) { if ( b ) { if ( ! b . parentTId ) return void view . expandCollapseNode ( a , b , c , d , e ) ; view . expandCollapseNode ( a , b , c , d ) , b . parentTId && view . expandCollapseParentNode ( a , b . getParentNode ( ) , c , d , e ) } } , expandCollapseSonNode : function ( a , b , c , d , e ) { var f = data . getRoot ( a ) , g = a . data . key . children , h = b ? b [ g ] : f [ g ] , i = ! b && d , j = data . getRoot ( a ) . expandTriggerFlag ; if ( data . getRoot ( a ) . expandTriggerFlag = ! 1 , h ) for ( var k = 0 , l = h . length ; k < l ; k ++ ) h [ k ] && view . expandCollapseSonNode ( a , h [ k ] , c , i ) ; data . getRoot ( a ) . expandTriggerFlag = j , view . expandCollapseNode ( a , b , c , d , e ) } , isSelectedNode : function ( a , b ) { if ( ! b ) return ! 1 ; var c , d = data . getRoot ( a ) . curSelectedList ; for ( c = d . length - 1 ; c >= 0 ; c -- ) if ( b === d [ c ] ) return ! 0 ; return ! 1 } , makeDOMNodeIcon : function ( a , b , c ) { var d = data . getNodeName ( b , c ) , e = b . view . nameIsHTML ? d : d . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) ; a . push ( "<span id='" , c . tId , consts . id . ICON , "' title='' treeNode" , consts . id . ICON , " class='" , view . makeNodeIcoClass ( b , c ) , "' style='" , view . makeNodeIcoStyle ( b , c ) , "'></span><span id='" , c . tId , consts . id . SPAN , "'>" , e , "</span>" ) } , makeDOMNodeLine : function ( a , b , c ) { a . push ( "<span id='" , c . tId , consts . id . SWITCH , "' title='' class='" , view . makeNodeLineClass ( b , c ) , "' treeNode" , consts . id . SWITCH , "></span>" ) } , makeDOMNodeMainAfter : function ( a , b , c ) { a . push ( "</li>" ) } , makeDOMNodeMainBefore : function ( a , b , c ) { a . push ( "<li id='" , c . tId , "' class='" , consts . className . LEVEL , c . level , "' tabindex='0' hidefocus='true' treenode>" ) } , makeDOMNodeNameAfter : function ( a , b , c ) { a . push ( "</a>" ) } , makeDOMNodeNameBefore : function ( a , b , c ) { var d = data . getNodeTitle ( b , c ) , e = view . makeNodeUrl ( b , c ) , f = view . makeNodeFontCss ( b , c ) , g = [ ] ; for ( var h in f ) g . push ( h , ":" , f [ h ] , ";" ) ; a . push ( "<a id='" , c . tId , consts . id . A , "' class='" , consts . className . LEVEL , c . level , "' treeNode" , consts . id . A , ' onclick="' , c . click || "" , '" ' , null != e && e . length > 0 ? "href='" + e + "'" : "" , " target='" , view . makeNodeTarget ( c ) , "' style='" , g . join ( "" ) , "'" ) , tools . apply ( b . view . showTitle , [ b . treeId , c ] , b . view . showTitle ) && d && a . push ( "title='" , d . replace ( /'/g , "'" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) , "'" ) , a . push ( ">" ) } , makeNodeFontCss : function ( a , b ) { var c = tools . apply ( a . view . fontCss , [ a . treeId , b ] , a . view . fontCss ) ; return c && "function" != typeof c ? c : { } } , makeNodeIcoClass : function ( a , b ) { var c = [ "ico" ] ; return b . isAjaxing || ( c [ 0 ] = ( b . iconSkin ? b . iconSkin + "_" : "" ) + c [ 0 ] , b . isParent ? c . push ( b . open ? consts . folder . OPEN : consts . folder . CLOSE ) : c . push ( consts . folder . DOCU ) ) , consts . className . BUTTON + " " + c . join ( "_" ) } , makeNodeIcoStyle : function ( a , b ) { var c = [ ] ; if ( ! b . isAjaxing ) { var d = b . isParent && b . iconOpen && b . iconClose ? b . open ? b . iconOpen : b . iconClose : b . icon ; d && c . push ( "background:url(" , d , ") 0 0 no-repeat;" ) , 0 != a . view . showIcon && tools . apply ( a . view . showIcon , [ a . treeId , b ] , ! 0 ) || c . push ( "width:0px;height:0px;" ) } return c . join ( "" ) } , makeNodeLineClass : function ( a , b ) { var c = [ ] ; return a . view . showLine ? 0 == b . level && b . isFirstNode && b . isLastNode ? c . push ( consts . line . ROOT ) : 0 == b . level && b . isFirstNode ? c . push ( consts . line . ROOTS ) : b . isLastNode ? c . push ( consts . line . BOTTOM ) : c . push ( consts . line . CENTER ) : c . push ( consts . line . NOLINE ) , b . isParent ? c . push ( b . open ? consts . folder . OPEN : consts . folder . CLOSE ) : c . push ( consts . folder . DOCU ) , view . makeNodeLineClassEx ( b ) + c . join ( "_" ) } , makeNodeLineClassEx : function ( a ) { return consts . className . BUTTON + " " + consts . className . LEVEL + a . level + " " + consts . className . SWITCH + " " } , makeNodeTarget : function ( a ) { return a . target || "_blank" } , makeNodeUrl : function ( a , b ) { var c = a . data . key . url ; return b [ c ] ? b [ c ] : null } , makeUlHtml : function ( a , b , c , d ) { c . push ( "<ul id='" , b . tId , consts . id . UL , "' class='" , consts . className . LEVEL , b . level , " " , view . makeUlLineClass ( a , b ) , " ' style =
a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; var c = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , d = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 25 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( c , BI . extend ( b . logic , { items : d } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . ArrowNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isOpened ( ) ) } , setText : function ( a ) { BI . ArrowNode . superclass . setText . apply ( this , arguments ) , this . text . setText ( a ) } , setOpened : function ( a ) { BI . ArrowNode . superclass . setOpened . apply ( this , arguments ) , this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.arrow_group_node" , BI . ArrowNode ) , BI . FirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . FirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-first-plus-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . FirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.first_tree_node_checkbox" , stopPropagation : ! 0 } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py , keyword : b . keyword } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && ( this . isSelected ( ) ? a . triggerExpand ( ) : a . triggerCollapse ( ) ) } ) ; var c = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , d = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 25 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( c , BI . extend ( b . logic , { items : d } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . FirstPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( a ) { BI . FirstPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.first_plus_group_node" , BI . FirstPlusGroupNode ) , BI . IconArrowNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . IconArrowNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-icon-arrow-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 25 , iconHeight : 13 , iconWidth : 13 , iconCls : "" } ) } , _init : function ( ) { BI . IconArrowNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.arrow_group_node_checkbox" , width : 23 , stopPropagation : ! 0 } ) ; var c = BI . createWidget ( { type : "bi.center_adapt" , cls : b . iconCls , width : 23 , items : [ { type : "bi.icon" , height : b . iconHeight , width : b . iconWidth } ] } ) ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && ( this . isSelected ( ) ? a . triggerExpand ( ) : a . triggerCollapse ( ) ) } ) ; var d = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , e = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 25 , el : this . checkbox } , { width : 23 , el : c } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( d , BI . extend ( b . logic , { items : e } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . IconArrowNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( a ) { BI . IconArrowNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.icon_arrow_node" , BI . IconArrowNode ) , BI . LastPlusGroupNode = BI
var j = new Error ( "Cannot find module '" + g + "'" ) ; throw j . code = "MODULE_NOT_FOUND" , j } var k = c [ g ] = { exports : { } } ; a [ g ] [ 0 ] . call ( k . exports , function ( b ) { var c = a [ g ] [ 1 ] [ b ] ; return e ( c ? c : b ) } , k , k . exports , b , a , c , d ) } return c [ g ] . exports } for ( var f = "function" == typeof require && require , g = 0 ; g < d . length ; g ++ ) e ( d [ g ] ) ; return e } ( { 1 : [ function ( a , b , c ) { function d ( a , b ) { for ( ; a && a . nodeType !== e ; ) { if ( a . matches ( b ) ) return a ; a = a . parentNode } } var e = 9 ; if ( "undefined" != typeof Element && ! Element . prototype . matches ) { var f = Element . prototype ; f . matches = f . matchesSelector || f . mozMatchesSelector || f . msMatchesSelector || f . oMatchesSelector || f . webkitMatchesSelector } b . exports = d } , { } ] , 2 : [ function ( a , b , c ) { function d ( a , b , c , d , f ) { var g = e . apply ( this , arguments ) ; return a . addEventListener ( c , g , f ) , { destroy : function ( ) { a . removeEventListener ( c , g , f ) } } } function e ( a , b , c , d ) { return function ( c ) { c . delegateTarget = f ( c . target , b ) , c . delegateTarget && d . call ( a , c ) } } var f = a ( "./closest" ) ; b . exports = d } , { "./closest" : 1 } ] , 3 : [ function ( a , b , c ) { c . node = function ( a ) { return void 0 !== a && a instanceof HTMLElement && 1 === a . nodeType } , c . nodeList = function ( a ) { var b = Object . prototype . toString . call ( a ) ; return void 0 !== a && ( "[object NodeList]" === b || "[object HTMLCollection]" === b ) && "length" in a && ( 0 === a . length || c . node ( a [ 0 ] ) ) } , c . string = function ( a ) { return "string" == typeof a || a instanceof String } , c . fn = function ( a ) { var b = Object . prototype . toString . call ( a ) ; return "[object Function]" === b } } , { } ] , 4 : [ function ( a , b , c ) { function d ( a , b , c ) { if ( ! a && ! b && ! c ) throw new Error ( "Missing required arguments" ) ; if ( ! h . string ( b ) ) throw new TypeError ( "Second argument must be a String" ) ; if ( ! h . fn ( c ) ) throw new TypeError ( "Third argument must be a Function" ) ; if ( h . node ( a ) ) return e ( a , b , c ) ; if ( h . nodeList ( a ) ) return f ( a , b , c ) ; if ( h . string ( a ) ) return g ( a , b , c ) ; throw new TypeError ( "First argument must be a String, HTMLElement, HTMLCollection, or NodeList" ) } function e ( a , b , c ) { return a . addEventListener ( b , c ) , { destroy : function ( ) { a . removeEventListener ( b , c ) } } } function f ( a , b , c ) { return Array . prototype . forEach . call ( a , function ( a ) { a . addEventListener ( b , c ) } ) , { destroy : function ( ) { Array . prototype . forEach . call ( a , function ( a ) { a . removeEventListener ( b , c ) } ) } } } function g ( a , b , c ) { return i ( document . body , a , b , c ) } var h = a ( "./is" ) , i = a ( "delegate" ) ; b . exports = d } , { "./is" : 3 , delegate : 2 } ] , 5 : [ function ( a , b , c ) { function d ( a ) { var b ; if ( "SELECT" === a . nodeName ) a . focus ( ) , b = a . value ; else if ( "INPUT" === a . nodeName || "TEXTAREA" === a . nodeName ) { var c = a . hasAttribute ( "readonly" ) ; c || a . setAttribute ( "readonly" , "" ) , a . select ( ) , a . setSelectionRange ( 0 , a . value . length ) , c || a . removeAttribute ( "readonly" ) , b = a . value } else { a . hasAttribute ( "contenteditable" ) && a . focus ( ) ; var d = window . getSelection ( ) , e = document . createRange ( ) ; e . selectNodeContents ( a ) , d . removeAllRanges ( ) , d . addRange ( e ) , b = d . toString ( ) } return b } b . exports = d } , { } ] , 6 : [ function ( a , b , c ) { function d ( ) { } d . prototype = { on : function ( a , b , c ) { var d = this . e || ( this . e = { } ) ; return ( d [ a ] || ( d [ a ] = [ ] ) ) . push ( { fn : b , ctx : c } ) , this } , once : function ( a , b , c ) { function d ( ) { e . off ( a , d ) , b . apply ( c , arguments ) } var e = this ; return d . _ = b , this . on ( a , d , c ) } , emit : function ( a ) { var b = [ ] . slice . call ( arguments , 1 ) , c = ( ( this . e || ( this . e = { } ) ) [ a ] || [ ] ) . slice ( ) , d = 0 , e = c . length ; for ( d ; d < e ; d ++ ) c [ d ] . fn . apply ( c [ d ] . ctx , b ) ; return this } , off : function ( a , b ) { var c = this . e || ( this . e = { } ) , d = c [ a ] , e = [ ] ; if ( d && b ) for ( var f = 0 , g = d . length ; f < g ; f ++ ) d [ f ] . fn !== b && d [ f ] . fn . _ !== b && e . push ( d [ f ] ) ; return e . length ? c [ a ] = e : delete c [ a ] , this } } , b . exports = d } , { } ] , 7 : [ function ( b , c , d ) { ! function ( e , f ) { if ( "function" == typeof a && a . amd ) a ( [ "module" , "select" ] , f ) ; else if ( "undefined" != typeof d ) f ( c , b ( "select" ) ) ; else { var g = { exports : { } } ; f ( g , e . select ) , e . clipboardAction = g . exports } } ( this , function ( a , b ) { "use strict" ; function c ( a ) { return a && a . _ _esModule ? a : { "default" : a } } function d ( a , b ) { if ( ! ( a instanceof b ) ) throw new TypeError ( "Cannot call a class as a function" ) } var e = c ( b ) , f = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( a ) { return typeof a } : function ( a ) { return a && "function" == typeof Symbol && a . constructor === Symbol && a !== Symbol . prototype ? "symbol" : typeof a } , g = function ( ) { function a ( a , b ) { for ( var c = 0 ; c < b . length ; c ++ ) { var d = b [ c ] ; d . enumerable = d . enumerable || ! 1 , d . configurable = ! 0 , "value" in d && ( d . writable = ! 0 ) , Object . defineProperty ( a , d . key , d ) } } return functi
var d = $ ( ".farbtastic" , a ) ; c . wheel = $ ( ".wheel" , a ) . get ( 0 ) , c . radius = 84 , c . square = 100 , c . width = 194 , navigator . appVersion . match ( /MSIE [0-6]\./ ) && $ ( "*" , d ) . each ( function ( ) { if ( "none" != this . currentStyle . backgroundImage ) { var a = this . currentStyle . backgroundImage ; a = this . currentStyle . backgroundImage . substring ( 5 , a . length - 2 ) , $ ( this ) . css ( { backgroundImage : "none" , filter : "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + a + "')" } ) } } ) , c . linkTo = function ( a ) { return "object" == typeof c . callback && $ ( c . callback ) . unbind ( "keyup" , c . updateValue ) , c . color = null , "function" == typeof a ? c . callback = a : "object" != typeof a && "string" != typeof a || ( c . callback = $ ( a ) , c . callback . bind ( "keyup" , c . updateValue ) , c . callback . get ( 0 ) . value && c . setColor ( c . callback . get ( 0 ) . value ) ) , this } , c . updateValue = function ( a ) { this . value && this . value != c . color && c . setColor ( this . value ) } , c . setColor = function ( a ) { var b = c . unpack ( a ) ; return c . color != a && b && ( c . color = a , c . rgb = b , c . hsl = c . RGBToHSL ( c . rgb ) , c . updateDisplay ( ) ) , this } , c . setHSL = function ( a ) { return c . hsl = a , c . rgb = c . HSLToRGB ( a ) , c . color = c . pack ( c . rgb ) , c . updateDisplay ( ) , this } , c . widgetCoords = function ( a ) { var b , d , e = a . target || a . srcElement , f = c . wheel ; if ( "undefined" != typeof a . offsetX ) { for ( var g = { x : a . offsetX , y : a . offsetY } , h = e ; h ; ) h . mouseX = g . x , h . mouseY = g . y , g . x += h . offsetLeft , g . y += h . offsetTop , h = h . offsetParent ; for ( var h = f , i = { x : 0 , y : 0 } ; h ; ) { if ( "undefined" != typeof h . mouseX ) { b = h . mouseX - i . x , d = h . mouseY - i . y ; break } i . x += h . offsetLeft , i . y += h . offsetTop , h = h . offsetParent } for ( h = e ; h ; ) h . mouseX = void 0 , h . mouseY = void 0 , h = h . offsetParent } else { var g = c . absolutePosition ( f ) ; b = ( a . pageX || 0 * ( a . clientX + $ ( "html" ) . get ( 0 ) . scrollLeft ) ) - g . x , d = ( a . pageY || 0 * ( a . clientY + $ ( "html" ) . get ( 0 ) . scrollTop ) ) - g . y } return { x : b - c . width / 2 , y : d - c . width / 2 } } , c . click = function ( a ) { var b = c . widgetCoords ( a ) ; return c . circleDrag = 2 * Math . max ( Math . abs ( b . x ) , Math . abs ( b . y ) ) > c . square , c . mousemove ( a ) , ! 1 } , c . mousemove = function ( a ) { var b = c . widgetCoords ( a ) ; if ( c . circleDrag ) { var d = Math . atan2 ( b . x , - b . y ) / 6.28 ; d < 0 && ( d += 1 ) , c . setHSL ( [ d , c . hsl [ 1 ] , c . hsl [ 2 ] ] ) } else { var e = Math . max ( 0 , Math . min ( 1 , - ( b . x / c . square ) + . 5 ) ) , f = Math . max ( 0 , Math . min ( 1 , - ( b . y / c . square ) + . 5 ) ) ; c . setHSL ( [ c . hsl [ 0 ] , e , f ] ) } return ! 1 } , c . updateDisplay = function ( ) { var a = 6.28 * c . hsl [ 0 ] ; $ ( ".h-marker" , d ) . css ( { left : Math . round ( Math . sin ( a ) * c . radius + c . width / 2 ) + "px" , top : Math . round ( - Math . cos ( a ) * c . radius + c . width / 2 ) + "px" } ) , $ ( ".sl-marker" , d ) . css ( { left : Math . round ( c . square * ( . 5 - c . hsl [ 1 ] ) + c . width / 2 ) + "px" , top : Math . round ( c . square * ( . 5 - c . hsl [ 2 ] ) + c . width / 2 ) + "px" } ) , $ ( ".color" , d ) . css ( "backgroundColor" , c . pack ( c . HSLToRGB ( [ c . hsl [ 0 ] , 1 , . 5 ] ) ) ) , "object" == typeof c . callback ? ( $ ( c . callback ) . css ( { backgroundColor : c . color , color : c . hsl [ 2 ] > . 5 ? "#000" : "#fff" } ) , $ ( c . callback ) . each ( function ( ) { this . value && this . value != c . color && ( this . value = c . color ) } ) ) : "function" == typeof c . callback && c . callback . call ( c , c . color ) } , c . absolutePosition = function ( a ) { var b = { x : a . offsetLeft , y : a . offsetTop } ; if ( a . offsetParent ) { var d = c . absolutePosition ( a . offsetParent ) ; b . x += d . x , b . y += d . y } return b } , c . pack = function ( a ) { var b = Math . round ( 255 * a [ 0 ] ) , c = Math . round ( 255 * a [ 1 ] ) , d = Math . round ( 255 * a [ 2 ] ) ; return "#" + ( b < 16 ? "0" : "" ) + b . toString ( 16 ) + ( c < 16 ? "0" : "" ) + c . toString ( 16 ) + ( d < 16 ? "0" : "" ) + d . toString ( 16 ) } , c . unpack = function ( a ) { return 7 == a . length ? [ parseInt ( "0x" + a . substring ( 1 , 3 ) ) / 255 , parseInt ( "0x" + a . substring ( 3 , 5 ) ) / 255 , parseInt ( "0x" + a . substring ( 5 , 7 ) ) / 255 ] : 4 == a . length ? [ parseInt ( "0x" + a . substring ( 1 , 2 ) ) / 15 , parseInt ( "0x" + a . substring ( 2 , 3 ) ) / 15 , parseInt ( "0x" + a . substring ( 3 , 4 ) ) / 15 ] : void 0 } , c . HSLToRGB = function ( a ) { var b , c , d = a [ 0 ] , e = a [ 1 ] , f = a [ 2 ] ; return c = f <= . 5 ? f * ( e + 1 ) : f + e - f * e , b = 2 * f - c , [ this . hueToRGB ( b , c , d + . 33333 ) , this . hueToRGB ( b , c , d ) , this . hueToRGB ( b , c , d - . 33333 ) ] } , c . hueToRGB = function ( a , b , c ) { return c = c < 0 ? c + 1 : c > 1 ? c - 1 : c , 6 * c < 1 ? a + ( b - a ) * c * 6 : 2 * c < 1 ? b : 3 * c < 2 ? a + ( b - a ) * ( . 66666 - c ) * 6 : a } , c . RGBToHSL = function ( a ) { var b , c , d , e , f , g , h = a [ 0 ] , i = a [ 1 ] , j = a [ 2 ] ; return b = Math . min ( h , Math . min ( i , j ) ) , c = Math . max ( h , Math . max ( i , j ) ) , d = c - b , g = ( b + c ) / 2 , f = 0 , g > 0 && g < 1 && ( f = d / ( g < . 5 ? 2 * g : 2 - 2 * g ) ) , e = 0 , d > 0 && ( c == h && c != i && ( e += ( i - j ) / d ) , c == i && c != j && ( e += 2 + ( j - h ) / d ) , c == j && c != h && ( e += 4 + ( h - i ) / d ) , e /= 6 ) , [ e , f , g ] } , $ ( "*" , d ) . click ( c . click ) , c . setColor ( "#000000" ) , b && c . linkTo ( b ) } , BI . BubbleCombo = BI . inherit ( BI . Widget , { _const : { TRIANGLE _LENGTH : 6 } , _defaultConfig : function ( ) { return BI . exten
items : b . items } ) , this . popup . on ( BI . TextValueComboPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . SmallTextValueCombo . hideView ( ) , a . fireEvent ( BI . SmallTextValueCombo . EVENT _CHANGE ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . SmallTextValueCombo = BI . createWidget ( { type : "bi.combo" , element : this , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 300 } } ) } , setValue : function ( a ) { this . trigger . setValue ( a ) , this . popup . setValue ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } , populate : function ( a ) { this . options . items = a , this . SmallTextValueCombo . populate ( a ) } } ) , 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 a = this . options , b = this ; this . popup = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( a . items , { type : "bi.single_select_item" , textAlign : a . textAlign , height : 30 } ) , chooseType : a . chooseType , layouts : [ { type : "bi.vertical" } ] , value : a . value } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . TextValueComboPopup . EVENT _CHANGE , c , d ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . popup ] } ) } , populate : function ( a ) { BI . TextValueComboPopup . superclass . populate . apply ( this , arguments ) , a = BI . createItems ( a , { type : "bi.single_select_item" , height : 30 } ) , this . popup . populate ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( a ) { this . popup . setValue ( a ) } } ) , BI . TextValueComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_combo_popup" , BI . TextValueComboPopup ) , BI . TextValueDownListCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueDownListCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-text-value-down-list-combo" , height : 30 } ) } , _init : function ( ) { BI . TextValueDownListCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . _createValueMap ( ) ; var c ; BI . isNotNull ( b . value ) && ( c = this . _digest ( b . value ) ) , this . trigger = BI . createWidget ( { type : "bi.down_list_select_text_trigger" , height : b . height , items : b . items , text : b . text , value : c } ) , this . combo = BI . createWidget ( { type : "bi.down_list_combo" , element : this , chooseType : BI . Selection . Single , adjustLength : 2 , height : b . height , el : this . trigger , value : BI . isNull ( c ) ? [ ] : [ c ] , items : BI . deepClone ( b . items ) } ) , this . combo . on ( BI . DownListCombo . EVENT _CHANGE , function ( ) { a . setValue ( a . combo . getValue ( ) [ 0 ] . value ) , a . fireEvent ( BI . TextValueDownListCombo . EVENT _CHANGE ) } ) , this . combo . on ( BI . DownListCombo . EVENT _SON _VALUE _CHANGE , function ( ) { a . setValue ( a . combo . getValue ( ) [ 0 ] . childValue ) , a . fireEvent ( BI . TextValueDownListCombo . EVENT _CHANGE ) } ) } , _createValueMap : function ( ) { var a = this ; this . valueMap = { } , BI . each ( BI . flatten ( this . options . items ) , function ( b , c ) { BI . has ( c , "el" ) ? BI . each ( c . children , function ( b , d ) { a . valueMap [ d . value ] = { value : c . el . value , childValue : d . value } } ) : a . valueMap [ c . value ] = { value : c . value } } ) } , _digest : function ( a ) { return this . valueMap [ a ] } , setValue : function ( a ) { a = this . _digest ( a ) , this . combo . setValue ( [ a ] ) , this . trigger . setValue ( a ) } , getValue : function ( ) { var a = this . combo . getValue ( ) [ 0 ] ; return [ a . childValue || a . value ] } , populate : function ( a ) { this . options . items = BI . flatten ( a ) , this . combo . populate ( a ) , this . _createValueMap ( ) } } ) , BI . TextValueDownListCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_down_list_combo" , BI . TextValueDownListCombo ) , BI . DownListSelectTextTrigger = BI . inherit ( BI . Trigger , { _defaultConfig : function ( ) { return BI . extend ( BI . DownListSelectTextTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-down-list-select-text-trigger" , height : 24 , text : "" } ) } , _init : function ( ) { BI . DownListSelectTextTrigger . superclass . _init . apply ( this , arguments ) ; var a = this . options ; this . trigger = BI . createWidget ( { type : "bi.select_text_trigger" , elemen
element : this , items : [ { el : this . text , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _FOCUS , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _FOCUS , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _BLUR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _CLICK , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( b ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _VALID , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { a . _showHint ( ) , a . fireEvent ( BI . SimpleStateEditor . EVENT _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _START , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _PAUSE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _STOP , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _SPACE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _ENTER , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _RESTRICT , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { a . fireEvent ( BI . SimpleStateEditor . EVENT _EMPTY , arguments ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) , this . _showHint ( ) , BI . isNotNull ( b . text ) && this . setState ( b . text ) } , doRedMark : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { "" === this . editor . getValue ( ) && BI . isKey ( this . options . watermark ) || this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , focus : function ( ) { this . _showInput ( ) , this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) , this . _showHint ( ) } , _showInput : function ( ) { this . editor . visible ( ) , this . text . invisible ( ) } , _showHint : function ( ) { this . editor . invisible ( ) , this . text . visible ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } , setErrorText : function ( a ) { this . editor . setErrorText ( a ) } , getErrorText : function ( ) { return this . editor . getErrorText ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , setValue : function ( a ) { this . editor . setValue ( a ) } , getValue : function ( ) { return this . editor . getValue ( ) } , getState : function ( ) { return this . editor . getValue ( ) . match ( /[^\s]+/g ) } , setState : function ( a ) { return BI . SimpleStateEditor . superclass . setValue . apply ( this , arguments ) , BI . isNumber ( a ) ? void ( a === BI . Selection . All ? ( this . text . setText ( BI . i18nText ( "BI-Already_Selected" ) ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : a === BI . Selection . Multi ? ( this . text . setText ( BI . i18nText ( "BI-Already_Selected" ) ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : ( this . text . setText ( BI . i18nText ( "BI-Basic_Unrestricted" ) ) , this . text . element . addClass ( "state-editor-infinite-text" ) ) ) : void ( BI . isArray ( a ) && 1 !== a . length ? BI . isEmpty ( a ) ? ( this . text . setText ( BI . i18nText ( "BI-Basic_Unrestricted" ) ) , this . text . element . addClass ( "state-editor-infinite-text" ) ) : ( this . text . setText ( BI . i18nText ( "BI-Already_Selected" ) ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) : ( this . text . setText ( a ) , this . text . setTitle ( a ) , this . text . element . removeClass ( "state-editor-infinite-text" ) ) ) } } ) , BI . SimpleStateEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . SimpleStateEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . SimpleStateEditor . EVENT _BLUR = "EVENT_BLUR" , BI . SimpleStateEditor . EVENT _
} } ) , BI . DirectionPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.direction_pager" , BI . DirectionPager ) , BI . DetailPager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DetailPager . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-detail-pager" , behaviors : { } , layouts : [ { type : "bi.horizontal" , hgap : 10 , vgap : 0 } ] , dynamicShow : ! 0 , dynamicShowFirstLast : ! 1 , dynamicShowPrevNext : ! 1 , pages : ! 1 , curr : function ( ) { return 1 } , groups : 0 , jump : BI . emptyFn , first : ! 1 , last : ! 1 , prev : "上一页" , next : "下一页" , firstPage : 1 , lastPage : function ( ) { return 1 } , hasPrev : BI . emptyFn , hasNext : BI . emptyFn } ) } , _init : function ( ) { BI . DetailPager . superclass . _init . apply ( this , arguments ) ; var a = this ; this . currPage = BI . result ( this . options , "curr" ) , this . _lock = ! 1 , this . _debouce = BI . debounce ( function ( ) { a . _lock = ! 1 } , 300 ) , this . _populate ( ) } , _populate : function ( ) { var a = this , b = this . options , c = [ ] , d = { } ; this . empty ( ) ; var e = BI . result ( b , "pages" ) , f = BI . result ( this , "currPage" ) , g = BI . result ( b , "groups" ) , h = BI . result ( b , "first" ) , i = BI . result ( b , "last" ) , j = BI . result ( b , "prev" ) , k = BI . result ( b , "next" ) ; e === ! 1 ? ( g = 0 , h = ! 1 , i = ! 1 ) : g > e && ( g = e ) , d . index = Math . ceil ( ( f + ( g > 1 && g !== e ? 1 : 0 ) ) / ( 0 === g ? 1 : g ) ) , ( ! b . dynamicShow && ! b . dynamicShowPrevNext || f > 1 ) && j !== ! 1 && ( BI . isKey ( j ) ? c . push ( { text : j , value : "prev" , disabled : e === ! 1 ? b . hasPrev ( f ) === ! 1 : ! ( f > 1 && j !== ! 1 ) } ) : c . push ( BI . extend ( { disabled : e === ! 1 ? b . hasPrev ( f ) === ! 1 : ! ( f > 1 && j !== ! 1 ) } , j ) ) ) , ( ! b . dynamicShow && ! b . dynamicShowFirstLast || d . index > 1 && 0 !== g ) && h && ( c . push ( { text : h , value : "first" , disabled : ! ( d . index > 1 && 0 !== g ) } ) , d . index > 1 && 0 !== g && c . push ( { type : "bi.label" , cls : "page-ellipsis" , text : "…" } ) ) , d . poor = Math . floor ( ( g - 1 ) / 2 ) , d . start = d . index > 1 ? f - d . poor : 1 , d . end = d . index > 1 ? function ( ) { var a = f + ( g - d . poor - 1 ) ; return a > e ? e : a } ( ) : g , d . end - d . start < g - 1 && ( d . start = d . end - g + 1 ) ; var l = d . start , m = d . end ; for ( h && i && d . index > 1 && 0 !== g && e > g && d . end < e && 0 !== g && ( l ++ , m -- ) ; l <= m ; l ++ ) l === f ? c . push ( { text : l , value : l , selected : ! 0 } ) : c . push ( { text : l , value : l } ) ; ( ! b . dynamicShow && ! b . dynamicShowFirstLast || e > g && d . end < e && 0 !== g ) && i && ( e > g && d . end < e && 0 !== g && c . push ( { type : "bi.label" , cls : "page-ellipsis" , text : "…" } ) , c . push ( { text : i , value : "last" , disabled : ! ( e > g && d . end < e && 0 !== g ) } ) ) , d . flow = ! j && 0 === g , ( ! b . dynamicShow && ! b . dynamicShowPrevNext && k || f !== e && k || d . flow ) && c . push ( function ( ) { return BI . isKey ( k ) ? e === ! 1 ? { text : k , value : "next" , disabled : b . hasNext ( f ) === ! 1 } : d . flow && f === e ? { text : k , value : "next" , disabled : ! 0 } : { text : k , value : "next" , disabled : ! ( f !== e && k || d . flow ) } : BI . extend ( { disabled : e === ! 1 ? b . hasNext ( f ) === ! 1 : ! ( f !== e && k || d . flow ) } , k ) } ( ) ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , element : this , items : BI . createItems ( c , { cls : "page-item bi-border bi-list-item-active" , height : 23 , hgap : 10 } ) , behaviors : b . behaviors , layouts : b . layouts } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( c , d , f ) { if ( a . _lock !== ! 0 ) { if ( a . _lock = ! 0 , a . _debouce ( ) , c === BI . Events . CLICK ) { var g = a . button _group . getValue ( ) [ 0 ] ; switch ( g ) { case "first" : a . currPage = 1 ; break ; case "last" : a . currPage = e ; break ; case "prev" : a . currPage -- ; break ; case "next" : a . currPage ++ ; break ; default : a . currPage = g } b . jump . apply ( a , [ { pages : e , curr : a . currPage } ] ) , a . _populate ( ) , a . fireEvent ( BI . DetailPager . EVENT _CHANGE , f ) } a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } ) , this . fireEvent ( BI . DetailPager . EVENT _AFTER _POPULATE ) } , getCurrentPage : function ( ) { return this . currPage } , setAllPages : function ( a ) { this . options . pages = a } , hasPrev : function ( a ) { a || ( a = 1 ) ; var b = this . options , c = this . options . pages ; return c === ! 1 ? b . hasPrev ( a ) : a > 1 } , hasNext : function ( a ) { a || ( a = 1 ) ; var b = this . options , c = this . options . pages ; return c === ! 1 ? b . hasNext ( a ) : a < c } , setValue : function ( a ) { var b = this . options ; if ( a = 0 | a , a = a < 1 ? 1 : a , b . pages === ! 1 ) { var c = BI . result ( b , "lastPage" ) , d = 1 ; this . currPage = a > c ? c : ( d = BI . result ( b , "firstPage" ) , a < d ? d : a ) } else a = a > b . pages ? b . pages : a , this . currPage = a ; this . _populate ( ) } , getValue : function ( ) { var a = this . button _group . getValue ( ) [ 0 ] ; switch ( a ) { case "prev" : return - 1 ; case "next" : return 1 ; case "first" : return BI . MIN ; case "last" : return BI . MAX ; default : return a } } , attr : function ( a , b ) { BI . DetailPager . superclass . attr . apply ( this , arguments ) , "curr" === a && ( this . currPage = BI . result ( this . options , "curr" ) ) } , populate : function ( ) { this . _populate ( ) } } ) , BI . DetailPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . DetailPager . EVENT _AFTER _POPUL
freezeCols : this . _formatFreezeCols ( ) } } , _init : function ( ) { BI . DynamicSummaryLayerTreeTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _digest ( ) ; this . table = BI . createWidget ( b . el , { type : "bi.resizable_table" , element : this , width : b . width , height : b . height , isNeedResize : b . isNeedResize , isResizeAdapt : b . isResizeAdapt , isNeedFreeze : b . isNeedFreeze , freezeCols : c . freezeCols , isNeedMerge : b . isNeedMerge , mergeCols : [ ] , mergeRule : b . mergeRule , columnSize : c . columnSize , minColumnSize : c . minColumnSize , maxColumnSize : c . maxColumnSize , headerRowSize : b . headerRowSize , rowSize : b . rowSize , regionColumnSize : b . regionColumnSize , header : c . header , items : c . items } ) , this . table . on ( BI . Table . EVENT _TABLE _SCROLL , function ( ) { a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , function ( ) { a . _recomputeColumnSize ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , function ( ) { a . _recomputeColumnSize ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , arguments ) } ) } , setWidth : function ( a ) { BI . DynamicSummaryLayerTreeTable . superclass . setWidth . apply ( this , arguments ) , this . table . setWidth ( a ) } , setHeight : function ( a ) { BI . DynamicSummaryLayerTreeTable . superclass . setHeight . apply ( this , arguments ) , this . table . setHeight ( a ) } , setColumnSize : function ( a ) { this . options . columnSize = a } , getColumnSize : function ( ) { return this . options . columnSize } , setRegionColumnSize : function ( a ) { this . options . regionColumnSize = a , this . table . setRegionColumnSize ( a ) } , getRegionColumnSize : function ( ) { return this . table . getRegionColumnSize ( ) } , setVerticalScroll : function ( a ) { this . table . setVerticalScroll ( a ) } , setLeftHorizontalScroll : function ( a ) { this . table . setLeftHorizontalScroll ( a ) } , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , getLeftHorizontalScroll : function ( ) { return this . table . getLeftHorizontalScroll ( ) } , getRightHorizontalScroll : function ( ) { return this . table . getRightHorizontalScroll ( ) } , attr : function ( a , b ) { var c = this ; if ( BI . isObject ( a ) ) return void BI . each ( a , function ( a , b ) { c . attr ( a , b ) } ) ; switch ( BI . DynamicSummaryLayerTreeTable . superclass . attr . apply ( this , arguments ) , a ) { case "columnSize" : case "minColumnSize" : case "maxColumnSize" : case "freezeCols" : case "mergeCols" : return } this . table . attr . apply ( this . table , [ a , b ] ) } , restore : function ( ) { this . table . restore ( ) } , populate : function ( a , b , c , d ) { var e = this . options ; a && ( e . items = a ) , b && ( e . header = b ) , c && ( e . crossItems = c ) , d && ( e . crossHeader = d ) ; var f = this . _digest ( ) ; this . table . setColumnSize ( f . columnSize ) , this . table . attr ( "minColumnSize" , f . minColumnSize ) , this . table . attr ( "maxColumnSize" , f . maxColumnSize ) , this . table . attr ( "freezeCols" , f . freezeCols ) , this . table . populate ( f . items , f . header ) } , destroy : function ( ) { this . table . destroy ( ) , BI . DynamicSummaryLayerTreeTable . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.dynamic_summary_layer_tree_table" , BI . DynamicSummaryLayerTreeTable ) , BI . DynamicSummaryTreeTable = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DynamicSummaryTreeTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-dynamic-summary-tree-table" , el : { type : "bi.resizable_table" } , isNeedResize : ! 0 , isResizeAdapt : ! 0 , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 0 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , headerRowSize : 25 , footerRowSize : 25 , rowSize : 25 , regionColumnSize : [ ] , headerCellStyleGetter : BI . emptyFn , summaryCellStyleGetter : BI . emptyFn , sequenceCellStyleGetter : BI . emptyFn , header : [ ] , footer : ! 1 , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _getVDeep : function ( ) { return this . options . crossHeader . length } , _getHDeep : function ( ) { var a = this . options ; return Math . max ( a . mergeCols . length , a . freezeCols . length , BI . TableTree . maxDeep ( a . items ) - 1 ) } , _init : function ( ) { BI . DynamicSummaryTreeTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _digest ( ) ; this . table = BI . createWidget ( b . el , { type : "bi.resizable_table" , element : this , width : b . width , height : b . height , isNeedResize : b . isNeedResize , isResizeAdapt : b . isResizeAdapt , isNeedFreeze : b . isNeedFreeze , freezeCols : b . freezeC
} , _initBranchView : function ( ) { var a = this , b = this . options ; this . branchView = BI . createWidget ( b . popup , { } ) , this . branchView . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , populate : function ( a ) { this . branchView . populate . apply ( this . branchView , arguments ) } , getValue : function ( ) { return this . branchView . getValue ( ) } } ) , BI . BranchExpander . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.branch_expander" , BI . BranchExpander ) , BI . HandStandBranchTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . HandStandBranchTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-handstand-branch-tree" , expander : { } , el : { } , items : [ ] } ) } , _init : function ( ) { BI . HandStandBranchTree . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . branchTree = BI . createWidget ( { type : "bi.custom_tree" , element : this , expander : BI . extend ( { type : "bi.handstand_branch_expander" , el : { } , popup : { type : "bi.custom_tree" } } , b . expander ) , el : BI . extend ( { type : "bi.button_tree" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , layouts : [ { type : "bi.horizontal_adapt" } ] } , b . el ) , items : this . options . items } ) , this . branchTree . on ( BI . CustomTree . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . HandStandBranchTree . EVENT _CHANGE , arguments ) } ) , this . branchTree . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , populate : function ( ) { this . branchTree . populate . apply ( this . branchTree , arguments ) } , getValue : function ( ) { return this . branchTree . getValue ( ) } } ) , BI . HandStandBranchTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.handstand_branch_tree" , BI . HandStandBranchTree ) , BI . BranchTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . BranchTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-branch-tree" , expander : { } , el : { } , items : [ ] } ) } , _init : function ( ) { BI . BranchTree . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . branchTree = BI . createWidget ( { type : "bi.custom_tree" , element : this , expander : BI . extend ( { type : "bi.branch_expander" , el : { } , popup : { type : "bi.custom_tree" } } , b . expander ) , el : BI . extend ( { type : "bi.button_tree" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , layouts : [ { type : "bi.vertical" } ] } , b . el ) , items : this . options . items } ) , this . branchTree . on ( BI . CustomTree . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . BranchTree . EVENT _CHANGE , arguments ) } ) , this . branchTree . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , populate : function ( ) { this . branchTree . populate . apply ( this . branchTree , arguments ) } , getValue : function ( ) { return this . branchTree . getValue ( ) } } ) , BI . BranchTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.branch_tree" , BI . BranchTree ) , BI . DisplayTree = BI . inherit ( BI . TreeView , { _defaultConfig : function ( ) { return BI . extend ( BI . DisplayTree . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-display-tree" } ) } , _init : function ( ) { BI . DisplayTree . superclass . _init . apply ( this , arguments ) } , _configSetting : function ( ) { function a ( a , b ) { return ! 1 } var b = { view : { selectedMulti : ! 1 , dblClickExpand : ! 1 , showIcon : ! 1 , nameIsHTML : ! 0 , showTitle : ! 1 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , callback : { beforeCollapse : a } } ; return b } , _dealWidthNodes : function ( a ) { a = BI . DisplayTree . superclass . _dealWidthNodes . apply ( this , arguments ) ; this . options ; return BI . each ( a , function ( a , b ) { null == b . text && b . count > 0 && ( b . text = b . value + "(" + BI . i18nText ( "BI-Basic_Altogether" ) + b . count + BI . i18nText ( "BI-Basic_Count" ) + ")" ) } ) , a } , initTree : function ( a , b ) { var b = b || this . _configSetting ( ) ; this . nodes = $ . fn . zTree . init ( this . tree . element , b , a ) } , destroy : function ( ) { BI . DisplayTree . superclass . destroy . apply ( this , arguments ) } } ) , BI . DisplayTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.display_tree" , BI . DisplayTree ) , BI . LevelTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . LevelTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-level-tree" , el : { chooseType : 0 } , expander : { } , items : [ ] , value : "" } ) } , _init : function ( ) { BI . LevelTree . superclass . _init . apply ( this , arguments ) , this . initTree ( this . options . items ) } , _formatItems : function ( a , b ) { var c = this ; return BI . each ( a , function ( d , e ) { var f = { layer : b } ; if ( BI . isKey ( e . id ) || ( e . id = BI . UUID ( ) ) , e . isParen
height : 24 } ) } , _init : function ( ) { BI . DateTrigger . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _const ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : b . height , validationChecker : function ( b ) { var c = b . match ( /\d+/g ) ; return a . _autoAppend ( b , c ) , a . _dateCheck ( b ) && BI . checkDateLegal ( b ) && a . _checkVoid ( { year : c [ 0 ] , month : c [ 1 ] , day : c [ 2 ] } ) } , quitChecker : function ( ) { return ! 1 } , hgap : c . hgap , vgap : c . vgap , allowBlank : ! 0 , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) , errorText : function ( ) { return a . editor . isEditing ( ) ? BI . i18nText ( "BI-Date_Trigger_Error_Text" ) : BI . i18nText ( "BI-Year_Trigger_Invalid_Text" ) } } ) , this . editor . on ( BI . SignEditor . EVENT _KEY _DOWN , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _KEY _DOWN ) } ) , this . editor . on ( BI . SignEditor . EVENT _FOCUS , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _FOCUS ) } ) , this . editor . on ( BI . SignEditor . EVENT _STOP , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _STOP ) } ) , this . editor . on ( BI . SignEditor . EVENT _VALID , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _VALID ) } ) , this . editor . on ( BI . SignEditor . EVENT _ERROR , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _ERROR ) } ) , this . editor . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var b = a . editor . getValue ( ) ; if ( BI . isNotNull ( b ) && a . editor . setState ( b ) , BI . isNotEmptyString ( b ) ) { var c = b . split ( "-" ) ; a . store _value = { type : BI . DateTrigger . MULTI _DATE _CALENDAR , value : { year : 0 | c [ 0 ] , month : c [ 1 ] - 1 , day : 0 | c [ 2 ] } } } a . fireEvent ( BI . DateTrigger . EVENT _CONFIRM ) } ) , this . editor . on ( BI . SignEditor . EVENT _SPACE , function ( ) { a . editor . isValid ( ) && a . editor . blur ( ) } ) , this . editor . on ( BI . SignEditor . EVENT _START , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _START ) } ) , this . editor . on ( BI . SignEditor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . DateTrigger . EVENT _CHANGE ) } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : BI . createWidget ( ) , width : 30 } , { el : this . editor } ] } ) , this . setValue ( b . value ) } , _dateCheck : function ( a ) { return BI . parseDateTime ( a , "%Y-%x-%d" ) . print ( "%Y-%x-%d" ) == a || BI . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) == a || BI . parseDateTime ( a , "%Y-%x-%e" ) . print ( "%Y-%x-%e" ) == a || BI . parseDateTime ( a , "%Y-%X-%e" ) . print ( "%Y-%X-%e" ) == a } , _checkVoid : function ( a ) { return ! BI . checkDateVoid ( a . year , a . month , a . day , this . options . min , this . options . max ) [ 0 ] } , _autoAppend : function ( a , b ) { var c = this , d = BI . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) , e = function ( a ) { return BI . parseDateTime ( a , "%Y" ) . print ( "%Y" ) == a && d >= c . options . min && d <= c . options . max } , f = function ( a ) { return BI . parseDateTime ( a , "%Y-%X" ) . print ( "%Y-%X" ) == a && d >= c . options . min && d <= c . options . max } ; if ( BI . isNotNull ( b ) && BI . checkDateLegal ( a ) ) switch ( a . length ) { case this . _const . yearLength : e ( a ) && this . editor . setValue ( a + "-" ) ; break ; case this . _const . yearMonthLength : f ( a ) && this . editor . setValue ( a + "-" ) } } , setValue : function ( a ) { var b , c , d = this , e = BI . getDate ( ) ; this . store _value = a , BI . isNotNull ( a ) && ( b = a . type || BI . DateTrigger . MULTI _DATE _CALENDAR , c = a . value , BI . isNull ( c ) && ( c = a ) ) ; var f = function ( a , b ) { var c = a . print ( "%Y-%x-%e" ) ; d . editor . setState ( c ) , d . editor . setValue ( c ) , d . setTitle ( b + ":" + c ) } ; switch ( b ) { case BI . DateTrigger . MULTI _DATE _YEAR _PREV : var g = c + BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _PREV ] ; e = BI . getDate ( e . getFullYear ( ) - 1 * c , e . getMonth ( ) , e . getDate ( ) ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _YEAR _AFTER : var g = c + BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _AFTER ] ; e = BI . getDate ( e . getFullYear ( ) + 1 * c , e . getMonth ( ) , e . getDate ( ) ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _YEAR _BEGIN : var g = BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _BEGIN ] ; e = BI . getDate ( e . getFullYear ( ) , 0 , 1 ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _YEAR _END : var g = BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _YEAR _END ] ; e = BI . getDate ( e . getFullYear ( ) , 11 , 31 ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _QUARTER _PREV : var g = c + BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _PREV ] ; e = BI . getDate ( ) . getBeforeMulQuarter ( c ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _QUARTER _AFTER : var g = c + BI . DateTrigger . MULTI _DATE _SEGMENT _NUM [ BI . DateTrigger . MULTI _DATE _QUARTER _AFTER ] ; e = BI . getDate ( ) . getAfterMulQuarter ( c ) , f ( e , g ) ; break ; case BI . DateTrigger . MULTI _DATE _QUARTER _BEGIN : var g = BI . DateTrigger . MULTI _DATE _SE
this . calendar . setValue ( a ) , this . selectedTime = a } , _setDatePicker : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . year ) || BI . isNull ( a . month ) ? this . datePicker . setValue ( this . _getNewCurrentDate ( ) ) : this . datePicker . setValue ( a ) } , _setCalendar : function ( a ) { BI . isNull ( a ) || BI . isNull ( a . day ) ? ( this . calendar . empty ( ) , this . _setCalenderValue ( this . _getNewCurrentDate ( ) ) ) : this . _setCalenderValue ( a ) } , setValue : function ( a ) { this . _setDatePicker ( a ) , this . _setCalendar ( a ) } , getValue : function ( ) { return this . selectedTime } } ) , BI . shortcut ( "bi.static_date_pane_card" , BI . StaticDatePaneCard ) , BI . DynamicDatePane = BI . inherit ( BI . Widget , { props : { baseCls : "bi-dynamic-date-pane" } , render : function ( ) { var a = this ; return { type : "bi.vtape" , items : [ { el : { type : "bi.linear_segment" , cls : "bi-border-bottom" , height : 30 , items : BI . createItems ( [ { text : BI . i18nText ( "BI-Multi_Date_YMD" ) , value : BI . DynamicDatePane . Static } , { text : BI . i18nText ( "BI-Basic_Dynamic_Title" ) , value : BI . DynamicDatePane . Dynamic } ] , { textAlign : "center" } ) , listeners : [ { eventName : BI . ButtonGroup . EVENT _CHANGE , action : function ( ) { var b = this . getValue ( ) [ 0 ] ; switch ( a . dateTab . setSelect ( b ) , b ) { case BI . DynamicDatePane . Static : var c = BI . DynamicDateHelper . getCalculation ( a . dynamicPane . getValue ( ) ) ; a . ymd . setValue ( { year : c . getFullYear ( ) , month : c . getMonth ( ) , day : c . getDate ( ) } ) ; break ; case BI . DynamicDatePane . Dynamic : a . dynamicPane . setValue ( { year : 0 } ) } } } ] , ref : function ( ) { a [ "switch" ] = this } } , height : 30 } , { type : "bi.tab" , ref : function ( ) { a . dateTab = this } , showIndex : BI . DynamicDatePane . Static , cardCreator : function ( b ) { switch ( b ) { case BI . DynamicDatePane . Static : return { type : "bi.static_date_pane_card" , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { a . fireEvent ( "EVENT_CHANGE" ) } } ] , ref : function ( ) { a . ymd = this } } ; case BI . DynamicDatePane . Dynamic : default : return { type : "bi.dynamic_date_card" , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { a . fireEvent ( "EVENT_CHANGE" ) } } ] , ref : function ( ) { a . dynamicPane = this } } } } } ] } } , mounted : function ( ) { this . setValue ( this . options . value ) } , _checkValueValid : function ( a ) { return BI . isNull ( a ) || BI . isEmptyObject ( a ) || BI . isEmptyString ( a ) } , setValue : function ( a ) { a = a || { } ; var b = a . type || BI . DynamicDateCombo . Static , c = a . value || a ; switch ( this [ "switch" ] . setValue ( b ) , this . dateTab . setSelect ( b ) , b ) { case BI . DynamicDateCombo . Dynamic : this . dynamicPane . setValue ( c ) ; break ; case BI . DynamicDateCombo . Static : default : if ( this . _checkValueValid ( c ) ) { var d = BI . getDate ( ) ; this . ymd . setValue ( { year : d . getFullYear ( ) , month : d . getMonth ( ) } ) } else this . ymd . setValue ( c ) } } , getValue : function ( ) { return { type : this . dateTab . getSelect ( ) , value : this . dateTab . getValue ( ) } } } ) , BI . shortcut ( "bi.dynamic_date_pane" , BI . DynamicDatePane ) , BI . extend ( BI . DynamicDatePane , { Static : 1 , Dynamic : 2 } ) , BI . DynamicYearCard = BI . inherit ( BI . Widget , { props : { baseCls : "bi-year-card" } , render : function ( ) { var a = this ; return { type : "bi.vertical" , items : [ { type : "bi.label" , text : BI . i18nText ( "BI-Multi_Date_Relative_Current_Time" ) , textAlign : "left" , height : 24 } , { type : "bi.dynamic_date_param_item" , ref : function ( ) { a . item = this } , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { a . fireEvent ( "EVENT_CHANGE" ) } } ] } ] , vgap : 10 , hgap : 10 } } , _createValue : function ( a , b ) { return { dateType : a , value : Math . abs ( b ) , offset : b > 0 ? 1 : 0 } } , setValue : function ( a ) { a = a || { year : 0 } , this . item . setValue ( this . _createValue ( BI . DynamicDateCard . TYPE . YEAR , a . year ) ) } , getValue : function ( ) { var a = this . item . getValue ( ) ; return { year : 0 === a . offset ? - a . value : a . value } } } ) , BI . DynamicYearCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.dynamic_year_card" , BI . DynamicYearCard ) , BI . StaticYearCard = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . StaticYearCard . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-year-card" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" } ) } , _createYearCalendar : function ( a ) { var b = this . options , c = this . _year , d = BI . createWidget ( { type : "bi.year_calendar" , behaviors : b . behaviors , min : b . min , max : b . max , logic : { dynamic : ! 0 } , year : c + 12 * a } ) ; return d . setValue ( this . _year ) , d } , _init : function ( ) { BI . StaticYearCard . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . selectedYear = this . _year = BI . getDate ( ) . getFullYear ( ) , this . backBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "pre-page-h-font" , width : 25 , height : 25 , value : - 1 , listeners : [ { even
} } ] } ] } } , getValue : function ( ) { return { year : this . selectedYear , quarter : this . selectedQuarter } } , setValue : function ( a ) { var b = this . options ; if ( a = a || { } , a . year = a . year || 0 , a . quarter = a . quarter || 0 , BI . checkDateVoid ( a . year , a . quarter , 1 , b . min , b . max ) [ 0 ] ) { var c = BI . getDate ( ) . getFullYear ( ) , d = BI . getDate ( ) . getQuarter ( ) ; this . selectedYear = "" , this . selectedQuarter = "" , this . yearPicker . setValue ( c ) , this . quarter . setValue ( d ) } else this . selectedYear = BI . parseInt ( a . year ) , this . selectedQuarter = BI . parseInt ( a . quarter ) , this . yearPicker . setValue ( this . selectedYear ) , this . quarter . setValue ( this . selectedQuarter ) } } ) , BI . StaticYearQuarterCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.static_year_quarter_card" , BI . StaticYearQuarterCard ) , BI . DynamicYearQuarterCombo = BI . inherit ( BI . Widget , { props : { baseCls : "bi-year-quarter-combo bi-border" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , height : 25 } , _init : function ( ) { BI . DynamicYearQuarterCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . storeValue = b . value , this . trigger = BI . createWidget ( { type : "bi.dynamic_year_quarter_trigger" , min : b . min , max : b . max , value : b . value || "" } ) , this . trigger . on ( BI . DynamicYearQuarterTrigger . EVENT _START , function ( ) { a . combo . isViewVisible ( ) && a . combo . hideView ( ) } ) , this . trigger . on ( BI . DynamicYearQuarterTrigger . EVENT _STOP , function ( ) { a . combo . showView ( ) } ) , this . trigger . on ( BI . DynamicYearQuarterTrigger . EVENT _ERROR , function ( ) { a . combo . isViewVisible ( ) && a . combo . hideView ( ) } ) , this . trigger . on ( BI . DynamicYearQuarterTrigger . EVENT _CONFIRM , function ( ) { a . combo . isViewVisible ( ) || ( a . storeValue = a . trigger . getValue ( ) , a . fireEvent ( BI . DynamicYearQuarterCombo . EVENT _CONFIRM ) ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : this . trigger , popup : { minWidth : 85 , stopPropagation : ! 1 , el : { type : "bi.dynamic_year_quarter_popup" , ref : function ( ) { a . popup = this } , listeners : [ { eventName : BI . DynamicYearQuarterPopup . EVENT _CHANGE , action : function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) , a . fireEvent ( BI . DynamicYearQuarterCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicYearQuarterPopup . BUTTON _CLEAR _EVENT _CHANGE , action : function ( ) { a . setValue ( ) , a . combo . hideView ( ) , a . fireEvent ( BI . DynamicYearQuarterCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicYearQuarterPopup . BUTTON _lABEL _EVENT _CHANGE , action : function ( ) { var b = BI . getDate ( ) ; a . setValue ( { year : b . getFullYear ( ) } ) , a . combo . hideView ( ) , a . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicYearQuarterPopup . BUTTON _OK _EVENT _CHANGE , action : function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) , a . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } ] , behaviors : b . behaviors , min : b . min , max : b . max } , value : b . value || "" } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . popup . setValue ( a . storeValue ) , a . fireEvent ( BI . DynamicYearQuarterCombo . EVENT _BEFORE _POPUPVIEW ) } ) , BI . createWidget ( { type : "bi.htape" , element : this , ref : function ( ) { a . comboWrapper = this } , items : [ { el : { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-change-h-font" , width : 24 , height : 24 , ref : function ( ) { a . changeIcon = this } } , width : 30 } , this . combo ] } ) , this . _checkDynamicValue ( b . value ) } , _checkDynamicValue : function ( a ) { var b = null ; switch ( BI . isNotNull ( a ) && ( b = a . type ) , b ) { case BI . DynamicYearQuarterCombo . Dynamic : this . changeIcon . setVisible ( ! 0 ) , this . comboWrapper . attr ( "items" ) [ 0 ] . width = 30 , this . comboWrapper . resize ( ) ; break ; default : this . comboWrapper . attr ( "items" ) [ 0 ] . width = 0 , this . comboWrapper . resize ( ) , this . changeIcon . setVisible ( ! 1 ) } } , setValue : function ( a ) { this . storeValue = a , this . trigger . setValue ( a ) , this . _checkDynamicValue ( a ) } , getValue : function ( ) { return this . storeValue } } ) , BI . DynamicYearQuarterCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicYearQuarterCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.dynamic_year_quarter_combo" , BI . DynamicYearQuarterCombo ) , BI . extend ( BI . DynamicYearQuarterCombo , { Static : 1 , Dynamic : 2 } ) , BI . DynamicYearQuarterPopup = BI . inherit ( BI . Widget , { constants : { tabHeight : 30 } , props : { baseCls : "bi-year-quarter-popup" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , width : 180 , height : 240 } , render : function ( ) { var a = this ; this . options ; return this . storeValue = { type : BI . DynamicYearQuarterCombo . Static } , { type : "bi.vtape" , items : [ { el : this
this . _yearCheck ( a ) && this . editor . setValue ( a + "-" ) ; break ; case this . _const . yearMonthLength : this . _monthCheck ( a ) && this . editor . setValue ( a + "-" ) } } , _yearCheck : function ( a ) { var b = BI . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) ; return BI . parseDateTime ( a , "%Y" ) . print ( "%Y" ) === a && b >= this . options . min && b <= this . options . max } , _monthCheck : function ( a ) { var b = BI . parseDateTime ( a , "%Y-%X-%d" ) . print ( "%Y-%X-%d" ) ; return BI . parseDateTime ( a , "%Y-%X" ) . print ( "%Y-%X" ) === a && b >= this . options . min && b <= this . options . max } , _setInnerValue : function ( a , b ) { var c = a . print ( "%Y-%x-%e" ) ; this . editor . setState ( c ) , this . editor . setValue ( c ) , this . setTitle ( BI . isEmptyString ( b ) ? c : b + ":" + c ) } , _getText : function ( a ) { function b ( a , b ) { switch ( b ) { case BI . DynamicDateCard . OFFSET . BEGIN : return a + BI . i18nText ( "BI-Basic_Begin_Start" ) ; case BI . DynamicDateCard . OFFSET . END : return a + BI . i18nText ( "BI-Basic_End_Stop" ) ; case BI . DynamicDateCard . OFFSET . CURRENT : default : return BI . i18nText ( "BI-Basic_Current_Day" ) } } var c = "" ; return BI . isNotNull ( a . year ) && 0 !== a . year && ( c += Math . abs ( a . year ) + BI . i18nText ( "BI-Basic_Year" ) + ( a . year < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) + b ( BI . i18nText ( "BI-Basic_Year" ) , a . position ) ) , BI . isNotNull ( a . quarter ) && 0 !== a . quarter && ( c += Math . abs ( a . quarter ) + BI . i18nText ( "BI-Basic_Single_Quarter" ) + ( a . quarter < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) + b ( BI . i18nText ( "BI-Basic_Year" ) , a . position ) ) , BI . isNotNull ( a . month ) && 0 !== a . month && ( c += Math . abs ( a . month ) + BI . i18nText ( "BI-Basic_Month" ) + ( a . month < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) + b ( BI . i18nText ( "BI-Basic_Month" ) , a . position ) ) , BI . isNotNull ( a . week ) && 0 !== a . week && ( c += Math . abs ( a . week ) + BI . i18nText ( "BI-Basic_Week" ) + ( a . week < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) + b ( BI . i18nText ( "BI-Basic_Week" ) , a . position ) ) , BI . isNotNull ( a . day ) && 0 !== a . day && ( c += Math . abs ( a . day ) + BI . i18nText ( "BI-Basic_Day" ) + ( a . day < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) + BI . size ( a ) === 1 ? b ( BI . i18nText ( "BI-Basic_Month" ) , a . position ) : "" ) , BI . isNotNull ( a . workDay ) && 0 !== a . workDay && ( c += Math . abs ( a . workDay ) + BI . i18nText ( "BI-Basic_Work_Day" ) + ( a . workDay < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , c } , setValue : function ( a ) { var b , c , d = BI . getDate ( ) ; switch ( this . storeValue = a , BI . isNotNull ( a ) && ( b = a . type || BI . DynamicDateCombo . Static , c = a . value || a ) , b ) { case BI . DynamicDateCombo . Dynamic : var e = this . _getText ( c ) ; d = BI . DynamicDateHelper . getCalculation ( c ) , this . _setInnerValue ( d , e ) ; break ; case BI . DynamicDateCombo . Static : default : if ( BI . isNull ( c ) || BI . isNull ( c . day ) ) this . editor . setState ( "" ) , this . editor . setValue ( "" ) , this . setTitle ( "" ) ; else { var f = c . year + "-" + ( c . month + 1 ) + "-" + c . day ; this . editor . setState ( f ) , this . editor . setValue ( f ) , this . setTitle ( f ) } } } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . storeValue } } ) , 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 . SearchEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . SearchEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-search-editor bi-border" , height : 24 , errorText : "" , watermark : BI . i18nText ( "BI-Basic_Search" ) , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn } ) } , _init : function ( ) { this . options . height -= 2 , BI . SearchEditor . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : b . height , watermark : b . watermark , allowBlank : ! 0 , errorText : b . errorText , validationChecker : b . validationChecker , quitChecker : b . quitChecker } ) , this . clear = BI . createWidget ( { type : "bi.icon_button" , stopEvent : ! 0 , cls : "search-close-h-font" } ) , this . clear . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . setValue ( "" ) , a . fireEvent ( BI . Contr
this . labelTwo . setValue ( this . max ) , this . _setAllPosition ( 0 , 100 ) ) ) } } ) , BI . IntervalSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.interval_slider" , BI . IntervalSlider ) , BI . AccurateCalculationModel = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . AccurateCalculationModel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "" } ) } , _init : function ( ) { BI . AccurateCalculationModel . superclass . _init . apply ( this , arguments ) } , _getMagnitude : function ( a ) { for ( var b = "1" , c = 0 ; c < a ; c ++ ) b += "0" ; return BI . parseInt ( b ) } , _formatDecimal : function ( a , b ) { if ( a . numDecimalLength !== b . numDecimalLength ) { var c = a . numDecimalLength - b . numDecimalLength ; if ( c > 0 ) var d = b ; else { var d = a ; c = 0 - c } for ( var e = 0 ; e < c ; e ++ ) "0" === d . numDecimal && 0 === e || ( d . numDecimal += "0" ) } } , _stringNumberFactory : function ( a ) { var b = a . toString ( ) , c = b . split ( "." ) , d = c [ 0 ] ; if ( 1 === c . length ) var e = "0" , f = 0 ; else var e = c [ 1 ] , f = c [ 1 ] . length ; return { numInteger : d , numDecimal : e , numDecimalLength : f } } , _accurateSubtraction : function ( a , b ) { function c ( a , b ) { return a . numDecimal . length >= b . numDecimal . length ? a . numDecimal . length : b . numDecimal . length } function d ( a , b ) { for ( var c = b - a . length , d = 0 ; d < c ; d ++ ) a = "0" + a ; return a } var e = this . _stringNumberFactory ( a ) , f = this . _stringNumberFactory ( b ) , g = BI . parseInt ( e . numInteger ) - BI . parseInt ( f . numInteger ) ; this . _formatDecimal ( e , f ) ; var h = c ( e , f ) ; if ( BI . parseInt ( e . numDecimal ) >= BI . parseInt ( f . numDecimal ) ) var i = ( BI . parseInt ( e . numDecimal ) - BI . parseInt ( f . numDecimal ) ) . toString ( ) , j = d ( i , h ) ; else { g -- ; var k = this . _getMagnitude ( h ) , i = ( k + BI . parseInt ( e . numDecimal ) - BI . parseInt ( f . numDecimal ) ) . toString ( ) , j = d ( i , h ) } var l = g + "." + j ; return BI . parseFloat ( l ) } , _accurateAddition : function ( a , b ) { function c ( a , b ) { for ( var c = b - a . length , d = 0 ; d < c ; d ++ ) a = "0" + a ; return a } var d = this . _stringNumberFactory ( a ) , e = this . _stringNumberFactory ( b ) , f = BI . parseInt ( d . numInteger ) + BI . parseInt ( e . numInteger ) ; this . _formatDecimal ( d , e ) ; var g = ( BI . parseInt ( d . numDecimal ) + BI . parseInt ( e . numDecimal ) ) . toString ( ) ; "0" !== g && ( g . length <= d . numDecimal . length ? g = c ( g , d . numDecimal . length ) : ( f ++ , g = g . slice ( 1 ) ) ) ; var h = f + "." + g ; return BI . parseFloat ( h ) } , _accurateMultiplication : function ( a , b ) { var c = this . _stringNumberFactory ( a ) , d = this . _stringNumberFactory ( b ) , e = BI . parseInt ( c . numInteger ) * BI . parseInt ( d . numInteger ) , f = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numDecimal ) * BI . parseInt ( d . numInteger ) , c . numDecimalLength ) , g = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numInteger ) * BI . parseInt ( d . numDecimal ) , d . numDecimalLength ) , h = this . _accurateDivisionTenExponent ( BI . parseInt ( c . numDecimal ) * BI . parseInt ( d . numDecimal ) , c . numDecimalLength + d . numDecimalLength ) ; return this . _accurateAddition ( this . _accurateAddition ( this . _accurateAddition ( e , f ) , g ) , h ) } , _accurateDivisionTenExponent : function ( a , b ) { function c ( a , b ) { for ( var c = b - a . length , d = 0 ; d < c ; d ++ ) a = "0" + a ; return a } var d = this . _stringNumberFactory ( a ) ; if ( d . numInteger . length > b ) var e = d . numInteger . slice ( 0 , d . numInteger . length - b ) , f = d . numInteger . slice ( - b ) ; else var e = "0" , f = c ( d . numInteger , b ) ; var g = e + "." + f + d . numDecimal ; return BI . parseFloat ( g ) } , accurateSubtraction : function ( a , b ) { return a >= 0 && b >= 0 ? a >= b ? this . _accurateSubtraction ( a , b ) : - this . _accurateSubtraction ( b , a ) : a >= 0 && b < 0 ? this . _accurateAddition ( a , - b ) : a < 0 && b >= 0 ? - this . _accurateAddition ( - a , b ) : a < 0 && b < 0 ? a >= b ? this . _accurateSubtraction ( - b , - a ) : this . _accurateSubtraction ( - a , - b ) : void 0 } , accurateAddition : function ( a , b ) { return a >= 0 && b >= 0 ? this . _accurateAddition ( a , b ) : a >= 0 && b < 0 ? this . accurateSubtraction ( a , - b ) : a < 0 && b >= 0 ? this . accurateSubtraction ( b , - a ) : a < 0 && b < 0 ? - this . _accurateAddition ( - a , - b ) : void 0 } , accurateMultiplication : function ( a , b ) { return a >= 0 && b >= 0 ? this . _accurateMultiplication ( a , b ) : a >= 0 && b < 0 ? - this . _accurateMultiplication ( a , - b ) : a < 0 && b >= 0 ? - this . _accurateMultiplication ( - a , b ) : a < 0 && b < 0 ? this . _accurateMultiplication ( - a , - b ) : void 0 } , accurateDivisionTenExponent : function ( a , b ) { return a >= 0 ? this . _accurateDivisionTenExponent ( a , b ) : - this . _accurateDivisionTenExponent ( - a , b ) } } ) , BI . MonthCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-combo" , behaviors : { } , height : 25 } ) } , _init : function ( ) { BI . MonthCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this .
return 0 | this . textEditor . getValue ( ) } , setInputValue : function ( a ) { this . textEditor . setValue ( a ) } , isEditorExist : function ( ) { return this . options . isEditorExist } } ) , BI . MultiDateSegment . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multidate_segment" , BI . MultiDateSegment ) , BI . WeekCard = BI . inherit ( BI . MultiDateCard , { _defaultConfig : function ( ) { return $ . extend ( BI . WeekCard . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multidate-weekcard" } ) } , _init : function ( ) { BI . WeekCard . superclass . _init . apply ( this , arguments ) } , dateConfig : function ( ) { return [ { selected : ! 0 , isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Week_Prev" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _PREV } , { isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Week_Next" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _AFTER } ] } , defaultSelectedItem : function ( ) { return BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _WEEK _PREV } } ) , BI . WeekCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.weekcard" , BI . WeekCard ) , BI . YearCard = BI . inherit ( BI . MultiDateCard , { _defaultConfig : function ( ) { return $ . extend ( BI . YearCard . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multidate-yearcard" } ) } , _init : function ( ) { BI . YearCard . superclass . _init . apply ( this , arguments ) } , dateConfig : function ( ) { return [ { selected : ! 0 , isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Year_Prev" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _PREV } , { isEditorExist : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Year_Next" ) , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _AFTER } , { isEditorExist : ! 1 , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _BEGIN , text : BI . i18nText ( "BI-Multi_Date_Year_Begin" ) } , { isEditorExist : ! 1 , value : BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _END , text : BI . i18nText ( "BI-Multi_Date_Year_End" ) } ] } , defaultSelectedItem : function ( ) { return BI . MultiDateCombo . DATE _TYPE . MULTI _DATE _YEAR _PREV } } ) , BI . YearCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.yearcard" , BI . YearCard ) , BI . DownListCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DownListCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-down-list-combo" , height : 24 , items : [ ] , adjustLength : 0 , direction : "bottom" , trigger : "click" , container : null , stopPropagation : ! 1 , el : { } } ) } , _init : function ( ) { BI . DownListCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . popupview = BI . createWidget ( { type : "bi.multi_layer_down_list_popup" , items : b . items , chooseType : b . chooseType , value : b . value } ) , this . popupview . on ( BI . DownListPopup . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . DownListCombo . EVENT _CHANGE , b ) , a . downlistcombo . hideView ( ) } ) , this . popupview . on ( BI . DownListPopup . EVENT _SON _VALUE _CHANGE , function ( b , c ) { a . fireEvent ( BI . DownListCombo . EVENT _SON _VALUE _CHANGE , b , c ) , a . downlistcombo . hideView ( ) } ) , this . downlistcombo = BI . createWidget ( { element : this , type : "bi.combo" , trigger : b . trigger , isNeedAdjustWidth : ! 1 , container : b . container , adjustLength : b . adjustLength , direction : b . direction , stopPropagation : b . stopPropagation , el : BI . createWidget ( b . el , { type : "bi.icon_trigger" , extraCls : b . iconCls ? b . iconCls : "pull-down-font" , width : b . width , height : b . height } ) , popup : { el : this . popupview , stopPropagation : ! 0 , maxHeight : 1e3 } } ) , this . downlistcombo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . fireEvent ( BI . DownListCombo . EVENT _BEFORE _POPUPVIEW ) } ) } , hideView : function ( ) { this . downlistcombo . hideView ( ) } , showView : function ( ) { this . downlistcombo . showView ( ) } , populate : function ( a ) { this . popupview . populate ( a ) } , setValue : function ( a ) { this . popupview . setValue ( a ) } , getValue : function ( ) { return this . popupview . getValue ( ) } } ) , BI . DownListCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . DownListCombo . EVENT _SON _VALUE _CHANGE = "EVENT_SON_VALUE_CHANGE" , BI . DownListCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multi_layer_down_list_combo" , BI . DownListCombo ) , BI . MultiLayerDownListPopup = BI . inherit ( BI . Pane , { constants : { nextIcon : "pull-right-e-font" , height : 25 , iconHeight : 12 , iconWidth : 12 , hgap : 0 , vgap : 0 , border : 1 } , _defaultConfig : function ( ) { var a = BI . MultiLayerDownListPopup . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : "bi-down-list-popup" , items : [ ] , chooseType : BI . Selection . Multi } ) } , _init : function ( ) { BI . MultiLayerDown
extraCls : "bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active" , logic : { dynamic : ! 1 } , layer : 0 , id : "" , pId : "" , height : 25 } ) } , _init : function ( ) { BI . MultiLayerSingleTreeMidTreeLeafItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . item = BI . createWidget ( { type : "bi.mid_tree_leaf_item" , cls : "bi-list-item-none" , logic : { dynamic : ! 0 } , id : b . id , pId : b . pId , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py , keyword : b . keyword } ) , this . item . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b !== BI . Events . CLICK && a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; var c = [ ] ; BI . count ( 0 , b . layer , function ( ) { c . push ( { type : "bi.layout" , cls : "base-line-conn-background" , width : 13 , height : b . height } ) } ) , c . push ( this . item ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( b . layer , 13 ) , items : [ c ] } ) } , doHighLight : function ( ) { this . item . doHighLight . apply ( this . item , arguments ) } , unHighLight : function ( ) { this . item . unHighLight . apply ( this . item , arguments ) } , getId : function ( ) { return this . options . id } , getPId : function ( ) { return this . options . pId } , doClick : function ( ) { BI . MultiLayerSingleTreeMidTreeLeafItem . superclass . doClick . apply ( this , arguments ) , this . item . setSelected ( this . isSelected ( ) ) } , setSelected : function ( a ) { BI . MultiLayerSingleTreeMidTreeLeafItem . superclass . setSelected . apply ( this , arguments ) , this . item . setSelected ( a ) } } ) , BI . shortcut ( "bi.multilayer_single_tree_mid_tree_leaf_item" , BI . MultiLayerSingleTreeMidTreeLeafItem ) , BI . MultiSelectCheckPane = BI . inherit ( BI . Widget , { constants : { height : 25 , lgap : 10 , tgap : 5 } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCheckPane . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-check-pane bi-background" , items : [ ] , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , onClickContinueSelect : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectCheckPane . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . storeValue = b . value || { } , this . display = BI . createWidget ( { type : "bi.display_selected_list" , items : b . items , itemsCreator : function ( c , d ) { return c = BI . extend ( c || { } , { selectedValues : a . storeValue . value } ) , a . storeValue . type === BI . Selection . Multi ? void d ( { items : BI . map ( a . storeValue . value , function ( a , c ) { var d = b . valueFormatter ( c ) || c ; return { text : d , value : c , title : d } } ) } ) : void b . itemsCreator ( c , d ) } } ) , this . continueSelect = BI . createWidget ( { type : "bi.text_button" , text : BI . i18nText ( "BI-Continue_Select" ) , cls : "multi-select-check-selected bi-high-light" } ) , this . continueSelect . on ( BI . TextButton . EVENT _CHANGE , function ( ) { b . onClickContinueSelect ( ) } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { height : this . constants . height , el : { type : "bi.left" , cls : "multi-select-continue-select" , items : [ { el : { type : "bi.label" , text : BI . i18nText ( "BI-Selected_Data" ) } , lgap : this . constants . lgap , tgap : this . constants . tgap } , { el : this . continueSelect , lgap : this . constants . lgap , tgap : this . constants . tgap } ] } } , { height : "fill" , el : this . display } ] } ) } , setValue : function ( a ) { this . storeValue = a || { } } , empty : function ( ) { this . display . empty ( ) } , populate : function ( ) { this . display . populate . apply ( this . display , arguments ) } } ) , BI . shortcut ( "bi.multi_select_check_pane" , BI . MultiSelectCheckPane ) , BI . DisplaySelectedList = BI . inherit ( BI . Pane , { constants : { height : 25 , lgap : 10 } , _defaultConfig : function ( ) { return BI . extend ( BI . DisplaySelectedList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-display-list" , itemsCreator : BI . emptyFn , items : [ ] } ) } , _init : function ( ) { BI . DisplaySelectedList . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . hasNext = ! 1 , this . button _group = BI . createWidget ( { type : "bi.list_pane" , element : this , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , items : this . _createItems ( b . items ) , chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , layouts : [ { type : "bi.vertical" , lgap : 10 } ] } , itemsCreator : function ( c , d ) { b . itemsCreator ( c , function ( b ) { a . hasNext = ! ! b . hasNext , d ( a . _createItems ( b . items ) ) } ) } , hasNext : function ( ) { return a . hasNext } } ) } , _createItems : function ( a ) { return BI . createItems ( a , { type : "bi.icon_text_item" , cls : "cursor-default check-font display-list-item bi-tips" , once : ! 0 , invalid : ! 0 , selected : ! 0 , height : this . constants . height , logic : { dynamic : ! 0 } } ) } , empty : function ( ) { this . button _group .
} , getValue : function ( ) { var a = this . editor . getState ( ) ; return BI . isArray ( a ) && a . length > 0 ? a [ a . length - 1 ] : "" } , getKeywords : function ( ) { var a = this . editor . getLastValidValue ( ) , b = a . match ( /[\S]+/g ) ; return BI . isEndWithBlank ( a ) ? b . concat ( [ " " ] ) : b } , populate : function ( a ) { } } ) , BI . MultiSelectEditor . EVENT _PAUSE = "MultiSelectEditor.EVENT_PAUSE" , BI . shortcut ( "bi.multi_select_editor" , BI . MultiSelectEditor ) , BI . MultiSelectSearcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectSearcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-searcher" , itemsCreator : BI . emptyFn , el : { } , popup : { } , valueFormatter : BI . emptyFn , adapter : null , masker : { } } ) } , _init : function ( ) { BI . MultiSelectSearcher . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( b . el , { type : "bi.multi_select_editor" , height : b . height } ) , this . searcher = BI . createWidget ( { type : "bi.searcher" , element : this , height : b . height , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( a , b ) { b ( ) } , el : this . editor , popup : BI . extend ( { type : "bi.multi_select_search_pane" , valueFormatter : b . valueFormatter , keywordGetter : function ( ) { return a . editor . getValue ( ) } , itemsCreator : function ( c , d ) { c . keyword = a . editor . getValue ( ) , this . setKeyword ( c . keyword ) , b . itemsCreator ( c , d ) } , value : b . value } , b . popup ) , adapter : b . adapter , masker : b . masker } ) , this . searcher . on ( BI . Searcher . EVENT _START , function ( ) { a . fireEvent ( BI . MultiSelectSearcher . EVENT _START ) } ) , this . searcher . on ( BI . Searcher . EVENT _PAUSE , function ( ) { this . hasMatched ( ) , a . fireEvent ( BI . MultiSelectSearcher . EVENT _PAUSE ) } ) , this . searcher . on ( BI . Searcher . EVENT _STOP , function ( ) { a . fireEvent ( BI . MultiSelectSearcher . EVENT _STOP ) } ) , this . searcher . on ( BI . Searcher . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MultiSelectSearcher . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . Searcher . EVENT _SEARCHING , function ( ) { var b = this . getKeywords ( ) ; a . fireEvent ( BI . MultiSelectSearcher . EVENT _SEARCHING , b ) } ) , BI . isNotNull ( b . value ) && this . setState ( b . value ) } , adjustView : function ( ) { this . searcher . adjustView ( ) } , isSearching : function ( ) { return this . searcher . isSearching ( ) } , stopSearch : function ( ) { this . searcher . stopSearch ( ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , hasMatched : function ( ) { return this . searcher . hasMatched ( ) } , hasChecked : function ( ) { return this . searcher . getView ( ) && this . searcher . getView ( ) . hasChecked ( ) } , setAdapter : function ( a ) { this . searcher . setAdapter ( a ) } , setState : function ( a ) { var b = this . options ; if ( a || ( a = { } ) , a . value || ( a . value = [ ] ) , a . type === BI . Selection . All ) if ( 0 === a . value . length ) this . editor . setState ( BI . Selection . All ) ; else if ( BI . size ( a . assist ) <= 20 ) { var c = "" ; BI . each ( a . assist , function ( a , d ) { c += 0 === a ? "" + ( b . valueFormatter ( d + "" ) || d ) : "," + ( b . valueFormatter ( d + "" ) || d ) } ) , this . editor . setState ( c ) } else this . editor . setState ( BI . Selection . Multi ) ; else if ( 0 === a . value . length ) this . editor . setState ( BI . Selection . None ) ; else if ( BI . size ( a . value ) <= 20 ) { var c = "" ; BI . each ( a . value , function ( a , d ) { c += 0 === a ? "" + ( b . valueFormatter ( d + "" ) || d ) : "," + ( b . valueFormatter ( d + "" ) || d ) } ) , this . editor . setState ( c ) } else this . editor . setState ( BI . Selection . Multi ) } , setValue : function ( a ) { this . setState ( a ) , this . searcher . setValue ( a ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( a ) { 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 . 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 a = this , b = this . options ; this . button = BI . create
var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.multi_select_editor" , height : b . height , el : { type : "bi.simple_state_editor" , height : b . height } } ) , this . searcher = BI . createWidget ( { type : "bi.searcher" , element : this , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( b , c ) { c ( { keyword : a . editor . getValue ( ) } ) } , el : this . editor , popup : BI . extend ( { type : "bi.multi_tree_search_pane" , keywordGetter : function ( ) { return a . editor . getValue ( ) } , itemsCreator : function ( c , d ) { c . keyword = a . editor . getValue ( ) , b . itemsCreator ( c , d ) } , value : b . value } , b . popup ) , adapter : b . adapter , masker : b . masker } ) , this . searcher . on ( BI . Searcher . EVENT _START , function ( ) { a . fireEvent ( BI . MultiTreeSearcher . EVENT _START ) } ) , this . searcher . on ( BI . Searcher . EVENT _PAUSE , function ( ) { this . hasMatched ( ) , a . fireEvent ( BI . MultiTreeSearcher . EVENT _PAUSE ) } ) , this . searcher . on ( BI . Searcher . EVENT _STOP , function ( ) { a . fireEvent ( BI . MultiTreeSearcher . EVENT _STOP ) } ) , this . searcher . on ( BI . Searcher . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MultiTreeSearcher . EVENT _CHANGE , arguments ) } ) , BI . isNotNull ( b . value ) && this . setState ( b . value ) } , adjustView : function ( ) { this . searcher . adjustView ( ) } , setAdapter : function ( a ) { this . searcher . setAdapter ( a ) } , isSearching : function ( ) { return this . searcher . isSearching ( ) } , stopSearch : function ( ) { this . searcher . stopSearch ( ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , hasMatched : function ( ) { return this . searcher . hasMatched ( ) } , hasChecked : function ( ) { return this . searcher . getView ( ) && this . searcher . getView ( ) . hasChecked ( ) } , setState : function ( a ) { function b ( a ) { var c = "" , d = 0 , e = BI . size ( a ) ; return BI . each ( a , function ( a , f ) { d ++ ; var g = b ( f ) ; c += a + ( "" === g ? "" : ":" + g ) + ( d === e ? "" : "," ) } ) , c } if ( a || ( a = { } ) , a . value || ( a . value = { } ) , BI . isNumber ( a ) ) this . editor . setState ( a ) ; else if ( 0 === BI . size ( a . value ) ) this . editor . setState ( BI . Selection . None ) ; else { var c = "" ; BI . each ( a . value , function ( a , d ) { var e = b ( d ) ; c += a + ( "" === e ? "" : ":" + e ) + "; " } ) , this . editor . setState ( c ) } } , setValue : function ( a ) { this . setState ( a ) , this . searcher . setValue ( a ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( a ) { this . searcher . populate . apply ( this . searcher , arguments ) } } ) , BI . MultiTreeSearcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . MultiTreeSearcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiTreeSearcher . EVENT _START = "EVENT_START" , BI . MultiTreeSearcher . EVENT _STOP = "EVENT_STOP" , 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" , validationChecker : function ( ) { return ! 0 } , valueFormatter : function ( a ) { return a } , value : 0 , allowBlank : ! 1 , errorText : "" , step : 1 } ) } , _init : function ( ) { BI . NumberEditor . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : b . height , allowBlank : b . allowBlank , value : b . valueFormatter ( b . value ) , validationChecker : b . validationChecker , errorText : b . errorText } ) , this . editor . on ( BI . TextEditor . EVENT _CHANGE , function ( ) { b . value = this . getValue ( ) , a . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . TextEditor . EVENT _CONFIRM , function ( ) { this . setValue ( BI . parseFloat ( this . getValue ( ) ) ) , a . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . topBtn = BI . createWidget ( { type : "bi.icon_button" , trigger : "lclick," , cls : "column-pre-page-h-font top-button bi-border-left bi-border-bottom" } ) , this . topBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . _finetuning ( b . step ) , a . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , a . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . bottomBtn = BI . createWidget ( { type : "bi.icon_button" , trigger : "lclick," , cls : "column-next-page-h-font bottom-button bi-border-left bi-border-top" } ) , this . bottomBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . _finetuning ( - b . step ) , a . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , a . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , BI . createWidget ( { type : "bi.htape" , 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 } ] } ) } , _finetuning : function
h [ h . length - 1 ] += d [ 0 ] - f , i [ i . length - 1 ] += d [ 1 ] - g ; var j = BI . clone ( h ) , k = BI . clone ( i ) ; j [ j . length - 1 ] = "" , k [ k . length - 1 ] = "" , this . table . setColumnSize ( j . concat ( k ) ) , e = a . _getBlockSize ( ) , h [ h . length - 1 ] < e . left [ e . left . length - 1 ] && ( h [ h . length - 1 ] = e . left [ e . left . length - 1 ] ) , i [ i . length - 1 ] < e . right [ e . right . length - 1 ] && ( i [ i . length - 1 ] = e . right [ e . right . length - 1 ] ) , a . table . setColumnSize ( h . concat ( i ) ) } else if ( ! this . _isAdaptiveColumn ( ) ) { var d = this . table . getClientRegionColumnSize ( ) , e = this . _getBlockSize ( ) , l = e . sum , m = e . size ; m [ m . length - 1 ] += d [ 0 ] - l ; var n = BI . clone ( m ) ; n [ n . length - 1 ] = "" , this . table . setColumnSize ( n ) , e = this . _getBlockSize ( ) , m [ m . length - 1 ] < e . size [ e . size . length - 1 ] && ( m [ m . length - 1 ] = e . size [ e . size . length - 1 ] ) , this . table . setColumnSize ( m ) } } , _resizeBody : function ( ) { if ( this . _isAdaptiveColumn ( ) ) { var a = this . table . getCalculateColumnSize ( ) ; this . setColumnSize ( a ) } } , _adjustRegion : function ( ) { var a = this . options , b = this . table . getCalculateRegionColumnSize ( ) ; if ( a . isNeedFreeze === ! 0 && a . freezeCols . length > 0 && a . freezeCols . length < a . columnSize . length ) { var c = this . _getBlockSize ( ) , d = c . sumLeft , e = c . sumRight ; ( d < b [ 0 ] || b [ 0 ] >= d + e ) && this . table . setRegionColumnSize ( [ d , "fill" ] ) , this . _resizeRegion ( ) } } , _resizeRegion : function ( ) { var a = this . options , b = this . table . getCalculateRegionColumnSize ( ) ; if ( a . isNeedFreeze === ! 0 && a . freezeCols . length > 0 && a . freezeCols . length < a . columnSize . length ) { var c = this . table . element . width ( ) ; if ( b [ 0 ] < 15 || b [ 1 ] < 15 ) { var d = a . freezeCols , e = c / 3 ; d . length > a . columnSize . length / 2 && ( e = 2 * c / 3 ) , this . table . setRegionColumnSize ( [ e , "fill" ] ) } } } , resize : function ( ) { this . table . resize ( ) , this . _resizeRegion ( ) , this . _resizeHeader ( ) } , setColumnSize : function ( a ) { this . table . setColumnSize ( a ) , this . _adjustRegion ( ) , this . _resizeHeader ( ) } , getColumnSize : function ( ) { return this . table . getColumnSize ( ) } , getCalculateColumnSize : function ( ) { return this . table . getCalculateColumnSize ( ) } , setHeaderColumnSize : function ( a ) { this . table . setHeaderColumnSize ( a ) , this . _adjustRegion ( ) , this . _resizeHeader ( ) } , setRegionColumnSize : function ( a ) { this . table . setRegionColumnSize ( a ) , this . _resizeHeader ( ) } , getRegionColumnSize : function ( ) { return this . table . getRegionColumnSize ( ) } , getCalculateRegionColumnSize : function ( ) { return this . table . getCalculateRegionColumnSize ( ) } , getCalculateRegionRowSize : function ( ) { return this . table . getCalculateRegionRowSize ( ) } , getClientRegionColumnSize : function ( ) { return this . table . getClientRegionColumnSize ( ) } , getScrollRegionColumnSize : function ( ) { return this . table . getScrollRegionColumnSize ( ) } , getScrollRegionRowSize : function ( ) { return this . table . getScrollRegionRowSize ( ) } , hasVerticalScroll : function ( ) { return this . table . hasVerticalScroll ( ) } , setVerticalScroll : function ( a ) { this . table . setVerticalScroll ( a ) } , setLeftHorizontalScroll : function ( a ) { this . table . setLeftHorizontalScroll ( a ) } , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , getLeftHorizontalScroll : function ( ) { return this . table . getLeftHorizontalScroll ( ) } , getRightHorizontalScroll : function ( ) { return this . table . getRightHorizontalScroll ( ) } , getColumns : function ( ) { return this . table . getColumns ( ) } , attr : function ( ) { BI . ResponisveTable . superclass . attr . apply ( this , arguments ) , this . table . attr . apply ( this . table , arguments ) } , populate : function ( a ) { var b = this , c = this . options ; this . table . populate . apply ( this . table , arguments ) , c . isNeedFreeze === ! 0 && BI . nextTick ( function ( ) { b . _initRegionSize ( ) , b . table . resize ( ) , b . _resizeHeader ( ) } ) } } ) , BI . shortcut ( "bi.responsive_table" , BI . ResponisveTable ) , BI . SelectTreeFirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . SelectTreeFirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-select-tree-first-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . SelectTreeFirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.first_tree_node_checkbox" , stopPropagation : ! 0 } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : b . height , height : b . height , hgap : b . hgap , text : b
} ) , BI . SingleSelectCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.single_select_combo" , BI . SingleSelectCombo ) , BI . SingleSelectList = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-select-list" , direction : BI . Direction . Top , logic : { dynamic : ! 0 } , items : [ ] , itemsCreator : BI . emptyFn , hasNext : BI . emptyFn , onLoaded : BI . emptyFn , el : { type : "bi.list_pane" } } ) } , _init : function ( ) { BI . SingleSelectList . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . list = BI . createWidget ( b . el , { type : "bi.list_pane" , items : b . items , itemsCreator : function ( c , d ) { b . itemsCreator ( c , function ( b ) { d . apply ( a , arguments ) } ) } , onLoaded : b . onLoaded , hasNext : b . hasNext } ) , this . list . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { b === BI . Events . CLICK && a . fireEvent ( BI . SingleSelectList . EVENT _CHANGE , c , d ) , a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( b . direction ) , BI . extend ( { scrolly : ! 0 } , b . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( b . direction , this . list ) } ) ) ) ) } , hasPrev : function ( ) { return this . list . hasPrev ( ) } , hasNext : function ( ) { return this . list . hasNext ( ) } , prependItems : function ( a ) { this . list . prependItems . apply ( this . list , arguments ) } , addItems : function ( a ) { this . list . addItems . apply ( this . list , arguments ) } , setValue : function ( a ) { this . list . setValue ( [ a ] ) } , getValue : function ( ) { return this . list . getValue ( ) [ 0 ] } , empty : function ( ) { this . list . empty ( ) } , populate : function ( a ) { this . list . populate . apply ( this . list , arguments ) } , resetHeight : function ( a ) { this . list . resetHeight ? this . list . resetHeight ( a ) : this . list . element . css ( { "max-height" : a + "px" } ) } , setNotSelectedValue : function ( ) { this . list . setNotSelectedValue . apply ( this . list , arguments ) } , getNotSelectedValue : function ( ) { return this . list . getNotSelectedValue ( ) } , getAllButtons : function ( ) { return this . list . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . list . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . list . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . list . getNotSelectedButtons ( ) } , getIndexByValue : function ( a ) { return this . list . getIndexByValue ( a ) } , getNodeById : function ( a ) { return this . list . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . list . getNodeByValue ( a ) } } ) , BI . SingleSelectList . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_list" , BI . SingleSelectList ) , BI . SingleSelectLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-loader" , logic : { dynamic : ! 0 } , el : { height : 400 } , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . SingleSelectLoader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = ! 1 ; this . button _group = BI . createWidget ( { type : "bi.single_select_list" , element : this , logic : b . logic , el : BI . extend ( { onLoaded : b . onLoaded , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } } , b . el ) , itemsCreator : function ( d , e ) { var f = a . _startValue ; a . storeValue && ( d = BI . extend ( d || { } , { selectedValues : [ a . storeValue ] } ) ) , b . itemsCreator ( d , function ( g ) { c = g . hasNext ; var h = [ ] ; if ( 1 === d . times && a . storeValue ) { var i = BI . map ( [ a . storeValue ] , function ( a , c ) { var d = b . valueFormatter ( c ) || c ; return { text : d , value : c , title : d , selected : ! 1 } } ) ; h = a . _createItems ( i ) } e ( h . concat ( a . _createItems ( g . items ) ) , g . keyword || "" ) , 1 === d . times && a . storeValue && ( BI . isKey ( f ) && ( a . storeValue = f ) , a . setValue ( a . storeValue ) ) , 1 === d . times && a . _scrollToTop ( ) } ) } , hasNext : function ( ) { return c } } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . SingleSelectList . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SingleSelectLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( a ) { return BI . createItems ( a , { type : "bi.single_select_radio_item" , logic : this . options . logic , height : 25 , selected : ! 1 } ) } , _scrollToTop : function ( ) { var a = this ; BI . delay ( function
SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSlider . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-slider bi-slider-track" , digit : ! 1 , unit : "" } ) } , _init : function ( ) { BI . SingleSlider . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = this . _constant ; this . enable = ! 1 , this . value = "" , this . grayTrack = BI . createWidget ( { type : "bi.layout" , cls : "gray-track" , height : 6 } ) , this . blueTrack = BI . createWidget ( { type : "bi.layout" , cls : "blue-track bi-high-light-background" , height : 6 } ) , this . track = this . _createTrackWrapper ( ) , this . slider = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . _draggable ( this . slider ) ; var d = BI . createWidget ( { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . slider ] } ] , hgap : c . SLIDER _WIDTH _HALF , height : c . SLIDER _HEIGHT } ) ; d . element . click ( function ( d ) { if ( a . enable ) { var e = d . clientX - a . element . offset ( ) . left - c . SLIDER _WIDTH _HALF , f = a . track . element [ 0 ] . scrollWidth , g = 0 ; e < 0 && ( g = 0 ) , e > 0 && e < f - c . SLIDER _WIDTH && ( g = 100 * e / a . _getGrayTrackLength ( ) ) , e > f - c . SLIDER _WIDTH && ( g = 100 ) ; var h = BI . parseFloat ( g . toFixed ( 1 ) ) ; a . _setAllPosition ( h ) ; var i = a . _getValueByPercent ( h ) ; i = b . digit === ! 1 ? i : i . toFixed ( b . digit ) , a . label . setValue ( i ) , a . value = i , a . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.sign_text_editor" , cls : "slider-editor-button" , errorText : "" , text : b . unit , width : c . EDITOR _WIDTH - 2 , allowBlank : ! 1 , validationChecker : function ( b ) { return a . _checkValidation ( b ) } } ) , this . label . element . hover ( function ( ) { a . label . element . removeClass ( "bi-border" ) . addClass ( "bi-border" ) } , function ( ) { a . label . element . removeClass ( "bi-border" ) } ) , this . label . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var b = BI . parseFloat ( this . getValue ( ) ) , c = a . _getPercentByValue ( b ) , d = BI . parseFloat ( c . toFixed ( 1 ) ) ; a . _setAllPosition ( d ) , this . setValue ( b ) , a . value = b , a . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } ) , this . _setVisible ( ! 1 ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : 7 , height : c . TRACK _HEIGHT } , top : 23 , left : 0 , width : "100%" } , { el : d , top : 20 , left : 0 , width : "100%" } , { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . label ] } ] , rgap : c . EDITOR _WIDTH , height : c . EDITOR _HEIGHT } , top : 0 , left : 0 , width : "100%" } ] } ) } , _draggable : function ( a ) { function b ( a ) { return BI . clamp ( a , 0 , c . _getGrayTrackLength ( ) ) } var c = this , d = this . options , e = ! 1 , f = 0 , g = 0 , h = 0 , i = new BI . MouseMoveTracker ( function ( j ) { if ( i . isDragging ( ) ) { e = ! 0 , g += j , f = b ( h + g ) , a . element . addClass ( "dragging" ) ; var k = 100 * f / c . _getGrayTrackLength ( ) , l = BI . parseFloat ( k . toFixed ( 1 ) ) ; c . _setBlueTrack ( l ) , c . _setLabelPosition ( l ) , c . _setSliderPosition ( l ) ; var m = c . _getValueByPercent ( l ) ; m = d . digit === ! 1 ? m : m . toFixed ( d . digit ) , c . label . setValue ( m ) , c . value = m , c . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } } , function ( ) { if ( e === ! 0 ) { f = b ( f ) ; var d = 100 * f / c . _getGrayTrackLength ( ) , j = BI . parseFloat ( d . toFixed ( 1 ) ) ; c . _setSliderPosition ( j ) , f = 0 , g = 0 , h = f , e = ! 1 } a . element . removeClass ( "dragging" ) , i . releaseMouseMoves ( ) , c . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } , window ) ; a . element . on ( "mousedown" , function ( c ) { a . isEnabled ( ) && ( h = this . offsetLeft , b ( h ) , i . captureMouseMoves ( c ) ) } ) } , _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 ( a ) { var b = this . options , c = ! 1 ; if ( BI . isNumeric ( a ) && ! ( BI . isNull ( a ) || a < this . min || a > this . max ) ) if ( b . digit === ! 1 ) c = ! 0 ; else { var d = ( a + "" ) . split ( "." ) [ 1 ] || "" ; c = d . length === b . digit } return c } , _setBlueTrack : function ( a ) { this . blueTrack . element . css ( { width : a + "%" } ) } , _setLabelPosition : function ( a ) { this . label . element . css ( { left : a + "%" } ) } , _setSliderPosition : function ( a ) { this . slider . element . css ( { left : a + "%" } ) } , _setAllPosition : function ( a ) { this . _setSliderPosition ( a ) , this . _setLabelPosition ( a ) , this . _setBlueTrack ( a ) } , _setVisible : function ( a ) { this . slider . setVisible ( a ) , this . label . setVisible ( a ) } , _getGrayTrackLength : function ( ) { return this . grayTrack . element [ 0 ] . scrollWidth } , _getValueByPercent : function ( a ) { var b = BI . pars
this . year . setValue ( a . year ) } , getValue : function ( ) { return { year : this . year . getValue ( ) , quarter : this . quarter . getValue ( ) } } } ) , BI . YearQuarterCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . YearQuarterCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.year_quarter_combo" , BI . YearQuarterCombo ) , BI . AbstractAllValueChooser = BI . inherit ( BI . Widget , { _const : { perPage : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . AbstractAllValueChooser . superclass . _defaultConfig . apply ( this , arguments ) , { width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _valueFormatter : function ( a ) { var b = a ; return BI . isNotNull ( this . items ) && BI . some ( this . items , function ( c , d ) { if ( d . value === a ) return b = d . text , ! 0 } ) , b } , _itemsCreator : function ( a , b ) { function c ( c ) { var d = ( a . keywords || [ ] ) . slice ( ) ; if ( a . keyword && d . push ( a . keyword ) , BI . each ( d , function ( a , b ) { var d = BI . Func . getSearchResult ( c , b ) ; c = d . match . concat ( d . find ) } ) , a . selectedValues ) { var e = BI . makeObject ( a . selectedValues , ! 0 ) ; c = BI . filter ( c , function ( a , b ) { return ! e [ b . value ] } ) } return a . type === BI . MultiSelectCombo . REQ _GET _ALL _DATA ? void b ( { items : c } ) : a . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void b ( { count : c . length } ) : void b ( { items : c , hasNext : ! 1 } ) } var d = this , e = this . options ; e . cache && this . items ? c ( this . items ) : e . itemsCreator ( { } , function ( a ) { d . items = a , c ( a ) } ) } } ) , 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 : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; BI . isNotNull ( b . items ) && ( this . items = b . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : b . width , height : b . height , value : { type : BI . Selection . Multi , value : b . value || [ ] } } ) , this . combo . on ( BI . MultiSelectCombo . EVENT _CONFIRM , function ( ) { a . fireEvent ( BI . AllValueChooserCombo . EVENT _CONFIRM ) } ) } , setValue : function ( a ) { this . combo . setValue ( { type : BI . Selection . Multi , value : a || [ ] } ) } , getValue : function ( ) { var a = this . combo . getValue ( ) || { } ; return a . type === BI . Selection . All ? a . assist : a . value || [ ] } , populate : function ( ) { this . combo . populate . apply ( this , arguments ) } } ) , BI . AllValueChooserCombo . EVENT _CONFIRM = "AllValueChooserCombo.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 a = this , b = this . options ; BI . isNotNull ( b . items ) && ( this . items = b . 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 : b . width , height : b . height } ) , this . list . on ( BI . MultiSelectList . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . AllValueChooserPane . EVENT _CHANGE ) } ) } , setValue : function ( a ) { this . list . setValue ( { type : BI . Selection . Multi , value : a || [ ] } ) } , getValue : function ( ) { var a = this . list . getValue ( ) || { } ; return a . type === BI . Selection . All ? a . assist : a . value || [ ] } , populate : function ( ) { this . list . populate . apply ( this . list , arguments ) } } ) , BI . AllValueChooserPane . EVENT _CHANGE = "AllValueChooserPane.EVENT_CHANGE" , BI . shortcut ( "bi.all_value_chooser_pane" , BI . AllValueChooserPane ) , BI . AbstractTreeValueChooser = BI . inherit ( BI . Widget , { _const : { perPage : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . AbstractTreeValueChooser . superclass . _defaultConfig . apply ( this , arguments ) , { items : null , itemsCreator : BI . emptyFn } ) } , _initData : function ( a ) { this . items = a ; var b = BI . Tree . treeFormat ( a ) ; this . tree = new BI . Tree , this . tree . initTree ( b ) } , _itemsCreator : function ( a , b ) { function c ( ) { switch ( a . type ) { case BI . TreeView . REQ _TYPE _INIT _DATA : d . _reqInitTreeNode ( a , b ) ; break ; case BI . TreeView . REQ _TYPE _ADJUST _DATA : d . _reqAdjustTree
* 公式编辑控件
* @ class BI . FormulaEditor
* @ extends BI . Widget
* /
BI . FormulaEditor = BI . inherit ( BI . Single , {
_defaultConfig : function ( ) {
return $ . extend ( BI . FormulaEditor . superclass . _defaultConfig . apply ( ) , {
baseCls : "bi-formula-editor bi-card" ,
watermark : "" ,
value : "" ,
fieldTextValueMap : { } ,
showHint : true ,
lineHeight : 2
} ) ;
} ,
_init : function ( ) {
BI . FormulaEditor . superclass . _init . apply ( this , arguments ) ;
var o = this . options , self = this ;
this . editor = CodeMirror ( this . element [ 0 ] , {
textWrapping : true ,
lineWrapping : true ,
lineNumbers : false ,
mode : "formula" ,
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars : /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
} ) ;
o . lineHeight === 1 ? this . element . addClass ( "codemirror-low-line-height" ) : this . element . addClass ( "codemirror-high-line-height" ) ;
this . editor . on ( "change" , function ( cm , change ) {
self . _checkWaterMark ( ) ;
if ( o . showHint ) {
CodeMirror . showHint ( cm , CodeMirror . formulaHint , { completeSingle : false } ) ;
}
BI . nextTick ( function ( ) {
self . fireEvent ( BI . FormulaEditor . EVENT _CHANGE ) ;
} ) ;
} ) ;
this . editor . on ( "focus" , function ( ) {
self . _checkWaterMark ( ) ;
self . fireEvent ( BI . FormulaEditor . EVENT _FOCUS ) ;
} ) ;
this . editor . on ( "blur" , function ( ) {
self . fireEvent ( BI . FormulaEditor . EVENT _BLUR ) ;
} ) ;
if ( BI . isKey ( o . value ) ) {
self . setValue ( o . value ) ;
}
if ( BI . isKey ( this . options . watermark ) ) {
var self = this ;
this . watermark = BI . createWidget ( {
type : "bi.label" ,
cls : "bi-water-mark" ,
text : this . options . watermark ,
whiteSpace : "nowrap" ,
textAlign : "left"
} ) ;
BI . createWidget ( {
type : "bi.absolute" ,
element : self ,
items : [ {
el : self . watermark ,
left : 0 ,
top : 0
} ]
} ) ;
this . watermark . element . bind (
"mousedown" , function ( e ) {
self . insertString ( "" ) ;
self . editor . focus ( ) ;
e . stopEvent ( ) ;
}
) ;
this . watermark . element . bind ( "click" , function ( e ) {
self . editor . focus ( ) ;
e . stopEvent ( ) ;
} ) ;
this . watermark . element . css ( {
position : "absolute" ,
left : 3 ,
right : 3 ,
top : 6 ,
bottom : 0
} ) ;
}
} ,
_checkWaterMark : function ( ) {
var o = this . options ;
if ( ! this . disabledWaterMark && BI . isEmptyString ( this . editor . getValue ( ) ) && BI . isKey ( o . watermark ) ) {
this . watermark && this . watermark . visible ( ) ;
} else {
this . watermark && this . watermark . invisible ( ) ;
}
} ,
disableWaterMark : function ( ) {
this . disabledWaterMark = true ;
this . _checkWaterMark ( ) ;
} ,
focus : function ( ) {
this . editor . focus ( ) ;
} ,
/ * *
* 添加字段
* @ param field
* /
insertField : function ( field ) {
var from = this . editor . getCursor ( ) ;
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this . editor . replaceSelection ( "\u200b" + field + "\u200b" ) ;
var to = this . editor . getCursor ( ) ;
this . editor . markText ( from , to , { className : "fieldName" , atomic : true , startStyle : "start" , endStyle : "end" } ) ;
this . editor . replaceSelection ( " " ) ;
this . editor . focus ( ) ;
} ,
insertFunction : function ( fn ) {
var from = this . editor . getCursor ( ) ;
this . editor . replaceSelection ( fn ) ;
var to = this . editor . getCursor ( ) ;
this . editor . markText ( from , to , { className : "#function" , atomic : true } ) ;
this . editor . replaceSelection ( "() " ) ;
to = this . editor . getCursor ( ) ;
to . ch = to . ch - 2 ;
this . editor . setCursor ( to ) ;
this . editor . focus ( ) ;
} ,
insertOperator : function ( op ) {
var from = this . editor . getCursor ( ) ;
this . editor . replaceSelection ( op ) ;
var to = this . editor . getCursor ( ) ;
this . editor . markText ( from , to , { className : "%operator" , atomic : true } ) ;
this . editor . replaceSelection ( " " ) ;
this . editor . focus ( ) ;
} ,
setFunction : function ( v ) {
var from = this . editor . getCursor ( ) ;
this . editor . replaceSelection ( v ) ;
var to = this . editor . getCursor ( ) ;
this . editor . markText ( from , to , { className : "#function" , atomic : true } ) ;
} ,
insertString : function ( str ) {
this . editor . replaceSelection ( str ) ;
this . editor . focus ( ) ;
} ,
getFormulaString : function ( ) {
return this . editor . getValue ( ) ;
} ,
getUsedFields : function ( ) {
var fieldMap = this . options . fieldTextValueMap ;
var fields = [ ] ;
this . editor . getValue ( true , function ( line ) {
var value = line . text ;
_ . forEach ( line . markedSpans , function ( i , ms ) {
switch ( i . marker . className ) {
case "fieldName" :
// 因为插入字段的时候首尾加了不可见字符,所以首尾缩进一个字符
var dId = fieldMap [ value . substr ( i . from + 1 , i . to - i . from - 2 ) ] ;
if ( ! fields . contains ( dId ) ) {
fields . push ( dId ) ;
}
}
} ) ;
} ) ;
return fields ;
} ,
getCheckString : function ( ) {
return this . editor . getValue ( true , function ( line ) {
var rawText = line . text , value = line . text , num = 0 ;
value . text = rawText ;
_ . forEach ( line . markedSpans , function ( i , ms ) {
switch ( i . marker . className ) {
case "fieldName" :
var fieldNameLength = i . to - i . from ;
value = value . substr ( 0 , i . from + num ) + "$a" + value . substr ( i . to + num , value . length ) ;
num = num + 2 - fieldNameLength ;
break ;
}
} ) ;
return value ;
} ) ;
} ,
getValue : function ( ) {
var fieldMap = this . options . fieldTextValueMap ;
return this . editor . getValue ( "\n" , function ( line ) {
var rawText = line . text , value = line . text , num = 0 ;
value . text = rawText ;
_ . forEach ( line . markedSpans , function ( i , ms ) {
switch ( i . marker . className ) {
case "fieldName" :
var fieldNameLength = i . to - i . from ;
var start = i . from + num + 1 ;
var end = fieldNameLength - 2 ;
var fieldId = fieldMap [ value . substr ( start , end ) ] ;
value = value . substr ( 0 , i . from + num ) + "$\{" + fieldId + "\}" + value . substr ( i . to + num , value . length ) ;
num += fieldId . length - fieldNameLength + 3 ;
break ;
}
} ) ;
return value ;
} ) ;
} ,
setValue : function ( value ) {
this . editor . setValue ( value ) ;
} ,
setFieldTextValueMap : function ( fieldTextValueMap ) {
this . options . fieldTextValueMap = fieldTextValueMap ;
} ,
refresh : function ( ) {
var self = this ;
BI . nextTick ( function ( ) {
self . editor . refresh ( ) ;
} ) ;
}
} ) ;
BI . FormulaEditor . EVENT _CHANGE = "EVENT_CHANGE" ;
BI . FormulaEditor . EVENT _BLUR = "EVENT_BLUR" ;
BI . FormulaEditor . EVENT _FOCUS = "EVENT_FOCUS" ;
BI . shortcut ( "bi.formula_editor" , BI . FormulaEditor ) ;