/*! 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 ( a , b ) { function c ( a ) { var b = a . length , c = ia . type ( a ) ; return ! ia . isWindow ( a ) && ( ! ( 1 !== a . nodeType || ! b ) || ( "array" === c || "function" !== c && ( 0 === b || "number" == typeof b && b > 0 && b - 1 in a ) ) ) } function d ( a ) { var b = xa [ a ] = { } ; return ia . each ( a . match ( ka ) || [ ] , function ( a , c ) { b [ c ] = ! 0 } ) , b } function e ( a , c , d , e ) { if ( ia . acceptData ( a ) ) { var f , g , h = ia . expando , i = "string" == typeof c , j = a . nodeType , k = j ? ia . cache : a , l = j ? a [ h ] : a [ h ] && h ; if ( l && k [ l ] && ( e || k [ l ] . data ) || ! i || d !== b ) return l || ( j ? a [ h ] = l = _ . pop ( ) || ia . guid ++ : l = h ) , k [ l ] || ( k [ l ] = { } , j || ( k [ l ] . toJSON = ia . noop ) ) , "object" != typeof c && "function" != typeof c || ( e ? k [ l ] = ia . extend ( k [ l ] , c ) : k [ l ] . data = ia . extend ( k [ l ] . data , c ) ) , f = k [ l ] , e || ( f . data || ( f . data = { } ) , f = f . data ) , d !== b && ( f [ ia . camelCase ( c ) ] = d ) , i ? ( g = f [ c ] , null == g && ( g = f [ ia . camelCase ( c ) ] ) ) : g = f , g } } function f ( a , b , c ) { if ( ia . acceptData ( a ) ) { var d , e , f , g = a . nodeType , i = g ? ia . cache : a , j = g ? a [ ia . expando ] : ia . expando ; if ( i [ j ] ) { if ( b && ( f = c ? i [ j ] : i [ j ] . data ) ) { ia . isArray ( b ) ? b = b . concat ( ia . map ( b , ia . camelCase ) ) : b in f ? b = [ b ] : ( b = ia . camelCase ( b ) , b = b in f ? [ b ] : b . split ( " " ) ) ; for ( d = 0 , e = b . length ; d < e ; d ++ ) delete f [ b [ d ] ] ; if ( ! ( c ? h : ia . isEmptyObject ) ( f ) ) return } ( c || ( delete i [ j ] . data , h ( i [ j ] ) ) ) && ( g ? ia . cleanData ( [ a ] , ! 0 ) : ia . support . deleteExpando || i != i . window ? delete i [ j ] : i [ j ] = null ) } } } function g ( a , c , d ) { if ( d === b && 1 === a . nodeType ) { var e = "data-" + c . replace ( za , "-$1" ) . toLowerCase ( ) ; if ( d = a . getAttribute ( e ) , "string" == typeof d ) { try { d = "true" === d || "false" !== d && ( "null" === d ? null : + d + "" === d ? + d : ya . test ( d ) ? ia . parseJSON ( d ) : d ) } catch ( f ) { } ia . data ( a , c , d ) } else d = b } return d } function h ( a ) { var b ; for ( b in a ) if ( ( "data" !== b || ! ia . isEmptyObject ( a [ b ] ) ) && "toJSON" !== b ) return ! 1 ; return ! 0 } function i ( ) { return ! 0 } function j ( ) { return ! 1 } function k ( a , b ) { do a = a [ b ] ; while ( a && 1 !== a . nodeType ) ; return a } function l ( a , b , c ) { if ( b = b || 0 , ia . isFunction ( b ) ) return ia . grep ( a , function ( a , d ) { var e = ! ! b . call ( a , d , a ) ; return e === c } ) ; if ( b . nodeType ) return ia . grep ( a , function ( a ) { return a === b === c } ) ; if ( "string" == typeof b ) { var d = ia . grep ( a , function ( a ) { return 1 === a . nodeType } ) ; if ( Ra . test ( b ) ) return ia . filter ( b , d , ! c ) ; b = ia . filter ( b , d ) } return ia . grep ( a , function ( a ) { return ia . inArray ( a , b ) >= 0 === c } ) } function m ( a ) { var b = Ua . split ( "|" ) , c = a . createDocumentFragment ( ) ; if ( c . createElement ) for ( ; b . length ; ) c . createElement ( b . pop ( ) ) ; return c } function n ( a , b ) { return a . getElementsByTagName ( b ) [ 0 ] || a . appendChild ( a . ownerDocument . createElement ( b ) ) } function o ( a ) { var b = a . getAttributeNode ( "type" ) ; return a . type = ( b && b . specified ) + "/" + a . type , a } function p ( a ) { var b = eb . exec ( a . type ) ; return b ? a . type = b [ 1 ] : a . removeAttribute ( "type" ) , a } function q ( a , b ) { for ( var c , d = 0 ; null != ( c = a [ d ] ) ; d ++ ) ia . _data ( c , "globalEval" , ! b || ia . _data ( b [ d ] , "globalEval" ) ) } function r ( a , b ) { if ( 1 === b . nodeType && ia . hasData ( a ) ) { var c , d , e , f = ia . _data ( a ) , g = ia . _data ( b , f ) , h = f . events ; if ( h ) { delete g . handle , g . events = { } ; for ( c in h ) for ( d = 0 , e = h [ c ] . length ; d < e ; d ++ ) ia . event . add ( b , c , h [ c ] [ d ] ) } g . data && ( g . data = ia . extend ( { } , g . data ) ) } } function s ( a , b ) { var c , d , e ; if ( 1 === b . nodeType ) { if ( c = b . nodeName . toLowerCase ( ) , ! ia . support . noCloneEvent &&
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 , c ) { return b === ! 1 ? ia . removeAttr ( a , c ) : Ja && Ia || ! Ha . test ( c ) ? a . setAttribute ( ! Ia && ia . propFix [ c ] || c , c ) : a [ ia . camelCase ( "default-" + c ) ] = a [ c ] = ! 0 , c } } , Ja && Ia || ( ia . attrHooks . value = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return ia . nodeName ( a , "input" ) ? a . defaultValue : d && d . specified ? d . value : b } , set : function ( a , b , c ) { return ia . nodeName ( a , "input" ) ? void ( a . defaultValue = b ) : Aa && Aa . set ( a , b , c ) } } ) , Ia || ( Aa = ia . valHooks . button = { get : function ( a , c ) { var d = a . getAttributeNode ( c ) ; return d && ( "id" === c || "name" === c || "coords" === c ? "" !== d . value : d . specified ) ? d . value : b } , set : function ( a , c , d ) { var e = a . getAttributeNode ( d ) ; return e || a . setAttributeNode ( e = a . ownerDocument . createAttribute ( d ) ) , e . value = c += "" , "value" === d || c === a . getAttribute ( d ) ? c : b } } , ia . attrHooks . contenteditable = { get : Aa . get , set : function ( a , b , c ) { Aa . set ( a , "" !== b && b , c ) } } , ia . each ( [ "width" , "height" ] , function ( a , b ) { ia . attrHooks [ b ] = ia . extend ( ia . attrHooks [ b ] , { set : function ( a , c ) { if ( "" === c ) return a . setAttribute ( b , "auto" ) , c } } ) } ) ) , ia . support . hrefNormalized || ( ia . each ( [ "href" , "src" , "width" , "height" ] , function ( a , c ) { ia . attrHooks [ c ] = ia . extend ( ia . attrHooks [ c ] , { get : function ( a ) { var d = a . getAttribute ( c , 2 ) ; return null == d ? b : d } } ) } ) , ia . each ( [ "href" , "src" ] , function ( a , b ) { ia . propHooks [ b ] = { get : function ( a ) { return a . getAttribute ( b , 4 ) } } } ) ) , ia . support . style || ( ia . attrHooks . style = { get : function ( a ) { return a . style . cssText || b } , set : function ( a , b ) { return a . style . cssText = b + "" } } ) , ia . support . optSelected || ( ia . propHooks . selected = ia . extend ( ia . propHooks . selected , { get : function ( a ) { var b = a . parentNode ; return b && ( b . selectedIndex , b . parentNode && b . parentNode . selectedIndex ) , null } } ) ) , ia . support . enctype || ( ia . propFix . enctype = "encoding" ) , ia . support . checkOn || ia . each ( [ "radio" , "checkbox" ] , function ( ) { ia . valHooks [ this ] = { get : function ( a ) { return null === a . getAttribute ( "value" ) ? "on" : a . value } } } ) , ia . each ( [ "radio" , "checkbox" ] , function ( ) { ia . valHooks [ this ] = ia . extend ( ia . valHooks [ this ] , { set : function ( a , b ) { if ( ia . isArray ( b ) ) return a . checked = ia . inArray ( ia ( a ) . val ( ) , b ) >= 0 } } ) } ) ; var Ka = /^(?:input|select|textarea)$/i , La = /^key/ , Ma = /^(?:mouse|contextmenu)|click/ , Na = /^(?:focusinfocus|focusoutblur)$/ , Oa = /^([^.]*)(?:\.(.+)|)$/ ; ia . event = { global : { } , add : function ( a , c , d , e , f ) { var g , h , i , j , k , l , m , n , o , p , q , r = ia . _data ( a ) ; if ( r ) { for ( d . handler && ( j = d , d = j . handler , f = j . selector ) , d . guid || ( d . guid = ia . guid ++ ) , ( h = r . events ) || ( h = r . events = { } ) , ( l = r . handle ) || ( l = r . handle = function ( a ) { return typeof ia === V || a && ia . event . triggered === a . type ? b : ia . event . dispatch . apply ( l . elem , arguments ) } , l . elem = a ) , c = ( c || "" ) . match ( ka ) || [ "" ] , i = c . length ; i -- ; ) g = Oa . exec ( c [ i ] ) || [ ] , o = q = g [ 1 ] , p = ( g [ 2 ] || "" ) . split ( "." ) . sort ( ) , k = ia . event . special [ o ] || { } , o = ( f ? k . delegateType : k . bindType ) || o , k = ia . event . special [ o ] || { } , m = ia . extend ( { type : o , origType : q , data : e , handler : d , guid : d . guid , selector : f , needsContext : f && ia . expr . match . needsContext . test ( f ) , namespace : p . join ( "." ) } , j ) , ( n = h [ o ] ) || ( n = h [ o ] = [ ] , n . delegateCount = 0 , k . setup && k . setup . call ( a , e , p , l ) !== ! 1 || ( a . addEventListener ? a . addEventListener ( o , l , ! 1 ) : a . att
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" ) } , nextAll : function ( a ) { return ia . dir ( a , "nextSibling" ) } , prevAll : function ( a ) { return ia . dir ( a , "previousSibling" ) } , nextUntil : function ( a , b , c ) { return ia . dir ( a , "nextSibling" , c ) } , prevUntil : function ( a , b , c ) { return ia . dir ( a , "previousSibling" , c ) } , siblings : function ( a ) { return ia . sibling ( ( a . parentNode || { } ) . firstChild , a ) } , children : function ( a ) { return ia . sibling ( a . firstChild ) } , contents : function ( a ) { return ia . nodeName ( a , "iframe" ) ? a . contentDocument || a . contentWindow . document : ia . merge ( [ ] , a . childNodes ) } } , function ( a , b ) { ia . fn [ a ] = function ( c , d ) { var e = ia . map ( this , b , c ) ; return Pa . test ( a ) || ( d = c ) , d && "string" == typeof d && ( e = ia . filter ( d , e ) ) , e = this . length > 1 && ! Ta [ a ] ? ia . unique ( e ) : e , this . length > 1 && Qa . test ( a ) && ( e = e . reverse ( ) ) , this . pushStack ( e ) } } ) , ia . extend ( { filter : function ( a , b , c ) { return c && ( a = ":not(" + a + ")" ) , 1 === b . length ? ia . find . matchesSelector ( b [ 0 ] , a ) ? [ b [ 0 ] ] : [ ] : ia . find . matches ( a , b ) } , dir : function ( a , c , d ) { for ( var e = [ ] , f = a [ c ] ; f && 9 !== f . nodeType && ( d === b || 1 !== f . nodeType || ! ia ( f ) . is ( d ) ) ; ) 1 === f . nodeType && e . push ( f ) , f = f [ c ] ; return e } , sibling : function ( a , b ) { for ( var c = [ ] ; a ; a = a . nextSibling ) 1 === a . nodeType && a !== b && c . push ( a ) ; return c } } ) ; var Ua = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video" , Va = / jQuery\d+="(?:null|\d+)"/g , Wa = new RegExp ( "<(?:" + Ua + ")[\\s/>]" , "i" ) , Xa = /^\s+/ , Ya = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi , Za = /<([\w:]+)/ , $a = /<tbody/i , _a = /<|&#?\w+;/ , ab = /<(?:script|style|link)/i , bb = /^(?:checkbox|radio)$/i , cb = /checked\s*(?:[^=]|=\s*.checked.)/i , db = /^$|\/(?:java|ecma)script/i , eb = /^true\/(.*)/ , fb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g , gb = { option : [ 1 , "<select multiple='multiple'>" , "</select>" ] , legend : [ 1 , "<fieldset>" , "</fieldset>" ] , area : [ 1 , "<map>" , "</map>" ] , param : [ 1 , "<object>" , "</object>" ] , thead : [ 1 , "<table>" , "</table>" ] , tr : [ 2 , "<table><tbody>" , "</tbody></table>" ] , col : [ 2 , "<table><tbody></tbody><colgroup>" , "</colgroup></table>" ] , td : [ 3 , "<table><tbody><tr>" , "</tr></tbody></table>" ] , _default : ia . support . htmlSerialize ? [ 0 , "" , "" ] : [ 1 , "X<div>" , "</div>" ] } , hb = m ( W ) , ib = hb . appendChild ( W . createElement ( "div" ) ) ; gb . optgroup = gb . option , gb . tbody = gb . tfoot = gb . colgroup = gb . caption = gb . thead , gb . th = gb . td , ia . fn . extend ( { text : function ( a ) { return ia . access ( this , function ( a ) { return a === b ? ia . text ( this ) : this . empty ( ) . append ( ( this [ 0 ] && this [ 0 ] . ownerDocument || W ) . createTextNode ( a ) ) } , null , a , arguments . length ) } , wrapAll : function ( a ) { if ( ia . isFunction ( a ) ) return this . each ( function ( b ) { ia ( this ) . wrapAll ( a . call ( this , b ) ) } ) ; if ( this [ 0 ] ) { var b = ia ( a , this [ 0 ] . ownerDocument ) . eq ( 0 ) . clone ( ! 0 ) ; this [ 0 ] . parentNode && b . insertBefore ( this [ 0 ] ) , b . map ( function ( ) { for ( var a = this ; a . firstChild && 1 === a . firstChild . nodeType ; ) a = a . firstChild ; return a } ) . append ( this ) } return this } , wrapInner : function ( a ) { return ia . isFunction ( a ) ? this . each ( function ( b ) { ia ( this ) . wrapInner ( a . call ( this , b ) ) } ) : this . each ( function ( ) { var b = ia ( this ) , c = b . contents ( ) ; c . leng
var j = g [ i ] ; b && void 0 !== c [ j ] || ( c [ j ] = f [ j ] ) } return c } } , v = function ( a ) { if ( ! r . isObject ( a ) ) return { } ; if ( p ) return p ( a ) ; q . prototype = a ; var b = new q ; return q . prototype = null , b } , w = Math . pow ( 2 , 53 ) - 1 , x = function ( a ) { var b = null != a && a . length ; return "number" == typeof b && b >= 0 && b <= w } ; r . each = r . forEach = function ( a , b , c ) { b = s ( b , c ) ; var d , e ; if ( x ( a ) ) for ( d = 0 , e = a . length ; d < e ; d ++ ) b ( a [ d ] , d , a ) ; else { var f = r . keys ( a ) ; for ( d = 0 , e = f . length ; d < e ; d ++ ) b ( a [ f [ d ] ] , f [ d ] , a ) } return a } , r . map = r . collect = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = Array ( e ) , g = 0 ; g < e ; g ++ ) { var h = d ? d [ g ] : g ; f [ g ] = b ( a [ h ] , h , a ) } return f } , r . reduce = r . foldl = r . inject = a ( 1 ) , r . reduceRight = r . foldr = a ( - 1 ) , r . find = r . detect = function ( a , b , c ) { var d ; if ( d = x ( a ) ? r . findIndex ( a , b , c ) : r . findKey ( a , b , c ) , void 0 !== d && d !== - 1 ) return a [ d ] } , r . filter = r . select = function ( a , b , c ) { var d = [ ] ; return b = t ( b , c ) , r . each ( a , function ( a , c , e ) { b ( a , c , e ) && d . push ( a ) } ) , d } , r . reject = function ( a , b , c ) { return r . filter ( a , r . negate ( t ( b ) ) , c ) } , r . every = r . all = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( ! b ( a [ g ] , g , a ) ) return ! 1 } return ! 0 } , r . some = r . any = function ( a , b , c ) { b = t ( b , c ) ; for ( var d = ! x ( a ) && r . keys ( a ) , e = ( d || a ) . length , f = 0 ; f < e ; f ++ ) { var g = d ? d [ f ] : f ; if ( b ( a [ g ] , g , a ) ) return ! 0 } return ! 1 } , r . contains = r . includes = r . include = function ( a , b , c ) { return x ( a ) || ( a = r . values ( a ) ) , r . indexOf ( a , b , "number" == typeof c && c ) >= 0 } , r . invoke = function ( a , b ) { var c = j . call ( arguments , 2 ) , d = r . isFunction ( b ) ; return r . map ( a , function ( a ) { var e = d ? b : a [ b ] ; return null == e ? e : e . apply ( a , c ) } ) } , r . pluck = function ( a , b ) { return r . map ( a , r . property ( b ) ) } , r . where = function ( a , b ) { return r . filter ( a , r . matcher ( b ) ) } , r . findWhere = function ( a , b ) { return r . find ( a , r . matcher ( b ) ) } , r . max = function ( a , b , c ) { var d , e , f = - ( 1 / 0 ) , g = - ( 1 / 0 ) ; if ( null == b && null != a ) { a = x ( a ) ? a : r . values ( a ) ; for ( var h = 0 , i = a . length ; h < i ; h ++ ) d = a [ h ] , d > f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e > g || e === - ( 1 / 0 ) && f === - ( 1 / 0 ) ) && ( f = a , g = e ) } ) ; return f } , r . min = function ( a , b , c ) { var d , e , f = 1 / 0 , g = 1 / 0 ; if ( null == b && null != a ) { a = x ( a ) ? a : r . values ( a ) ; for ( var h = 0 , i = a . length ; h < i ; h ++ ) d = a [ h ] , d < f && ( f = d ) } else b = t ( b , c ) , r . each ( a , function ( a , c , d ) { e = b ( a , c , d ) , ( e < g || e === 1 / 0 && f === 1 / 0 ) && ( f = a , g = e ) } ) ; return f } , r . shuffle = function ( a ) { for ( var b , c = x ( a ) ? a : r . values ( a ) , d = c . length , e = Array ( d ) , f = 0 ; f < d ; f ++ ) b = r . random ( 0 , f ) , b !== f && ( e [ f ] = e [ b ] ) , e [ b ] = c [ f ] ; return e } , r . sample = function ( a , b , c ) { return null == b || c ? ( x ( a ) || ( a = r . values ( a ) ) , a [ r . random ( a . length - 1 ) ] ) : r . shuffle ( a ) . slice ( 0 , Math . max ( 0 , b ) ) } , r . sortBy = function ( a , b , c ) { return b = t ( b , c ) , r . pluck ( r . map ( a , function ( a , c , d ) { return { value : a , index : c , criteria : b ( a , c , d ) } } ) . sort ( function ( a , b ) { var c = a . criteria , d = b . criteria ; if ( c !== d ) { if ( c > d || void 0 === c ) return 1 ; if ( c < d || void 0 === d ) return - 1 } return a . index - b . index } ) , "value" ) } ; var y = function ( a ) { return function ( b , c , d ) { var e = { } ; return c = t ( c , d ) , r . each ( b , function ( d , f ) { var g = c ( d , f , b ) ; a ( e , d , g ) } ) , e } } ; r . groupBy = y ( function ( a , b , c ) { r . has ( a , c ) ? a [ c ] . push ( b ) : a [ c ] = [ b ] } ) , r . indexBy = y ( function ( a , b , c ) { a [ c ] = b } ) , r . countBy = y ( function ( a , b , c ) { r . has ( a , c ) ? a [ c ] ++ : a [ c ] = 1 } ) , r . toArray = function ( a ) { return a ? r . isArray ( a ) ? j . call ( a ) : x ( a ) ? r . map ( a , r . identity ) : r . values ( a ) : [ ] } , r . size = function ( a ) { return null == a ? 0 : x ( a ) ? a . length : r . keys ( a ) . length } , r . partition = function ( a , b , c ) { b = t ( b , c ) ; var d = [ ] , e = [ ] ; return r . each ( a , function ( a , c , f ) { ( b ( a , c , f ) ? d : e ) . push ( a ) } ) , [ d , e ] } , r . first = r . head = r . take = function ( a , b , c ) { if ( null != a ) return null == b || c ? a [ 0 ] : r . initial ( a , a . length - b ) } , r . initial = function ( a , b , c ) { return j . call ( a , 0 , Math . max ( 0 , a . length - ( null == b || c ? 1 : b ) ) ) } , r . last = function ( a , b , c ) { if ( null != a ) return null == b || c ? a [ a . length - 1 ] : r . rest ( a , Math . max ( 0 , a . length - b ) ) } , r . rest = r . tail = r . drop = function ( a , b , c ) { return j . call ( a , null == b || c ? 1 : b ) } , r . compact = function ( a ) { return r . filter ( a , r . identity ) } ; var z = function ( a , b , c , d ) { for ( var e = [ ] , f = 0 , g = d || 0 , h = a && a . length ; g < h ; g ++ ) { var i = a [ g ] ; if ( x ( i ) && ( r . isArray ( i ) || r . isArguments ( i ) ) ) { b || ( i = z ( i , b , c ) ) ; var j = 0 , k = i . length ; for ( e . length += k ; j < k ; ) e [ f ++ ] = i [ j ++ ] } else c || ( e [ f ++ ] = i ) } return e } ; r . flatten = function ( a , b ) { return z ( a , b , ! 1 ) } , r . without = function ( a ) { return r . difference ( a , j . call ( arguments , 1 ) ) } , r . uniq = r . unique = function ( a , b , c , d ) { if ( null == a ) return [ ] ; r . isBoolean ( b ) || ( d = c , c = b , b = ! 1 ) , null != c && ( c = t ( c , d ) ) ; for ( var e = [ ] , f = [ ] , g = 0 , h = a . length ; g < h ; g ++ ) { var i = a [ g ] ,
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 . _isRoot === ! 0 ? b = ! 0 : this . _parent && this . _parent . _isMounted === ! 0 && ( b = ! 0 ) , b && ( this . beforeMount && this . beforeMount ( ) , this . _isMounted = ! 0 , this . _mountChildren && this . _mountChildren ( ) , BI . each ( this . _children , function ( b , c ) { ! a . isEnabled ( ) && c . _setEnable ( ! 1 ) , ! a . isValid ( ) && c . _setValid ( ! 1 ) , c . _mount && c . _mount ( ) } ) , this . mounted && this . mounted ( ) ) ) } , _mountChildren : null , isMounted : function ( ) { return this . _isMounted } , setWidth : function ( a ) { this . options . width = a , this . _initElementWidth ( ) } , setHeight : function ( a ) { this . options . height = a , this . _initElementHeight ( ) } , _setEnable : function ( a ) { a === ! 0 ? this . options . disabled = ! 1 : a === ! 1 && ( this . options . disabled = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetEnable && c . _setEnable && c . _setEnable ( a ) } ) } , _setValid : function ( a ) { a === ! 0 ? this . options . invalid = ! 1 : a === ! 1 && ( this . options . invalid = ! 0 ) , BI . each ( this . _children , function ( b , c ) { ! c . _manualSetValid && c . _setValid && c . _setValid ( a ) } ) } , _setVisible : function ( a ) { a === ! 0 ? this . options . invisible = ! 1 : a === ! 1 && ( this . options . invisible = ! 0 ) } , setEnable : function ( a ) { this . _manualSetEnable = ! 0 , this . _setEnable ( a ) , a === ! 0 ? this . element . removeClass ( "base-disabled disabled" ) : a === ! 1 && this . element . addClass ( "base-disabled disabled" ) } , setVisible : function ( a ) { this . _setVisible ( a ) , a === ! 0 ? ( this . element . css ( "display" , "" ) , this . _mount ( ) ) : a === ! 1 && this . element . css ( "display" , "none" ) , this . fireEvent ( BI . Events . VIEW , a ) } , setValid : function ( a ) { this . _manualSetValid = ! 0 , this . _setValid ( a ) , a === ! 0 ? this . element . removeClass ( "base-invalid invalid" ) : a === ! 1 && this . element . addClass ( "base-invalid invalid" ) } , doBehavior : function ( ) { var a = arguments ; BI . each ( this . _children , function ( b , c ) { c . doBehavior && c . doBehavior . apply ( c , a ) } ) } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return this . options . height } , isValid : function ( ) { return ! this . options . invalid } , addWidget : function ( a , b ) { var c = this ; if ( a instanceof BI . Widget && ( b = a , a = b . getName ( ) ) , BI . isKey ( a ) && ( a += "" ) , a = a || b . getName ( ) || BI . uniqueId ( "widget" ) , this . _children [ a ] ) throw new Error ( "name has already been existed" ) ; return b . _setParent && b . _setParent ( this ) , b . on ( BI . Events . DESTROY , function ( ) { BI . remove ( c . _children , this ) } ) , this . _children [ a ] = b } , getWidgetByName : function ( a ) { if ( ! BI . isKey ( a ) || a === this . getName ( ) ) return this ; a += "" ; var b = void 0 , c = { } ; return BI . any ( this . _children , function ( d , e ) { return d === a ? ( b = e , ! 0 ) : void ( c [ d ] = e ) } ) , b || BI . any ( c , function ( a , c ) { return b = c . getWidgetByName ( a ) } ) , b } , removeWidget : function ( a ) { BI . isWidget ( a ) ? BI . remove ( this . _children , a ) : delete this . _children [ a ] } , hasWidget : function ( a ) { return null != this . _children [ a ] } , getName : function ( ) { return this . widgetName } , setTag : function ( a ) { this . options . tag = a } , getTag : function ( ) { return this . options . tag } , attr : function ( a , b ) { var c = this ; return BI . isPlainObject ( a ) ? void BI . each ( a , function ( a , b ) { c . attr ( a , b ) } ) : BI . isNotNull ( b ) ? this . options [ a ] = b : this . options [ a ] } , getText : function ( ) { } , setText : function ( a ) { } , getValue : function ( ) { } , setValue : function ( a ) { } , isEnabled : function ( ) { return ! this . options . disabled } , isVisible : function ( ) { return ! this . options . invisible } , disable : function ( ) { this . setEnable ( ! 1 ) } , enable : function ( ) { this . setEnable ( ! 0 ) } , valid : function ( ) { this . setValid ( ! 0 ) } , invalid : function ( ) { this . setValid ( ! 1 ) } , invisible : function ( ) { this . setVisible ( ! 1 ) } , visible : function ( ) { this . setVisible ( ! 0 ) } , _ _d : function ( ) { this . beforeDestroy && this .
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" , 20340 : "NE" , 20375 : "TD" , 20389 : "YJ" , 20391 : "CZ" , 20415 : "PB" , 20446 : "YS" , 20447 : "SQ" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 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" , 40
null != b && b . setRight ( c || null ) , null != c && c . setLeft ( b || null ) , this . children . splice ( a , 1 ) } , removeAllChilds : function ( ) { this . children = [ ] } , addChild : function ( a , b ) { var c = null ; c = BI . isUndefined ( b ) ? this . children . length - 1 : b - 1 , a . setParent ( this ) , c >= 0 && ( this . getChild ( c ) && this . getChild ( c ) . setRight ( a ) , a . setLeft ( this . getChild ( c ) ) ) , BI . isUndefined ( b ) ? this . children . push ( a ) : this . children . splice ( b , 0 , a ) } , 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 . sc
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" , BS : "beforesubmit" , AS : "aftersubmit" , SC : "submitcomplete" , SF : "submitfailure" , SS : "submitsuccess" , BVW : "beforeverifywrite" , AVW : "afterverifywrite" , AV : "afterverify" , BW : "beforewrite" , AW : "afterwrite" , WS : "writesuccess" , WF : "writefailure" , BA : "beforeappend" , AA : "afterappend" , BD : "beforedelete" , AD : "beforedelete" , UC : "unloadcheck" , BTOPDF : "beforetopdf" , ATOPDF : "aftertopdf" , BTOEXCEL : "beforetoexcel" , ATOEXCEL : "aftertoexcel" , BTOWORD : "beforetoword" , ATOWORD : "aftertoword" , BTOIMAGE : "beforetoimage" , ATOIMAGE : "aftertoimage" , BTOHTML : "beforetohtml" , ATOHTML : "aftertohtml" , BIMEXCEL : "beforeimportexcel" , AIMEXCEL : "afterimportexcel" , BPDFPRINT : "beforepdfprint" , APDFPRINT : "afterpdfprint" , BFLASHPRINT : "beforeflashprint" , AFLASHPRINT : "afterflashprint" , BAPPLETPRINT : "beforeappletprint" , AAPPLETPRINT : "afterappletprint" , BSEVERPRINT : "beforeserverprint" , ASERVERPRINT : "afterserverprint" , BEMAIL : "beforeemail" , AEMAIL : "afteremail" } } ) , BI . extend ( jQuery . fn , { destroy : function ( ) { this . remove ( ) , BI . isIE ( ) === ! 0 && ( this [ 0 ] . outerHTML = "" ) } , _ _textKeywordMarked _ _ : function ( a , b , c ) { if ( ! BI . isKey ( b ) || ( a + "" ) . length > 100 ) return this . text ( ( a + "" ) . replaceAll ( " " , " " ) ) ; b += "" , b = BI . toUpperCase ( b ) ; var d = ( a || "" ) + "" ; for ( c = ( c || BI . makeFirstPY ( a ) ) + "" , null != c && ( c = BI . toUpperCase ( c ) ) , this . empty ( ) ; ; ) { var e = BI . toUpperCase ( d ) . indexOf ( b ) , f = null ; if ( null != c && ( f = c . indexOf ( b ) , f >= 0 && ( f %= a . length ) ) , e >= 0 ) this . append ( d . substr ( 0 , e ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . text ( d . substr ( e , b . length ) . replaceAll ( " " , " " ) ) ) , d = d . substr ( e + b . length ) , null != c && ( c = c . substr ( e + b . length ) ) ; else { if ( ! ( null != f && f >= 0 && Math . floor ( f / a . length ) === Math . floor ( ( f + b . length - 1 ) / a . length ) ) ) { this . append ( d ) ; break } this . append ( d . substr ( 0 , f ) ) , this . append ( $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . text ( d . substr ( f , b . length ) . replaceAll ( " " , " " ) ) ) , null != c && ( c = c . substr ( f + b . length ) ) , d = d . substr ( f + b . length ) } } return this } , getDomHeight : function ( a ) { var b = $ ( this ) . clone ( ) ; b . appendTo ( $ ( a || "body" ) ) ; var c = b . height ( ) ; return b . remove ( ) , c } , hasVerticalScroll : function ( ) { return this . height ( ) > 0 && this [ 0 ] . clientWidth < this [ 0 ] . offsetWidth } , hasHorizonScroll : function ( ) { return this . width ( ) > 0 && this [ 0 ] . clientHeight < this [ 0 ] . offsetHeight } , getStyle : function ( a ) { var b = this [ 0 ] , c = void 0 ; if ( window . getComputedStyle && ( c = window . getComputedStyle ( b , null ) ) ) return c . getPropertyValue ( BI . hyphenate ( a ) ) ; if ( document . defaultView && document . defaultView . getComputedStyle ) { if ( c = document . defaultView . getComputedStyle ( b , null ) ) return c . getPropertyValue ( BI . hyphenate ( a ) ) ; if ( "display" === a ) return "none" } return b . currentStyle ? "float" === a ? b . currentStyle . cssFloat || b . currentStyle . styleFloat : b . currentStyle [ BI . camelize ( a ) ] : b . style && b . style [ BI . camelize ( a ) ] } , _ _isMouseInBounds _ _ : function ( a ) { var b = this . offset ( ) ; return ! ( a . pageX < b . left || a . pageX > b . left + this . outerWidth ( ) || a . pageY < b . top || a . pageY > b . top + this . outerHeight ( ) ) } , _ _hasZIndexMask _ _ : function ( a ) { return a && null != this . zIndexMask [ a ] } , _ _buildZIndexMask _ _ : function ( a , b ) { this . zIndexMask = this . zIndexMask || { } , this . indexMask = this . indexMask || [ ] ; var c = BI . createWidget ( { type : "bi.center_adapt" , cls : "bi-z-index-mask" , items : b } ) ; return c . element . css ( { "z-index" : a } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : c , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . indexMask . push ( c ) , a && ( this . zIndexMask [ a ] = c ) , c . element } , _ _releaseZIndexMask
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 a && ( b += a + "=" + c + "&" ) } ) , 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 } } ) , $ . extend ( String , { escape : function ( a ) { return a . replace ( /('|\\)/g , "\\$1" ) } , leftPad : function ( a , b , c ) { var d = String ( a ) ; for ( c || ( c = " " ) ; d . length < b ; ) d = c + d ; return d . toString ( ) } , format : function ( a ) { var b = Array . prototype . slice . call ( arguments , 1 ) ; return a . replace ( /\{(\d+)\}/g , function ( a , c ) { return b [ 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 . _animationFrameID ) , this . _animationFrameID = null ) , this . _isDragging && ( this . _isDragging = ! 1 , this . _x = null , this . _y = null ) } , isDragging : function ( ) { return this . _isDragging } , _onMouseMove : function ( a ) { var c = a . clientX , d = a . clientY ; this . _deltaX += c - this . _x , this . _deltaY += d - this . _y , null === this . _animationFrameID && ( this . _animationFrameID = b ( this . _didMouseMove ) ) , this . _x = c , this . _y = d , a . preventDefault ? a . preventDefault ( ) : a . returnValue = ! 1 } , _didMouseMove : function ( ) { this . _animationFrameID = null , this . _onMove ( this . _deltaX , this . _deltaY ) , this . _deltaX = 0 , this . _deltaY = 0 } , _onMouseUp : function ( ) { this . _animationFrameID && this . _didMouseMove ( ) , this . _onMoveEnd ( ) } } } ( ) , ! function ( ) { function a ( a ) { var e = 0 , f = 0 , g = 0 , h = 0 ; return "detail" in a && ( f = a . detail ) , "wheelDelta" in a && ( f = - a . wheelDelta / 120 ) , "wheelDeltaY" in a && ( f = - a . wheelDeltaY / 120 ) , "wheelDeltaX" in a && ( e = - a . wheelDeltaX / 120 ) , "axis" in a && a . axis === a . HORI
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 . createWidget ( b ) ; this . addWidget ( this . getName ( ) + "center" , g ) } this . getWidgetByName ( this . getName ( ) + "center" ) . element . css ( { position : "absolute" , top : c , bottom : d , left : e , right : f } ) } } , populate : function ( a ) { BI . BorderLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.border" , BI . BorderLayout ) , BI . CardLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . CardLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-card-layout" , items : [ ] } ) } , render : function ( ) { BI . CardLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { } , stroke : function ( a ) { var b = this , c = this . options ; this . showIndex = void 0 , BI . each ( a , function ( a , d ) { if ( d ) { if ( b . hasWidget ( d . cardName ) ) var e = b . getWidgetByName ( d . cardName ) ; else { var e = BI . createWidget ( d ) ; e . on ( BI . Events . DESTROY , function ( ) { var a = BI . findIndex ( c . items , function ( a , b ) { return b . cardName == d . cardName } ) ; a > - 1 && c . items . splice ( a , 1 ) } ) , b . addWidget ( d . cardName , e ) } e . element . css ( { position : "absolute" , top : "0" , right : "0" , bottom : "0" , left : "0" } ) , e . setVisible ( ! 1 ) } } ) } , update : function ( ) { } , empty : function ( ) { BI . CardLayout . superclass . empty . apply ( this , arguments ) , this . options . items = [ ] } , populate : function ( a ) { BI . CardLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) , this . options . defaultShowName && this . showCardByName ( this . options . defaultShowName ) } , isCardExisted : function ( a ) { return BI . some ( this . options . items , function ( b , c ) { return c . cardName == a && c . el } ) } , getCardByName : function ( a ) { if ( ! this . isCardExisted ( a ) ) throw new Error ( "cardName is not exist" ) ; return this . _children [ a ] } , _deleteCardByName : function ( a ) { delete this . _children [ a ] ; var b = BI . findIndex ( this . options . items , function ( b , c ) { return c . cardName == a } ) ; b > - 1 && this . options . items . splice ( b , 1 ) } , deleteCardByName : function ( a ) { if ( ! this . isCardExisted ( a ) ) throw new Error ( "cardName is not exist" ) ; var b = this . _children [ a ] ; this . _deleteCardByName ( a ) , b && b . _destroy ( ) } , addCardByName : function ( a , b ) { if ( this . isCardExis
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 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . VerticalCenterLayout . 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 : 0 , row : b , 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 , height : "auto" } ) , c [ a ] . el . addItem ( e ) } } ) , BI . createWidget ( { type : "bi.grid" , element : this , columns : 1 , rows : c . length , items : c } ) } , populate : function ( a ) { BI . VerticalCenterLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vertical_center" , BI . VerticalCenterLayout ) , BI . Data = Data = { } , Data . Constant = BI . Constant = BICst = { } , function ( ) { var a = { } ; Data . BufferPool = { put : function ( b , c ) { if ( BI . isNotNull ( a [ b ] ) ) throw new Error ( "Buffer Pool has the key already!" ) ; a [ b ] = c } , get : function ( b ) { return a [ b ] } } } ( ) , function ( ) { var a = { } ; Data . SharingPool = { _Shared : a , put : function ( b , c ) { a [ b ] = c } , cat : function ( ) { for ( var b = Array . prototype . slice . call ( arguments , 0 ) , c = a , d = 0 ; d < b . length ; d ++ ) c = c && c [ b [ d ] ] ; return c } , get : function ( ) { return BI . deepClone ( this . cat . apply ( this , arguments ) ) } , remove : function ( b ) { delete a [ b ] } } } ( ) , Data . Req = { } , Data . Source = BISource = { } , function ( a ) { "function" == typeof define && define . amd ? define ( [ "../core/jquery" ] , a ) : "object" == typeof exports ? module . exports = a : a ( jQuery ) } ( function ( a ) { function b ( b ) { var g = b || window . event , h = i . call ( arguments , 1 ) , j = 0 , l = 0 , m = 0 , n = 0 , o = 0 , p = 0 ; if ( b = a . event . fix ( g ) , b . type = "mousewheel" , "detail" in g && ( m = g . detail * - 1 ) , "wheelDelta" in g && ( m = g . wheelDelta ) , "wheelDeltaY" in g && ( m = g . wheelDeltaY ) , "wheelDeltaX" in g && ( l = g . wheelDeltaX * - 1 ) , "axis" in g && g . axis === g . HORIZONTAL _AXIS && ( l = m * - 1 , m = 0 ) , j = 0 === m ? l : m , "deltaY" in g && ( m = g . deltaY * - 1 , j = m ) , "deltaX" in g && ( l = g . deltaX , 0 === m && ( j = l * - 1 ) ) , 0 !== m || 0 !== l ) { if ( 1 === g . deltaMode ) { var q = 40 ; j *= q , m *= q , l *= q } else if ( 2 === g . deltaMode ) { var r = 800 ; j *= r , m *= r , l *= r } if ( n = Math . max ( Math . abs ( m ) , Math . abs ( l ) ) , ( ! f || n < f ) && ( f = n , d ( g , n ) && ( f /= 40 ) ) , d ( g , n ) && ( j /= 40 , l /= 40 , m /= 40 ) , j = Math [ j >= 1 ? "floor" : "ceil" ] ( j / f ) , l = Math [ l >= 1 ? "floor" : "ceil" ] ( l / f ) , m = Math [ m >= 1 ? "floor" : "ceil" ] ( m / f ) , k . settings . normalizeOffset && this . getBoundingClientRect ) { var s = this . getBoundingClientRect ( ) ; o = b . clientX - s . left , p = b . clientY - s . top } return b . deltaX = l , b . deltaY = m , b . deltaFactor = f , b . offsetX = o , b . offsetY = p , b . deltaMode = 0 , h . unshift ( b , j , l , m ) , e && clearTimeout ( e ) , e = setTimeout ( c , 200 ) , ( a . event . dispatch || a . event . handle ) . apply ( this , h ) } } function c ( ) { f = null } function d ( a , b ) { return k . settings . adjustOldDeltas && "mousewheel" === a . type && b % 120 === 0 } var e , f , g = [ "wheel" , "mousewheel" , "DOMMouseScroll" , "MozMousePixelScroll" ] , h = "onwheel" in docu
b . halfCheck === ! 0 && ( b . halfCheck = ! 1 , c ( b . children ) ) } ) } if ( b . halfCheck = ! 1 , b . checked === ! 0 ) { c ( b . children ) ; var d = $ . fn . zTree . getZTreeObj ( a ) , e = d . getSelectedNodes ( ) ; BI . each ( e , function ( a , b ) { b . halfCheck = ! 1 } ) } } function c ( a , b ) { h . _beforeExpandNode ( a , b ) } function d ( a , b , c ) { h . _selectTreeNode ( b , c ) } function e ( a , b , c ) { c . halfCheck = ! 1 } function f ( a , b , c ) { c . halfCheck = ! 1 } var g = this . options . paras , h = this , i = { async : { enable : ! 1 , otherParam : BI . cjkEncodeDO ( g ) } , check : { enable : ! 0 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , view : { showIcon : ! 1 , expandSpeed : "" , nameIsHTML : ! 0 , dblClickExpand : ! 1 } , callback : { beforeCheck : b , onCheck : d , beforeExpand : c , onExpand : e , onCollapse : f , onClick : a } } ; return i } , _selectTreeNode : function ( a , b ) { var c = this , d = ( this . options , BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) ) , e = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) ; else { var f = b , g = this . _getTree ( this . options . paras . selectedValues , d ) ; for ( BI . isNotNull ( g [ e ] ) && delete g [ e ] ; null != f && BI . isEmpty ( g ) ; ) d = d . slice ( 0 , d . length - 1 ) , f = f . getParentNode ( ) , null != f && ( g = this . _getTree ( this . options . paras . selectedValues , d ) , e = this . _getNodeValue ( f ) , delete g [ e ] ) } BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) } , _beforeExpandNode : function ( a , b ) { function c ( a , c ) { d . nodes . addNodes ( b , a ) , c === ! 0 && BI . delay ( function ( ) { i ++ , g . times = i , e . itemsCreator ( g , h ) } , 100 ) } var d = this , e = this . options , f = b . parentValues || d . _getParentValues ( b ) , g = BI . extend ( { } , e . paras , { id : b . id , times : 1 , parentValues : f . concat ( this . _getNodeValue ( b ) ) , checkState : b . getCheckStatus ( ) } ) , h = function ( a ) { var b = a . items || [ ] ; b . length > 0 && c ( d . _dealWidthNodes ( b ) , ! ! a . hasNext ) } , i = 1 ; b . children || e . itemsCreator ( g , h ) } , _join : function ( a , b ) { function c ( a , b , f ) { BI . each ( b , function ( g , h ) { BI . isNull ( f [ g ] ) ? d . _addTreeNode ( e , a , g , h ) : BI . isEmpty ( f [ g ] ) ? d . _addTreeNode ( e , a , g , { } ) : c ( a . concat ( [ g ] ) , b [ g ] , f [ g ] ) } ) } var d = this , e = { } ; return c ( [ ] , a , b ) , c ( [ ] , b , a ) , e } , hasChecked : function ( ) { return ! BI . isEmpty ( this . options . paras . selectedValues ) || BI . AsyncTree . superclass . hasChecked . apply ( this , arguments ) } , getValue : function ( ) { if ( ! this . nodes ) return { } ; var a = this . _getSelectedValues ( ) ; return BI . isEmpty ( a ) ? BI . deepClone ( this . options . paras . selectedValues ) : BI . isEmpty ( this . options . paras . selectedValues ) ? a : this . _join ( a , this . options . paras . selectedValues ) } , stroke : function ( a ) { delete this . options . keyword , BI . extend ( this . options . paras , a ) ; var b = this . _configSetting ( ) ; this . _initTree ( b ) } } ) , BI . shortcut ( "bi.async_tree" , BI . AsyncTree ) , BI . PartTree = BI . inherit ( BI . AsyncTree , { _defaultConfig : function ( ) { return BI . extend ( BI . PartTree . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . PartTree . superclass . _init . apply ( this , arguments ) } , _loadMore : function ( ) { var a = this , b = this . options , c = BI . extend ( { } , b . paras , { type : BI . TreeView . REQ _TYPE _INIT _DATA , times : ++ this . times } ) ; this . tip . setLoading ( ) , b . itemsCreator ( c , function ( c ) { var d = ! ! c . hasNext , e = c . items || [ ] ; b . paras . lastSearchValue = c . lastSearchValue , a . _stop !== ! 0 && ( d ? a . tip . setLoaded ( ) : a . tip . setEnd ( ) , e . length > 0 && a . nodes . addNodes ( null , a . _dealWidthNodes ( e ) ) ) } ) } , _selectTreeNode : function ( a , b ) { var c = this , d = this . options , e = BI . deepClone ( b . parentValues || c . _getParentValues ( b ) ) , f = this . _getNodeValue ( b ) ; if ( b . checked === ! 0 ) BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) ; else { for ( var g = this . options . paras . selectedValues , h = e . concat ( f ) , i = 0 , j = h . length ; i < j ; i ++ ) { if ( g = g [ h [ i ] ] , null == g ) return ; if ( BI . isEmpty ( g ) ) break } d . itemsCreator ( BI . extend ( { } , d . paras , { type : BI . TreeView . REQ _TYPE _SELECT _DATA , notSelectedValue : f , parentValues : e } ) , function ( a ) { c . options . paras . selectedValues = a , BI . AsyncTree . superclass . _selectTreeNode . apply ( c , arguments ) } ) } } , _getSelectedValues : function ( ) { function a ( d ) { BI . each ( d , function ( d , e ) { var f = e . getCheckStatus ( ) ; if ( f . checked === ! 1 ) return ! 0 ; var g = e . parentValues || b . _getParentValues ( e ) , h = g . concat ( [ b . _getNodeValue ( e ) ] ) ; return b . _buildTree ( c , h ) , BI . isNotEmptyArray ( e . children ) ? ( a ( e . children ) , ! 0 ) : void ( f . half === ! 0 && b . _getHalfSelectedValues ( c , e ) ) } ) } var b = this , c = { } , d = this . nodes . getNodes ( ) ; return a ( d ) , c } , _initTree : function ( a , b ) { function c ( b ) { d . _stop !== ! 0 && ( d . nodes = $ . fn . zTree . init ( f . element , a , b ) ) } var d = this , e = this . options ; this . times = 1 ; var f = this . tree ; f . empty ( ) , d . tip . setVisible ( ! 1 ) , this . loading ( ) ; var g = BI . extend ( { } , e . par
for ( var b = this . options , c = BI . deepClone ( b . layouts [ 0 ] ) , d = BI . formatEL ( c ) . el ; d && d . items && ! BI . isEmpty ( d . items ) ; ) d = BI . formatEL ( d . items [ 0 ] ) . el ; return d . items = a , c } , addItems : function ( a ) { this . layouts . addItems ( a ) } , prependItems : function ( a ) { this . layouts . prependItems ( a ) } , setValue : function ( a ) { } , getValue : function ( ) { return this . layouts . getValue ( ) } , populate : function ( a ) { a = a || [ ] , this . options . items = a , a = this . _packageBtns ( a ) , this . layouts ? this . layouts . populate ( a ) : this . layouts = BI . createWidget ( BI . extend ( { element : this } , this . _packageLayout ( a ) ) ) } } ) , BI . VirtualGroup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.virtual_group" , BI . VirtualGroup ) , BI . Loader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Loader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-loader" , direction : "top" , isDefaultInit : ! 0 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { type : "bi.button_group" } , items : [ ] , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn , count : ! 1 , prev : ! 1 , next : { } , hasPrev : BI . emptyFn , hasNext : BI . emptyFn } ) } , _prevLoad : function ( ) { var a = this , b = this . options ; this . prev . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : -- this . times } , function ( ) { a . prev . setLoaded ( ) , a . prependItems . apply ( a , arguments ) } ] ) } , _nextLoad : function ( ) { var a = this , b = this . options ; this . next . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : ++ this . times } , function ( ) { a . next . setLoaded ( ) , a . addItems . apply ( a , arguments ) } ] ) } , _init : function ( ) { BI . Loader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . itemsCreator === ! 1 && ( b . prev = ! 1 , b . next = ! 1 ) , b . prev !== ! 1 && ( this . prev = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . prev ) ) , this . prev . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _prevLoad ( ) } ) ) , this . button _group = BI . createWidget ( b . el , { type : "bi.button_group" , chooseType : 0 , items : b . items , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . Loader . EVENT _CHANGE , d ) } ) , b . next !== ! 1 && ( this . next = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . next ) ) , this . next . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _nextLoad ( ) } ) ) , 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 . prev , this . button _group , this . next ) } ) ) ) ) , b . isDefaultInit && BI . isEmpty ( b . items ) && BI . nextTick ( BI . bind ( function ( ) { b . isDefaultInit && BI . isEmpty ( b . items ) && this . populate ( ) } , this ) ) , BI . isNotEmptyArray ( b . items ) && this . populate ( b . items ) } , hasPrev : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasPrev . apply ( this , [ { times : this . times , count : this . count } ] ) } , hasNext : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasNext . apply ( this , [ { times : this . times , count : this . count } ] ) } , prependItems : function ( a ) { this . count += a . length , this . next !== ! 1 && ( this . hasPrev ( ) ? ( this . options . items = this . options . items . concat ( a ) , this . prev . setLoaded ( ) ) : this . prev . setEnd ( ) ) , this . button _group . prependItems . apply ( this . button _group , arguments ) } , addItems : function ( a ) { this . count += a . length , BI . isObject ( this . next ) && ( this . hasNext ( ) ? ( this . options . items = this . options . items . concat ( a ) , this . next . setLoaded ( ) ) : this . next . setEnd ( ) ) , this . button _group . addItems . apply ( this . button _group , arguments ) } , populate : function ( a ) { var b = this , c = this . options ; return 0 === arguments . length && BI . isFunction ( c . itemsCreator ) ? void c . itemsCreator . apply ( this , [ { times : 1 } , function ( ) { if ( 0 === arguments . length ) throw new Error ( "arguments can not be null!!!" ) ; b . populate . apply ( b , arguments ) , c . onLoaded ( ) } ] ) : ( this . options . items = a , this . times = 1 , this . count = 0 , this . count += a . length , BI . isObject ( this . next ) && ( this . hasNext ( ) ? this . next . setLoaded ( ) : this . next . invisible ( ) ) , BI . isObject ( this . prev ) && ( this . hasPrev ( ) ? this . prev . setLoaded ( ) : this . prev . invisible ( ) ) , void this . button _group . populate . apply ( this . button _group , arguments ) ) } , setNotSelectedValue : function ( ) { this . button _group . setNotSelectedValue . apply ( this . button _group , arguments ) } , getNotSelectedValue : function ( ) { return this . butt
w ( a ) && ( Kb ( a ) , b . dims = H ( a ) ) ; var e = d . first + d . size , f = Math . max ( b . visible . from - a . options . viewportMargin , d . first ) , g = Math . min ( e , b . visible . to + a . options . viewportMargin ) ; c . viewFrom < f && f - c . viewFrom < 20 && ( f = Math . max ( d . first , c . viewFrom ) ) , c . viewTo > g && c . viewTo - g < 20 && ( g = Math . min ( e , c . viewTo ) ) , Ef && ( f = qd ( a . doc , f ) , g = rd ( a . doc , g ) ) ; var h = f != c . viewFrom || g != c . viewTo || c . lastWrapHeight != b . wrapperHeight || c . lastWrapWidth != b . wrapperWidth ; Nb ( a , f , g ) , c . viewOffset = _d ( Vd ( a . doc , c . viewFrom ) ) , a . display . mover . style . top = c . viewOffset + "px" ; var i = Ob ( a ) ; if ( ! h && 0 == i && ! b . force && c . renderedView == c . view && ( null == c . updateLineNumbers || c . updateLineNumbers >= c . viewTo ) ) return ! 1 ; var j = Pe ( ) ; return i > 4 && ( c . lineDiv . style . display = "none" ) , I ( a , c . updateLineNumbers , b . dims ) , i > 4 && ( c . lineDiv . style . display = "" ) , c . renderedView = c . view , j && Pe ( ) != j && j . offsetHeight && j . focus ( ) , Ne ( c . cursorDiv ) , Ne ( c . selectionDiv ) , c . gutters . style . height = 0 , h && ( c . lastWrapHeight = b . wrapperHeight , c . lastWrapWidth = b . wrapperWidth , Ma ( a , 400 ) ) , c . updateLineNumbers = null , ! 0 } function C ( a , b ) { for ( var c = b . viewport , d = ! 0 ; ( d && a . options . lineWrapping && b . oldDisplayWidth != Ua ( a ) || ( c && null != c . top && ( c = { top : Math . min ( a . doc . height + Ra ( a . display ) - Va ( a ) , c . top ) } ) , b . visible = u ( a . display , a . doc , c ) , ! ( b . visible . from >= a . display . viewFrom && b . visible . to <= a . display . viewTo ) ) ) && B ( a , b ) ; d = ! 1 ) { F ( a ) ; var e = o ( a ) ; Ha ( a ) , E ( a , e ) , s ( a , e ) } b . signal ( a , "update" , a ) , a . display . viewFrom == a . display . reportedViewFrom && a . display . viewTo == a . display . reportedViewTo || ( b . signal ( a , "viewportChange" , a , a . display . viewFrom , a . display . viewTo ) , a . display . reportedViewFrom = a . display . viewFrom , a . display . reportedViewTo = a . display . viewTo ) } function D ( a , b ) { var c = new z ( a , b ) ; if ( B ( a , c ) ) { F ( a ) , C ( a , c ) ; var d = o ( a ) ; Ha ( a ) , E ( a , d ) , s ( a , d ) , c . finish ( ) } } function E ( a , b ) { a . display . sizer . style . minHeight = b . docHeight + "px" ; var c = b . docHeight + a . display . barHeight ; a . display . heightForcer . style . top = c + "px" , a . display . gutters . style . height = Math . max ( c + Ta ( a ) , b . clientHeight ) + "px" } function F ( a ) { for ( var b = a . display , c = b . lineDiv . offsetTop , d = 0 ; d < b . view . length ; d ++ ) { var e , f = b . view [ d ] ; if ( ! f . hidden ) { if ( nf && of < 8 ) { var g = f . node . offsetTop + f . node . offsetHeight ; e = g - c , c = g } else { var h = f . node . getBoundingClientRect ( ) ; e = h . bottom - h . top } var i = f . line . height - e ; if ( e < 2 && ( e = rb ( b ) ) , ( i > . 001 || i < - . 001 ) && ( Yd ( f . line , e ) , G ( f . line ) , f . rest ) ) for ( var j = 0 ; j < f . rest . length ; j ++ ) G ( f . rest [ j ] ) } } } function G ( a ) { if ( a . widgets ) for ( var b = 0 ; b < a . widgets . length ; ++ b ) a . widgets [ b ] . height = a . widgets [ b ] . node . offsetHeight } function H ( a ) { for ( var b = a . display , c = { } , d = { } , e = b . gutters . clientLeft , f = b . gutters . firstChild , g = 0 ; f ; f = f . nextSibling , ++ g ) c [ a . options . gutters [ g ] ] = f . offsetLeft + f . clientLeft + e , d [ a . options . gutters [ g ] ] = f . clientWidth ; return { fixedPos : y ( b ) , gutterTotalWidth : b . gutters . offsetWidth , gutterLeft : c , gutterWidth : d , wrapperWidth : b . wrapper . clientWidth } } function I ( a , b , c ) { function d ( b ) { var c = b . nextSibling ; return pf && yf && a . display . currentWheelTarget == b ? b . style . display = "none" : b . parentNode . removeChild ( b ) , c } for ( var e = a . display , f = a . options . lineNumbers , g = e . lineDiv , h = g . firstChild , i = e . view , j = e . viewFrom , k = 0 ; k < i . length ; k ++ ) { var l = i [ k ] ; if ( l . hidden ) ; else if ( l . node && l . node . parentNode == g ) { for ( ; h != l . node ; ) h = d ( h ) ; var m = f && null != b && b <= j && l . lineNumber ; l . changes && ( De ( l . changes , "gutter" ) > - 1 && ( m = ! 1 ) , J ( a , l , j , c ) ) , m && ( Ne ( l . lineNumber ) , l . lineNumber . appendChild ( document . createTextNode ( x ( a . options , j ) ) ) ) , h = l . node . nextSibling } else { var n = R ( a , l , j , c ) ; g . insertBefore ( n , h ) } j += l . size } for ( ; h ; ) h = d ( h ) } function J ( a , b , c , d ) { for ( var e = 0 ; e < b . changes . length ; e ++ ) { var f = b . changes [ e ] ; "text" == f ? N ( a , b ) : "gutter" == f ? P ( a , b , c , d ) : "class" == f ? O ( b ) : "widget" == f && Q ( a , b , d ) } b . changes = null } function K ( a ) { return a . node == a . text && ( a . node = Me ( "div" , null , null , "position: relative" ) , a . text . parentNode && a . text . parentNode . replaceChild ( a . node , a . text ) , a . node . appendChild ( a . text ) , nf && of < 8 && ( a . node . style . zIndex = 2 ) ) , a . node } function L ( a ) { var b = a . bgClass ? a . bgClass + " " + ( a . line . bgClass || "" ) : a . line . bgClass ; if ( b && ( b += " CodeMirror-linebackground" ) , a . background ) b ? a . background . className = b : ( a . background . parentNode . removeChild ( a . background ) , a . background = null ) ; else if ( b ) { var c = K ( a ) ; a . background = c . insertBefore ( Me ( "div" , null , b ) , c . firstChild ) } } function M ( a , b ) { var c = a . display . externalMeasured ; return c && c . line == b . l
b < 0 ) return null ; for ( var c = a . display . view , d = 0 ; d < c . length ; d ++ ) if ( b -= c [ d ] . size , b < 0 ) return d } function Mb ( a , b , c , d ) { var e , f = Lb ( a , b ) , g = a . display . view ; if ( ! Ef || c == a . doc . first + a . doc . size ) return { index : f , lineN : c } ; for ( var h = 0 , i = a . display . viewFrom ; h < f ; h ++ ) i += g [ h ] . size ; if ( i != b ) { if ( d > 0 ) { if ( f == g . length - 1 ) return null ; e = i + g [ f ] . size - b , f ++ } else e = i - b ; b += e , c += e } for ( ; qd ( a . doc , c ) != c ; ) { if ( f == ( d < 0 ? 0 : g . length - 1 ) ) return null ; c += d * g [ f - ( d < 0 ? 1 : 0 ) ] . size , f += d } return { index : f , lineN : c } } function Nb ( a , b , c ) { var d = a . display , e = d . view ; 0 == e . length || b >= d . viewTo || c <= d . viewFrom ? ( d . view = Hb ( a , b , c ) , d . viewFrom = b ) : ( d . viewFrom > b ? d . view = Hb ( a , b , d . viewFrom ) . concat ( d . view ) : d . viewFrom < b && ( d . view = d . view . slice ( Lb ( a , b ) ) ) , d . viewFrom = b , d . viewTo < c ? d . view = d . view . concat ( Hb ( a , d . viewTo , c ) ) : d . viewTo > c && ( d . view = d . view . slice ( 0 , Lb ( a , c ) ) ) ) , d . viewTo = c } function Ob ( a ) { for ( var b = a . display . view , c = 0 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; e . hidden || e . node && ! e . changes || ++ c } return c } function Pb ( a ) { function b ( ) { e . activeTouch && ( f = setTimeout ( function ( ) { e . activeTouch = null } , 1e3 ) , g = e . activeTouch , g . end = + new Date ) } function c ( a ) { if ( 1 != a . touches . length ) return ! 1 ; var b = a . touches [ 0 ] ; return b . radiusX <= 1 && b . radiusY <= 1 } function d ( a , b ) { if ( null == b . left ) return ! 0 ; var c = b . left - a . left , d = b . top - a . top ; return c * c + d * d > 400 } var e = a . display ; xg ( e . scroller , "mousedown" , Db ( a , Ub ) ) , nf && of < 11 ? xg ( e . scroller , "dblclick" , Db ( a , function ( b ) { if ( ! ve ( a , b ) ) { var c = Tb ( a , b ) ; if ( c && ! Zb ( a , b ) && ! Sb ( a . display , b ) ) { ug ( b ) ; var d = a . findWordAt ( c ) ; va ( a . doc , d . anchor , d . head ) } } } ) ) : xg ( e . scroller , "dblclick" , function ( b ) { ve ( a , b ) || ug ( b ) } ) , Cf || xg ( e . scroller , "contextmenu" , function ( b ) { pc ( a , b ) } ) ; var f , g = { end : 0 } ; xg ( e . scroller , "touchstart" , function ( a ) { if ( ! c ( a ) ) { clearTimeout ( f ) ; var b = + new Date ; e . activeTouch = { start : b , moved : ! 1 , prev : b - g . end <= 300 ? g : null } , 1 == a . touches . length && ( e . activeTouch . left = a . touches [ 0 ] . pageX , e . activeTouch . top = a . touches [ 0 ] . pageY ) } } ) , xg ( e . scroller , "touchmove" , function ( ) { e . activeTouch && ( e . activeTouch . moved = ! 0 ) } ) , xg ( e . scroller , "touchend" , function ( c ) { var f = e . activeTouch ; if ( f && ! Sb ( e , c ) && null != f . left && ! f . moved && new Date - f . start < 300 ) { var g , h = a . coordsChar ( e . activeTouch , "page" ) ; g = ! f . prev || d ( f , f . prev ) ? new ma ( h , h ) : ! f . prev . prev || d ( f , f . prev . prev ) ? a . findWordAt ( h ) : new ma ( Ff ( h . line , 0 ) , qa ( a . doc , Ff ( h . line + 1 , 0 ) ) ) , a . setSelection ( g . anchor , g . head ) , a . focus ( ) , ug ( c ) } b ( ) } ) , xg ( e . scroller , "touchcancel" , b ) , xg ( e . scroller , "scroll" , function ( ) { e . scroller . clientHeight && ( ac ( a , e . scroller . scrollTop ) , bc ( a , e . scroller . scrollLeft , ! 0 ) , zg ( a , "scroll" , a ) ) } ) , xg ( e . scroller , "mousewheel" , function ( b ) { cc ( a , b ) } ) , xg ( e . scroller , "DOMMouseScroll" , function ( b ) { cc ( a , b ) } ) , xg ( e . wrapper , "scroll" , function ( ) { e . wrapper . scrollTop = e . wrapper . scrollLeft = 0 } ) , e . dragFunctions = { simple : function ( b ) { ve ( a , b ) || wg ( b ) } , start : function ( b ) { _b ( a , b ) } , drop : Db ( a , $b ) } ; var h = e . input . getField ( ) ; xg ( h , "keyup" , function ( b ) { kc . call ( a , b ) } ) , xg ( h , "keydown" , Db ( a , ic ) ) , xg ( h , "keypress" , Db ( a , lc ) ) , xg ( h , "focus" , Ie ( nc , a ) ) , xg ( h , "blur" , Ie ( oc , a ) ) } function Qb ( b , c , d ) { var e = d && d != a . Init ; if ( ! c != ! e ) { var f = b . display . dragFunctions , g = c ? xg : yg ; g ( b . display . scroller , "dragstart" , f . start ) , g ( b . display . scroller , "dragenter" , f . simple ) , g ( b . display . scroller , "dragover" , f . simple ) , g ( b . display . scroller , "drop" , f . drop ) } } function Rb ( a ) { var b = a . display ; b . lastWrapHeight == b . wrapper . clientHeight && b . lastWrapWidth == b . wrapper . clientWidth || ( b . cachedCharWidth = b . cachedTextHeight = b . cachedPaddingH = null , b . scrollbarsClipped = ! 1 , a . setSize ( ) ) } function Sb ( a , b ) { for ( var c = re ( b ) ; c != a . wrapper ; c = c . parentNode ) if ( ! c || 1 == c . nodeType && "true" == c . getAttribute ( "cm-ignore-events" ) || c . parentNode == a . sizer && c != a . mover ) return ! 0 } function Tb ( a , b , c , d ) { var e = a . display ; if ( ! c && "true" == re ( b ) . getAttribute ( "cm-not-content" ) ) return null ; var f , g , h = e . lineSpace . getBoundingClientRect ( ) ; try { f = b . clientX - h . left , g = b . clientY - h . top } catch ( b ) { return null } var i , j = pb ( a , f , g ) ; if ( d && 1 == j . xRel && ( i = Vd ( a . doc , j . line ) . text ) . length == j . ch ) { var k = Gg ( i , i . length , a . options . tabSize ) - i . length ; j = Ff ( j . line , Math . max ( 0 , Math . round ( ( f - Sa ( a . display ) . left ) / sb ( a . display ) ) - k ) ) } return j } function Ub ( a ) { var b = this , c = b . display ; if ( ! ( c . activeTouch && c . input . supportsTouch ( ) || ve ( b , a ) ) ) { if ( c . shift = a . shiftKey , Sb ( c , a ) ) return void ( pf || ( c . scroller . draggable = ! 1 , setTimeout ( function ( ) { c . scroller . dragga
null == h && ( h = a . options . flattenSpans ) ; var i , j = 0 , k = null , l = new ig ( b , a . options . tabSize ) , m = a . options . addModeClass && [ null ] ; for ( "" == b && zd ( Ad ( c , d ) , f ) ; ! l . eol ( ) ; ) { if ( l . pos > a . options . maxHighlightLength ? ( h = ! 1 , g && Gd ( a , b , d , l . pos ) , l . pos = b . length , i = null ) : i = zd ( Bd ( c , l , d , m ) , f ) , m ) { var n = m [ 0 ] . name ; n && ( i = "m-" + ( i ? n + " " + i : n ) ) } if ( ! h || k != i ) { for ( ; j < l . start ; ) j = Math . min ( l . start , j + 5e4 ) , e ( j , k ) ; k = i } l . start = l . pos } for ( ; j < l . pos ; ) { var o = Math . min ( l . pos , j + 5e4 ) ; e ( o , k ) , j = o } } function Ed ( a , b , c , d ) { var e = [ a . state . modeGen ] , f = { } ; Dd ( a , b . text , a . doc . mode , c , function ( a , b ) { e . push ( a , b ) } , f , d ) ; for ( var g = 0 ; g < a . state . overlays . length ; ++ g ) { var h = a . state . overlays [ g ] , i = 1 , j = 0 ; Dd ( a , b . text , h . mode , ! 0 , function ( a , b ) { for ( var c = i ; j < a ; ) { var d = e [ i ] ; d > a && e . splice ( i , 1 , a , e [ i + 1 ] , d ) , i += 2 , j = Math . min ( a , d ) } if ( b ) if ( h . opaque ) e . splice ( c , i - c , a , "cm-overlay " + b ) , i = c + 2 ; else for ( ; c < i ; c += 2 ) { var f = e [ c + 1 ] ; e [ c + 1 ] = ( f ? f + " " : "" ) + "cm-overlay " + b } } , f ) } return { styles : e , classes : f . bgClass || f . textClass ? f : null } } function Fd ( a , b , c ) { if ( ! b . styles || b . styles [ 0 ] != a . state . modeGen ) { var d = Ed ( a , b , b . stateAfter = Pa ( a , Zd ( b ) ) ) ; b . styles = d . styles , d . classes ? b . styleClasses = d . classes : b . styleClasses && ( b . styleClasses = null ) , c === a . doc . frontier && a . doc . frontier ++ } return b . styles } function Gd ( a , b , c , d ) { var e = a . doc . mode , f = new ig ( b , a . options . tabSize ) ; for ( f . start = f . pos = d || 0 , "" == b && Ad ( e , c ) ; ! f . eol ( ) && f . pos <= a . options . maxHighlightLength ; ) Bd ( e , f , c ) , f . start = f . pos } function Hd ( a , b ) { if ( ! a || /^\s*$/ . test ( a ) ) return null ; var c = b . addModeClass ? pg : og ; return c [ a ] || ( c [ a ] = a . replace ( /\S+/g , "cm-$&" ) ) } function Id ( a , b ) { var c = Me ( "span" , null , null , pf ? "padding-right: .1px" : null ) , d = { pre : Me ( "pre" , [ c ] , "CodeMirror-line" ) , content : c , col : 0 , pos : 0 , cm : a , splitSpaces : ( nf || pf ) && a . getOption ( "lineWrapping" ) } ; b . measure = { } ; for ( var e = 0 ; e <= ( b . rest ? b . rest . length : 0 ) ; e ++ ) { var f , g = e ? b . rest [ e - 1 ] : b . line ; d . pos = 0 , d . addToken = Kd , We ( a . display . measure ) && ( f = ae ( g ) ) && ( d . addToken = Md ( d . addToken , f ) ) , d . map = [ ] ; var h = b != a . display . externalMeasured && Zd ( g ) ; Od ( g , d , Fd ( a , g , h ) ) , g . styleClasses && ( g . styleClasses . bgClass && ( d . bgClass = Re ( g . styleClasses . bgClass , d . bgClass || "" ) ) , g . styleClasses . textClass && ( d . textClass = Re ( g . styleClasses . textClass , d . textClass || "" ) ) ) , 0 == d . map . length && d . map . push ( 0 , 0 , d . content . appendChild ( Ve ( a . display . measure ) ) ) , 0 == e ? ( b . measure . map = d . map , b . measure . cache = { } ) : ( ( b . measure . maps || ( b . measure . maps = [ ] ) ) . push ( d . map ) , ( b . measure . caches || ( b . measure . caches = [ ] ) ) . push ( { } ) ) } return pf && /\bcm-tab\b/ . test ( d . content . lastChild . className ) && ( d . content . className = "cm-tab-wrap-hack" ) , zg ( a , "renderLine" , a , b . line , d . pre ) , d . pre . className && ( d . textClass = Re ( d . pre . className , d . textClass || "" ) ) , d } function Jd ( a ) { var b = Me ( "span" , "•" , "cm-invalidchar" ) ; return b . title = "\\u" + a . charCodeAt ( 0 ) . toString ( 16 ) , b . setAttribute ( "aria-label" , b . title ) , b } function Kd ( a , b , c , d , e , f , g ) { if ( b ) { var h = a . splitSpaces ? b . replace ( / {3,}/g , Ld ) : b , i = a . cm . state . specialChars , j = ! 1 ; if ( i . test ( b ) ) for ( var k = document . createDocumentFragment ( ) , l = 0 ; ; ) { i . lastIndex = l ; var m = i . exec ( b ) , n = m ? m . index - l : b . length - l ; if ( n ) { var o = document . createTextNode ( h . slice ( l , l + n ) ) ; nf && of < 9 ? k . appendChild ( Me ( "span" , [ o ] ) ) : k . appendChild ( o ) , a . map . push ( a . pos , a . pos + n , o ) , a . col += n , a . pos += n } if ( ! m ) break ; if ( l += n + 1 , "\t" == m [ 0 ] ) { var p = a . cm . options . tabSize , q = p - a . col % p , o = k . appendChild ( Me ( "span" , Be ( q ) , "cm-tab" ) ) ; o . setAttribute ( "role" , "presentation" ) , o . setAttribute ( "cm-text" , "\t" ) , a . col += q } else { var o = a . cm . options . specialCharPlaceholder ( m [ 0 ] ) ; o . setAttribute ( "cm-text" , m [ 0 ] ) , nf && of < 9 ? k . appendChild ( Me ( "span" , [ o ] ) ) : k . appendChild ( o ) , a . col += 1 } a . map . push ( a . pos , a . pos + 1 , o ) , a . pos ++ } else { a . col += b . length ; var k = document . createTextNode ( h ) ; a . map . push ( a . pos , a . pos + b . length , k ) , nf && of < 9 && ( j = ! 0 ) , a . pos += b . length } if ( c || d || e || j || g ) { var r = c || "" ; d && ( r += d ) , e && ( r += e ) ; var s = Me ( "span" , [ k ] , r , g ) ; return f && ( s . title = f ) , a . content . appendChild ( s ) } a . content . appendChild ( k ) } } function Ld ( a ) { for ( var b = " " , c = 0 ; c < a . length - 2 ; ++ c ) b += c % 2 ? " " : " " ; return b += " " } function Md ( a , b ) { return function ( c , d , e , f , g , h , i ) { e = e ? e + " cm-force-border" : "cm-force-border" ; for ( var j = c . pos , k = j + d . length ; ; ) { for ( var l = 0 ; l < b . length ; l ++ ) { var m = b [ l ] ; if ( m . to > j && m . from <= j ) break } if ( m . to >= k ) return a ( c , d , e , f , g , h , i ) ; a ( c , d . slice ( 0 , m . to - j ) , e , f , null , h , i ) , f = null , d = d . slice ( m . to - j ) , j = m . to } } } function Nd ( a , b , c , d ) { var e = !
return W ( this . anchor , this . head ) } , empty : function ( ) { return this . head . line == this . anchor . line && this . head . ch == this . anchor . ch } } ; var If , Jf , Kf , Lf = { left : 0 , right : 0 , top : 0 , bottom : 0 } , Mf = null , Nf = 0 , Of = 0 , Pf = 0 , Qf = null ; nf ? Qf = - . 53 : kf ? Qf = 15 : rf ? Qf = - . 7 : tf && ( Qf = - 1 / 3 ) ; var Rf = function ( a ) { var b = a . wheelDeltaX , c = a . wheelDeltaY ; return null == b && a . detail && a . axis == a . HORIZONTAL _AXIS && ( b = a . detail ) , null == c && a . detail && a . axis == a . VERTICAL _AXIS ? c = a . detail : null == c && ( c = a . wheelDelta ) , { x : b , y : c } } ; a . wheelEventPixels = function ( a ) { var b = Rf ( a ) ; return b . x *= Qf , b . y *= Qf , b } ; var Sf = new ze , Tf = null , Uf = a . changeEnd = function ( a ) { return a . text ? Ff ( a . from . line + a . text . length - 1 , Ce ( a . text ) . length + ( 1 == a . text . length ? a . from . ch : 0 ) ) : a . to } ; a . prototype = { constructor : a , focus : function ( ) { window . focus ( ) , this . display . input . focus ( ) } , setOption : function ( a , b ) { var c = this . options , d = c [ a ] ; c [ a ] == b && "mode" != a || ( c [ a ] = b , Wf . hasOwnProperty ( a ) && Db ( this , Wf [ a ] ) ( this , b , d ) ) } , getOption : function ( a ) { return this . options [ a ] } , getDoc : function ( ) { return this . doc } , addKeyMap : function ( a , b ) { this . state . keyMaps [ b ? "push" : "unshift" ] ( Rc ( a ) ) } , removeKeyMap : function ( a ) { for ( var b = this . state . keyMaps , c = 0 ; c < b . length ; ++ c ) if ( b [ c ] == a || b [ c ] . name == a ) return b . splice ( c , 1 ) , ! 0 } , addOverlay : Eb ( function ( b , c ) { var d = b . token ? b : a . getMode ( this . options , b ) ; if ( d . startState ) throw new Error ( "Overlays may not be stateful." ) ; this . state . overlays . push ( { mode : d , modeSpec : b , opaque : c && c . opaque } ) , this . state . modeGen ++ , Ib ( this ) } ) , removeOverlay : Eb ( function ( a ) { for ( var b = this . state . overlays , c = 0 ; c < b . length ; ++ c ) { var d = b [ c ] . modeSpec ; if ( d == a || "string" == typeof a && d . name == a ) return b . splice ( c , 1 ) , this . state . modeGen ++ , void Ib ( this ) } } ) , indentLine : Eb ( function ( a , b , c ) { "string" != typeof b && "number" != typeof b && ( b = null == b ? this . options . smartIndent ? "smart" : "prev" : b ? "add" : "subtract" ) , sa ( this . doc , a ) && Kc ( this , a , b , c ) } ) , indentSelection : Eb ( function ( a ) { for ( var b = this . doc . sel . ranges , c = - 1 , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( e . empty ( ) ) e . head . line > c && ( Kc ( this , e . head . line , a , ! 0 ) , c = e . head . line , d == this . doc . sel . primIndex && Ic ( this ) ) ; else { var f = e . from ( ) , g = e . to ( ) , h = Math . max ( c , f . line ) ; c = Math . min ( this . lastLine ( ) , g . line - ( g . ch ? 0 : 1 ) ) + 1 ; for ( var i = h ; i < c ; ++ i ) Kc ( this , i , a ) ; var j = this . doc . sel . ranges ; 0 == f . ch && b . length == j . length && j [ d ] . from ( ) . ch > 0 && xa ( this . doc , d , new ma ( f , j [ d ] . to ( ) ) , Dg ) } } } ) , getTokenAt : function ( a , b ) { return Cd ( this , a , b ) } , getLineTokens : function ( a , b ) { return Cd ( this , Ff ( a ) , b , ! 0 ) } , getTokenTypeAt : function ( a ) { a = qa ( this . doc , a ) ; var b , c = Fd ( this , Vd ( this . doc , a . line ) ) , d = 0 , e = ( c . length - 1 ) / 2 , f = a . ch ; if ( 0 == f ) b = c [ 2 ] ; else for ( ; ; ) { var g = d + e >> 1 ; if ( ( g ? c [ 2 * g - 1 ] : 0 ) >= f ) e = g ; else { if ( ! ( c [ 2 * g + 1 ] < f ) ) { b = c [ 2 * g + 2 ] ; break } d = g + 1 } } var h = b ? b . indexOf ( "cm-overlay " ) : - 1 ; return h < 0 ? b : 0 == h ? null : b . slice ( 0 , h - 1 ) } , getModeAt : function ( b ) { var c = this . doc . mode ; return c . innerMode ? a . innerMode ( c , this . getTokenAt ( b ) . state ) . mode : c } , getHelper : function ( a , b ) { return this . getHelpers ( a , b ) [ 0 ] } , getHelpers : function ( a , b ) { var c = [ ] ; if ( ! ag . hasOwnProperty ( b ) ) return c ; var d = ag [ b ] , e = this . getModeAt ( a ) ; if ( "string" == typeof e [ b ] ) d [ e [ b ] ] && c . push ( d [ e [ b ] ] ) ; else if ( e [ b ] ) for ( var f = 0 ; f < e [ b ] . length ; f ++ ) { var g = d [ e [ b ] [ f ] ] ; g && c . push ( g ) } else e . helperType && d [ e . helperType ] ? c . push ( d [ e . helperType ] ) : d [ e . name ] && c . push ( d [ e . name ] ) ; for ( var f = 0 ; f < d . _global . length ; f ++ ) { var h = d . _global [ f ] ; h . pred ( e , this ) && De ( c , h . val ) == - 1 && c . push ( h . val ) } return c } , getStateAfter : function ( a , b ) { var c = this . doc ; return a = pa ( c , null == a ? c . first + c . size - 1 : a ) , Pa ( this , a + 1 , b ) } , cursorCoords : function ( a , b ) { var c , d = this . doc . sel . primary ( ) ; return c = null == a ? d . head : "object" == typeof a ? qa ( this . doc , a ) : a ? d . from ( ) : d . to ( ) , mb ( this , c , b || "page" ) } , charCoords : function ( a , b ) { return lb ( this , qa ( this . doc , a ) , b || "page" ) } , coordsChar : function ( a , b ) { return a = kb ( this , a , b || "page" ) , pb ( this , a . left , a . top ) } , lineAtHeight : function ( a , b ) { return a = kb ( this , { top : a , left : 0 } , b || "page" ) . top , $d ( this . doc , a + this . display . viewOffset ) } , heightAtLine : function ( a , b ) { var c , d = ! 1 ; if ( "number" == typeof a ) { var e = this . doc . first + this . doc . size - 1 ; a < this . doc . first ? a = this . doc . first : a > e && ( a = e , d = ! 0 ) , c = Vd ( this . doc , a ) } else c = a ; return jb ( this , c , { top : 0 , left : 0 } , b || "page" ) . top + ( d ? this . doc . height - _d ( c ) : 0 ) } , defaultTextHeight : function ( ) { return rb ( this . display ) } , defaultCharWidth : function ( ) { return sb ( this . display ) } , setGutterMarker : E
} } ) , addSelection : Fb ( function ( a , b , c ) { var d = this . sel . ranges . slice ( 0 ) ; d . push ( new ma ( qa ( this , a ) , qa ( this , b || a ) ) ) , Ba ( this , na ( d , d . length - 1 ) , c ) } ) , getSelection : function ( a ) { for ( var b , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; b = b ? b . concat ( e ) : e } return a === ! 1 ? b : b . join ( a || "\n" ) } , getSelections : function ( a ) { for ( var b = [ ] , c = this . sel . ranges , d = 0 ; d < c . length ; d ++ ) { var e = Wd ( this , c [ d ] . from ( ) , c [ d ] . to ( ) ) ; a !== ! 1 && ( e = e . join ( a || "\n" ) ) , b [ d ] = e } return b } , replaceSelection : function ( a , b , c ) { for ( var d = [ ] , e = 0 ; e < this . sel . ranges . length ; e ++ ) d [ e ] = a ; this . replaceSelections ( d , b , c || "+input" ) } , replaceSelections : Fb ( function ( a , b , c ) { for ( var d = [ ] , e = this . sel , f = 0 ; f < e . ranges . length ; f ++ ) { var g = e . ranges [ f ] ; d [ f ] = { from : g . from ( ) , to : g . to ( ) , text : Ug ( a [ f ] ) , origin : c } } for ( var h = b && "end" != b && uc ( this , d , b ) , f = d . length - 1 ; f >= 0 ; f -- ) wc ( this , d [ f ] ) ; h ? Aa ( this , h ) : this . cm && Ic ( this . cm ) } ) , undo : Fb ( function ( ) { yc ( this , "undo" ) } ) , redo : Fb ( function ( ) { yc ( this , "redo" ) } ) , undoSelection : Fb ( function ( ) { yc ( this , "undo" , ! 0 ) } ) , redoSelection : Fb ( function ( ) { yc ( this , "redo" , ! 0 ) } ) , setExtending : function ( a ) { this . extend = a } , getExtending : function ( ) { return this . extend } , historySize : function ( ) { for ( var a = this . history , b = 0 , c = 0 , d = 0 ; d < a . done . length ; d ++ ) a . done [ d ] . ranges || ++ b ; for ( var d = 0 ; d < a . undone . length ; d ++ ) a . undone [ d ] . ranges || ++ c ; return { undo : b , redo : c } } , clearHistory : function ( ) { this . history = new be ( this . history . maxGeneration ) } , markClean : function ( ) { this . cleanGeneration = this . changeGeneration ( ! 0 ) } , changeGeneration : function ( a ) { return a && ( this . history . lastOp = this . history . lastSelOp = this . history . lastOrigin = null ) , this . history . generation } , isClean : function ( a ) { return this . history . generation == ( a || this . cleanGeneration ) } , getHistory : function ( ) { return { done : me ( this . history . done ) , undone : me ( this . history . undone ) } } , setHistory : function ( a ) { var b = this . history = new be ( this . history . maxGeneration ) ; b . done = me ( a . done . slice ( 0 ) , null , ! 0 ) , b . undone = me ( a . undone . slice ( 0 ) , null , ! 0 ) } , addLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" ; if ( a [ d ] ) { if ( Qe ( c ) . test ( a [ d ] ) ) return ! 1 ; a [ d ] += " " + c } else a [ d ] = c ; return ! 0 } ) } ) , removeLineClass : Fb ( function ( a , b , c ) { return Lc ( this , a , "gutter" == b ? "gutter" : "class" , function ( a ) { var d = "text" == b ? "textClass" : "background" == b ? "bgClass" : "gutter" == b ? "gutterClass" : "wrapClass" , e = a [ d ] ; if ( ! e ) return ! 1 ; if ( null == c ) a [ d ] = null ; else { var f = e . match ( Qe ( c ) ) ; if ( ! f ) return ! 1 ; var g = f . index + f [ 0 ] . length ; a [ d ] = e . slice ( 0 , f . index ) + ( f . index && g != e . length ? " " : "" ) + e . slice ( g ) || null } return ! 0 } ) } ) , addLineWidget : Fb ( function ( a , b , c ) { return wd ( this , a , b , c ) } ) , removeLineWidget : function ( a ) { a . clear ( ) } , markText : function ( a , b , c ) { return Sc ( this , qa ( this , a ) , qa ( this , b ) , c , "range" ) } , setBookmark : function ( a , b ) { var c = { replacedWith : b && ( null == b . nodeType ? b . widget : b ) , insertLeft : b && b . insertLeft , clearWhenEmpty : ! 1 , shared : b && b . shared , handleMouseEvents : b && b . handleMouseEvents } ; return a = qa ( this , a ) , Sc ( this , a , a , c , "bookmark" ) } , findMarksAt : function ( a ) { a = qa ( this , a ) ; var b = [ ] , c = Vd ( this , a . line ) . markedSpans ; if ( c ) for ( var d = 0 ; d < c . length ; ++ d ) { var e = c [ d ] ; ( null == e . from || e . from <= a . ch ) && ( null == e . to || e . to >= a . ch ) && b . push ( e . marker . parent || e . marker ) } return b } , findMarks : function ( a , b , c ) { a = qa ( this , a ) , b = qa ( this , b ) ; var d = [ ] , e = a . line ; return this . iter ( a . line , b . line + 1 , function ( f ) { var g = f . markedSpans ; if ( g ) for ( var h = 0 ; h < g . length ; h ++ ) { var i = g [ h ] ; e == a . line && a . ch > i . to || null == i . from && e != a . line || e == b . line && i . from > b . ch || c && ! c ( i . marker ) || d . push ( i . marker . parent || i . marker ) } ++ e } ) , d } , getAllMarks : function ( ) { var a = [ ] ; return this . iter ( function ( b ) { var c = b . markedSpans ; if ( c ) for ( var d = 0 ; d < c . length ; ++ d ) null != c [ d ] . from && a . push ( c [ d ] . marker ) } ) , a } , posFromIndex : function ( a ) { var b , c = this . first ; return this . iter ( function ( d ) { var e = d . text . length + 1 ; return e > a ? ( b = a , ! 0 ) : ( a -= e , void ++ c ) } ) , qa ( this , Ff ( c , b ) ) } , indexFromPos : function ( a ) { a = qa ( this , a ) ; var b = a . ch ; return a . line < this . first || a . ch < 0 ? 0 : ( this . iter ( this . first , a . line , function ( a ) { b += a . text . length + 1 } ) , b ) } , copy : function ( a ) { var b = new rg ( Xd ( this , this . first , this . first + this . size ) , this . modeOption , this . first ) ; return b . scrollTop = this . scrollTop , b . scrollLeft = this . scrollLeft , b . sel = this . sel , b . ex
BI . isFunction ( g ) && g . apply ( null , [ ! 1 ] ) } } } ) , i . push ( { el : { type : "bi.button" , text : BI . i18nText ( "BI-Basic_OK" ) , height : 30 , handler : function ( ) { h ( ) , BI . isFunction ( g ) && g . apply ( null , [ ! 0 ] ) } } } ) ; var j = { element : c , type : "bi.center_adapt" , items : [ { type : "bi.border" , cls : "bi-message-content bi-card" , items : { north : { el : { type : "bi.border" , cls : "bi-message-title bi-background" , items : { center : { el : { type : "bi.label" , text : e || BI . i18nText ( "BI-Basic_Prompt" ) , textAlign : "left" , hgap : 20 , height : 50 } } , east : { el : { type : "bi.icon_button" , cls : "bi-message-close close-font" , handler : function ( ) { h ( ) } } , width : 60 } } } , height : 50 } , center : { el : { type : "bi.text" , cls : "bi-message-text" , tgap : 60 , hgap : 20 , lineHeight : 30 , whiteSpace : "normal" , text : f } } , south : { el : { type : "bi.absolute" , items : [ { el : { type : "bi.right_vertical_adapt" , hgap : 5 , items : i } , top : 0 , left : 20 , right : 20 , bottom : 0 } ] } , height : 60 } } , width : 400 , height : 300 } ] } ; a = BI . createWidget ( j ) } } } ( ) } ) , BI . GridView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . GridView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-grid-view" , overflowX : ! 0 , overflowY : ! 0 , overscanColumnCount : 0 , overscanRowCount : 0 , rowHeightGetter : BI . emptyFn , columnWidthGetter : BI . emptyFn , scrollLeft : 0 , scrollTop : 0 , items : [ ] } ) } , _init : function ( ) { BI . GridView . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 , this . _debounceRelease = BI . debounce ( function ( ) { a . _scrollLock = ! 1 } , 1e3 / 60 ) , this . container = BI . createWidget ( { type : "bi.absolute" } ) , this . element . scroll ( function ( ) { a . _scrollLock !== ! 0 && ( b . scrollLeft = a . element . scrollLeft ( ) , b . scrollTop = a . element . scrollTop ( ) , a . _calculateChildrenToRender ( ) , a . fireEvent ( BI . GridView . EVENT _SCROLL , { scrollLeft : b . scrollLeft , scrollTop : b . scrollTop } ) ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , scrollable : b . overflowX === ! 0 && b . overflowY === ! 0 , scrolly : b . overflowX === ! 1 && b . overflowY === ! 0 , scrollx : b . overflowX === ! 0 && b . overflowY === ! 1 , items : [ this . container ] } ) , b . items . length > 0 && this . _populate ( ) , 0 === b . scrollLeft && 0 === b . scrollTop || BI . nextTick ( function ( ) { a . element . scrollTop ( b . scrollTop ) , a . element . scrollLeft ( b . scrollLeft ) } ) } , _getOverscanIndices : function ( a , b , c , d ) { return { overscanStartIndex : Math . max ( 0 , c - b ) , overscanStopIndex : Math . min ( a - 1 , d + b ) } } , _calculateChildrenToRender : function ( ) { var a = this , b = this . options , c = b . width , d = b . height , e = BI . clamp ( b . scrollLeft , 0 , this . _getMaxScrollLeft ( ) ) , f = BI . clamp ( b . scrollTop , 0 , this . _getMaxScrollTop ( ) ) , g = b . overscanColumnCount , h = b . overscanRowCount ; if ( d > 0 && c > 0 ) { var i = this . _columnSizeAndPositionManager . getVisibleCellRange ( c , e ) , j = this . _rowSizeAndPositionManager . getVisibleCellRange ( d , f ) ; if ( BI . isEmpty ( i ) || BI . isEmpty ( j ) ) return ; var k = this . _columnSizeAndPositionManager . getOffsetAdjustment ( c , e ) , l = this . _rowSizeAndPositionManager . getOffsetAdjustment ( d , f ) ; this . _renderedColumnStartIndex = i . start , this . _renderedColumnStopIndex = i . stop , this . _renderedRowStartIndex = j . start , this . _renderedRowStopIndex = j . stop ; var m = this . _getOverscanIndices ( this . columnCount , g , this . _renderedColumnStartIndex , this . _renderedColumnStopIndex ) , n = this . _getOverscanIndices ( this . rowCount , h , this . _renderedRowStartIndex , this . _renderedRowStopIndex ) , o = m . overscanStartIndex , p = m . overscanStopIndex , q = n . overscanStartIndex , r = n . overscanStopIndex , s = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( q ) , t = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( o ) , u = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( r ) , v = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( p ) , w = s . offset + l , x = t . offset + k , y = u . offset + l + u . size , z = v . offset + k + v . size ; if ( w >= this . renderRange . minY && y <= this . renderRange . maxY && x >= this . renderRange . minX && z <= this . renderRange . maxX ) return ; for ( var A = [ ] , B = { } , C = { } , D = this . _getMaxScrollLeft ( ) , E = this . _getMaxScrollTop ( ) , F = 0 , G = 0 , H = 0 , I = q ; I <= r ; I ++ ) for ( var J = this . _rowSizeAndPositionManager . getSizeAndPositionOfCell ( I ) , K = o ; K <= p ; K ++ ) { var L , M = I + "-" + K , N = this . _columnSizeAndPositionManager . getSizeAndPositionOfCell ( K ) , O = this . renderedKeys [ M ] && this . renderedKeys [ M ] [ 2 ] ; O >= 0 ? ( N . size !== this . renderedCells [ O ] . _width && ( this . renderedCells [ O ] . _width = N . size , this . renderedCells [ O ] . el . setWidth ( N . size ) ) , J . size !== this . renderedC
} } , restoreRng : function ( ) { this . savedRange && this . selRng ( this . savedRange , this . savedSel ) } , keyDown : function ( a , b ) { this . ne . fireEvent ( "keydown" , a ) } , selected : function ( b ) { var c = b . target ; if ( c || ( c = this . selElm ( ) ) || ( c = this . selElm ( ) ) , ! b . ctrlKey ) { var d = this . ne . selectedInstance ; d != this && ( d && this . ne . fireEvent ( "blur" , b ) , this . ne . selectedInstance = this , this . ne . fireEvent ( "focus" , b ) ) , this . ne . fireEvent ( "selected" , b ) , this . isFocused = ! 0 , this . elm . element . addClass ( a + "selected" ) } } , blur : function ( ) { this . isFocused = ! 1 , this . elm . element . removeClass ( a + "selected" ) } , saveContent : function ( ) { this . ne . fireEvent ( "save" ) , this . e . element . value ( this . getContent ( ) ) } , getElm : function ( ) { return this . elm } , getContent : function ( ) { return this . content = this . getElm ( ) . element . html ( ) , this . ne . fireEvent ( "get" ) , this . content } , setContent : function ( a ) { this . content = a , this . ne . fireEvent ( "set" ) , this . elm . element . html ( this . content ) } , nicCommand : function ( a , b ) { document . execCommand ( a , ! 1 , b ) } } ) } ( ) , BI . RichEditorBackgroundChooserTrigger = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var a = BI . RichEditorBackgroundChooserTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { width : 20 , height : 20 } ) } , _init : function ( ) { BI . RichEditorBackgroundChooserTrigger . superclass . _init . apply ( this , arguments ) , this . font = BI . createWidget ( { type : "bi.icon_button" , cls : "text-background-font" } ) , this . underline = BI . createWidget ( { type : "bi.icon_button" , cls : "text-color-underline-font" } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . font , top : 2 , left : 2 } , { el : this . underline , top : 7 , left : 2 } ] } ) } , setValue : function ( a ) { this . underline . element . css ( "color" , a ) } , getValue : function ( ) { return this . font . element . css ( "color" ) } } ) , BI . shortcut ( "bi.rich_editor_background_color_chooser_trigger" , BI . RichEditorBackgroundChooserTrigger ) , BI . RichEditorAlignCenterButton = BI . inherit ( BI . RichEditorAction , { _defaultConfig : function ( ) { return BI . extend ( BI . RichEditorAlignCenterButton . superclass . _defaultConfig . apply ( this , arguments ) , { width : 20 , height : 20 , command : "justifycenter" } ) } , _init : function ( ) { BI . RichEditorAlignCenterButton . superclass . _init . apply ( this , arguments ) ; var a = this ; this . options ; this . align = BI . createWidget ( { type : "bi.icon_button" , element : this , forceNotSelected : ! 0 , title : BI . i18nText ( "BI-Word_Align_Center" ) , height : 20 , width : 20 , cls : "text-toolbar-button bi-list-item-active text-align-center-font" } ) , this . align . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . doCommand ( ) } ) } , activate : function ( ) { } , deactivate : function ( ) { } } ) , BI . shortcut ( "bi.rich_editor_align_center_button" , BI . RichEditorAlignCenterButton ) , BI . RichEditorAlignLeftButton = BI . inherit ( BI . RichEditorAction , { _defaultConfig : function ( ) { return BI . extend ( BI . RichEditorAlignLeftButton . superclass . _defaultConfig . apply ( this , arguments ) , { width : 20 , height : 20 , command : "justifyleft" } ) } , _init : function ( ) { BI . RichEditorAlignLeftButton . superclass . _init . apply ( this , arguments ) ; var a = this ; this . options ; this . align = BI . createWidget ( { type : "bi.icon_button" , element : this , forceNotSelected : ! 0 , title : BI . i18nText ( "BI-Word_Align_Left" ) , height : 20 , width : 20 , cls : "text-toolbar-button bi-list-item-active text-align-left-font" } ) , this . align . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . doCommand ( ) } ) } , activate : function ( ) { } , deactivate : function ( ) { } } ) , BI . shortcut ( "bi.rich_editor_align_left_button" , BI . RichEditorAlignLeftButton ) , BI . RichEditorAlignRightButton = BI . inherit ( BI . RichEditorAction , { _defaultConfig : function ( ) { return BI . extend ( BI . RichEditorAlignRightButton . superclass . _defaultConfig . apply ( this , arguments ) , { width : 20 , height : 20 , command : "justifyright" } ) } , _init : function ( ) { BI . RichEditorAlignRightButton . superclass . _init . apply ( this , arguments ) ; var a = this ; this . options ; this . align = BI . createWidget ( { type : "bi.icon_button" , element : this , forceNotSelected : ! 0 , title : BI . i18nText ( "BI-Word_Align_Right" ) , height : 20 , width : 20 , cls : "text-toolbar-button bi-list-item-active text-align-right-font" } ) , this . align . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . doCommand ( ) } ) } , activate : function ( ) { } , deactivate : function ( ) { } } ) , BI . shortcut ( "bi.rich_editor_align_right_button" , BI . RichEditorAlignRightButton ) , BI . RichEditorBoldButton = BI . inherit ( BI . RichEditorAction , { _defaultConfig : function ( ) { return BI . extend ( B
} ) } , _init : function ( ) { BI . TextItem . 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 . TextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . TextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_item" , BI . TextItem ) , BI . IconTextIconNode = BI . inherit ( BI . NodeButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { var a = BI . IconTextIconNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-icon-text-icon-node" , logic : { dynamic : ! 1 } , iconCls1 : "close-ha-font" , iconCls2 : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextIconNode . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , 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 } ) ; var c = BI . createWidget ( { type : "bi.center_adapt" , cls : a . iconCls1 , width : b . commonWidth , height : a . height , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } ) , d = BI . createWidget ( { type : "bi.layout" , width : b . commonWidth , height : a . height } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.center_adapt" , cls : a . iconCls2 , width : b . commonWidth , items : [ { el : { type : "bi.icon" , width : a . iconWidth , height : a . iconHeight } } ] } , top : 0 , bottom : 0 , right : 0 } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( a . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , c , this . text , d ) } ) ) ) ) } , doClick : function ( ) { BI . IconTextIconNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextIconNode . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . IconTextIconNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_icon_node" , BI . IconTextIconNode ) , BI . IconTextNode = BI . inherit ( BI . NodeButton , { _const : { commonWidth : 25 } , _defaultConfig : function ( ) { 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" ,
c . attach _array = [ ] , c . attach _names = [ ] , c . attachNum = 0 } ) } , _events : function ( a ) { var b = this ; return event . add ( a . dom . input , "change" , function ( ) { event . del ( a . dom . input , "change" , arguments . callee ) ; for ( var c = a . dom . input . cloneNode ( ! 0 ) , d = 0 , e = F ( a . dom . input ) ; d < e . length ; d ++ ) { var f = e . item ( d ) , g = f . value || f . name , h = f . fileName || ( f . fileName = g . split ( "\\" ) . pop ( ) ) , i = - 1 !== h . indexOf ( "." ) ? h . split ( "." ) . pop ( ) . toLowerCase ( ) : "unknown" , j = f . fileSize || f . size ; a . fileType && - 1 === a . fileType . indexOf ( "*." + i ) ? ( BI . Msg . toast ( BI . i18nText ( "BI-Upload_File_Type_Error" ) ) , b . fireEvent ( BI . File . EVENT _ERROR , { errorType : 0 , file : f } ) ) : a . maxSize !== - 1 && j && a . maxSize < j ? ( BI . Msg . toast ( BI . i18nText ( "BI-Upload_File_Size_Error" ) ) , b . fireEvent ( BI . File . EVENT _ERROR , { errorType : 1 , file : f } ) ) : ( a . files . unshift ( f ) , b . fireEvent ( BI . File . EVENT _CHANGE , { file : f } ) ) } c . value = "" , a . dom . input . parentNode . replaceChild ( c , a . dom . input ) , a . dom . input = c , event . add ( a . dom . input , "change" , arguments . callee ) } ) , a } , _wrap : function ( ) { var a = this . options , b = this . element [ 0 ] ; return a . multiple === ! 0 && this . element . attr ( "multiple" , "multiple" ) , b . value = "" , this . _events ( { dom : { input : b , disabled : ! 1 } , name : b . name , maxSize : a . maxSize ? a . maxSize >> 0 : - 1 , files : [ ] , clean : function ( ) { this . files = [ ] } , upload : function ( a ) { if ( a ) for ( var b in a ) this [ b ] = a [ b ] ; return sendFiles ( this , this . maxSize ) , this } , hide : function ( ) { this . dom . disabled && ( this . dom . disabled = ! 1 , this . dom . input . removeAttribute ( "disabled" ) ) } , show : function ( a , b , c , d ) { this . dom . disabled || ( this . dom . disabled = ! 0 , this . dom . input . setAttribute ( "disabled" , "disabled" ) ) } } ) } , select : function ( ) { $ ( this . wrap . dom . input ) . click ( ) } , upload : function ( a ) { this . wrap . upload ( a ) } , getValue : function ( ) { return this . wrap . attach _array } , reset : function ( ) { this . wrap . attach _array = [ ] , this . wrap . attach _names = [ ] , this . wrap . attachNum = 0 } , _setEnable : function ( a ) { BI . File . superclass . _setEnable . apply ( this , arguments ) , a === ! 0 ? this . element . attr ( "disabled" , "disabled" ) : this . element . removeAttr ( "disabled" ) } } ) , BI . File . EVENT _CHANGE = "BI.File.EVENT_CHANGE" , BI . File . EVENT _UPLOADSTART = "EVENT_UPLOADSTART" , BI . File . EVENT _ERROR = "EVENT_ERROR" , BI . File . EVENT _PROGRESS = "EVENT_PROGRESS" , BI . File . EVENT _UPLOADED = "EVENT_UPLOADED" , BI . shortcut ( "bi.file" , BI . File ) } ( ) , BI . Input = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var a = BI . Input . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-input display-block" , element : "<input/>" , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 } ) } , _init : function ( ) { BI . Input . superclass . _init . apply ( this , arguments ) ; var a = this , b = ! 1 , c = ! 1 , d = BI . debounce ( function ( c ) { a . onKeyDown ( c , b ) , a . _keydown _ = ! 1 } , 300 ) , e = BI . debounce ( BI . bind ( this . _click , this ) , BI . EVENT _RESPONSE _TIME , ! 0 ) ; this . _blurDebounce = BI . debounce ( BI . bind ( this . _blur , this ) , BI . EVENT _RESPONSE _TIME , ! 0 ) , this . element . keydown ( function ( d ) { c = ! 1 , b = d . ctrlKey , a . fireEvent ( BI . Input . EVENT _QUICK _DOWN ) } ) . keyup ( function ( b ) { c && b . keyCode === BI . KeyCode . ENTER || ( a . _keydown _ = ! 0 , d ( b . keyCode ) ) } ) . on ( "input propertychange" , function ( b ) { c = ! 0 , a . _keydown _ = ! 0 , d ( b . keyCode ) } ) . click ( function ( a ) { a . stopPropagation ( ) , e ( ) } ) . mousedown ( function ( b ) { a . element . val ( a . element . val ( ) ) } ) . focusout ( function ( b ) { a . _blurDebounce ( ) } ) } , _focus : function ( ) { this . element . addClass ( "bi-input-focus" ) , 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 . 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 . ge
hs : 1 , rg : 1 } , fa = /,?([achlmqrstvxz]),?/gi , ga = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi , ha = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi , ia = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi , ja = ( b . _radial _gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/ , { } ) , ka = function ( a , b ) { return $ ( a ) - $ ( b ) } , la = function ( a ) { return a } , ma = b . _rectPath = function ( a , b , c , d , e ) { return e ? [ [ "M" , a + e , b ] , [ "l" , c - 2 * e , 0 ] , [ "a" , e , e , 0 , 0 , 1 , e , e ] , [ "l" , 0 , d - 2 * e ] , [ "a" , e , e , 0 , 0 , 1 , - e , e ] , [ "l" , 2 * e - c , 0 ] , [ "a" , e , e , 0 , 0 , 1 , - e , - e ] , [ "l" , 0 , 2 * e - d ] , [ "a" , e , e , 0 , 0 , 1 , e , - e ] , [ "z" ] ] : [ [ "M" , a , b ] , [ "l" , c , 0 ] , [ "l" , 0 , d ] , [ "l" , - c , 0 ] , [ "z" ] ] } , na = function ( a , b , c , d ) { return null == d && ( d = c ) , [ [ "M" , a , b ] , [ "m" , 0 , - d ] , [ "a" , c , d , 0 , 1 , 1 , 0 , 2 * d ] , [ "a" , c , d , 0 , 1 , 1 , 0 , - 2 * d ] , [ "z" ] ] } , oa = b . _getPath = { path : function ( a ) { return a . attr ( "path" ) } , circle : function ( a ) { var b = a . attrs ; return na ( b . cx , b . cy , b . r ) } , ellipse : function ( a ) { var b = a . attrs ; return na ( b . cx , b . cy , b . rx , b . ry ) } , rect : function ( a ) { var b = a . attrs ; return ma ( b . x , b . y , b . width , b . height , b . r ) } , image : function ( a ) { var b = a . attrs ; return ma ( b . x , b . y , b . width , b . height ) } , text : function ( a ) { var b = a . _getBBox ( ) ; return ma ( b . x , b . y , b . width , b . height ) } , set : function ( a ) { var b = a . _getBBox ( ) ; return ma ( b . x , b . y , b . width , b . height ) } } , pa = b . mapPath = function ( a , b ) { if ( ! b ) return a ; var c , d , e , f , g , h , i ; for ( a = Ia ( a ) , e = 0 , g = a . length ; e < g ; e ++ ) for ( i = a [ e ] , f = 1 , h = i . length ; f < h ; f += 2 ) c = b . x ( i [ f ] , i [ f + 1 ] ) , d = b . y ( i [ f ] , i [ f + 1 ] ) , i [ f ] = c , i [ f + 1 ] = d ; return a } ; if ( b . _g = z , b . type = z . win . SVGAngle || z . doc . implementation . hasFeature ( "http://www.w3.org/TR/SVG11/feature#BasicStructure" , "1.1" ) ? "SVG" : "VML" , "VML" == b . type ) { var qa , ra = z . doc . createElement ( "div" ) ; if ( ra . innerHTML = '<v:shape adj="1"/>' , qa = ra . firstChild , qa . style . behavior = "url(#default#VML)" , ! qa || "object" != typeof qa . adj ) return b . type = F ; ra = null } b . svg = ! ( b . vml = "VML" == b . type ) , b . _Paper = B , b . fn = u = B . prototype = b . prototype , b . _id = 0 , b . _oid = 0 , b . is = function ( a , b ) { return b = L . call ( b ) , "finite" == b ? ! X [ y ] ( + a ) : "array" == b ? a instanceof Array : "null" == b && null === a || b == typeof a && null !== a || "object" == b && a === Object ( a ) || "array" == b && Array . isArray && Array . isArray ( a ) || V . call ( a ) . slice ( 8 , - 1 ) . toLowerCase ( ) == b } , b . angle = function ( a , c , d , e , f , g ) { if ( null == f ) { var h = a - d , i = c - e ; return h || i ? ( 180 + 180 * M . atan2 ( - i , - h ) / R + 360 ) % 360 : 0 } return b . angle ( a , c , f , g ) - b . angle ( d , e , f , g ) } , b . rad = function ( a ) { return a % 360 * R / 180 } , b . deg = function ( a ) { return Math . round ( 180 * a / R % 360 * 1e3 ) / 1e3 } , b . snapTo = function ( a , c , d ) { if ( d = b . is ( d , "finite" ) ? d : 10 , b . is ( a , U ) ) { for ( var e = a . length ; e -- ; ) if ( P ( a [ e ] - c ) <= d ) return a [ e ] } else { a = + a ; var f = c % a ; if ( f < d ) return c - f ; if ( f > a - d ) return c - f + a } return c } ; b . createUUID = function ( a , b ) { return function ( ) { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" . replace ( a , b ) . toUpperCase ( ) } } ( /[xy]/g , function ( a ) { var b = 16 * M . random ( ) | 0 , c = "x" == a ? b : 3 & b | 8 ; return c . toString ( 16 ) } ) ; b . setWindow = function ( c ) { a ( "raphael.setWindow" , b , z . win , c ) , z . win = c , z . do
} , ab = function ( a , c ) { return function ( d , e , f ) { d = Ia ( d ) ; for ( var g , h , i , j , k , l = "" , m = { } , n = 0 , o = 0 , p = d . length ; o < p ; o ++ ) { if ( i = d [ o ] , "M" == i [ 0 ] ) g = + i [ 1 ] , h = + i [ 2 ] ; else { if ( j = _a ( g , h , i [ 1 ] , i [ 2 ] , i [ 3 ] , i [ 4 ] , i [ 5 ] , i [ 6 ] ) , n + j > e ) { if ( c && ! m . start ) { if ( k = _a ( g , h , i [ 1 ] , i [ 2 ] , i [ 3 ] , i [ 4 ] , i [ 5 ] , i [ 6 ] , e - n ) , l += [ "C" + k . start . x , k . start . y , k . m . x , k . m . y , k . x , k . y ] , f ) return l ; m . start = l , l = [ "M" + k . x , k . y + "C" + k . n . x , k . n . y , k . end . x , k . end . y , i [ 5 ] , i [ 6 ] ] . join ( ) , n += j , g = + i [ 5 ] , h = + i [ 6 ] ; continue } if ( ! a && ! c ) return k = _a ( g , h , i [ 1 ] , i [ 2 ] , i [ 3 ] , i [ 4 ] , i [ 5 ] , i [ 6 ] , e - n ) , { x : k . x , y : k . y , alpha : k . alpha } } n += j , g = + i [ 5 ] , h = + i [ 6 ] } l += i . shift ( ) + i } return m . end = l , k = a ? n : c ? m : b . findDotsAtSegment ( g , h , i [ 0 ] , i [ 1 ] , i [ 2 ] , i [ 3 ] , i [ 4 ] , i [ 5 ] , 1 ) , k . alpha && ( k = { x : k . x , y : k . y , alpha : k . alpha } ) , k } } , bb = ab ( 1 ) , cb = ab ( ) , db = ab ( 0 , 1 ) ; b . getTotalLength = bb , b . getPointAtLength = cb , b . getSubpath = function ( a , b , c ) { if ( this . getTotalLength ( a ) - c < 1e-6 ) return db ( a , b ) . end ; var d = db ( a , c , 1 ) ; return b ? db ( d , b ) . end : d } , Xa . getTotalLength = function ( ) { var a = this . getPath ( ) ; if ( a ) return this . node . getTotalLength ? this . node . getTotalLength ( ) : bb ( a ) } , Xa . getPointAtLength = function ( a ) { var b = this . getPath ( ) ; if ( b ) return cb ( b , a ) } , Xa . getPath = function ( ) { var a , c = b . _getPath [ this . type ] ; if ( "text" != this . type && "set" != this . type ) return c && ( a = c ( this ) ) , a } , Xa . getSubpath = function ( a , c ) { var d = this . getPath ( ) ; if ( d ) return b . getSubpath ( d , a , c ) } ; var eb = b . easing _formulas = { linear : function ( a ) { return a } , "<" : function ( a ) { return Q ( a , 1.7 ) } , ">" : function ( a ) { return Q ( a , . 48 ) } , "<>" : function ( a ) { var b = . 48 - a / 1.04 , c = M . sqrt ( . 1734 + b * b ) , d = c - b , e = Q ( P ( d ) , 1 / 3 ) * ( d < 0 ? - 1 : 1 ) , f = - c - b , g = Q ( P ( f ) , 1 / 3 ) * ( f < 0 ? - 1 : 1 ) , h = e + g + . 5 ; return 3 * ( 1 - h ) * h * h + h * h * h } , backIn : function ( a ) { var b = 1.70158 ; return a * a * ( ( b + 1 ) * a - b ) } , backOut : function ( a ) { a -= 1 ; var b = 1.70158 ; return a * a * ( ( b + 1 ) * a + b ) + 1 } , elastic : function ( a ) { return a == ! ! a ? a : Q ( 2 , - 10 * a ) * M . sin ( ( a - . 075 ) * ( 2 * R ) / . 3 ) + 1 } , bounce : function ( a ) { var b , c = 7.5625 , d = 2.75 ; return a < 1 / d ? b = c * a * a : a < 2 / d ? ( a -= 1.5 / d , b = c * a * a + . 75 ) : a < 2.5 / d ? ( a -= 2.25 / d , b = c * a * a + . 9375 ) : ( a -= 2.625 / d , b = c * a * a + . 984375 ) , b } } ; eb . easeIn = eb [ "ease-in" ] = eb [ "<" ] , eb . easeOut = eb [ "ease-out" ] = eb [ ">" ] , eb . easeInOut = eb [ "ease-in-out" ] = eb [ "<>" ] , eb [ "back-in" ] = eb . backIn , eb [ "back-out" ] = eb . backOut ; var fb = [ ] , gb = window . requestAnimationFrame || window . webkitRequestAnimationFrame || window . mozRequestAnimationFrame || window . oRequestAnimationFrame || window . msRequestAnimationFrame || function ( a ) { setTimeout ( a , 16 ) } , hb = function ( ) { for ( var c = + new Date , d = 0 ; d < fb . length ; d ++ ) { var e = fb [ d ] ; if ( ! e . el . removed && ! e . paused ) { var f , g , h = c - e . start , i = e . ms , j = e . easing , k = e . from , l = e . diff , m = e . to , n = ( e . t , e . el ) , o = { } , p = { } ; if ( e . initstatus ? ( h = ( e . initstatus * e . anim . top - e . prev ) / ( e . percent - e . prev ) * i , e . status = e . initstatus , delete e . initstatus , e . stop && fb . splice ( d -- , 1 ) ) : e . status = ( e . prev + ( e . percent - e . prev ) * ( h / i ) ) / e . anim . top , ! ( h < 0 ) ) if ( h < i ) { var q = j ( h / i ) ; for ( var s in k ) if ( k [ y ] ( s ) ) { switch ( ca [ s ] ) { case S : f = + k [ s ] + q * i * l [ s ] ; break ; case "colour" : f = "rgb(" + [ ib ( Z ( k [ s ] . r + q * i * l [ s ] . r ) ) , ib ( Z ( k [ s ] . g + q * i * l [ s ] . g ) ) , ib ( Z ( k [ s ] . b + q * i * l [ s ] . b ) ) ] . join ( "," ) + ")" ; break ; case "path" : f = [ ] ; for ( var t = 0 , u = k [ s ] . length ; t < u ; t ++ ) { f [ t ] = [ k [ s ] [ t ] [ 0 ] ] ; for ( var v = 1 , w = k [ s ] [ t ] . length ; v < w ; v ++ ) f [ t ] [ v ] = + k [ s ] [ t ] [ v ] + q * i * l [ s ] [ t ] [ v ] ; f [ t ] = f [ t ] . join ( G ) } f = f . join ( G ) ; break ; case "transform" : if ( l [ s ] . real ) for ( f = [ ] , t = 0 , u = k [ s ] . length ; t < u ; t ++ ) for ( f [ t ] = [ k [ s ] [ t ] [ 0 ] ] , v = 1 , w = k [ s ] [ t ] . length ; v < w ; v ++ ) f [ t ] [ v ] = k [ s ] [ t ] [ v ] + q * i * l [ s ] [ t ] [ v ] ; else { var x = function ( a ) { return + k [ s ] [ a ] + q * i * l [ s ] [ a ] } ; f = [ [ "m" , x ( 0 ) , x ( 1 ) , x ( 2 ) , x ( 3 ) , x ( 4 ) , x ( 5 ) ] ] } break ; case "csv" : if ( "clip-rect" == s ) for ( f = [ ] , t = 4 ; t -- ; ) f [ t ] = + k [ s ] [ t ] + q * i * l [ s ] [ t ] ; break ; default : var z = [ ] [ D ] ( k [ s ] ) ; for ( f = [ ] , t = n . paper . customAttributes [ s ] . length ; t -- ; ) f [ t ] = + z [ t ] + q * i * l [ s ] [ t ] } o [ s ] = f } n . attr ( o ) , function ( b , c , d ) { setTimeout ( function ( ) { a ( "raphael.anim.frame." + b , c , d ) } ) } ( n . id , n , e . anim ) } else { if ( function ( c , d , e ) { setTimeout ( function ( ) { a ( "raphael.anim.frame." + d . id , d , e ) , a ( "raphael.anim.finish." + d . id , d , e ) , b . is ( c , "function" ) && c . call ( d ) } ) } ( e . callback , n , e . anim ) , n . attr ( m ) , fb . splice ( d -- , 1 ) , e . repeat > 1 && ! e . next ) { for ( g in m ) m [ y ] ( g ) && ( p [ g ] = e . totalOrigin [ g ] ) ; e . el . attr ( p ) , r ( e . anim , e . el , e . anim . percents [ 0 ] , null , e . totalOrigin , e . repeat - 1 ) } e . next && ! e . stop && r ( e . anim , e . el , e . next , null , e . totalOrigin , e . repeat ) } } } fb . length && gb ( hb ) } , ib = function ( a ) { return a > 255 ? 255 : a < 0 ? 0 : a } ; Xa . animateWith = function ( a , c , d , e , f , g ) { var h = this ; if ( h . removed ) return g && g . call (
break ; case "long" : case "short" : i = e [ g ] } var k = a . node . getElementsByTagName ( "stroke" ) [ 0 ] ; k [ f + "arrow" ] = h , k [ f + "arrowlength" ] = i , k [ f + "arrowwidth" ] = j } , B = function ( e , i ) { e . attrs = e . attrs || { } ; var l = e . node , m = e . attrs , p = l . style , q = v [ e . type ] && ( i . x != m . x || i . y != m . y || i . width != m . width || i . height != m . height || i . cx != m . cx || i . cy != m . cy || i . rx != m . rx || i . ry != m . ry || i . r != m . r ) , r = w [ e . type ] && ( m . cx != i . cx || m . cy != i . cy || m . r != i . r || m . rx != i . rx || m . ry != i . ry ) , s = e ; for ( var t in i ) i [ b ] ( t ) && ( m [ t ] = i [ t ] ) ; if ( q && ( m . path = a . _getPath [ e . type ] ( e ) , e . _ . dirty = 1 ) , i . href && ( l . href = i . href ) , i . title && ( l . title = i . title ) , i . target && ( l . target = i . target ) , i . cursor && ( p . cursor = i . cursor ) , "blur" in i && e . blur ( i . blur ) , ( i . path && "path" == e . type || q ) && ( l . path = x ( ~ c ( m . path ) . toLowerCase ( ) . indexOf ( "r" ) ? a . _pathToAbsolute ( m . path ) : m . path ) , e . _ . dirty = 1 , "image" == e . type && ( e . _ . fillpos = [ m . x , m . y ] , e . _ . fillsize = [ m . width , m . height ] , z ( e , 1 , 1 , 0 , 0 , 0 ) ) ) , "transform" in i && e . transform ( i . transform ) , r ) { var y = + m . cx , B = + m . cy , D = + m . rx || + m . r || 0 , E = + m . ry || + m . r || 0 ; l . path = a . format ( "ar{0},{1},{2},{3},{4},{1},{4},{1}x" , f ( ( y - D ) * u ) , f ( ( B - E ) * u ) , f ( ( y + D ) * u ) , f ( ( B + E ) * u ) , f ( y * u ) ) , e . _ . dirty = 1 } if ( "clip-rect" in i ) { var G = c ( i [ "clip-rect" ] ) . split ( k ) ; if ( 4 == G . length ) { G [ 2 ] = + G [ 2 ] + + G [ 0 ] , G [ 3 ] = + G [ 3 ] + + G [ 1 ] ; var H = l . clipRect || a . _g . doc . createElement ( "div" ) , I = H . style ; I . clip = a . format ( "rect({1}px {2}px {3}px {0}px)" , G ) , l . clipRect || ( I . position = "absolute" , I . top = 0 , I . left = 0 , I . width = e . paper . width + "px" , I . height = e . paper . height + "px" , l . parentNode . insertBefore ( H , l ) , H . appendChild ( l ) , l . clipRect = H ) } i [ "clip-rect" ] || l . clipRect && ( l . clipRect . style . clip = "auto" ) } if ( e . textpath ) { var J = e . textpath . style ; i . font && ( J . font = i . font ) , i [ "font-family" ] && ( J . fontFamily = '"' + i [ "font-family" ] . split ( "," ) [ 0 ] . replace ( /^['"]+|['"]+$/g , o ) + '"' ) , i [ "font-size" ] && ( J . fontSize = i [ "font-size" ] ) , i [ "font-weight" ] && ( J . fontWeight = i [ "font-weight" ] ) , i [ "font-style" ] && ( J . fontStyle = i [ "font-style" ] ) } if ( "arrow-start" in i && A ( s , i [ "arrow-start" ] ) , "arrow-end" in i && A ( s , i [ "arrow-end" ] , 1 ) , null != i . opacity || null != i [ "stroke-width" ] || null != i . fill || null != i . src || null != i . stroke || null != i [ "stroke-width" ] || null != i [ "stroke-opacity" ] || null != i [ "fill-opacity" ] || null != i [ "stroke-dasharray" ] || null != i [ "stroke-miterlimit" ] || null != i [ "stroke-linejoin" ] || null != i [ "stroke-linecap" ] ) { var K = l . getElementsByTagName ( j ) , L = ! 1 ; if ( K = K && K [ 0 ] , ! K && ( L = K = F ( j ) ) , "image" == e . type && i . src && ( K . src = i . src ) , i . fill && ( K . on = ! 0 ) , null != K . on && "none" != i . fill && null !== i . fill || ( K . on = ! 1 ) , K . on && i . fill ) { var M = c ( i . fill ) . match ( a . _ISURL ) ; if ( M ) { K . parentNode == l && l . removeChild ( K ) , K . rotate = ! 0 , K . src = M [ 1 ] , K . type = "tile" ; var N = e . getBBox ( 1 ) ; K . position = N . x + n + N . y , e . _ . fillpos = [ N . x , N . y ] , a . _preload ( M [ 1 ] , function ( ) { e . _ . fillsize = [ this . offsetWidth , this . offsetHeight ] } ) } else K . color = a . getRGB ( i . fill ) . hex , K . src = o , K . type = "solid" , a . getRGB ( i . fill ) . error && ( s . type in { circle : 1 , ellipse : 1 } || "r" != c ( i . fill ) . charAt ( ) ) && C ( s , i . fill , K ) && ( m . fill = "none" , m . gradient = i . fill , K . rotate = ! 1 ) } if ( "fill-opacity" in i || "opacity" in i ) { var O = ( ( + m [ "fill-opacity" ] + 1 || 2 ) - 1 ) * ( ( + m . opacity + 1 || 2 ) - 1 ) * ( ( + a . getRGB ( i . fill ) . o + 1 || 2 ) - 1 ) ; O = h ( g ( O , 0 ) , 1 ) , K . opacity = O , K . src && ( K . color = "none" ) } l . appendChild ( K ) ; var P = l . getElementsByTagName ( "stroke" ) && l . getElementsByTagName ( "stroke" ) [ 0 ] , Q = ! 1 ; ! P && ( Q = P = F ( "stroke" ) ) , ( i . stroke && "none" != i . stroke || i [ "stroke-width" ] || null != i [ "stroke-opacity" ] || i [ "stroke-dasharray" ] || i [ "stroke-miterlimit" ] || i [ "stroke-linejoin" ] || i [ "stroke-linecap" ] ) && ( P . on = ! 0 ) , ( "none" == i . stroke || null === i . stroke || null == P . on || 0 == i . stroke || 0 == i [ "stroke-width" ] ) && ( P . on = ! 1 ) ; var R = a . getRGB ( i . stroke ) ; P . on && i . stroke && ( P . color = R . hex ) , O = ( ( + m [ "stroke-opacity" ] + 1 || 2 ) - 1 ) * ( ( + m . opacity + 1 || 2 ) - 1 ) * ( ( + R . o + 1 || 2 ) - 1 ) ; var S = . 75 * ( d ( i [ "stroke-width" ] ) || 1 ) ; if ( O = h ( g ( O , 0 ) , 1 ) , null == i [ "stroke-width" ] && ( S = m [ "stroke-width" ] ) , i [ "stroke-width" ] && ( P . weight = S ) , S && S < 1 && ( O *= S ) && ( P . weight = 1 ) , P . opacity = O , i [ "stroke-linejoin" ] && ( P . joinstyle = i [ "stroke-linejoin" ] || "miter" ) , P . miterlimit = i [ "stroke-miterlimit" ] || 8 , i [ "stroke-linecap" ] && ( P . endcap = "butt" == i [ "stroke-linecap" ] ? "flat" : "square" == i [ "stroke-linecap" ] ? "square" : "round" ) , "stroke-dasharray" in i ) { var T = { "-" : "shortdash" , "." : "shortdot" , "-." : "shortdashdot" , "-.." : "shortdashdotdot" , ". " : "dot" , "- " : "dash" , "--" : "longdash" , "- ." : "dashdot" , "--." : "longdashdot" , "--.." : " longdashd
this . _isNeedDigest = ! 0 , this . options . columnSize = a } , setRegionColumnSize : function ( a ) { this . _isNeedDigest = ! 0 , this . options . regionColumnSize = a } , getColumnSize : function ( ) { return this . options . columnSize } , getRegionColumnSize : function ( ) { return this . options . regionColumnSize } , populate : function ( a , b ) { a && a !== this . options . items && ( this . _isNeedDigest = ! 0 , this . options . items = a , this . _restore ( ) ) , b && b !== this . options . header && ( this . _isNeedDigest = ! 0 , this . options . header = b , this . _restore ( ) ) , this . _populate ( ) } , _restore : function ( ) { this . topLeftCollection . restore ( ) , this . topRightCollection . restore ( ) , this . bottomLeftCollection . restore ( ) , this . bottomRightCollection . restore ( ) } , restore : function ( ) { this . _restore ( ) } } ) , BI . shortcut ( "bi.collection_table" , BI . CollectionTable ) , BI . QuickCollectionTable = BI . inherit ( BI . CollectionTable , { _defaultConfig : function ( ) { return BI . extend ( BI . QuickCollectionTable . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-quick-collection-table" } ) } , render : function ( ) { BI . QuickCollectionTable . superclass . render . apply ( this , arguments ) ; this . options ; this . topLeftCollection . setOverflowX ( ! 1 ) , this . topLeftCollection . setOverflowY ( ! 1 ) , this . topRightCollection . setOverflowX ( ! 1 ) , this . topRightCollection . setOverflowY ( ! 1 ) , this . bottomLeftCollection . setOverflowX ( ! 1 ) , this . bottomLeftCollection . setOverflowY ( ! 1 ) , this . bottomRightCollection . setOverflowX ( ! 1 ) , this . bottomRightCollection . setOverflowY ( ! 1 ) } , mounted : function ( ) { BI . QuickCollectionTable . superclass . mounted . apply ( this , arguments ) ; var a = this ; this . _topLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _topRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomLeftWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelLeft , this ) , BI . bind ( this . _shouldHandleLeftX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . _bottomRightWheelHandler = new BI . WheelHandler ( BI . bind ( this . _onWheelRight , this ) , BI . bind ( this . _shouldHandleRightX , this ) , BI . bind ( this . _shouldHandleY , this ) ) , this . topLeftCollection . element . mousewheel ( function ( b ) { a . _topLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . topRightCollection . element . mousewheel ( function ( b ) { a . _topRightWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomLeftCollection . element . mousewheel ( function ( b ) { a . _bottomLeftWheelHandler . onWheel ( b . originalEvent ) } ) , this . bottomRightCollection . element . mousewheel ( function ( b ) { a . _bottomRightWheelHandler . onWheel ( b . originalEvent ) } ) } , _shouldHandleLeftX : function ( a ) { return a > 0 ? this . bottomLeftCollection . getScrollLeft ( ) < this . bottomLeftCollection . getMaxScrollLeft ( ) : this . bottomLeftCollection . getScrollLeft ( ) > 0 } , _shouldHandleRightX : function ( a ) { return a > 0 ? this . bottomRightCollection . getScrollLeft ( ) < this . bottomRightCollection . getMaxScrollLeft ( ) : this . bottomRightCollection . getScrollLeft ( ) > 0 } , _shouldHandleY : function ( a ) { return a > 0 ? this . bottomRightCollection . getScrollTop ( ) < this . bottomRightCollection . getMaxScrollTop ( ) : this . bottomRightCollection . getScrollTop ( ) > 0 } , _onWheelLeft : function ( a , b ) { var c = this , d = this . bottomLeftCollection . getScrollTop ( ) , e = this . bottomLeftCollection . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftCollection . setScrollTop ( d ) , this . bottomRightCollection . setScrollTop ( d ) , this . topLeftCollection . setScrollLeft ( e ) , this . bottomLeftCollection . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _onWheelRight : function ( a , b ) { var c = this , d = this . bottomRightCollection . getScrollTop ( ) , e = this . bottomRightCollection . getScrollLeft ( ) ; d += b , e += a , this . bottomLeftCollection . setScrollTop ( d ) , this . bottomRightCollection . setScrollTop ( d ) , this . topRightCollection . setScrollLeft ( e ) , this . bottomRightCollection . setScrollLeft ( e ) , c . _populateScrollbar ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } , _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 . _getFreezeHe
type : "bi.adaptive" , width : this . _calculateWidth ( f ) , items : [ c ] } ) } , _createBottomRightBody : function ( ) { var a = this . bottomRightBody = this . _body ( ) ; return a . element . append ( this . _createCells ( this . bottomRightItems , this . columnRight , this . mergeRight , this . bottomRightBodyTds , this . bottomRightBodyItems , this . columnLeft . length ) ) , a } , _createFreezeTable : function ( ) { var a = this , b = this . options , c = this . _isRightFreeze ( ) , d = this . _split ( b . header ) ; this . topLeftItems = d . left , this . topRightItems = d . right , d = this . _split ( b . items ) , this . bottomLeftItems = d . left , this . bottomRightItems = d . right , this . columnLeft = [ ] , this . columnRight = [ ] , BI . each ( b . columnSize , function ( d , e ) { b . freezeCols . contains ( d ) ? a [ c ? "columnRight" : "columnLeft" ] . push ( e ) : a [ c ? "columnLeft" : "columnRight" ] . push ( e ) } ) , this . mergeLeft = [ ] , this . mergeRight = [ ] , BI . each ( b . mergeCols , function ( d , e ) { b . freezeCols . contains ( e ) ? a [ c ? "mergeRight" : "mergeLeft" ] . push ( e ) : a [ c ? "mergeLeft" : "mergeRight" ] . push ( e ) } ) ; var e = this . _createTopLeft ( ) , f = this . _createTopRight ( ) , g = this . _createBottomLeft ( ) , h = this . _createBottomRight ( ) ; this . scrollTopLeft = BI . createWidget ( { type : "bi.adaptive" , cls : "scroll-top-left" , width : "100%" , height : "100%" , scrollable : ! 1 , items : [ e ] } ) , this . scrollTopRight = BI . createWidget ( { type : "bi.adaptive" , cls : "scroll-top-right" , width : "100%" , height : "100%" , scrollable : ! 1 , items : [ f ] } ) , this . scrollBottomLeft = BI . createWidget ( { type : "bi.adaptive" , cls : "scroll-bottom-left" , width : "100%" , height : "100%" , scrollable : c || null , scrollx : ! c , items : [ g ] } ) , this . scrollBottomRight = BI . createWidget ( { type : "bi.adaptive" , cls : "scroll-bottom-right" , width : "100%" , height : "100%" , scrollable : ! c || null , scrollx : c , items : [ h ] } ) , this . topLeft = BI . createWidget ( { type : "bi.adaptive" , cls : "top-left" , scrollable : ! 1 , items : [ this . scrollTopLeft ] } ) , this . topRight = BI . createWidget ( { type : "bi.adaptive" , cls : "top-right" , scrollable : ! 1 , items : [ this . scrollTopRight ] } ) , this . bottomLeft = BI . createWidget ( { type : "bi.adaptive" , cls : "bottom-left" , items : [ this . scrollBottomLeft ] } ) , this . bottomRight = BI . createWidget ( { type : "bi.adaptive" , cls : "bottom-right" , scrollable : ! 1 , items : [ this . scrollBottomRight ] } ) ; var i = b . header . length * ( ( b . headerRowSize || b . rowSize ) + 1 ) + 1 , j = BI . sum ( b . freezeCols , function ( a , c ) { return b . columnSize [ c ] > 1 ? b . columnSize [ c ] + 1 : b . columnSize [ c ] } ) ; this . _resize = function ( ) { a . scrollBottomLeft . element . is ( ":visible" ) && ( a . scrollBottomLeft . element . css ( { "overflow-x" : "auto" } ) , a . scrollBottomRight . element . css ( { "overflow-x" : "auto" } ) , a . setColumnSize ( b . columnSize ) , c ? a . scrollBottomLeft . element . css ( { "overflow-y" : "auto" } ) : a . scrollBottomRight . element . css ( { "overflow-y" : "auto" } ) , ( a . scrollBottomLeft . element . hasHorizonScroll ( ) || a . scrollBottomRight . element . hasHorizonScroll ( ) ) && ( a . scrollBottomLeft . element . css ( "overflow-x" , "scroll" ) , a . scrollBottomRight . element . css ( "overflow-x" , "scroll" ) ) , a . scrollBottomRight . element . hasVerticalScroll ( ) ? a . scrollTopRight . element . css ( "overflow-y" , "scroll" ) : a . scrollTopRight . element . css ( "overflow-y" , "hidden" ) , a . scrollBottomLeft . element . hasVerticalScroll ( ) ? a . scrollTopLeft . element . css ( "overflow-y" , "scroll" ) : a . scrollTopLeft . element . css ( "overflow-y" , "hidden" ) , a . scrollTopLeft . element [ 0 ] . scrollLeft = a . scrollBottomLeft . element [ 0 ] . scrollLeft , a . scrollTopRight . element [ 0 ] . scrollLeft = a . scrollBottomRight . element [ 0 ] . scrollLeft , a . scrollBottomLeft . element [ 0 ] . scrollTop = a . scrollBottomRight . element [ 0 ] . scrollTop ) } ; var k = b . regionColumnSize ; 0 === b . freezeCols . length ? k = c ? [ "fill" , 0 ] : [ 0 , "fill" ] : b . freezeCols . length >= b . columnSize . length && ( k = c ? [ 0 , "fill" ] : [ "fill" , 0 ] ) , this . partitions = BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , b . logic , { rows : 2 , columns : 2 , columnSize : k || ( c ? [ "fill" , j ] : [ j , "fill" ] ) , rowSize : [ i , "fill" ] , items : [ [ { el : this . topLeft } , { el : this . topRight } ] , [ { el : this . bottomLeft } , { el : this . bottomRight } ] ] } ) ) ) ) , this . _initFreezeScroll ( ) , BI . ResizeDetector . addResizeListener ( this , function ( ) { a . _resize ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _RESIZE ) } ) } , mounted : function ( ) { this . _resize && this . _resize ( ) , this . fireEvent ( BI . Table . EVENT _TABLE _AFTER _INIT ) } , _initFreezeScroll : function ( ) { function a ( a , c , d ) { a . scroll ( function ( e ) { d . scrollTop ( a . scrollTop ( ) ) , c . scrollLeft ( a . scrollLeft ( ) ) , b . fireEvent ( BI . Table . EVENT _TABLE _SCROLL ) } ) } var b = this ; this . options ;
} , setWidth : function ( a ) { BI . ResizableTable . superclass . setWidth . apply ( this , arguments ) , this . table . setWidth ( a ) } , setHeight : function ( a ) { BI . ResizableTable . superclass . setHeight . apply ( this , arguments ) , this . table . setHeight ( a ) } , setVerticalScroll : function ( a ) { this . table . setVerticalScroll ( a ) } , setLeftHorizontalScroll : function ( a ) { this . table . setLeftHorizontalScroll ( a ) } , setRightHorizontalScroll : function ( a ) { this . table . setRightHorizontalScroll ( a ) } , setColumnSize : function ( a ) { this . options . columnSize = a , this . table . setColumnSize ( a ) } , getColumnSize : function ( ) { return this . table . getColumnSize ( ) } , setRegionColumnSize : function ( a ) { this . options . regionColumnSize = a , this . table . setRegionColumnSize ( a ) } , getRegionColumnSize : function ( ) { return this . table . getRegionColumnSize ( ) } , getVerticalScroll : function ( ) { return this . table . getVerticalScroll ( ) } , getLeftHorizontalScroll : function ( ) { return this . table . getLeftHorizontalScroll ( ) } , getRightHorizontalScroll : function ( ) { return this . table . getRightHorizontalScroll ( ) } , attr : function ( ) { BI . ResizableTable . superclass . attr . apply ( this , arguments ) , this . table . attr . apply ( this . table , arguments ) } , restore : function ( ) { this . table . restore ( ) } , populate : function ( a , b ) { a && ( this . options . items = a ) , b && ( this . options . header = b , this . options . isNeedResize && ( b = this . _formatHeader ( b ) ) ) , this . table . populate ( a , b ) , this . _populate ( ) } } ) , BI . shortcut ( "bi.resizable_table" , BI . ResizableTable ) , BI . CustomTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . CustomTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-custom-tree" , expander : { el : { } , popup : { type : "bi.custom_tree" } } , items : [ ] , itemsCreator : BI . emptyFn , el : { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } } ) } , _init : function ( ) { BI . CustomTree . superclass . _init . apply ( this , arguments ) , this . initTree ( this . options . items ) } , _formatItems : function ( a ) { var b = this , c = this . options ; a = BI . Tree . transformToTreeFormat ( a ) ; var d = [ ] ; return BI . each ( a , function ( a , e ) { if ( BI . isNotEmptyArray ( e . children ) || e . isParent === ! 0 ) { var f = BI . extend ( { type : "bi.expander" , el : { } , popup : { type : "bi.custom_tree" } } , BI . deepClone ( c . expander ) , { id : e . id , pId : e . pId , value : e . value } ) , g = BI . stripEL ( e ) ; BI . isWidget ( g ) ? f . el = g : ( g = BI . clone ( g ) , delete g . children , BI . extend ( f . el , g ) ) , f . popup . expander = BI . deepClone ( c . expander ) , f . items = f . popup . items = e . children , f . itemsCreator = f . popup . itemsCreator = function ( a ) { if ( BI . isNotNull ( a . node ) ) return c . itemsCreator . apply ( b , arguments ) ; var d = Array . prototype . slice . call ( arguments , 0 ) ; return d [ 0 ] . node = e , c . itemsCreator . apply ( b , d ) } , BI . isNull ( f . popup . el ) && ( f . popup . el = BI . deepClone ( c . el ) ) , d . push ( f ) } else d . push ( e ) } ) , d } , initTree : function ( a ) { var b = this , c = this . options ; this . tree = BI . createWidget ( c . el , { element : this , items : this . _formatItems ( a ) , itemsCreator : function ( a , d ) { c . itemsCreator . apply ( this , [ a , function ( a ) { var c = Array . prototype . slice . call ( arguments , 0 ) ; c [ 0 ] = b . _formatItems ( a ) , d . apply ( null , c ) } ] ) } } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( a , c , d ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . CustomTree . EVENT _CHANGE , c , d ) } ) } , stroke : function ( a ) { this . populate . apply ( this , arguments ) } , populate : function ( a ) { var b = Array . prototype . slice . call ( arguments , 0 ) ; arguments . length > 0 && ( b [ 0 ] = this . _formatItems ( a ) ) , this . tree . populate . apply ( this . tree , b ) } , setValue : function ( a ) { this . tree && this . tree . setValue ( a ) } , getValue : function ( ) { return this . tree ? this . tree . getValue ( ) : [ ] } , getAllButtons : function ( ) { return this . tree ? this . tree . getAllButtons ( ) : [ ] } , getAllLeaves : function ( ) { return this . tree ? this . tree . getAllLeaves ( ) : [ ] } , getNodeById : function ( a ) { return this . tree && this . tree . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . tree && this . tree . getNodeByValue ( a ) } , empty : function ( ) { this . tree . empty ( ) } } ) , BI . CustomTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.custom_tree" , BI . CustomTree ) , function ( $ ) { var settings = { } , roots = { } , caches = { } , _consts = { className : { BUTTON : "button" , LEVEL : "level" , ICO _LOADING : "ico_loading" , SWITCH : "switch" } , event : { NODECREATED : "ztree_nodeCreated" , CLICK : "ztree_click" , EXPAND : "ztree_expand" , COLLAPSE : "ztree_collapse" , ASYNC _SUCCESS : "ztree_async_success" , ASYNC _ERROR : "ztree_async_error" , REMOVE : "ztree_remove" , SELECTED : " ztree _selecte
} , init : function ( a , b , c ) { var d = tools . clone ( _setting ) ; $ . extend ( ! 0 , d , b ) , d . treeId = a . attr ( "id" ) , d . treeObj = a , d . treeObj . empty ( ) , settings [ d . treeId ] = d , "undefined" == typeof document . body . style . maxHeight && ( d . view . expandSpeed = "" ) , data . initRoot ( d ) ; var e = data . getRoot ( d ) , f = d . data . key . children ; c = c ? tools . clone ( tools . isArray ( c ) ? c : [ c ] ) : [ ] , d . data . simpleData . enable ? e [ f ] = data . transformTozTreeFormat ( d , c ) : e [ f ] = c , data . initCache ( d ) , event . unbindTree ( d ) , event . bindTree ( d ) , event . unbindEvent ( d ) , event . bindEvent ( d ) ; var g = { setting : d , addNodes : function ( a , b , c ) { function e ( ) { view . addNodes ( d , a , f , 1 == c ) } if ( ! b ) return null ; if ( a || ( a = null ) , a && ! a . isParent && d . data . keep . leaf ) return null ; var f = tools . clone ( tools . isArray ( b ) ? b : [ b ] ) ; return tools . canAsync ( d , a ) ? view . asyncNode ( d , a , c , e ) : e ( ) , f } , cancelSelectedNode : function ( a ) { view . cancelPreSelectedNode ( d , a ) } , destroy : function ( ) { view . destroy ( d ) } , expandAll : function ( a ) { return a = ! ! a , view . expandCollapseSonNode ( d , null , a , ! 0 ) , a } , expandNode : function ( a , b , c , e , f ) { if ( ! a || ! a . isParent ) return null ; if ( b !== ! 0 && b !== ! 1 && ( b = ! a . open ) , f = ! ! f , f && b && 0 == tools . apply ( d . callback . beforeExpand , [ d . treeId , a ] , ! 0 ) ) return null ; if ( f && ! b && 0 == tools . apply ( d . callback . beforeCollapse , [ d . treeId , a ] , ! 0 ) ) return null ; if ( b && a . parentTId && view . expandCollapseParentNode ( d , a . getParentNode ( ) , b , ! 1 ) , b === a . open && ! c ) return null ; if ( data . getRoot ( d ) . expandTriggerFlag = f , ! tools . canAsync ( d , a ) && c ) view . expandCollapseSonNode ( d , a , b , ! 0 , function ( ) { if ( e !== ! 1 ) try { $$ ( a , d ) . focus ( ) . blur ( ) } catch ( b ) { } } ) ; else if ( a . open = ! b , view . switchNode ( this . setting , a ) , e !== ! 1 ) try { $$ ( a , d ) . focus ( ) . blur ( ) } catch ( g ) { } return b } , getNodes : function ( ) { return data . getNodes ( d ) } , getNodeByParam : function ( a , b , c ) { return a ? data . getNodeByParam ( d , c ? c [ d . data . key . children ] : data . getNodes ( d ) , a , b ) : null } , getNodeByTId : function ( a ) { return data . getNodeCache ( d , a ) } , getNodesByParam : function ( a , b , c ) { return a ? data . getNodesByParam ( d , c ? c [ d . data . key . children ] : data . getNodes ( d ) , a , b ) : null } , getNodesByParamFuzzy : function ( a , b , c ) { return a ? data . getNodesByParamFuzzy ( d , c ? c [ d . data . key . children ] : data . getNodes ( d ) , a , b ) : null } , getNodesByFilter : function ( a , b , c , e ) { return b = ! ! b , a && "function" == typeof a ? data . getNodesByFilter ( d , c ? c [ d . data . key . children ] : data . getNodes ( d ) , a , b , e ) : b ? null : [ ] } , getNodeIndex : function ( a ) { if ( ! a ) return null ; for ( var b = d . data . key . children , c = a . parentTId ? a . getParentNode ( ) : data . getRoot ( d ) , e = 0 , f = c [ b ] . length ; e < f ; e ++ ) if ( c [ b ] [ e ] == a ) return e ; return - 1 } , getSelectedNodes : function ( ) { for ( var a = [ ] , b = data . getRoot ( d ) . curSelectedList , c = 0 , e = b . length ; c < e ; c ++ ) a . push ( b [ c ] ) ; return a } , isSelectedNode : function ( a ) { return data . isSelectedNode ( d , a ) } , reAsyncChildNodes : function ( a , b , c ) { if ( this . setting . async . enable ) { var e = ! a ; if ( e && ( a = data . getRoot ( d ) ) , "refresh" == b ) { for ( var f = this . setting . data . key . children , g = 0 , h = a [ f ] ? a [ f ] . length : 0 ; g < h ; g ++ ) data . removeNodeCache ( d , a [ f ] [ g ] ) ; if ( data . removeSelectedNode ( d ) , a [ f ] = [ ] , e ) this . setting . treeObj . empty ( ) ; else { var i = $$ ( a , consts . id . UL , d ) ; i . empty ( ) } } view . asyncNode ( this . setting , e ? null : a , ! ! c ) } } , refresh : function ( ) { this . setting . treeObj . empty ( ) ; var a = data . getRoot ( d ) , b = a [ d . data . key . children ] ; data . initRoot ( d ) , a [ d . data . key . children ] = b , data . initCache ( d ) , view . createNodes ( d , 0 , a [ d . data . key . children ] ) } , removeChildNodes : function ( a ) { if ( ! a ) return null ; var b = d . data . key . children , c = a [ b ] ; return view . removeChildNodes ( d , a ) , c ? c : null } , removeNode : function ( a , b ) { a && ( b = ! ! b , b && 0 == tools . apply ( d . callback . beforeRemove , [ d . treeId , a ] , ! 0 ) || ( view . removeNode ( d , a ) , b && this . setting . treeObj . trigger ( consts . event . REMOVE , [ d . treeId , a ] ) ) ) } , selectNode : function ( a , b ) { if ( a && tools . uCanDo ( d ) ) { if ( b = d . view . selectedMulti && b , a . parentTId ) view . expandCollapseParentNode ( d , a . getParentNode ( ) , ! 0 , ! 1 , function ( ) { try { $$ ( a , d ) . focus ( ) . blur ( ) } catch ( b ) { } } ) ; else try { $$ ( a , d ) . focus ( ) . blur ( ) } catch ( c ) { } view . selectNode ( d , a , b ) } } , transformTozTreeNodes : function ( a ) { return data . transformTozTreeFormat ( d , a ) } , transformToArray : function ( a ) { return data . transformToArrayFormat ( d , a ) } , updateNode : function ( a , b ) { if ( a ) { var c = $$ ( a , d ) ; c . get ( 0 ) && tools . uCanDo ( d ) && ( view . setNodeName ( d , a ) , view . setNodeTarget ( d , a ) , view . setNodeUrl ( d , a ) , view . setNodeLineIcos ( d , a ) , view . setNodeFontCss ( d , a ) ) } } } ; return e . treeTools = g , data . setZTreeTools ( d , g ) , e [ f ] && e [ f ] . length > 0 ? view . createNodes ( d , 0 , e
} , doClick : function ( ) { BI . NodeButton . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( a ) { BI . MultiLayerIconArrowNode . superclass . setOpened . apply ( this , arguments ) , this . node . setOpened ( a ) } } ) , BI . shortcut ( "bi.multilayer_icon_arrow_node" , BI . MultiLayerIconArrowNode ) , BI . PlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . PlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-plus-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . PlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.tree_node_checkbox" } ) , 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 && a . setSelected ( a . isSelected ( ) ) , 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 . PlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( a ) { BI . PlusGroupNode . superclass . setOpened . apply ( this , arguments ) , this . checkbox && this . checkbox . setSelected ( a ) } } ) , BI . shortcut ( "bi.plus_group_node" , BI . PlusGroupNode ) , BI . TriangleGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . TriangleGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-triangle-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . TriangleGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { iconWidth : 13 , iconHeight : 13 , type : "bi.tree_group_node_checkbox" } ) , 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 && a . setSelected ( a . isSelected ( ) ) , 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 . TriangleGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isOpened ( ) ) } , setOpened : function ( a ) { BI . TriangleGroupNode . superclass . setOpened . apply ( this , arguments ) , this . checkbox . setSelected ( a ) } , setText : function ( a ) { BI . TriangleGroupNode . superclass . setText . apply ( this , arguments ) , this . text . setText ( a ) } } ) , BI . shortcut ( "bi.triangle_group_node" , BI . TriangleGroupNode ) , BI . FirstTreeLeafItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . FirstTreeLeafItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-first-tree-leaf-item bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , layer : 0 , height : 25 } ) } , _init : function ( ) { BI . FirstTreeLeafItem . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" } ) , 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 && a . setSel
if ( "cut" === this . action && ( a . hasAttribute ( "readonly" ) || a . hasAttribute ( "disabled" ) ) ) throw new Error ( 'Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes' ) ; this . _target = a } } , get : function ( ) { return this . _target } } ] ) , a } ( ) ; a . exports = h } ) } , { select : 5 } ] , 8 : [ function ( b , c , d ) { ! function ( e , f ) { if ( "function" == typeof a && a . amd ) a ( [ "module" , "./clipboard-action" , "tiny-emitter" , "good-listener" ] , f ) ; else if ( "undefined" != typeof d ) f ( c , b ( "./clipboard-action" ) , b ( "tiny-emitter" ) , b ( "good-listener" ) ) ; else { var g = { exports : { } } ; f ( g , e . clipboardAction , e . tinyEmitter , e . goodListener ) , e . clipboard = g . exports } } ( this , function ( a , b , c , d ) { "use strict" ; function e ( a ) { return a && a . _ _esModule ? a : { "default" : a } } function f ( a , b ) { if ( ! ( a instanceof b ) ) throw new TypeError ( "Cannot call a class as a function" ) } function g ( a , b ) { if ( ! a ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; return ! b || "object" != typeof b && "function" != typeof b ? a : b } function h ( a , b ) { if ( "function" != typeof b && null !== b ) throw new TypeError ( "Super expression must either be null or a function, not " + typeof b ) ; a . prototype = Object . create ( b && b . prototype , { constructor : { value : a , enumerable : ! 1 , writable : ! 0 , configurable : ! 0 } } ) , b && ( Object . setPrototypeOf ? Object . setPrototypeOf ( a , b ) : a . _ _proto _ _ = b ) } function i ( a , b ) { var c = "data-clipboard-" + a ; if ( b . hasAttribute ( c ) ) return b . getAttribute ( c ) } var j = e ( b ) , k = e ( c ) , l = e ( d ) , m = 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 function ( b , c , d ) { return c && a ( b . prototype , c ) , d && a ( b , d ) , b } } ( ) , n = function ( a ) { function b ( a , c ) { f ( this , b ) ; var d = g ( this , ( b . _ _proto _ _ || Object . getPrototypeOf ( b ) ) . call ( this ) ) ; return d . resolveOptions ( c ) , d . listenClick ( a ) , d } return h ( b , a ) , m ( b , [ { key : "resolveOptions" , value : function ( ) { var a = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : { } ; this . action = "function" == typeof a . action ? a . action : this . defaultAction , this . target = "function" == typeof a . target ? a . target : this . defaultTarget , this . text = "function" == typeof a . text ? a . text : this . defaultText } } , { key : "listenClick" , value : function ( a ) { var b = this ; this . listener = ( 0 , l [ "default" ] ) ( a , "click" , function ( a ) { return b . onClick ( a ) } ) } } , { key : "onClick" , value : function ( a ) { var b = a . delegateTarget || a . currentTarget ; this . clipboardAction && ( this . clipboardAction = null ) , this . clipboardAction = new j [ "default" ] ( { action : this . action ( b ) , target : this . target ( b ) , text : this . text ( b ) , trigger : b , emitter : this } ) } } , { key : "defaultAction" , value : function ( a ) { return i ( "action" , a ) } } , { key : "defaultTarget" , value : function ( a ) { var b = i ( "target" , a ) ; if ( b ) return document . querySelector ( b ) } } , { key : "defaultText" , value : function ( a ) { return i ( "text" , a ) } } , { key : "destroy" , value : function ( ) { this . listener . destroy ( ) , this . clipboardAction && ( this . clipboardAction . destroy ( ) , this . clipboardAction = null ) } } ] , [ { key : "isSupported" , value : function ( ) { var a = arguments . length > 0 && void 0 !== arguments [ 0 ] ? arguments [ 0 ] : [ "copy" , "cut" ] , b = "string" == typeof a ? [ a ] : a , c = ! ! document . queryCommandSupported ; return b . forEach ( function ( a ) { c = c && ! ! document . queryCommandSupported ( a ) } ) , c } } ] ) , b } ( k [ "default" ] ) ; a . exports = n } ) } , { "./clipboard-action" : 7 , "good-listener" : 4 , "tiny-emitter" : 6 } ] } , { } , [ 8 ] ) ( 8 ) } ) } catch ( e ) { ! function ( a ) { a . fn . zclip = function ( b ) { if ( "object" == typeof b && ! b . length ) { var c = a . extend ( { path : "ZeroClipboard.swf" , copy : null , beforeCopy : null , afterCopy : null , clickAfter : ! 0 , setHandCursor : ! 0 , setCSSEffects : ! 0 } , b ) ; return this . each ( function ( ) { var b = a ( this ) ; if ( b . is ( ":visible" ) && ( "string" == typeof c . copy || a . isFunction ( c . copy ) ) ) { ZeroClipboard . setMoviePath ( c . path ) ; var d = new ZeroClipboard . Client ; a . isFunction ( c . copy ) && b . bind ( "zClip_copy" , c . copy ) , a . isFunction ( c . beforeCopy ) && b . bind ( "zClip_beforeCopy" , c . beforeCopy ) , a . isFunction ( c . afterCopy ) && b . bind ( "zClip_afterCopy" , c . afterCopy ) , d . setHandCursor ( c . setHandCursor ) , d . setCSSEffects ( c . setCSSEffects ) , d . addEventListener ( "mouseOver" , function ( a ) { b . trigger ( "mouseenter" ) } ) , d . addEventListener ( "mouseOut" , function ( a ) { b . trigger ( "mouseleave" ) } ) , d . addEventListener ( "mouseDown" , function ( e ) { b . trigger ( "mousedown" ) , a . isFunction ( c . copy ) ? d . setText ( b . triggerHandler
cls : "button-combo-triangle-wrapper" , items : [ { type : "bi.layout" , cls : "bubble-combo-triangle-" + a + " bi-high-light-border" } ] } ) , b . el = this . triangle , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ b ] } ) } , _createLeftTriangle : function ( ) { this . _createTriangle ( "left" ) } , _createRightTriangle : function ( ) { this . _createTriangle ( "right" ) } , _createTopTriangle : function ( ) { this . _createTriangle ( "top" ) } , _createBottomTriangle : function ( ) { this . _createTriangle ( "bottom" ) } , _showTriangle : function ( ) { var a = this . combo . getPopupPosition ( ) ; switch ( a . dir ) { case "left,top" : case "left,bottom" : this . _createLeftTriangle ( ) , this . combo . getView ( ) . showLine ( "right" ) ; break ; case "right,top" : case "right,bottom" : this . _createRightTriangle ( ) , this . combo . getView ( ) . showLine ( "left" ) ; break ; case "top,left" : case "top,right" : this . _createTopTriangle ( ) , this . combo . getView ( ) . showLine ( "bottom" ) ; break ; case "bottom,left" : case "bottom,right" : this . _createBottomTriangle ( ) , this . combo . getView ( ) . showLine ( "top" ) } } , _hideTriangle : function ( ) { this . triangle && this . triangle . destroy ( ) , this . triangle = null , this . combo . getView ( ) && this . combo . getView ( ) . hideLine ( ) } , hideView : function ( ) { this . _hideTriangle ( ) , this . combo && this . combo . hideView ( ) } , showView : function ( ) { this . combo && this . combo . showView ( ) } , isViewVisible : function ( ) { return this . combo . isViewVisible ( ) } } ) , BI . BubbleCombo . EVENT _TRIGGER _CHANGE = "EVENT_TRIGGER_CHANGE" , BI . BubbleCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . BubbleCombo . EVENT _EXPAND = "EVENT_EXPAND" , BI . BubbleCombo . EVENT _COLLAPSE = "EVENT_COLLAPSE" , BI . BubbleCombo . EVENT _AFTER _INIT = "EVENT_AFTER_INIT" , BI . BubbleCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . BubbleCombo . EVENT _AFTER _POPUPVIEW = "EVENT_AFTER_POPUPVIEW" , BI . BubbleCombo . EVENT _BEFORE _HIDEVIEW = "EVENT_BEFORE_HIDEVIEW" , BI . BubbleCombo . EVENT _AFTER _HIDEVIEW = "EVENT_AFTER_HIDEVIEW" , BI . shortcut ( "bi.bubble_combo" , BI . BubbleCombo ) , BI . BubblePopupView = BI . inherit ( BI . PopupView , { _defaultConfig : function ( ) { var a = BI . BubblePopupView . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : a . baseCls + " bi-bubble-popup-view" } ) } , _init : function ( ) { BI . BubblePopupView . superclass . _init . apply ( this , arguments ) } , showLine : function ( a ) { var b = { } , c = { } ; switch ( a ) { case "left" : b = { top : 0 , bottom : 0 , left : - 1 } , c = { width : 3 } ; break ; case "right" : b = { top : 0 , bottom : 0 , right : - 1 } , c = { width : 3 } ; break ; case "top" : b = { left : 0 , right : 0 , top : - 1 } , c = { height : 3 } ; break ; case "bottom" : b = { left : 0 , right : 0 , bottom : - 1 } , c = { height : 3 } } this . line = BI . createWidget ( c , { type : "bi.layout" , cls : "bubble-popup-line bi-high-light-background" } ) , b . el = this . line , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ b ] } ) } , hideLine : function ( ) { this . line && this . line . destroy ( ) } } ) , BI . shortcut ( "bi.bubble_popup_view" , BI . BubblePopupView ) , BI . BubblePopupBarView = BI . inherit ( BI . BubblePopupView , { _defaultConfig : function ( ) { return BI . extend ( BI . BubblePopupBarView . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-bubble-bar-popup-view" , buttons : [ { value : BI . i18nText ( BI . i18nText ( "BI-Basic_Sure" ) ) } , { value : BI . i18nText ( "BI-Basic_Cancel" ) , level : "ignore" } ] } ) } , _init : function ( ) { BI . BubblePopupBarView . superclass . _init . apply ( this , arguments ) } , _createToolBar : function ( ) { var a = this . options , b = this , c = [ ] ; return BI . each ( a . buttons . reverse ( ) , function ( a , d ) { BI . isWidget ( d ) ? c . push ( d ) : c . push ( BI . extend ( { type : "bi.button" , height : 30 , handler : function ( a ) { b . fireEvent ( BI . BubblePopupBarView . EVENT _CLICK _TOOLBAR _BUTTON , a ) } } , d ) ) } ) , BI . createWidget ( { type : "bi.right_vertical_adapt" , height : 40 , hgap : 10 , bgap : 10 , items : c } ) } } ) , BI . BubblePopupBarView . EVENT _CLICK _TOOLBAR _BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON" , BI . shortcut ( "bi.bubble_bar_popup_view" , BI . BubblePopupBarView ) , BI . EditorIconCheckCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . EditorIconCheckCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseClass : "bi-check-editor-combo" , width : 100 , height : 24 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 0 , watermark : "" , errorText : "" } ) } , _init : function ( ) { BI . EditorIconCheckCombo . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . trigger = BI . createWidget ( { type : "bi.editor_trigger" , items : b . items , height : b . height , validation
a . fireEvent ( BI . SignInitialEditor . EVENT _CLICK , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( b ) { a . fireEvent ( BI . SignInitialEditor . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _VALID , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { a . _showHint ( ) , a . _checkText ( ) , a . fireEvent ( BI . SignInitialEditor . EVENT _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _START , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _PAUSE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _STOP , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _SPACE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { a . _checkText ( ) , a . fireEvent ( BI . SignInitialEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _ENTER , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _RESTRICT , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { a . fireEvent ( BI . SignInitialEditor . EVENT _EMPTY , arguments ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) , this . _showHint ( ) , a . _checkText ( ) } , _checkText : function ( ) { var a = this . options ; BI . nextTick ( BI . bind ( function ( ) { if ( "" === this . editor . getValue ( ) ) this . text . setValue ( a . watermark || "" ) , this . text . element . addClass ( "bi-water-mark" ) ; else { var b = this . editor . getValue ( ) ; b = BI . isEmpty ( b ) || b == a . text ? a . text : b + "(" + a . text + ")" , this . text . setValue ( b ) , this . text . element . removeClass ( "bi-water-mark" ) } } , this ) ) } , _showInput : function ( ) { this . editor . visible ( ) , this . text . invisible ( ) } , _showHint : function ( ) { this . editor . invisible ( ) , this . text . visible ( ) } , setTitle : function ( a ) { this . text . setTitle ( a ) } , setWarningTitle : function ( a ) { this . text . setWarningTitle ( a ) } , focus : function ( ) { this . _showInput ( ) , this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) , this . _showHint ( ) , this . _checkText ( ) } , 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 ) } , 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 ) { var b = this . options ; this . editor . setValue ( a . value ) , b . text = a . text || b . text , this . _checkText ( ) } , getValue : function ( ) { return { value : this . editor . getValue ( ) , text : this . options . text } } , getState : function ( ) { return this . text . getValue ( ) } , setState : function ( a ) { var b = this . options ; this . _showHint ( ) , a = BI . isEmpty ( a ) || a == b . text ? b . text : a + "(" + b . text + ")" , this . text . setValue ( a ) } } ) , BI . SignInitialEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . SignInitialEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . SignInitialEditor . EVENT _BLUR = "EVENT_BLUR" , BI . SignInitialEditor . EVENT _CLICK = "EVENT_CLICK" , BI . SignInitialEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . SignInitialEditor . EVENT _CLICK _LABEL = "EVENT_CLICK_LABEL" , BI . SignInitialEditor . EVENT _START = "EVENT_START" , BI . SignInitialEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . SignInitialEditor . EVENT _STOP = "EVENT_STOP" , BI . SignInitialEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . SignInitialEditor . EVENT _VALID = "EVENT_VALID" , BI . SignInitialEditor . EVENT _ERROR = "EVENT_ERROR" , BI . SignInitialEditor . EVENT _ENTER = "EVENT_ENTER" , BI . SignInitialEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . SignInitialEditor . EVENT _SPACE = "EVENT_SPACE" , BI . SignInitialEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( " bi . sign _initial _edito
this . _checkAllSelected ( ) } , 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 . SelectList . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.select_list" , BI . SelectList ) , BI . LazyLoader = BI . inherit ( BI . Widget , { _const : { PAGE : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . LazyLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-lazy-loader" , el : { } } ) } , _init : function ( ) { var a = this , b = this . options ; BI . LazyLoader . superclass . _init . apply ( this , arguments ) ; var c = b . items . length ; this . loader = BI . createWidget ( { type : "bi.loader" , element : this , el : b . el , itemsCreator : function ( b , c ) { c ( a . _getNextItems ( b ) ) } , hasNext : function ( a ) { return a . count < c } } ) , this . loader . on ( BI . Loader . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . LazyLoader . EVENT _CHANGE , b ) } ) } , _getNextItems : function ( a ) { var b = this . options , c = b . items . length - this . _const . PAGE * ( a . times - 1 ) , d = BI . last ( b . items , c ) , e = BI . first ( d , this . _const . PAGE ) ; return e } , populate : function ( a ) { this . loader . populate ( a ) } , addItems : function ( a ) { this . loader . addItems ( a ) } , empty : function ( ) { this . loader . empty ( ) } , setNotSelectedValue : function ( ) { this . loader . setNotSelectedValue . apply ( this . loader , arguments ) } , getNotSelectedValue : function ( ) { return this . loader . getNotSelectedValue ( ) } , setValue : function ( ) { this . loader . setValue . apply ( this . loader , arguments ) } , getValue : function ( ) { return this . loader . getValue . apply ( this . loader , arguments ) } , getAllButtons : function ( ) { return this . loader . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . loader . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . loader . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . loader . getNotSelectedButtons ( ) } , getIndexByValue : function ( a ) { return this . loader . getIndexByValue ( a ) } , getNodeById : function ( a ) { return this . loader . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . loader . getNodeByValue ( a ) } } ) , BI . LazyLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.lazy_loader" , BI . LazyLoader ) , BI . ListLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ListLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-list-loader" , isDefaultInit : ! 0 , el : { type : "bi.button_group" } , items : [ ] , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn , count : ! 1 , next : { } , hasNext : BI . emptyFn } ) } , _nextLoad : function ( ) { var a = this , b = this . options ; this . next . setLoading ( ) , b . itemsCreator . apply ( this , [ { times : ++ this . times } , function ( ) { a . next . setLoaded ( ) , a . addItems . apply ( a , arguments ) } ] ) } , _init : function ( ) { BI . ListLoader . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; b . itemsCreator === ! 1 && ( b . next = ! 1 ) , this . button _group = BI . createWidget ( b . el , { type : "bi.button_group" , element : this , chooseType : 0 , items : b . items , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( b , c , d ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . ListLoader . EVENT _CHANGE , d ) } ) , b . next !== ! 1 && ( this . next = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , b . next ) ) , this . next . on ( BI . Controller . EVENT _CHANGE , function ( b ) { b === BI . Events . CLICK && a . _nextLoad ( ) } ) ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . next ] } ) , b . isDefaultInit && BI . isEmpty ( b . items ) && BI . nextTick ( BI . bind ( function ( ) { this . populate ( ) } , this ) ) , BI . isNotEmptyArray ( b . items ) && this . populate ( b . items ) } , hasNext : function ( ) { var a = this . options ; return BI . isNumber ( a . count ) ? this . count < a . count : ! ! a . hasNext . apply ( this , [ { times : this . times , count : this . count } ] ) } , addItems : function ( a ) { this . count += a . length , BI . isObject ( this . next ) && ( this . hasNext ( ) ? ( this . options . items = this . options . items . concat ( a ) , this . next . setLoaded ( ) ) : this . next . setEnd ( ) ) , this . button _group . addItems . apply ( this . button _group , arguments ) , this . next . element . appendTo ( this . element ) } ,
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 . freezeCols , isNeedMerge : b . isNeedMerge , mergeCols : b . mergeCols , mergeRule : b . mergeRule , columnSize : b . columnSize , minColumnSize : b . minColumnSize , maxColumnSize : b . 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 ( ) { b . regionColumnSize = this . getRegionColumnSize ( ) ; var c = this . getColumnSize ( ) , d = b . columnSize . length - c . length ; b . columnSize = c . slice ( ) , b . columnSize = b . columnSize . concat ( BI . makeArray ( d , 0 ) ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , function ( ) { b . regionColumnSize = this . getRegionColumnSize ( ) ; var c = this . getColumnSize ( ) , d = b . columnSize . length - c . length ; b . columnSize = c . slice ( ) , b . columnSize = b . columnSize . concat ( BI . makeArray ( d , 0 ) ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , arguments ) } ) } , _digest : function ( ) { var a = this . options , b = this . _getHDeep ( ) , c = this . _getVDeep ( ) , d = BI . TableTree . formatHeader ( a . header , a . crossHeader , a . crossItems , b , c , a . headerCellStyleGetter ) , e = BI . DynamicSummaryTreeTable . formatHorizontalItems ( a . items , b , ! 1 , a . summaryCellStyleGetter ) , f = BI . DynamicSummaryTreeTable . formatSummaryItems ( e , d , a . crossItems , b ) , g = a . columnSize . slice ( ) , h = a . minColumnSize . slice ( ) , i = a . maxColumnSize . slice ( ) ; return BI . removeAt ( g , f . deletedCols ) , BI . removeAt ( h , f . deletedCols ) , BI . removeAt ( i , f . deletedCols ) , { header : f . header , items : f . items , columnSize : g , minColumnSize : h , maxColumnSize : i } } , setWidth : function ( a ) { BI . DynamicSummaryTreeTable . superclass . setWidth . apply ( this , arguments ) , this . table . setWidth ( a ) } , setHeight : function ( a ) { BI . DynamicSummaryTreeTable . 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 ) { switch ( BI . DynamicSummaryTreeTable . superclass . attr . apply ( this , arguments ) , a ) { case "minColumnSize" : case "maxColumnSize" : return } this . table . attr . apply ( this . table , arguments ) } , 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 . populate ( f . items , f . header ) } , destroy : function ( ) { this . table . destroy ( ) , BI . DynamicSummaryTreeTable . superclass . destroy . apply ( this , arguments ) } } ) , BI . extend ( BI . DynamicSummaryTreeTable , { formatHorizontalItems : function ( a , b , c , d ) { function e ( a , g ) { var h ; if ( BI . isArray ( g . children ) ) { if ( BI . each ( g . children , function ( b , c ) { var d ; a != - 1 ? ( d = a . slice ( ) , d . push ( g ) ) : d = [ ] , e ( d , c ) } ) , a != - 1 ? ( h = a
} ) , 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 : [ ] } ) } , _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 . isParent === ! 0 || BI . isNotEmptyArray ( e . children ) ) { switch ( d ) { case 0 : f . type = "bi.first_plus_group_node" ; break ; case a . length - 1 : f . type = "bi.last_plus_group_node" ; break ; default : f . type = "bi.mid_plus_group_node" } BI . defaults ( e , f ) , c . _formatItems ( e . children , b + 1 ) } else { switch ( d ) { case a . length - 1 : f . type = "bi.last_tree_leaf_item" ; break ; default : f . type = "bi.mid_tree_leaf_item" } BI . defaults ( e , f ) } } ) , a } , _assertId : function ( a ) { BI . each ( a , function ( a , b ) { BI . isKey ( b . id ) || ( b . id = BI . UUID ( ) ) } ) } , initTree : function ( a ) { var b = this , c = this . options ; this . empty ( ) , this . _assertId ( a ) , this . tree = BI . createWidget ( { type : "bi.custom_tree" , element : this , expander : BI . extend ( { el : { } , popup : { type : "bi.custom_tree" } } , c . expander ) , items : this . _formatItems ( BI . Tree . transformToTreeFormat ( a ) , 0 ) , el : BI . extend ( { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } , c . el ) } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( a ) { b . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , a === BI . Events . CLICK && b . fireEvent ( BI . LevelTree . EVENT _CHANGE , arguments ) } ) } , stroke : function ( a ) { this . tree . stroke . apply ( this . tree , arguments ) } , populate : function ( a ) { a = this . _formatItems ( BI . Tree . transformToTreeFormat ( a ) , 0 ) , this . tree . populate ( a ) } , setValue : function ( a ) { this . tree . setValue ( a ) } , getValue : function ( ) { return this . tree . getValue ( ) } , getAllLeaves : function ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( a ) { return this . tree . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . tree . getNodeByValue ( a ) } } ) , BI . LevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.level_tree" , BI . LevelTree ) , BI . SimpleTreeView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SimpleTreeView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-simple-tree" , itemsCreator : BI . emptyFn , items : null } ) } , _init : function ( ) { BI . SimpleTreeView . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . structure = new BI . Tree , this . tree = BI . createWidget ( { type : "bi.tree_view" , element : this , itemsCreator : function ( c , d ) { var e = function ( b ) { d ( { items : b } ) , a . structure . initTree ( BI . Tree . transformToTreeFormat ( b ) ) } ; BI . isNotNull ( b . items ) ? e ( b . items ) : b . itemsCreator ( c , e ) } } ) , this . tree . on ( BI . TreeView . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . SimpleTreeView . EVENT _CHANGE , arguments ) } ) , BI . isNotEmptyArray ( b . items ) && this . populate ( ) } , populate : function ( a , b ) { a && ( this . options . items = a ) , this . tree . stroke ( { keyword : b } ) } , setValue : function ( a ) { a || ( a = [ ] ) ; var b = this , c = { } , d = [ ] ; BI . each ( a , function ( a , e ) { var f = b . structure . search ( e , "value" ) ; if ( f ) { var g = f ; for ( g = g . getParent ( ) , g && ( c [ g . value ] || ( c [ g . value ] = 0 ) , c [ g . value ] ++ ) ; g && g . getChildrenLength ( ) <= c [ g . value ] ; ) d . push ( g . value ) , g = g . getParent ( ) , g && ( c [ g . value ] || ( c [ g . value ] = 0 ) , c [ g . value ] ++ ) } } ) , this . tree . setValue ( BI . makeObject ( a . concat ( d ) ) ) } , _getValue : function ( ) { var a = [ ] , b = this . tree . getValue ( ) , c = function ( b ) { BI . each ( b , function ( b , d ) { BI . isEmpty ( d ) ? a . push ( b ) : c ( d ) } ) } ; return c ( b ) , a } , empty : function ( ) { this . tree . empty ( ) } , getValue : function ( ) { var a = this , b = [ ] , c = this . _getValue ( ) ; return BI . each ( c , function ( c , d ) { var e = a . structure . search ( d , "value" ) ; e && a . structure . _traverse ( e , function ( a ) { a . isLeaf ( ) && b . push ( a . value ) } ) } ) , b } } ) , BI . SimpleTreeView . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.simple_tree" , BI . SimpleTreeView ) , BI . EditorTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 } , _defaultConfig : function ( ) { var a = BI . EditorTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { baseCls : ( a . baseCls || "" ) + " bi-editor-trigger bi-border" , height : 24 , validation
height : b . height } ; this . _setArrangeSize ( h ) ; var d = this . _getGridPositionAndSize ( h ) , i = [ { x : 0 , y : BI . MAX , w : d . w , h : d . h , i : d . i } ] . concat ( this . _getLayoutsByRegions ( ) ) ; i = this . _moveElement ( i , i [ 0 ] , d . x , d . y , ! 0 ) , i = this . compact ( i , ! 0 ) ; var f = this . _setRegionsByLayout ( this . _cloneRegion ( ) , i ) , c = this . _getBlockPositionAndSize ( i [ 0 ] ) ; this . position = { insert : c , regions : f } , this . _applyRegion ( f ) , this . _setBlockPositionAndSize ( c ) , this . _start ( ) } return this . position } , setRegionPosition : function ( a , b ) { var c = this . options , d = this . _getScrollOffset ( ) ; switch ( b = BI . extend ( b , { left : b . left + d . left , top : b . top + d . top } ) , c . layoutType ) { case BI . Arrangement . LAYOUT _TYPE . FREE : BI . extend ( this . regions [ a ] , { left : b . left < 0 ? 0 : b . left , top : b . top < 0 ? 0 : b . top } ) , this . _applyRegion ( ) ; break ; case BI . Arrangement . LAYOUT _TYPE . GRID : if ( b . stop ) { BI . extend ( this . regions [ a ] , { left : b . left < 0 ? 0 : b . left , top : b . top < 0 ? 0 : b . top } ) ; var e = this . _cloneRegion ( ) , f = this . _getLayoutsByRegions ( e ) ; f = this . compact ( f , ! 0 ) ; var g = this . _getRegionsByLayout ( f ) ; this . _modifyRegion ( g ) , this . _applyRegion ( ) , this . block . setVisible ( ! 1 ) } else { BI . extend ( this . regions [ a ] , { left : b . left < 0 ? 0 : b . left , top : b . top < 0 ? 0 : b . top } ) ; var e = this . _cloneRegion ( ) , h = this . _getGridPositionAndSize ( BI . extend ( e [ a ] , { left : b . left < 0 ? 0 : b . left , top : b . top < 0 ? 0 : b . top } ) ) , i = h . x , j = h . y ; h = BI . extend ( h , { x : 0 , y : BI . MAX , i : - 1 } ) , delete e [ a ] ; var f = this . _getLayoutsByRegions ( e ) ; f = this . _moveElement ( [ h ] . concat ( f ) , h , i , j , ! 0 ) , f = this . compact ( f , ! 0 ) ; var g = this . _getRegionsByLayout ( f ) ; this . _modifyRegion ( g ) , this . _applyRegion ( ) , this . _setBlockPositionAndSize ( this . _getBlockPositionAndSize ( h ) ) , this . block . setVisible ( ! 0 ) } } } , setDropPosition : function ( a , b ) { var c = this ; this . arrangement . setVisible ( ! 0 ) ; var d = this . _getScrollOffset ( ) ; return this . _setArrangeSize ( BI . extend ( { } , b , { left : a . left + d . left , top : a . top + d . top } ) ) , function ( ) { c . arrangement . setVisible ( ! 1 ) } } , scrollTo : function ( a ) { this . container . element . scrollTop ( a . top ) , this . container . element . scrollLeft ( a . left ) } , zoom : function ( a ) { var b = this ; this . options ; if ( a ) { var c = this . _applyContainer ( ) ; switch ( this . getLayoutType ( ) ) { case BI . Arrangement . LAYOUT _TYPE . FREE : if ( this . _isArrangeFine ( ) ) { var d = this . getClientWidth ( ) , e = ( a . x || 1 ) * d / ( c . left + c . width ) , f = this . _cloneRegion ( ) ; BI . each ( f , function ( a , b ) { b . left = b . left * e , b . width = b . width * e } ) , this . _test ( f ) && ( this . _modifyRegion ( f ) , this . _applyRegion ( ) ) , this . resize ( ) , this . relayout ( ) } break ; case BI . Arrangement . LAYOUT _TYPE . GRID : if ( this . _isArrangeFine ( ) ) { var d = this . getClientWidth ( ) , g = this . getClientHeight ( ) , e = ( a . x || 1 ) * d / ( c . left + c . width ) , h = ( a . y || 1 ) * g / ( c . top + c . height ) , f = this . _cloneRegion ( ) ; if ( BI . each ( f , function ( a , c ) { c . left = c . left * e , c . width = c . width * e , c . top = c . top * h , c . height = c . height * h ; var d = b . _getOneWidthPortion ( ) , f = Math . round ( c . width / d ) , g = Math . round ( c . left / d ) , i = Math . round ( ( c . width + c . left ) / d ) ; g + f !== i && ( c . left = g * d , c . width = i * d - c . left ) } ) , this . _test ( f ) ) { var i = this . _getLayoutsByRegions ( f ) ; i = this . compact ( i , ! 0 ) , f = this . _getRegionsByLayout ( i ) , this . _modifyRegion ( f ) , this . _applyRegion ( ) } } else this . relayout ( ) } } } , resize : function ( ) { var a = this . options ; switch ( a . layoutType ) { case BI . Arrangement . LAYOUT _TYPE . FREE : break ; case BI . Arrangement . LAYOUT _TYPE . GRID : this . zoom ( this . ratio ) ; var b = this . _cloneRegion ( ) , c = this . _getLayoutsByRegions ( b ) ; c = this . compact ( c , ! 0 ) , b = this . _getRegionsByLayout ( c ) , this . _modifyRegion ( b ) , this . _applyRegion ( ) } } , relayout : function ( ) { var a = this , b = this . options ; switch ( b . layoutType ) { case BI . Arrangement . LAYOUT _TYPE . FREE : break ; case BI . Arrangement . LAYOUT _TYPE . GRID : if ( this . _isArrangeFine ( ) ) this . resize ( ) ; else { var c = this . _getOneHeightPortion ( ) , d = this . getClientWidth ( ) , e = ( this . getClientHeight ( ) , this . _cloneRegion ( ) ) , f = BI . toArray ( e ) ; f . sort ( function ( b , c ) { return a . _isEqual ( b . top , c . top ) ? b . left - c . left : b . top - c . top } ) ; var g = f . length , h = 4 , i = ( Math . floor ( ( g - 1 ) / 4 + 1 ) , d / h ) , j = { } ; if ( BI . each ( f , function ( a , b ) { var d = Math . floor ( a / 4 ) , e = a % 4 ; BI . extend ( b , { top : d * c * 6 , left : e * i , width : i , height : 6 * c } ) , j [ d ] || ( j [ d ] = { } ) , j [ d ] [ e ] = b } ) , this . _test ( f ) ) { var k = this . _getLayoutsByRegions ( e ) ; k = this . compact ( k , ! 0 ) , e = this . _getRegionsByLayout ( k ) , this . _modifyRegion ( e ) , this . _populate ( f ) } } } } , _populate : function ( a ) { this . _stop ( ) , this . _calculateRegions ( a ) , this . _applyRegion ( ) } , populate : function ( a ) { this . regions = { } , this . _populate ( a ) , this . _renderRegion ( ) } } ) , BI . Arrang
} } ) , BI . DateTimeSelect . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.date_time_select" , BI . DateTimeSelect ) , BI . DateTimeTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . DateTimeTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-date-time-trigger" , min : "1900-01-01" , max : "2099-12-31" , height : 24 , width : 200 } ) } , _init : function ( ) { BI . DateTimeTrigger . superclass . _init . apply ( this , arguments ) ; var a = this . options , b = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , height : a . height , width : a . width , hgap : b . hgap } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : BI . createWidget ( ) , width : a . height } , { el : this . text } ] } ) } , _printTime : function ( a ) { return a < 10 ? "0" + a : a } , setValue : function ( a ) { var b , c = a ; if ( BI . isNull ( c ) ) c = new Date , b = c . print ( "%Y-%X-%d %H:%M:%S" ) ; else { var d = new Date ( c . year , c . month , c . day , c . hour , c . minute , c . second ) ; b = d . print ( "%Y-%X-%d %H:%M:%S" ) } this . text . setText ( b ) , this . text . setTitle ( b ) } } ) , BI . shortcut ( "bi.date_time_trigger" , BI . DateTimeTrigger ) , BI . DirectionPathChooser = BI . inherit ( BI . Widget , { _const : { lineColor : "#808080" , selectLineColor : "#009de3" } , _defaultConfig : function ( ) { return BI . extend ( BI . DirectionPathChooser . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-excel-table" , items : [ ] } ) } , _init : function ( ) { BI . DirectionPathChooser . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . pathChooser = BI . createWidget ( { type : "bi.path_chooser" , element : this , items : b . items } ) , this . pathChooser . on ( BI . PathChooser . EVENT _CHANGE , function ( b , c ) { a . _setValue ( b , c ) , a . fireEvent ( BI . DirectionPathChooser . EVENT _CHANGE ) } ) , this . _drawArrows ( ) } , _unselectAllArrows : function ( ) { var a = this . _const . lineColor ; BI . each ( this . arrows , function ( b , c ) { BI . each ( c , function ( b , c ) { BI . each ( c , function ( b , c ) { c . attr ( { fill : a , stroke : a } ) } ) } ) } ) } , _drawOneArrow : function ( a , b ) { var c = this . _const . lineColor , d = ( this . _const . selectLineColor , this . pathChooser . svg ) , e = "" ; switch ( b ) { case 0 : e = "M" + a . x + "," + a . y + "L" + ( a . x - 3 ) + "," + ( a . y + 5 ) + "L" + ( a . x + 3 ) + "," + ( a . y + 5 ) + "L" + a . x + "," + a . y ; break ; case 1 : e = "M" + a . x + "," + a . y + "L" + ( a . x - 5 ) + "," + ( a . y - 3 ) + "L" + ( a . x - 5 ) + "," + ( a . y + 3 ) + "L" + a . x + "," + a . y ; break ; case 2 : e = "M" + a . x + "," + a . y + "L" + ( a . x - 3 ) + "," + ( a . y - 5 ) + "L" + ( a . x + 3 ) + "," + ( a . y - 5 ) + "L" + a . x + "," + a . y ; break ; case 3 : e = "M" + a . x + "," + a . y + "L" + ( a . x + 5 ) + "," + ( a . y - 3 ) + "L" + ( a . x + 5 ) + "," + ( a . y + 3 ) + "L" + a . x + "," + a . y } return d . path ( e ) . attr ( { fill : c , stroke : c } ) } , _drawArrows : function ( ) { function a ( a , b ) { return b === - 1 ? 100 * ( a + 1 ) - 20 : 100 * a + 20 } function b ( a , b ) { var c = BI . find ( a , function ( c , d ) { if ( c > 0 && a [ c - 1 ] . x < b && a [ c ] . x > b ) return ! 0 } ) ; return c . y } var c = this , d = ( this . options , this . pathChooser . routes ) , e = this . pathChooser . pathes , f = this . pathChooser . cache ; this . arrows = { } , BI . each ( d , function ( d , g ) { c . arrows [ d ] = [ ] , BI . each ( g , function ( g , h ) { c . arrows [ d ] [ g ] = [ ] ; var i = e [ d ] [ g ] ; BI . each ( i , function ( a , b ) { if ( a > 0 && a < i . length - 1 ) { var e ; b . y === i [ a - 1 ] . y ? i [ a + 1 ] . y != b . y && ( f [ h [ h . length - 2 ] ] . direction === - 1 ? a - 1 > 0 && ( e = c . _drawOneArrow ( i [ a - 1 ] , 3 ) ) : e = c . _drawOneArrow ( i [ a ] , 1 ) ) : b . x === i [ a - 1 ] . x && ( e = b . y > i [ a - 1 ] . y ? f [ BI . first ( h ) ] . direction === - 1 ? c . _drawOneArrow ( i [ a - 1 ] , 0 ) : c . _drawOneArrow ( b , 2 ) : f [ h [ h . length - 2 ] ] . direction === - 1 ? c . _drawOneArrow ( i [ a - 1 ] , 2 ) : c . _drawOneArrow ( b , 0 ) ) , e && c . arrows [ d ] [ g ] . push ( e ) } } ) , BI . each ( h , function ( e , j ) { if ( 0 !== e ) { var k , l = h [ e - 1 ] ; if ( f [ l ] . direction === - 1 ) { var m = c . pathChooser . getRegionIndexById ( l ) , n = a ( m , - 1 ) , o = b ( i , n ) ; k = c . _drawOneArrow ( { x : n , y : o } , 3 ) } else { var m = c . pathChooser . getRegionIndexById ( j ) , n = a ( m ) , o = b ( i , n ) ; k = c . _drawOneArrow ( { x : n , y : o } , 1 ) } k && c . arrows [ d ] [ g ] . push ( k ) } } ) } ) } ) } , _setValue : function ( a , b ) { var c = this , d = this . _const . lineColor , e = this . _const . selectLineColor , f = this . pathChooser . routes , g = this . pathChooser . start , h = [ a ] ; g . contains ( a ) && ( h = g ) , BI . each ( h , function ( a , b ) { BI . each ( c . arrows [ b ] , function ( a , b ) { BI . each ( b , function ( a , b ) { b . attr ( { fill : d , stroke : d } ) . toFront ( ) } ) } ) } ) , BI . each ( this . arrows [ a ] [ b ] , function ( a , b ) { b . attr ( { fill : e , stroke : e } ) . toFront ( ) } ) ; for ( var i = BI . last ( f [ a ] [ b ] ) ; i && f [ i ] && 1 === f [ i ] . length ; ) BI . each ( c . arrows [ i ] [ 0 ] , function ( a , b ) { b . attr ( { fill : e , stroke : e } ) . toFront ( ) } ) , i = BI . last ( f [ i ] [ 0 ] ) } , setValue : function ( a ) { this . pathChooser . setValue ( a ) , this . _unselectAllArrows ( ) ; var b = this . pathChooser . routes , c = BI . keys ( b ) , d = this , e = [ ] , f = [ ] ; BI . each ( a , function ( a , b ) { BI . contains ( c , b )
BI . FileManagerNavButton . EVENT _CHANGE = "FileManagerNavButton.EVENT_CHANGE" , BI . shortcut ( "bi.file_manager_nav_button" , BI . FileManagerNavButton ) , BI . FileManagerNav = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . FileManagerNav . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-file-manager-nav bi-border-left" , height : 40 , items : [ ] } ) } , _init : function ( ) { BI . FileManagerNav . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . tree = new BI . Tree , this . refreshTreeData ( b . items ) , this . tree . getRoot ( ) . set ( "data" , { text : BI . i18nText ( "BI-Created_By_Me" ) , value : BI . FileManagerNav . ROOT _CREATE _BY _ME , id : BI . FileManagerNav . ROOT _CREATE _BY _ME } ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , element : this , items : [ { type : "bi.file_manager_nav_button" , text : BI . i18nText ( "BI-Created_By_Me" ) , selected : ! 0 , id : BI . FileManagerNav . ROOT _CREATE _BY _ME , value : BI . FileManagerNav . ROOT _CREATE _BY _ME } ] , layouts : [ { type : "bi.horizontal" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . ButtonGroup . EVENT _CHANGE , function ( b , c ) { a . fireEvent ( BI . FileManagerNav . EVENT _CHANGE , arguments ) } ) } , _getAllParents : function ( a ) { var b , c = [ ] ; for ( b = a ? this . tree . search ( a ) : this . tree . getRoot ( ) ; b . parent ; ) c . push ( b ) , b = b . parent ; return c . push ( b ) , c . reverse ( ) } , _formatNodes : function ( a ) { var b = [ ] ; return BI . each ( a , function ( a , c ) { b . push ( BI . extend ( { type : "bi.file_manager_nav_button" , id : c . id } , c . get ( "data" ) ) ) } ) , BI . last ( b ) . selected = ! 0 , b } , getValue : function ( ) { return this . button _group . getValue ( ) } , getId : function ( ) { var a = [ ] ; return BI . each ( this . button _group . getSelectedButtons ( ) , function ( b , c ) { a . push ( c . attr ( "id" ) ) } ) , a } , refreshTreeData : function ( a ) { this . tree . initTree ( BI . Tree . transformToTreeFormat ( a ) ) , this . tree . getRoot ( ) . set ( "data" , { text : BI . i18nText ( "BI-Created_By_Me" ) , value : BI . FileManagerNav . ROOT _CREATE _BY _ME , id : BI . FileManagerNav . ROOT _CREATE _BY _ME } ) } , populate : function ( a ) { var b = BI . isNull ( a ) ? [ this . tree . getRoot ( ) ] : this . _getAllParents ( a . id ) ; this . button _group . populate ( this . _formatNodes ( b ) ) } } ) , BI . extend ( BI . FileManagerNav , { ROOT _CREATE _BY _ME : "-1" } ) , BI . FileManagerNav . EVENT _CHANGE = "FileManagerNav.EVENT_CHANGE" , BI . shortcut ( "bi.file_manager_nav" , BI . FileManagerNav ) , BI . InteractiveArrangement = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . InteractiveArrangement . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-interactive-arrangement" , resizable : ! 0 , layoutType : BI . Arrangement . LAYOUT _TYPE . GRID , items : [ ] } ) } , _init : function ( ) { BI . InteractiveArrangement . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . arrangement = BI . createWidget ( { type : "bi.adaptive_arrangement" , element : this , resizable : b . resizable , layoutType : b . layoutType , items : b . items } ) , this . arrangement . on ( BI . AdaptiveArrangement . EVENT _SCROLL , function ( ) { a . fireEvent ( BI . InteractiveArrangement . EVENT _SCROLL , arguments ) } ) , this . arrangement . on ( BI . AdaptiveArrangement . EVENT _RESIZE , function ( ) { a . fireEvent ( BI . InteractiveArrangement . EVENT _RESIZE , arguments ) } ) , this . arrangement . on ( BI . AdaptiveArrangement . EVENT _ELEMENT _RESIZE , function ( b , c ) { var d = a . _getRegionClientPosition ( b ) ; a . draw ( { left : d . left , top : d . top } , c , b ) } ) , this . arrangement . on ( BI . AdaptiveArrangement . EVENT _ELEMENT _STOP _RESIZE , function ( b , c ) { a . stopDraw ( ) , a . setRegionSize ( b , c ) } ) , this . tags = [ ] } , _isEqual : function ( a , b ) { return this . arrangement . _isEqual ( a , b ) } , _getScrollOffset : function ( ) { return this . arrangement . _getScrollOffset ( ) } , _positionAt : function ( a , b ) { var c = this ; b = b || this . getAllRegions ( ) ; var d = [ ] , e = [ ] , f = [ ] , g = [ ] , h = [ ] , i = [ ] ; return BI . each ( b , function ( b , j ) { var k = c . _getRegionClientPosition ( j . id ) ; Math . abs ( k . left - a . left ) <= 3 && d . push ( j ) , Math . abs ( k . left + k . width / 2 - a . left ) <= 3 && e . push ( j ) , Math . abs ( k . left + k . width - a . left ) <= 3 && f . push ( j ) , Math . abs ( k . top - a . top ) <= 3 && g . push ( j ) , Math . abs ( k . top + k . height / 2 - a . top ) <= 3 && h . push ( j ) , Math . abs ( k . top + k . height - a . top ) <= 3 && i . push ( j ) } ) , { left : d , center : e , right : f , top : g , middle : h , bottom : i } } , _getRegionClientPosition : function ( a ) { var b = this . getRegionByName ( a ) , c = this . arrangement . _getScrollOffset ( ) ; return { top : b . top - c . top , left : b . left - c . left , width : b . width , height : b . height , id : b . id } } , _vAlign : function ( a , b )
type : "bi.month_popup" , behaviors : b . behaviors } ) , this . popup . on ( BI . MonthPopup . EVENT _CHANGE , function ( ) { a . setValue ( a . popup . getValue ( ) ) , a . combo . hideView ( ) , a . fireEvent ( BI . MonthCombo . EVENT _CONFIRM ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , element : this , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : this . trigger , popup : { minWidth : 85 , el : this . popup } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { a . fireEvent ( BI . MonthCombo . EVENT _BEFORE _POPUPVIEW ) } ) } , setValue : function ( a ) { this . trigger . setValue ( a ) , this . popup . setValue ( a ) } , getValue : function ( ) { return this . popup . getValue ( ) } } ) , BI . MonthCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . MonthCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.month_combo" , BI . MonthCombo ) , BI . MonthPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-popup" , behaviors : { } } ) } , _init : function ( ) { BI . MonthPopup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options , c = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] , d = [ ] ; d . push ( c . slice ( 0 , 2 ) ) , d . push ( c . slice ( 2 , 4 ) ) , d . push ( c . slice ( 4 , 6 ) ) , d . push ( c . slice ( 6 , 8 ) ) , d . push ( c . slice ( 8 , 10 ) ) , d . push ( c . slice ( 10 , 12 ) ) , d = BI . map ( d , function ( a , b ) { return BI . map ( b , function ( a , b ) { return { type : "bi.text_item" , cls : "bi-list-item-active" , textAlign : "center" , whiteSpace : "nowrap" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : b , text : b + 1 } } ) } ) , this . month = BI . createWidget ( { type : "bi.button_group" , element : this , behaviors : b . behaviors , items : BI . createItems ( d , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { dynamic : ! 0 } , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 , hgap : 2 } ] } ) , this . month . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , b === BI . Events . CLICK && a . fireEvent ( BI . MonthPopup . EVENT _CHANGE ) } ) } , getValue : function ( ) { return this . month . getValue ( ) [ 0 ] } , setValue : function ( a ) { this . month . setValue ( [ a ] ) } } ) , BI . MonthPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.month_popup" , BI . MonthPopup ) , BI . MonthTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 , vgap : 2 , errorText : BI . i18nText ( "BI-Month_Trigger_Error_Text" ) } , _defaultConfig : function ( ) { return BI . extend ( BI . MonthTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-month-trigger bi-border" , height : 24 } ) } , _init : function ( ) { BI . MonthTrigger . 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 ( a ) { return "" === a || BI . isPositiveInteger ( a ) && a >= 1 && a <= 12 } , quitChecker : function ( a ) { return ! 1 } , hgap : c . hgap , vgap : c . vgap , allowBlank : ! 0 , errorText : c . errorText } ) , this . editor . on ( BI . SignEditor . EVENT _FOCUS , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _FOCUS ) } ) , this . editor . on ( BI . SignEditor . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _CHANGE ) } ) , this . editor . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var b = a . editor . getValue ( ) ; BI . isNotNull ( b ) && ( a . editor . setValue ( b ) , a . editor . setTitle ( b ) ) , a . fireEvent ( BI . MonthTrigger . 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 . MonthTrigger . EVENT _START ) } ) , this . editor . on ( BI . SignEditor . EVENT _STOP , function ( ) { a . fireEvent ( BI . MonthTrigger . EVENT _STOP ) } ) , BI . createWidget ( { element : this , type : "bi.htape" , items : [ { el : this . editor } , { el : { type : "bi.text_button" , text : BI . i18nText ( "BI-Multi_Date_Month" ) , baseCls : "bi-trigger-month-text" , width : b . height } , width : b . height } , { el : { type : "bi.trigger_icon_button" , width : b . height } , width : b . height } ] } ) } , setValue : function ( a ) { return BI . isNotNull ( a ) ? ( this . editor . setState ( a + 1 ) , this . editor . setValue ( a + 1 ) , void this . editor . setTitle ( a + 1 ) ) : ( this . editor . setState ( "" ) , this . editor . setValue ( "" ) , void this . editor . setTitle ( "" ) ) } , getKey : function ( ) { return 0 | this . editor . getValue ( ) } , getValue : function ( ) { return this . editor . getValue ( ) - 1 } } ) , BI . MonthTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . MonthTrigger . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . MonthTrigger . EVENT _START = "EVENT_START" , BI . MonthTrigger . EVENT _STOP = "EVENT_STOP" , BI . MonthTrigger . EVENT _CHANGE = " EVENT _CH
} , setValue : function ( a ) { this . tree . setValue ( a ) } , getValue : function ( ) { return this . tree . getValue ( ) } , getAllLeaves : function ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( a ) { return this . tree . getNodeById ( a ) } , getNodeByValue : function ( a ) { return this . tree . getNodeByValue ( a ) } } ) , BI . MultiLayerSelectLevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_level_tree" , BI . MultiLayerSelectLevelTree ) , BI . MultiLayerSelectTreePopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectTreePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-select-tree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] } ) } , _init : function ( ) { BI . MultiLayerSelectTreePopup . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . tree = BI . createWidget ( { type : "bi.multilayer_select_level_tree" , isDefaultInit : b . isDefaultInit , items : b . items , itemsCreator : b . itemsCreator } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , element : this , items : [ this . tree ] } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . tree . on ( BI . MultiLayerSelectLevelTree . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . MultiLayerSelectTreePopup . EVENT _CHANGE ) } ) , this . check ( ) } , getValue : function ( ) { return this . tree . getValue ( ) } , setValue : function ( a ) { a = BI . isArray ( a ) ? a : [ a ] , this . tree . setValue ( a ) } , populate : function ( a ) { BI . MultiLayerSelectTreePopup . superclass . populate . apply ( this , arguments ) , this . tree . populate ( a ) } } ) , BI . MultiLayerSelectTreePopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_tree_popup" , BI . MultiLayerSelectTreePopup ) , BI . MultiLayerSelectTreeFirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { extraCls : "bi-multilayer-select-tree-first-plus-group-node bi-list-item-active" , layer : 0 , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . node = BI . createWidget ( { type : "bi.select_tree_first_plus_group_node" , cls : "bi-list-item-none" , stopPropagation : ! 0 , logic : { dynamic : ! 0 } , id : b . id , pId : b . pId , open : b . open , height : b . height , hgap : b . hgap , text : b . text , value : b . value , py : b . py } ) , this . node . on ( BI . Controller . EVENT _CHANGE , function ( b ) { a . setSelected ( a . isSelected ( ) ) , 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 . node ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( b . layer , 13 ) , items : [ c ] } ) } , isOnce : function ( ) { return ! 0 } , doRedMark : function ( ) { this . node . doRedMark . apply ( this . node , arguments ) } , unRedMark : function ( ) { this . node . unRedMark . apply ( this . node , arguments ) } , isSelected : function ( ) { return this . node . isSelected ( ) } , setSelected : function ( a ) { BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . setSelected . apply ( this , arguments ) , this . node . setSelected ( a ) } , doClick : function ( ) { BI . NodeButton . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( a ) { BI . MultiLayerSelectTreeFirstPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , this . node . setOpened ( a ) } } ) , BI . shortcut ( "bi.multilayer_select_tree_first_plus_group_node" , BI . MultiLayerSelectTreeFirstPlusGroupNode ) , BI . MultiLayerSelectTreeLastPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var a = BI . MultiLayerSelectTreeLastPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( a , { extraCls : "bi-multilayer-select-tree-last-plus-group-node bi-list-item-active" , layer : 0 , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 25 } ) } , _init : function ( ) { BI . MultiLayerSelectTreeLastPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . node = BI . createWidget ( { type : "bi.select_tree_last_plus_group_node" , cls : "bi-list-item-none" , stopPropagation : ! 0 , logic : { dynamic : ! 0 } , id : b . id , pId : b . pId , open : b . open , height : b . height , hgap : b . hgap , text
a . _setStartValue ( b ) , c ( ) , a . populate ( ) , a . _setStartValue ( "" ) } ) } } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( b ) { var d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . combo . setValue ( a . storeValue ) , c ( ) , a . combo . populate ( ) , a . _setStartValue ( "" ) ) : ( a . combo . setValue ( a . storeValue ) , c ( ) ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { this . getCounter ( ) . setValue ( a . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { a . combo . isViewVisible ( ) || a . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_select_popup_view" , ref : function ( ) { a . popup = this , a . trigger . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiSelectPopupView . EVENT _CHANGE , action : function ( ) { a . storeValue = this . getValue ( ) , a . _adjust ( function ( ) { c ( ) } ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM , action : function ( ) { a . _defaultState ( ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CLEAR , action : function ( ) { a . setValue ( ) , a . _defaultState ( ) } } ] , itemsCreator : b . itemsCreator , valueFormatter : b . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { a . combo . adjustWidth ( ) , a . combo . adjustHeight ( ) , a . trigger . getCounter ( ) . adjustView ( ) , a . trigger . getSearcher ( ) . adjustView ( ) } ) } } , hideChecker : function ( a ) { return 0 === d . element . find ( a . target ) . length } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( a . storeValue ) , BI . nextTick ( function ( ) { a . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { a . trigger . stopEditing ( ) , a . requesting === ! 0 ? a . wants2Quit = ! 0 : a . fireEvent ( BI . MultiSelectCombo . EVENT _CONFIRM ) } ) ; var d = BI . createWidget ( { type : "bi.trigger_icon_button" , width : b . height , height : b . height , cls : "multi-select-trigger-icon-button bi-border-left" } ) ; d . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { a . trigger . getCounter ( ) . hideView ( ) , a . combo . isViewVisible ( ) ? a . combo . hideView ( ) : a . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : d , right : 0 , top : 0 , bottom : 0 } ] } ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( a ) { a || ( a = { } ) , a . type || ( a . type = BI . Selection . Multi ) , a . value || ( a . value = [ ] ) } , _makeMap : function ( a ) { return BI . makeObject ( a || [ ] ) } , _joinKeywords : function ( a , b ) { function c ( c ) { var e = d . _makeMap ( c ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( e [ b ] ) && d . storeValue . value [ d . storeValue . type === BI . Selection . Multi ? "pushDistinct" : "remove" ] ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , e . itemsCreator ( { type : BI . MultiSelectCombo . REQ _GET _ALL _DATA , keywords : a } , function ( a ) { var b = BI . pluck ( a . items , "value" ) ; c ( b ) } ) } , _joinAll : function ( a , b ) { var c = this , d = this . options ; this . _assertValue ( a ) , this . requesting = ! 0 , d . itemsCreator ( { type : BI . MultiSelectCombo . REQ _GET _ALL _DATA , keywords : [ this . trigger . getKey ( ) ] } , function ( d ) { var e = BI . pluck ( d . items , "value" ) ; if ( c . storeValue . type === a . type ) { var f = ! 1 , g = c . _makeMap ( c . storeValue . value ) ; return BI . each ( e , function ( a , b ) { BI . isNotNull ( g [ b ] ) && ( f = ! 0 , delete g [ b ] ) } ) , f && ( c . storeValue . value = BI . values ( g ) ) , void c . _adjust ( b ) } var h = c . _makeMap ( c . storeValue . value ) , i = c . _makeMap ( a . value ) , j = [ ] ; BI . each ( e , function ( a , b ) { BI . isNotNull ( h [ e [ a ] ] ) && delete h [ e [ a ] ] , BI . isNull ( i [ e [ a ] ] ) && j . push ( b ) } ) , c . storeValue . value = j . concat ( BI . values ( h ) ) , c . _adjust ( b ) } ) } , _adjust : function ( a ) { function b ( ) { c . storeValue . type === BI . Selection . All && c . storeValue . value . length >= c . _count ? c . storeValue = { type : BI . Selection . Multi , value : [ ] } : c . storeValue . type === BI . Selection . Multi && c . storeValue . value . length >= c . _count && ( c . storeValue = { type : BI . Selection . All , value : [ ] } ) , c . wants2Quit === ! 0 && ( c . fireEvent ( BI . MultiSelectCombo . EVENT _CONFIRM ) , c . wants2Quit = ! 1 ) , c . requesting = ! 1 } var c = this , d = this . options ; this . _count ? ( b ( ) , a ( ) ) : d . itemsCreator ( { type : BI . MultiSelectCombo . REQ _GET _DATA _LENGTH } , function ( d ) { c . _count = d . count ,
keywordGetter : function ( ) { return a . trigger . getKeyword ( ) } , itemsCreator : function ( c , d ) { c . keyword = a . trigger . getKeyword ( ) , this . setKeyword ( c . keyword ) , b . itemsCreator ( c , d ) } } ) , this . searcherPane . setVisible ( ! 1 ) , this . trigger = BI . createWidget ( { type : "bi.searcher" , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( a , b ) { b ( ) } , adapter : this . adapter , popup : this . searcherPane , height : 200 , masker : ! 1 , listeners : [ { eventName : BI . Searcher . EVENT _START , action : function ( ) { a . _showSearcherPane ( ) , a . _setStartValue ( "" ) , this . setValue ( BI . deepClone ( a . storeValue ) ) } } , { eventName : BI . Searcher . EVENT _STOP , action : function ( ) { a . _showAdapter ( ) , a . _setStartValue ( "" ) , a . adapter . setValue ( a . storeValue ) , a . adapter . populate ( ) } } , { eventName : BI . Searcher . EVENT _PAUSE , action : function ( ) { var b = this . getKeyword ( ) ; this . hasMatched ( ) && a . _join ( { type : BI . Selection . Multi , value : [ b ] } , function ( ) { a . _showAdapter ( ) , a . adapter . setValue ( a . storeValue ) , a . _setStartValue ( b ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) } } , { eventName : BI . Searcher . EVENT _SEARCHING , action : function ( ) { var b = this . getKeyword ( ) , d = BI . last ( b ) ; b = BI . initial ( b || [ ] ) , b . length > 0 && a . _joinKeywords ( b , function ( ) { BI . isEndWithBlank ( d ) ? ( a . adapter . setValue ( a . storeValue ) , c ( ) , a . adapter . populate ( ) , a . _setStartValue ( "" ) ) : ( a . adapter . setValue ( a . storeValue ) , c ( ) ) } ) } } , { eventName : BI . Searcher . EVENT _CHANGE , action : function ( b , d ) { d instanceof BI . MultiSelectBar ? a . _joinAll ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) : a . _join ( this . getValue ( ) , function ( ) { c ( ) , a . fireEvent ( BI . MultiSelectList . EVENT _CHANGE ) } ) } } ] } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : this . trigger , height : 30 } , { el : this . adapter , height : "fill" } ] } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . searcherPane , top : 30 , bottom : 0 , left : 0 , right : 0 } ] } ) } , _showAdapter : function ( ) { this . adapter . setVisible ( ! 0 ) , this . searcherPane . setVisible ( ! 1 ) } , _showSearcherPane : function ( ) { this . searcherPane . setVisible ( ! 0 ) , this . adapter . setVisible ( ! 1 ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) } , _assertValue : function ( a ) { a || ( a = { } ) , a . type || ( a . type = BI . Selection . Multi ) , a . value || ( a . value = [ ] ) } , _makeMap : function ( a ) { return BI . makeObject ( a || [ ] ) } , _joinKeywords : function ( a , b ) { function c ( c ) { var e = d . _makeMap ( c ) ; BI . each ( a , function ( a , b ) { BI . isNotNull ( e [ b ] ) && d . storeValue . value [ d . storeValue . type === BI . Selection . Multi ? "pushDistinct" : "remove" ] ( b ) } ) , d . _adjust ( b ) } var d = this , e = this . options ; this . _assertValue ( this . storeValue ) , this . _allData ? c ( this . _allData ) : e . itemsCreator ( { type : BI . MultiSelectList . REQ _GET _ALL _DATA } , function ( a ) { d . _allData = BI . pluck ( a . items , "value" ) , c ( d . _allData ) } ) } , _joinAll : function ( a , b ) { var c = this , d = this . options ; this . _assertValue ( a ) , d . itemsCreator ( { type : BI . MultiSelectList . REQ _GET _ALL _DATA , keyword : c . trigger . getKeyword ( ) } , function ( d ) { var e = BI . pluck ( d . items , "value" ) ; if ( c . storeValue . type === a . type ) { var f = ! 1 , g = c . _makeMap ( c . storeValue . value ) ; return BI . each ( e , function ( a , b ) { BI . isNotNull ( g [ b ] ) && ( f = ! 0 , delete g [ b ] ) } ) , f && ( c . storeValue . value = BI . values ( g ) ) , void c . _adjust ( b ) } var h = c . _makeMap ( c . storeValue . value ) , i = c . _makeMap ( a . value ) , j = [ ] ; BI . each ( e , function ( a , b ) { BI . isNotNull ( h [ e [ a ] ] ) && delete h [ e [ a ] ] , BI . isNull ( i [ e [ a ] ] ) && j . push ( b ) } ) , c . storeValue . value = j . concat ( BI . values ( h ) ) , c . _adjust ( b ) } ) } , _adjust : function ( a ) { function b ( ) { c . storeValue . type === BI . Selection . All && c . storeValue . value . length >= c . _count ? c . storeValue = { type : BI . Selection . Multi , value : [ ] } : c . storeValue . type === BI . Selection . Multi && c . storeValue . value . length >= c . _count && ( c . storeValue = { type : BI . Selection . All , value : [ ] } ) } var c = this , d = this . options ; this . _count ? ( b ( ) , a ( ) ) : d . itemsCreator ( { type : BI . MultiSelectList . REQ _GET _DATA _LENGTH } , function ( d ) { c . _count = d . count , b ( ) , a ( ) } ) } , _join : function ( a , b ) { var c = this ; this . options ; if ( this . _assertValue ( a ) , this . _assertValue ( this . storeValue ) , this . storeValue . type === a . type ) { var d = this . _makeMap ( this . storeValue . value ) ; BI . each ( a . value , function ( a , b ) { d [ b ] || ( c . storeValue . value . push ( b ) , d [ b ] = b ) } ) ; var e = ! 1 ; return BI . each ( a . assist , function ( a , b ) { BI . isNotNull ( d [ b ] ) && ( e = ! 0 , delete d [ b ] ) } ) , e && ( this . storeValue . value = BI . values ( d ) ) , void c . _adjust ( b ) } this . _joinAll ( a , b ) } , _setStartValue : function ( a ) { this . _startValue = a , this
a = a || { } ; var b , c = this ; ( BI . isNumeric ( a . min ) || BI . isEmptyString ( a . min ) ) && c . smallEditor . setValue ( a . min ) , BI . isNotNull ( a . min ) || c . smallEditor . setValue ( "" ) , ( BI . isNumeric ( a . max ) || BI . isEmptyString ( a . max ) ) && c . bigEditor . setValue ( a . max ) , BI . isNotNull ( a . max ) || c . bigEditor . setValue ( "" ) , BI . isNull ( a . closemin ) || ( b = a . closemin === ! 0 ? 1 : 0 , c . smallCombo . setValue ( b ) ) , BI . isNull ( a . closemax ) || ( b = a . closemax === ! 0 ? 1 : 0 , c . bigCombo . setValue ( b ) ) } , getValue : function ( ) { var a = this , b = { } , c = a . smallCombo . getValue ( ) , d = a . bigCombo . getValue ( ) ; return b . min = a . smallEditor . getValue ( ) , b . max = a . bigEditor . getValue ( ) , 0 === c [ 0 ] ? b . closemin = ! 1 : b . closemin = ! 0 , 0 === d [ 0 ] ? b . closemax = ! 1 : b . closemax = ! 0 , b } } ) , BI . NumberInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI . NumberInterval . EVENT _VALID = "EVENT_VALID" , BI . NumberInterval . EVENT _ERROR = "EVENT_ERROR" , BI . shortcut ( "bi.number_interval" , BI . NumberInterval ) , BI . PageTableCell = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . PageTableCell . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-page-table-cell" , text : "" , title : "" } ) } , _init : function ( ) { BI . PageTableCell . superclass . _init . apply ( this , arguments ) ; BI . createWidget ( { type : "bi.label" , element : this , textAlign : "left" , whiteSpace : "nowrap" , height : this . options . height , text : this . options . text , title : this . options . title , value : this . options . value , lgap : 5 , rgap : 5 } ) ; BI . isNotNull ( this . options . styles ) && BI . isObject ( this . options . styles ) && this . element . css ( this . options . styles ) } } ) , BI . shortcut ( "bi.page_table_cell" , BI . PageTableCell ) , BI . PageTable = BI . inherit ( BI . Widget , { _const : { scrollWidth : 18 , minScrollWidth : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . PageTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-page-table" , el : { type : "bi.sequence_table" } , pager : { horizontal : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } , vertical : { pages : ! 1 , curr : 1 , hasPrev : BI . emptyFn , hasNext : BI . emptyFn , firstPage : 1 , lastPage : BI . emptyFn } } , itemsCreator : BI . emptyFn , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 1 , mergeCols : [ ] , mergeRule : BI . emptyFn , columnSize : [ ] , minColumnSize : [ ] , maxColumnSize : [ ] , headerRowSize : 25 , rowSize : 25 , regionColumnSize : [ ] , headerCellStyleGetter : BI . emptyFn , summaryCellStyleGetter : BI . emptyFn , sequenceCellStyleGetter : BI . emptyFn , header : [ ] , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _init : function ( ) { BI . PageTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . hCurr = 1 , this . vCurr = 1 , this . table = BI . createWidget ( b . el , { type : "bi.sequence_table" , width : b . width , height : b . height && b . height - 30 , isNeedResize : ! 0 , isResizeAdapt : ! 1 , isNeedFreeze : b . isNeedFreeze , freezeCols : b . freezeCols , isNeedMerge : b . isNeedMerge , mergeCols : b . mergeCols , mergeRule : b . mergeRule , columnSize : b . columnSize , minColumnSize : b . minColumnSize , maxColumnSize : b . maxColumnSize , headerRowSize : b . headerRowSize , rowSize : b . rowSize , regionColumnSize : b . regionColumnSize , headerCellStyleGetter : b . headerCellStyleGetter , summaryCellStyleGetter : b . summaryCellStyleGetter , sequenceCellStyleGetter : b . sequenceCellStyleGetter , header : b . header , items : b . items , crossHeader : b . crossHeader , crossItems : b . crossItems } ) , 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 ( ) { b . regionColumnSize = this . getRegionColumnSize ( ) , b . columnSize = this . getColumnSize ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _REGION _RESIZE , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , function ( ) { b . regionColumnSize = this . getRegionColumnSize ( ) , b . columnSize = this . getColumnSize ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _COLUMN _RESIZE , arguments ) } ) , this . pager = BI . createWidget ( b . pager , { type : "bi.direction_pager" , height : 30 } ) , this . pager . on ( BI . Pager . EVENT _CHANGE , function ( ) { var c = this . getVPage && this . getVPage ( ) ; BI . isNull ( c ) && ( c = this . getCurrentPage ( ) ) ; var d = this . getHPage && this . getHPage ( ) ; b . itemsCreator ( { vpage : c , hpage : d } , function ( b , e , f , g ) { a . table . setVPage ? a . table . setVPage ( c ) : a . table . setValue ( c ) , a . table . setHPage && a . table . setHPage ( d ) , a . populate . apply ( a , arguments ) } ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . table , left : 0 , top : 0 } , { el : this . pager , left : 0 , right : 0 , bottom : 0 } ] }
BI . RelationViewRegionContainer . EVENT _PREVIEW = "RelationViewRegion.EVENT_PREVIEW" , BI . shortcut ( "bi.relation_view_region_container" , BI . RelationViewRegionContainer ) , BI . RelationViewRegion = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . RelationViewRegion . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-relation-view-region cursor-pointer" , width : 150 , text : "" , value : "" , header : "" , items : [ ] , belongPackage : ! 0 } ) } , _init : function ( ) { BI . RelationViewRegion . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . preview = BI . createWidget ( { type : "bi.icon_button" , cls : "relation-table-preview-font" , width : 25 , height : 25 , stopPropagation : ! 0 } ) , this . preview . on ( BI . IconButton . EVENT _CHANGE , function ( ) { a . fireEvent ( BI . RelationViewRegion . EVENT _PREVIEW , this . isSelected ( ) ) } ) , this . title = BI . createWidget ( { type : "bi.label" , height : 25 , width : 70 , text : b . text , value : b . value , textAlign : "left" } ) , BI . isKey ( b . header ) && this . title . setTitle ( b . header , { container : "body" } ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , items : this . _createItems ( b . items ) , layouts : [ { type : "bi.vertical" } ] } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ { type : "bi.vertical" , cls : "relation-view-region-container bi-card bi-border " + ( b . belongPackage ? "" : "other-package" ) , items : [ { type : "bi.vertical_adapt" , cls : "relation-view-region-title bi-border-bottom" , items : [ this . preview , this . title ] } , this . button _group ] } ] , hgap : 25 , vgap : 20 } ) } , _createItems : function ( a ) { var b = this ; return BI . map ( a , function ( a , c ) { return BI . extend ( c , { type : "bi.relation_view_item" , hoverIn : function ( ) { b . setValue ( c . value ) , b . fireEvent ( BI . RelationViewRegion . EVENT _HOVER _IN , c . value ) } , hoverOut : function ( ) { b . setValue ( [ ] ) , b . fireEvent ( BI . RelationViewRegion . EVENT _HOVER _OUT , c . value ) } } ) } ) } , doRedMark : function ( ) { this . title . doRedMark . apply ( this . title , arguments ) } , unRedMark : function ( ) { this . title . unRedMark . apply ( this . title , arguments ) } , getWidth : function ( ) { return this . options . width } , getHeight : function ( ) { return 25 * this . button _group . getAllButtons ( ) . length + 25 + 40 + 3 } , getTopLeftPosition : function ( ) { return { x : 35 , y : 20 } } , getTopRightPosition : function ( ) { return { x : this . getWidth ( ) - 25 - 10 , y : 20 } } , getBottomPosition : function ( ) { return { x : 35 , y : this . getHeight ( ) - 20 } } , getLeftPosition : function ( ) { return { x : 25 , y : 30 } } , getRightPosition : function ( ) { return { x : this . getWidth ( ) - 25 , y : 30 } } , setValue : function ( a ) { this . button _group . setValue ( a ) } , setPreviewSelected : function ( a ) { this . preview . setSelected ( a ) } } ) , BI . RelationViewRegion . EVENT _HOVER _IN = "RelationViewRegion.EVENT_HOVER_IN" , BI . RelationViewRegion . EVENT _HOVER _OUT = "RelationViewRegion.EVENT_HOVER_OUT" , BI . RelationViewRegion . EVENT _PREVIEW = "RelationViewRegion.EVENT_PREVIEW" , BI . shortcut ( "bi.relation_view_region" , BI . RelationViewRegion ) , BI . ResponisveTable = BI . inherit ( BI . Widget , { _const : { perColumnSize : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . ResponisveTable . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-responsive-table" , isNeedFreeze : ! 1 , freezeCols : [ ] , isNeedMerge : ! 1 , mergeCols : [ ] , mergeRule : function ( a , b ) { return BI . isEqual ( a , b ) } , columnSize : [ ] , headerRowSize : 25 , footerRowSize : 25 , rowSize : 25 , regionColumnSize : ! 1 , header : [ ] , footer : ! 1 , items : [ ] , crossHeader : [ ] , crossItems : [ ] } ) } , _init : function ( ) { BI . ResponisveTable . superclass . _init . apply ( this , arguments ) ; var a = this , b = this . options ; this . table = BI . createWidget ( { type : "bi.table_view" , element : this , isNeedFreeze : b . isNeedFreeze , freezeCols : b . freezeCols , isNeedMerge : b . isNeedMerge , mergeCols : b . mergeCols , mergeRule : b . mergeRule , columnSize : b . columnSize , headerRowSize : b . headerRowSize , footerRowSize : b . footerRowSize , rowSize : b . rowSize , regionColumnSize : b . regionColumnSize , header : b . header , footer : b . footer , items : b . items , crossHeader : b . crossHeader , crossItems : b . crossItems } ) , this . table . on ( BI . Table . EVENT _TABLE _AFTER _INIT , function ( ) { a . _initRegionSize ( ) , a . table . resize ( ) , a . _resizeHeader ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _AFTER _INIT , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _RESIZE , function ( ) { a . _resizeRegion ( ) , a . _resizeHeader ( ) , a . fireEvent ( BI . Table . EVENT _TABLE _RESIZE , arguments ) } ) , this . table . on ( BI . Table . EVENT _TABLE _SCROLL , function ( ) { a . fireEvent ( BI . Table . EVENT _TABLE _SCROLL , arguments ) } ) , this . table . on ( BI
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 ) { return BI . isNumeric ( a ) && ! ( BI . isNull ( a ) || a < this . min || a > this . max ) } , _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 . parseInt ( 10 * a ) ; return ( this . max - this . min ) * b / 1e3 + this . min } , _getPercentByValue : function ( a ) { return 100 * ( a - this . min ) / ( this . max - this . min ) } , getValue : function ( ) { return this . value } , setValue : function ( a ) { var b = this . options ; a = BI . parseFloat ( a ) , a = b . digit === ! 1 ? a : a . toFixed ( b . digit ) , isNaN ( a ) || ( this . _checkValidation ( a ) && ( this . value = a ) , a > this . max && ( this . value = this . max ) , a < this . min && ( this . value = this . min ) ) } , setMinAndMax : function ( a ) { var b = BI . parseFloat ( a . min ) , c = BI . parseFloat ( a . max ) ; ! isNaN ( b ) && ! isNaN ( c ) && c > b && ( this . min = b , this . max = c ) } , reset : function ( ) { this . _setVisible ( ! 1 ) , this . enable = ! 1 , this . value = "" , this . min = 0 , this . max = 0 , this . _setBlueTrack ( 0 ) } , populate : function ( ) { isNaN ( this . min ) || isNaN ( this . max ) || ( this . _setVisible ( ! 0 ) , this . enable = ! 0 , this . label . setErrorText ( BI . i18nText ( "BI-Please_Enter" ) + this . min + "-" + this . max + BI . i18nText ( "BI-Basic_De" ) + BI . i18nText ( "BI-Basic_Number" ) ) , BI . isNumeric ( this . value ) || BI . isNotEmptyString ( this . value ) ? ( this . label . setValue ( this . value ) , this . _setAllPosition ( this . _getPercentByValue ( this . value ) ) ) : ( this . label . setValue ( this . max ) , this . _setAllPosition ( 100 ) ) ) } } ) , BI . SingleSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_slider" , BI . SingleSlider ) , BI . SingleSliderLabel = BI . inherit ( BI . Widget , { _constant : { EDITOR _WIDTH : 90 , EDITOR _HEIGHT : 20 , HEIGHT : 20 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSliderLabel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-slider-label bi-slider-track" , digit : ! 1 , unit : "" } ) } , _init : function ( ) { BI . SingleSliderLabel . 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 . setText ( i + b . unit ) , a . value = i , a . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.label" , height : c . HEIGHT , width : c . EDITOR _WIDTH - 2 } ) , 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 : 13 , left : 0 , width : "100%" } , { el : d , top : 10 , 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 , d . width ) } var c = this , d = this . opti
} , _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 . _reqAdjustTreeNode ( a , b ) ; break ; case BI . TreeView . REQ _TYPE _SELECT _DATA : d . _reqSelectedTreeNode ( a , b ) ; break ; case BI . TreeView . REQ _TYPE _GET _SELECTED _DATA : d . _reqDisplayTreeNode ( a , b ) ; break ; default : d . _reqTreeNode ( a , b ) } } var d = this , e = this . options ; this . items ? c ( ) : e . itemsCreator ( { } , function ( a ) { d . _initData ( a ) , c ( ) } ) } , _reqDisplayTreeNode : function ( a , b ) { function c ( a , b , g ) { return null == g || BI . isEmpty ( g ) ? void BI . each ( b . getChildren ( ) , function ( d , g ) { var h = BI . clone ( a ) ; h . push ( g . value ) ; var i = f . _getChildCount ( h ) ; e ( g , b . id , i ) , c ( h , g , { } ) } ) : void BI . each ( g , function ( b ) { var h = f . _getTreeNode ( a , b ) , i = BI . clone ( a ) ; i . push ( h . value ) , e ( h , h . parent && h . parent . id , d ( g [ b ] , i ) ) , c ( i , h , g [ b ] ) } ) } function d ( a , b ) { return null == a ? 0 : BI . isEmpty ( a ) ? f . _getChildCount ( b ) : BI . size ( a ) } function e ( a , b , c ) { g . push ( { id : a . id , pId : b , text : a . text + ( c > 0 ? "(" + BI . i18nText ( "BI-Basic_Altogether" ) + c + BI . i18nText ( "BI-Basic_Count" ) + ")" : "" ) , value : a . value , open : ! 0 } ) } var f = this , g = [ ] , h = a . selectedValues ; return null == h || BI . isEmpty ( h ) ? void b ( { } ) : ( c ( [ ] , this . tree . getRoot ( ) , h ) , void b ( { items : g } ) ) } , _reqSelectedTreeNode : function ( a , b ) { function c ( a ) { var b = m . concat ( k ) ; if ( g ( a , b ) ) if ( f ( b ) ) i . _deleteNode ( a , b ) ; else { var c = [ ] , j = e ( m , k , [ ] , c ) ; j && BI . isNotEmptyArray ( c ) && BI . each ( c , function ( b , c ) { var e = i . _getNode ( a , c ) ; e ? i . _deleteNode ( a , c ) : d ( a , c , BI . last ( c ) ) } ) } if ( h ( a , b ) ) { var l = [ ] , j = ! 1 ; f ( b ) ? j = ! 0 : ( j = e ( m , k , l ) , b = m ) , j === ! 0 && ( d ( a , b , k ) , l . length > 0 && BI . each ( l , function ( b , c ) { i . _buildTree ( a , c ) } ) ) } } function d ( a , b , c ) { var d = a , e = [ ] , f = [ ] ; BI . some ( b , function ( g , h ) { var j = d [ h ] ; if ( null == j ) { if ( 0 === g ) return ! 0 ; if ( ! BI . isEmpty ( d ) ) return ! 0 ; var k = b . slice ( 0 , g ) , l = i . _getChildren ( k ) ; if ( f . push ( k ) , e . push ( l . length ) , g === b . length - 1 && 1 === l . length && l [ 0 ] === c ) for ( var m = e . length - 1 ; m >= 0 && 1 === e [ m ] ; m -- ) i . _deleteNode ( a , f [ m ] ) ; else BI . each ( l , function ( a , e ) { return g === b . length - 1 && e . value === c || void ( d [ e . value ] = { } ) } ) ; d = d [ h ] } else d = j } ) } function e ( a , b , c , d ) { var f = BI . clone ( a ) ; if ( f . push ( b ) , i . _isMatch ( a , b , l ) ) return d && d . push ( f ) , ! 0 ; var g = i . _getChildren ( f ) , h = [ ] , j = ! 1 ; return BI . each ( g , function ( a , b ) { e ( f , b . value , c , d ) ? j = ! 0 : h . push ( b . value ) } ) , j === ! 0 && BI . each ( h , function ( a , b ) { var d = BI . clone ( f ) ; d . push ( b ) , c . push ( d ) } ) , j } function f ( a ) { for ( var b = 0 , c = a . length ; b < c ; b ++ ) if ( i . _isMatch ( a . slice ( 0 , a . length - 1 ) , a [ b ] , l ) ) return ! 0 ; return ! 1 } function g ( a , b ) { for ( var c = a , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( c = c [ e ] , null == c ) return ! 1 } return ! 0 } function h ( a , b ) { for ( var c = a , d = 0 ; d < b . length ; d ++ ) { var e = b [ d ] ; if ( ! BI . has ( c , e ) ) return ! 1 ; if ( c = c [ e ] , BI . isEmpty ( c ) ) return ! 0 } return ! 1 } var i = this , j = BI . deepClone ( a . selectedValues ) , k = a . notSelectedValue || { } , l = a . keyword || "" , m = a . parentValues || [ ] ; return null == j || BI . isEmpty ( j ) ? void b ( { } ) : ( c ( j ) , void b ( j ) ) } , _reqAdjustTreeNode : function ( a , b ) { function c ( a , b ) { if ( null == a || BI . isEmpty ( a ) ) return ! 0 ; var e = ! 0 ; return BI . each ( a , function ( d , g ) { var h = BI . clone ( b ) ; h . push ( d ) , c ( a [ d ] , h ) || ( BI . each ( a [ d ] , function ( a , b ) { var c = BI . clone ( h ) ; c . push ( a ) , f . push ( c ) } ) , e = ! 1 ) } ) , e && d ( a , b ) } function d ( a , b ) { return BI . isEmpty ( a ) || e . _getChildCount ( b ) === BI . size ( a ) } var e = this , f = [ ] , g = a . selectedValues ; if ( null == g || BI . isEmpty ( g ) ) return void b ( { } ) ; BI . each ( g , function ( a , b ) { f . push ( [ a ] ) } ) , c ( g , [ ] ) ; var h = { } ; BI . each ( f , function ( a , b ) { e . _buildTree ( h , b ) } ) , b ( h ) } , _reqInitTreeNode : function ( a , b ) { function c ( ) { var a = j . _getChildren ( [ ] ) , b = a . length ; if ( "" !== n ) { for ( var c = 0 , e = b ; c < e ; c ++ ) if ( a [ c ] . value === n ) { b = c + 1 ; break } } else b = 0 ; for ( var f = [ ] , g = b , e = a . length ; g < e ; g ++ ) { if ( f . length < j . _const . perPage ) var h = d ( 1 , [ ] , a [ g ] . value , ! 1 , k ) ; else if ( f . length === j . _const . perPage ) var h = d ( 1 , [ ] , a [ g ] . value , ! 1 , [ ] ) ; if ( h [ 0 ] === ! 0 && f . push ( a [ g ] . value ) , f . length > j . _const . perPage ) break } return f } function d ( a , b , c , i , k ) { if ( j . _isMatch ( b , c , l ) ) { var m = i || h ( b , c ) ; return e ( b , c , ! 1 , m , ! i && f ( b , c ) , ! 0 , k ) , [ ! 0 , m ] } var n = BI . clone ( b ) ; n . push ( c ) ; var o = j . _getChildren ( n ) , p = ! 1 , m = ! 1 , q = i || g ( b , c ) ; return BI . each ( o , function ( b , c ) { var e = d ( a + 1 , n ,