From 5dd5f5867c2276f14ed1a0aa6c2f99c4aa5f3afc Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 18 Jul 2019 23:30:50 +0800 Subject: [PATCH] bugfix --- dist/2.0/fineui.css | 5 +++++ dist/2.0/fineui.ie.js | 13 +++++++++---- dist/2.0/fineui.ie.min.js | 8 ++++---- dist/2.0/fineui.js | 13 +++++++++---- dist/2.0/fineui.min.js | 8 ++++---- dist/bundle.css | 5 +++++ dist/bundle.ie.js | 13 +++++++++---- dist/bundle.ie.min.js | 8 ++++---- dist/bundle.js | 13 +++++++++---- dist/bundle.min.js | 8 ++++---- dist/core.js | 11 ++++++++--- dist/fineui.css | 5 +++++ dist/fineui.ie.js | 13 +++++++++---- dist/fineui.ie.min.js | 6 +++--- dist/fineui.js | 13 +++++++++---- dist/fineui.min.js | 8 ++++---- dist/fineui_without_jquery_polyfill.js | 13 +++++++++---- dist/utils.min.js | 2 +- dist/widget.css | 5 +++++ dist/widget.js | 2 +- src/core/widget.js | 11 ++++++++--- 21 files changed, 124 insertions(+), 59 deletions(-) diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index af537597c..a5abef2e2 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -4420,6 +4420,11 @@ ul.ztree.zTreeDragUL { .bi-number-editor .pull-up-font { font-size: 12px; } +.bi-number-interval.hack { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-number-interval .number-interval-small-editor { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 6b4e44820..b2816efe6 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77205,7 +77210,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/2.0/fineui.ie.min.js b/dist/2.0/fineui.ie.min.js index f05709291..e0dc8ab0b 100644 --- a/dist/2.0/fineui.ie.min.js +++ b/dist/2.0/fineui.ie.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ -var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPY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FKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ +var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNT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PLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),BI.defer(c)):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,container:b.container,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()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={type:BI.Selection.Multi,value:b.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue({type:BI.Selection.Multi,value:a.getValue()}),d.apply(a,arguments)})},value:{type:BI.Selection.Multi,value:b.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&a._addItem(c)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(a._addItem(c),a.trigger.stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_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()})}},value:{type:BI.Selection.Multi,value:b.value},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.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING", BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE", BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={},this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0, -right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){ +right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){ return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane), BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE", BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){a.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=b.match(/\d+/g);a.storeValue={hour:0|c[0],minute:0|c[1],second:0|c[2]}}a.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){a.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:b.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(a){var b=this._const;return BI.any(b.FORMAT_ARRAY,function(c,d){return BI.print(BI.parseDateTime(b.DEFAULT_DATE_STRING+" "+a,b.COMPLETE_COMPARE_FORMAT),d)===a})},_getTitle:function(){var a=this.storeValue||{},b=BI.getDate();return BI.print(BI.getDate(b.getFullYear(),0,1,a.hour,a.minute,a.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(a){var b=BI.getDate();return BI.isNotEmptyObject(a)?BI.print(BI.getDate(b.getFullYear(),b.getMonth(),b.getDay(),a.hour,a.minute,a.second),this._getFormatString()):BI.i18nText("BI-Basic_Unrestricted")},getKey:function(){return this.editor.getValue()},setValue:function(a){this.storeValue=a,this.editor.setValue(this._formatValue(a))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)}(),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),d.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{ diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 5c5d3fcb8..3f3f80c90 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77609,7 +77614,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/2.0/fineui.min.js b/dist/2.0/fineui.min.js index dd1b95d8a..a47b5cb28 100644 --- a/dist/2.0/fineui.min.js +++ b/dist/2.0/fineui.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ -var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJ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QMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ +var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\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=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCR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LCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),BI.defer(c)):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,container:b.container,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()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={type:BI.Selection.Multi,value:b.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue({type:BI.Selection.Multi,value:a.getValue()}),d.apply(a,arguments)})},value:{type:BI.Selection.Multi,value:b.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&a._addItem(c)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(a._addItem(c),a.trigger.stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_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()})}},value:{type:BI.Selection.Multi,value:b.value},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.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments); },resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={}, -this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)), +this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)), a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue); h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE); }),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){ diff --git a/dist/bundle.css b/dist/bundle.css index af537597c..a5abef2e2 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -4420,6 +4420,11 @@ ul.ztree.zTreeDragUL { .bi-number-editor .pull-up-font { font-size: 12px; } +.bi-number-interval.hack { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-number-interval .number-interval-small-editor { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index 6b4e44820..b2816efe6 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77205,7 +77210,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/bundle.ie.min.js b/dist/bundle.ie.min.js index f05709291..e0dc8ab0b 100644 --- a/dist/bundle.ie.min.js +++ b/dist/bundle.ie.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ -var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJ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HCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ +var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(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=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZP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ZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),BI.defer(c)):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,container:b.container,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()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={type:BI.Selection.Multi,value:b.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue({type:BI.Selection.Multi,value:a.getValue()}),d.apply(a,arguments)})},value:{type:BI.Selection.Multi,value:b.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&a._addItem(c)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(a._addItem(c),a.trigger.stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_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()})}},value:{type:BI.Selection.Multi,value:b.value},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.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING", BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE", BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={},this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0, -right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){ +right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){ return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane), BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE", BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){a.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=b.match(/\d+/g);a.storeValue={hour:0|c[0],minute:0|c[1],second:0|c[2]}}a.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){a.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:b.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(a){var b=this._const;return BI.any(b.FORMAT_ARRAY,function(c,d){return BI.print(BI.parseDateTime(b.DEFAULT_DATE_STRING+" "+a,b.COMPLETE_COMPARE_FORMAT),d)===a})},_getTitle:function(){var a=this.storeValue||{},b=BI.getDate();return BI.print(BI.getDate(b.getFullYear(),0,1,a.hour,a.minute,a.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(a){var b=BI.getDate();return BI.isNotEmptyObject(a)?BI.print(BI.getDate(b.getFullYear(),b.getMonth(),b.getDay(),a.hour,a.minute,a.second),this._getFormatString()):BI.i18nText("BI-Basic_Unrestricted")},getKey:function(){return this.editor.getValue()},setValue:function(a){this.storeValue=a,this.editor.setValue(this._formatValue(a))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)}(),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),d.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{ diff --git a/dist/bundle.js b/dist/bundle.js index 5c5d3fcb8..3f3f80c90 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77609,7 +77614,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/bundle.min.js b/dist/bundle.min.js index dd1b95d8a..a47b5cb28 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){ -var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHY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WWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ +var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTD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TYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY",b={ 19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize,hgap:b.hgap,vgap:b.vgap,items:b.items}},_init:function(){BI.TableLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalFillLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options,c=[];return BI.each(b.items,function(a,b){c.push(b.width||0)}),a=b.dynamic?"bi.horizontal_adapt":"bi.htape",{type:a,columnSize:c,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalFillLayoutLogic.superclass._init.apply(this,arguments)}}),BI.prepares.push(function(){var a,b=function(){return null==a&&(a=!(!BI.isSupportCss3||!BI.isSupportCss3("flex"))),a};BI.Plugin.registerWidget("bi.horizontal",function(a){var c=BI.isIE(),d=b(),e=c&&BI.getIEVersion()<8;return a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Middle&&a.horizontalAlign===BI.HorizontalAlign.Left?e?a:BI.extend(a,{type:"bi.table_adapt"}):a.verticalAlign===BI.VerticalAlign.Top&&a.horizontalAlign===BI.HorizontalAlign.Center?e?a:BI.extend(a,{type:"bi.table_adapt"}):c?a:d?BI.extend(a,{type:"bi.flex_horizontal"}):BI.extend(a,{type:"bi.table_adapt"})}),BI.Plugin.registerWidget("bi.center_adapt",function(a){var c=BI.isIE(),d=b(),e=a.items&&a.items.length<=1;return!c&&d&&e?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend(a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):e?BI.extend(a,{type:"bi.inline_center_adapt"}):a}),BI.Plugin.registerWidget("bi.vertical_adapt",function(a){var c=BI.isIE(),d=b();return!c&&d?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(a,{type:"bi.flex_vertical_center_adapt"}):BI.extend(a,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(a){return a.items&&a.items.length<=1?BI.extend(a,{type:"bi.horizontal_auto"}):a}),BI.Plugin.registerWidget("bi.float_center_adapt",function(a){return!BI.isIE()&&b()?a.scrollable===!0||a.scrollx===!0||a.scrolly===!0?BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(a,{type:"bi.flex_center_adapt"}):BI.extend(a,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(a){if(a.scrollable===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0)return BI.extend({},a,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(a){if(a.scrollable===!0||a.scrolly===!0||a.scrollx===!0)return BI.extend({},a,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_radio"}):a}),BI.Plugin.registerWidget("bi.checkbox",function(a){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(a,{type:"bi.image_checkbox"}):a}),BI.Plugin.registerWidget("bi.half_icon_button",function(a){return BI.isIE()&&BI.getIEVersion()<9?a:BI.extend(a,{type:"bi.half_button"})})}),!function(){var a=_global.document&&_global.document.attachEvent,b=!1;if(_global.document&&!a){var c=function(){var a=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(a){return _global.setTimeout(a,20)};return function(b){return a(b)}}(),d=function(){var a=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(b){return a(b)}}(),e=function(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight},f=function(a){return a.offsetWidth!==a.__resizeLast__.width||a.offsetHeight!==a.__resizeLast__.height},g=function(a){var b=this;e(this),this.__resizeRAF__&&d(this.__resizeRAF__),this.__resizeRAF__=c(function(){f(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(c){c.call(b,a)}))})},h=!1,i="animation",j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(h=!0),h===!1)for(var p=0;p div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',c=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.type="text/css",d.styleSheet?d.styleSheet.cssText=a:d.appendChild(document.createTextNode(a)),c.appendChild(d),b=!0}},u=function(b,c){a?(b.attachEvent("onresize",c),BI.defer(c)):(b.__resizeTriggers__||("static"===getComputedStyle(b).position&&(b.style.position="relative"),t(),b.__resizeLast__={},b.__resizeListeners__=[],(b.__resizeTriggers__=document.createElement("div")).className="resize-triggers",b.__resizeTriggers__.innerHTML='
',b.appendChild(b.__resizeTriggers__),e(b),b.addEventListener("scroll",g,!0),k&&b.__resizeTriggers__.addEventListener(k,function(a){a.animationName===q&&e(b)})),b.__resizeListeners__.push(c))},v=function(b,c){a?b.detachEvent("onresize",c):(b.__resizeListeners__.splice(b.__resizeListeners__.indexOf(c),1),b.__resizeListeners__.length||(b.removeEventListener("scroll",g),b.__resizeTriggers__=!b.removeChild(b.__resizeTriggers__)))};BI.ResizeDetector={addResizeListener:function(a,b){return u(a.element[0],b),function(){v(a.element[0],b)}},removeResizeListener:function(a,b){v(a.element[0],b)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(a){BI.Widget._renderEngine.createElement(document).ready(a)}}),BI.extend(BI.DOM,{patchProps:function(a,b){var c=jQuery._data(a[0]),d=c.events;BI.each(d,function(a,c){BI.each(c,function(c,d){b.on(a+(d.namespace?"."+d.namespace:""),d)})});var e=a.children(),f=b.children();if(e.length!==f.length)throw new Error("不匹配");BI.each(e,function(a,b){BI.DOM.patchProps(jQuery(b),jQuery(f[a]))}),BI.each(a.data("__widgets"),function(a,c){c.element=b})},hang:function(a){if(!BI.isEmpty(a)){var b=BI.Widget._renderEngine.createFragment();return BI.each(a,function(a,c){c instanceof BI.Widget&&(c=c.element),c instanceof $&&c[0]&&b.appendChild(c[0])}),b}},isExist:function(a){return BI.Widget._renderEngine.createElement("body").find(a.element).length>0},preloadImages:function(a,b){function c(){d++,d>=a.length&&b()}var d=0,e=[];BI.each(a,function(a,b){e[a]=new Image,e[a].src=b,e[a].onload=function(){c()},e[a].onerror=function(){c()}})},getTextSizeWidth:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.width();return c.remove(),d},getTextSizeHeight:function(a,b){var c=BI.Widget._renderEngine.createElement("").addClass("text-width-span").appendTo("body");null==b&&(b=12),b+="px",c.css("font-size",b).text(a);var d=c.height();return c.remove(),d},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var a=BI.Widget._renderEngine.createElement("
").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=a[0].offsetWidth-a[0].clientWidth,a.destroy()}return this._scrollWidth},getImage:function(a,b,c){var d=document.createElement("canvas"),e=2;BI.Widget._renderEngine.createElement("body").append(d);var f=BI.DOM.getTextSizeWidth(a,12)+4;d.width=f*e,d.height=16*e;var g=d.getContext("2d");g.font=12*e+"px Georgia",g.fillStyle=b||"#3685f2",g.textBaseline="middle",g.fillText(a,2*e,9*e),BI.Widget._renderEngine.createElement(d).destroy();var h=c||"rgba(54, 133, 242, 0.1)";return{width:f,height:16,src:d.toDataURL("image/png"),style:"background-color: "+h+";vertical-align: middle; margin: 0 1px; width:"+f+"px;height: 16px; max-width:"+f+"px;max-height: 16px; min-width:"+f+"px;min-height: 16px",param:a}}}),BI.extend(BI.DOM,{isColor:function(a){return a&&(this.isRGBColor(a)||this.isHexColor(a))},isRGBColor:function(a){return!!a&&"rgb"===a.substr(0,3)},isHexColor:function(a){return!!a&&("#"===a[0]&&7===a.length)},isDarkColor:function(a){if(!a||!this.isHexColor(a))return!1;var b=this.rgb2json(this.hex2rgb(a)),c=Math.round(.299*b.r+.587*b.g+.114*b.b);return c<192},getContrastColor:function(a){return a&&this.isColor(a)?this.isDarkColor(a)?"#ffffff":"#1a1a1a":""},rgb2hex:function(a){if(!a||"rgb"!=a.substr(0,3))return"";var b=a.match(/\d+(\.\d+)?/g),c=BI.parseInt(b[0]),d=BI.parseInt(b[1]),e=BI.parseInt(b[2]),f="#"+this.int2hex(c)+this.int2hex(d)+this.int2hex(e);return f},rgb2json:function(a){if(!a)return{};if(!this.isRGBColor(a))return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2])}},rgba2json:function(a){if(!a)return{};var b=a.match(/\d+(\.\d+)?/g);return{r:BI.parseInt(b[0]),g:BI.parseInt(b[1]),b:BI.parseInt(b[2]),a:BI.parseFloat(b[3])}},json2rgb:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgb("+a.r+","+a.g+","+a.b+")":""},json2rgba:function(a){return BI.isKey(a.r)&&BI.isKey(a.g)&&BI.isKey(a.b)?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":""},int2hex:function(a){var b=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return b[a>>>4]+""+b[15&a]},hex2rgb:function(a){if(!a)return"";if(!this.isHexColor(a))return a;var b,c="rgb(";return 7===a.length?b=[BI.parseInt("0x"+a.substring(1,3)),BI.parseInt("0x"+a.substring(3,5)),BI.parseInt("0x"+a.substring(5,7))]:4===a.length&&(b=[BI.parseInt("0x"+a.substring(1,2)),BI.parseInt("0x"+a.substring(2,3)),BI.parseInt("0x"+a.substring(3,4))]),c+=b[0]+",",c+=b[1]+",",c+=b[2]+")"},rgba2rgb:function(a,b){if(BI.isNull(b)&&(b=1),"rgba"!=a.substr(0,4))return"";var c=a.match(/\d+(\.\d+)?/g);if(c.length<4)return"";var d=BI.parseFloat(c[0]),e=BI.parseFloat(c[1]),f=BI.parseFloat(c[2]),g=BI.parseFloat(c[3]);return"rgb("+Math.floor(255*(b*(1-g))+d*g)+","+Math.floor(255*(b*(1-g))+e*g)+","+Math.floor(255*(b*(1-g))+f*g)+")"}}),BI.extend(BI.DOM,{getLeftPosition:function(a,b,c){return{left:a.element.offset().left-b.element.outerWidth()-(c||0)}},getInnerLeftPosition:function(a,b,c){return{left:a.element.offset().left+(c||0)}},getRightPosition:function(a,b,c){var d=a.element;return{left:d.offset().left+d.outerWidth()+(c||0)}},getInnerRightPosition:function(a,b,c){var d=a.element,e=b.element.bounds();return{left:d.offset().left+d.outerWidth()-e.width-(c||0)}},getTopPosition:function(a,b,c){return{top:a.element.offset().top-b.element.outerHeight()-(c||0)}},getBottomPosition:function(a,b,c){var d=a.element;return{top:d.offset().top+d.outerHeight()+(c||0)}},isLeftSpaceEnough:function(a,b,c){return BI.DOM.getLeftPosition(a,b,c).left>=0},isInnerLeftSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getInnerLeftPosition(a,b,c).left+d.width<=e.width},isRightSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getRightPosition(a,b,c).left+d.width<=e.width},isInnerRightSpaceEnough:function(a,b,c){return BI.DOM.getInnerRightPosition(a,b,c).left>=0},isTopSpaceEnough:function(a,b,c){return BI.DOM.getTopPosition(a,b,c).top>=0},isBottomSpaceEnough:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.getBottomPosition(a,b,c).top+d.height<=e.height},isRightSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.width-a.element.offset().left-a.element.bounds().width>=a.element.offset().left},isBottomSpaceLarger:function(a){var b=BI.Widget._renderEngine.createElement("body").bounds();return b.height-a.element.offset().top-a.element.bounds().height>=a.element.offset().top},getLeftAlignPosition:function(a,b,c){var d=b.element.bounds(),e=BI.Widget._renderEngine.createElement("body").bounds(),f=a.element.offset().left+c;return f+d.width>e.width&&(f=e.width-d.width),f<0&&(f=0),{left:f}},getLeftAdaptPosition:function(a,b,c){return BI.DOM.isLeftSpaceEnough(a,b,c)?BI.DOM.getLeftPosition(a,b,c):{left:0}},getRightAlignPosition:function(a,b,c){var d=a.element.bounds(),e=b.element.bounds(),f=a.element.offset().left+d.width-e.width-c;return f<0&&(f=0),{left:f}},getRightAdaptPosition:function(a,b,c){return BI.DOM.isRightSpaceEnough(a,b,c)?BI.DOM.getRightPosition(a,b,c):{left:BI.Widget._renderEngine.createElement("body").bounds().width-b.element.bounds().width}},getTopAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,-1*h.height+c)?e=g.top+c:d?(e=g.top+c,f=j.height-e):(e=j.height-i.height,ef.height?{top:0,adaptHeight:f.height-c}:{top:0}},getBottomAlignPosition:function(a,b,c,d){var e,f,g=a.element.offset(),h=a.element.bounds(),i=b.element.bounds(),j=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isTopSpaceEnough(a,b,-1*h.height+c)?e=g.top+h.height-i.height-c:d?(e=0,f=g.top+h.height-c):(e=0,i.height+c>j.height&&(f=j.height-c)),e<0&&(e=0),f?{top:e,adaptHeight:f}:{top:e}},getBottomAdaptPosition:function(a,b,c,d){var e=a.element.offset(),f=a.element.bounds(),g=b.element.bounds(),h=BI.Widget._renderEngine.createElement("body").bounds();return BI.DOM.isBottomSpaceEnough(a,b,c)?BI.DOM.getBottomPosition(a,b,c):d?{top:e.top+f.height+c,adaptHeight:h.height-e.top-f.height-c}:g.height+c>h.height?{top:c,adaptHeight:h.height-c}:{top:h.height-g.height-c}},getCenterAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.left+e.width/2+f.width/2>g.width?g.width-f.width:d.left+e.width/2-f.width/2,c<0&&(c=0),{left:c}},getMiddleAdaptPosition:function(a,b){var c,d=a.element.offset(),e=a.element.bounds(),f=b.element.bounds(),g=BI.Widget._renderEngine.createElement("body").bounds();return c=d.top+e.height/2+f.height/2>g.height?g.height-f.height:d.top+e.height/2-f.height/2,c<0&&(c=0),{top:c}},getComboPositionByDirections:function(a,b,c,d,e,f){c||(c=0),d||(d=0);var g,h,i,j,k,l=[],m=[],n=[],o=!1,p=!1,q=!1,r=f[0];for(g=0;g0&&a._joinKeywords(b,function(){BI.isEndWithBlank(d)?(a.combo.setValue(a.storeValue),c(),a.combo.populate(),a._setStartValue("")):(a.combo.setValue(a.storeValue),c())}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE,function(b,d){d instanceof BI.MultiSelectBar?a._joinAll(this.getValue(),function(){c()}):a._join(this.getValue(),function(){c()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,el:this.trigger,adjustLength:1,container:b.container,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()}),a.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM)}},{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()})}},value:b.value,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.MultiSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={type:BI.Selection.Multi,value:b.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue({type:BI.Selection.Multi,value:a.getValue()}),d.apply(a,arguments)})},value:{type:BI.Selection.Multi,value:b.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&a._addItem(c)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(a._addItem(c),a.trigger.stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_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()})}},value:{type:BI.Selection.Multi,value:b.value},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.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments); },resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={}, -this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)), +this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)), a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue); h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE); }),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){ diff --git a/dist/core.js b/dist/core.js index d4c8f4954..2ba08ccfd 100644 --- a/dist/core.js +++ b/dist/core.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } diff --git a/dist/fineui.css b/dist/fineui.css index 46fc22d29..4888b6cb5 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -4420,6 +4420,11 @@ ul.ztree.zTreeDragUL { .bi-number-editor .pull-up-font { font-size: 12px; } +.bi-number-interval.hack { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-number-interval .number-interval-small-editor { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 2b832e6c6..6a062811e 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -11902,12 +11902,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11996,6 +11998,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -12075,7 +12080,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77450,7 +77455,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/fineui.ie.min.js b/dist/fineui.ie.min.js index db75bf41b..71ca4ead5 100644 --- a/dist/fineui.ie.min.js +++ b/dist/fineui.ie.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if(0===e)return-1;for(b=e-1,arguments.length>1&&(b=Number(arguments[1]),b!=b?b=0:0!=b&&b!=1/0&&b!=-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b)))),c=b>=0?Math.min(b,e-1):e-Math.abs(b);c>=0;c--)if(c in d&&d[c]===a)return c;return-1}),_global.console=_global.console||function(){var a={};return a.log=a.warn=a.debug=a.info=a.error=a.time=a.dir=a.profile=a.clear=a.exception=a.trace=a.assert=function(){},a}(),_global.localStorage||(_global.localStorage={items:{},setItem:function(a,b){BI.Cache.addCookie(a,b)},getItem:function(a){return BI.Cache.getCookie(a)},removeItem:function(a){BI.Cache.deleteCookie(a)},key:function(){},clear:function(){this.items={}}}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw new TypeError("Object.keys called on a non-object");var b,c,d={__ob__:b,$accessors:b,$vbthis:b,$vbsetter:b},e=[];for(c in a)c in d||Object.prototype.hasOwnProperty.call(a,c)&&e.push(c);return e}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(a){return a.__proto__}:function(a){return a.constructor.prototype}),Date.now||(Date.now=function(){return(new Date).valueOf()}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(a){return void 0!==this.set[a]},Set.prototype.add=function(a){this.set[a]=1},Set.prototype.clear=function(){this.set={}}),!function(a){var b=a.navigator.userAgent.toLowerCase(),c=/msie/;if(c.test(b)){var d=Array.prototype.sort;Array.prototype.sort=function(a){if(a&&"function"==typeof a){if(this.length<2)return this;for(var b,c=0,e=c+1,f=this.length,g=!1,h=0;c0,g===!0&&(b=this[c],this[c]=this[e],this[e]=b);return this}return d.call(this)}}}(window);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0: return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime(); -}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(); +}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(); if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJS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",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize, @@ -33,7 +33,7 @@ return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none", });var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR, action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c, lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={},this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error", -border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){ +border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){ this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){}, _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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){a.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=b.match(/\d+/g);a.storeValue={hour:0|c[0],minute:0|c[1],second:0|c[2]}}a.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){a.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:b.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(a){var b=this._const;return BI.any(b.FORMAT_ARRAY,function(c,d){return BI.print(BI.parseDateTime(b.DEFAULT_DATE_STRING+" "+a,b.COMPLETE_COMPARE_FORMAT),d)===a})},_getTitle:function(){var a=this.storeValue||{},b=BI.getDate();return BI.print(BI.getDate(b.getFullYear(),0,1,a.hour,a.minute,a.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(a){var b=BI.getDate();return BI.isNotEmptyObject(a)?BI.print(BI.getDate(b.getFullYear(),b.getMonth(),b.getDay(),a.hour,a.minute,a.second),this._getFormatString()):BI.i18nText("BI-Basic_Unrestricted")},getKey:function(){return this.editor.getValue()},setValue:function(a){this.storeValue=a,this.editor.setValue(this._formatValue(a))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)}(),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),d.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),d.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),d},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){var b=this.options;return!BI.checkDateVoid(a.year,a.month,a.day,b.minDate,b.maxDate)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d"),b=BI.print(BI.parseDateTime(b,"%Y-%X-%d"),"%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_time_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),d.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),d.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),d},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){var b=this.options;return!BI.checkDateVoid(a.year,a.month,a.day,b.minDate,b.maxDate)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),b=BI.print(BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),!function(){BI.TimePeriods=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0},props:{extraCls:"bi-time-interval",value:{}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",height:this.constants.height,items:[{el:{type:"bi.horizontal_auto",items:[{type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-",ref:function(b){a.label=b}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:BI.extend({ref:function(b){a.left=b}},this._createCombo(b.value.start)),left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:BI.extend({ref:function(b){a.right=b}},this._createCombo(b.value.end)),left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]},top:0,left:0,right:0,bottom:0}]}},_createCombo:function(a){var b=this;return{type:"bi.time_combo",value:a,listeners:[{eventName:BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){b.left.hidePopupView(),b.right.hidePopupView()}},{eventName:BI.TimeCombo.EVENT_CHANGE,action:function(){b.fireEvent(BI.TimePeriods.EVENT_CHANGE)}},{eventName:BI.TimeCombo.EVENT_CONFIRM,action:function(){b.fireEvent(BI.TimePeriods.EVENT_CONFIRM)}}]}},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimePeriods.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimePeriods.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_periods",BI.TimePeriods)}(),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="", diff --git a/dist/fineui.js b/dist/fineui.js index 89b6cae84..42b4782b8 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -11902,12 +11902,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11996,6 +11998,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -12075,7 +12080,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -77854,7 +77859,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/fineui.min.js b/dist/fineui.min.js index 70f329f19..03d266256 100644 --- a/dist/fineui.min.js +++ b/dist/fineui.min.js @@ -1,7 +1,7 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if(0===e)return-1;for(b=e-1,arguments.length>1&&(b=Number(arguments[1]),b!=b?b=0:0!=b&&b!=1/0&&b!=-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b)))),c=b>=0?Math.min(b,e-1):e-Math.abs(b);c>=0;c--)if(c in d&&d[c]===a)return c;return-1}),_global.console=_global.console||function(){var a={};return a.log=a.warn=a.debug=a.info=a.error=a.time=a.dir=a.profile=a.clear=a.exception=a.trace=a.assert=function(){},a}(),_global.localStorage||(_global.localStorage={items:{},setItem:function(a,b){BI.Cache.addCookie(a,b)},getItem:function(a){return BI.Cache.getCookie(a)},removeItem:function(a){BI.Cache.deleteCookie(a)},key:function(){},clear:function(){this.items={}}}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw new TypeError("Object.keys called on a non-object");var b,c,d={__ob__:b,$accessors:b,$vbthis:b,$vbsetter:b},e=[];for(c in a)c in d||Object.prototype.hasOwnProperty.call(a,c)&&e.push(c);return e}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(a){return a.__proto__}:function(a){return a.constructor.prototype}),Date.now||(Date.now=function(){return(new Date).valueOf()}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(a){return void 0!==this.set[a]},Set.prototype.add=function(a){this.set[a]=1},Set.prototype.clear=function(){this.set={}}),!function(a){var b=a.navigator.userAgent.toLowerCase(),c=/msie/;if(c.test(b)){var d=Array.prototype.sort;Array.prototype.sort=function(a){if(a&&"function"==typeof a){if(this.length<2)return this;for(var b,c=0,e=c+1,f=this.length,g=!1,h=0;c0,g===!0&&(b=this[c],this[c]=this[e],this[e]=b);return this}return d.call(this)}}}(window);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0: return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta)}function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime(); -}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(); +}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0;)BI.prepares.shift()();var e,f;if(a||(a={}),BI.isWidget(c)?(d=c,c={}):c||(c={}),BI.isEmpty(a)&&BI.isEmpty(c))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(a))return a;if(a.type||c.type)return e=BI.extend({},c,a),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(a.el&&(a.el.type||c.type))return e=BI.extend({},c,a.el),f=BI.Plugin.getWidget(e.type,e),f.listeners=(f.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(e.type,this)}}]),f.type===e.type?b(f):BI.createWidget(BI.extend({},a,{type:f.type},c));if(BI.isWidget(a.el))return a.el;throw new Error("无法根据item创建组件")}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}(),a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;b<256;b++)b<128?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;h6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;k>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),_.extend(BI,{aesEncrypt:function(b,c){c=a.enc.Utf8.parse(c);var d=a.AES.encrypt(b,c,{mode:a.mode.ECB,padding:a.pad.Pkcs7}),e=d.ciphertext.toString(a.enc.Base64);return e}})}(),!function(){function a(a){return function(b,c,d){var e,f=b[c];f&&f.target==b||(e=b[c]=function(){for(var a,b=e.before,c=arguments,d=b.length;d--;){if(a=b[d].advice.apply(this,c),a===!1)return!1;c=a||c}for(var f=e.method.apply(this,c),g=e.after,h=0,i=g.length;h127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},c=function(a){for(var b="",c=0,d=0,e=0,f=0;c191&&d<224?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),e=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&e),c+=3);return b};_.extend(BI,{encode:function(c){var d,e,f,g,h,i,j,k="",l=0;for(c=b(c);l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+a.charAt(g)+a.charAt(h)+a.charAt(i)+a.charAt(j);return k},decode:function(b){var d,e,f,g,h,i,j,k="",l=0;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k=c(k)}})}(),BI.Cache={_prefix:"bi",setUsername:function(a){localStorage.setItem(BI.Cache._prefix+".username",(a+""||"").toUpperCase())},getUsername:function(){return localStorage.getItem(BI.Cache._prefix+".username")||""},_getKeyPrefix:function(){return BI.Cache.getUsername()+"."+BI.Cache._prefix+"."},_generateKey:function(a){return BI.Cache._getKeyPrefix()+(a||"")},getItem:function(a){return localStorage.getItem(BI.Cache._generateKey(a))},setItem:function(a,b){localStorage.setItem(BI.Cache._generateKey(a),b)},removeItem:function(a){localStorage.removeItem(BI.Cache._generateKey(a))},clear:function(){for(var a=localStorage.length;a>=0;a--){var b=localStorage.key(a);b&&0===b.indexOf(BI.Cache._getKeyPrefix())&&localStorage.removeItem(b)}},keys:function(){for(var a=[],b=localStorage.length;b>=0;b--){var c=localStorage.key(b);if(c){var d=BI.Cache._getKeyPrefix();0===c.indexOf(d)&&(a[a.length]=c.substring(d.length))}}return a},addCookie:function(a,b,c,d){var e=a+"="+escape(b);if(d&&d>0){var f=new Date;f.setTime(BI.getTime()+3600*d*1e3),e=e+"; expires="+f.toGMTString()}c&&(e=e+"; path="+c),document.cookie=e},getCookie:function(a){var b,c=new RegExp("(^| )"+a+"=([^;]*)(;|$)");return(b=document.cookie.match(c))?unescape(b[2]):null},deleteCookie:function(a,b){var c=new Date;c.setTime(BI.getTime()-1e4);var d=a+"=v; expires="+c.toGMTString();b&&(d=d+"; path="+b),document.cookie=d}},BI.CellSizeAndPositionManager=function(a,b,c){this._cellSizeGetter=b,this._cellCount=a,this._estimatedCellSize=c,this._cellSizeAndPositionData={},this._lastMeasuredIndex=-1},BI.CellSizeAndPositionManager.prototype={constructor:BI.CellSizeAndPositionManager,configure:function(a,b){this._cellCount=a,this._estimatedCellSize=b},getCellCount:function(){return this._cellCount},getEstimatedCellSize:function(){return this._estimatedCellSize},getLastMeasuredIndex:function(){return this._lastMeasuredIndex},getSizeAndPositionOfCell:function(a){if(!(a<0||a>=this._cellCount)){if(a>this._lastMeasuredIndex){for(var b=this.getSizeAndPositionOfLastMeasuredCell(),c=b.offset+b.size,d=this._lastMeasuredIndex+1;d<=a;d++){var e=this._cellSizeGetter(d);null==e||isNaN(e)||(this._cellSizeAndPositionData[d]={offset:c,size:e},c+=e)}this._lastMeasuredIndex=a}return this._cellSizeAndPositionData[a]}},getSizeAndPositionOfLastMeasuredCell:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}},getTotalSize:function(){var a=this.getSizeAndPositionOfLastMeasuredCell();return a.offset+a.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize},getUpdatedOffsetForIndex:function(a,b,c,d){var e,f=this.getSizeAndPositionOfCell(d),g=f.offset,h=g-b+f.size;switch(a){case"start":e=g;break;case"end":e=h;break;case"center":e=g-(b-f.size)/2;break;default:e=Math.max(h,Math.min(g,c))}var i=this.getTotalSize();return Math.max(0,Math.min(i-b,e))},getVisibleCellRange:function(a,b){var c=this.getTotalSize();if(0===c)return{};var d=b+a,e=this._findNearestCell(b),f=this.getSizeAndPositionOfCell(e);b=f.offset+f.size;for(var g=e;bc&&(a=d-1)}if(b>0)return b-1},_exponentialSearch:function(a,b){for(var c=1;a=a?this._binarySearch(c,0,a):this._exponentialSearch(c,a)}}},BI.ScalingCellSizeAndPositionManager=function(a,b,c,d){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(a,b,c),this._maxScrollSize=d||1e7},BI.ScalingCellSizeAndPositionManager.prototype={constructor:BI.ScalingCellSizeAndPositionManager,configure:function(){this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager,arguments)},getCellCount:function(){return this._cellSizeAndPositionManager.getCellCount()},getEstimatedCellSize:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()},getLastMeasuredIndex:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()},getOffsetAdjustment:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(),e=this._getOffsetPercentage(a,b,d);return Math.round(e*(d-c))},getSizeAndPositionOfCell:function(a){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(a)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(a,b,c,d){c=this._safeOffsetToOffset(b,c);var e=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(a,b,c,d);return this._offsetToSafeOffset(b,e)},getVisibleCellRange:function(a,b){return b=this._safeOffsetToOffset(a,b),this._cellSizeAndPositionManager.getVisibleCellRange(a,b)},resetCell:function(a){this._cellSizeAndPositionManager.resetCell(a)},_getOffsetPercentage:function(a,b,c){return c<=a?0:b/(c-a)},_offsetToSafeOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize();if(c===d)return b;var e=this._getOffsetPercentage(a,b,c);return Math.round(e*(d-a))},_safeOffsetToOffset:function(a,b){var c=this._cellSizeAndPositionManager.getTotalSize(),d=this.getTotalSize(); if(c===d)return b;var e=this._getOffsetPercentage(a,b,d);return Math.round(e*(c-a))}},!function(){var a="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMEL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:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},c=function(c){var d=c.charCodeAt(0);return d>40869||d<19968?c:b[d]?b[d]:a.charAt(d-19968)},d=function(a){for(var b,c=[""],d=0,e=0,f=a.length;e14){var i=g.substring(0,1);for(b=0;b0&&(this._items[0]=b,this._sinkDown(0)),a}},push:function(a){this._items[this._size++]=a,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var a=Math.floor((this._size+1)/2);a>=0;a--)this._sinkDown(a)},_bubbleUp:function(a){for(var b=this._items[a];a>0;){var c=Math.floor((a+1)/2)-1,d=this._items[c];if(this._comparator(d,b))return;this._items[c]=b,this._items[a]=d,a=c}},_sinkDown:function(a){for(var b=this._items[a];;){var c=2*(a+1)-1,d=2*(a+1),e=-1;if(c=0;--c)b[c]=0;return b},c=function(a){for(var b=1;b0;--d)this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},BI.PrefixIntervalTree.prototype={constructor:BI.PrefixIntervalTree,set:function(b,c){var d=this._half+b;for(this._heap[d]=c,d=a(d);0!==d;d=a(d))this._heap[d]=this._heap[2*d]+this._heap[2*d+1]},get:function(a){var b=this._half+a;return this._heap[b]},getSize:function(){return this._size},sumUntil:function(b){if(0===b)return 0;for(var c=this._half+b-1,d=this._heap[c];1!==c;c=a(c))c%2===1&&(d+=this._heap[c-1]);return d},sumTo:function(a){return this.sumUntil(a+1)},sum:function(a,b){return this.sumUntil(b)-this.sumUntil(a)},greatestLowerBound:function(a){if(a<0)return-1;var b=1;if(this._heap[b]<=a)return this._size;for(;b=0;--d)c[d]=b;return new BI.PrefixIntervalTree(c)},BI.PrefixIntervalTree.empty=function(a){return BI.PrefixIntervalTree.uniform(a,0)}}(),!function(){BI.Queue=function(a){this.capacity=a,this.array=[]},BI.Queue.prototype={constructor:BI.Queue,contains:function(a){return BI.contains(this.array,a)},indexOf:function(a){return BI.contains(this.array,a)},getElementByIndex:function(a){return this.array[a]},push:function(a){this.array.push(a),this.capacity&&this.array.length>this.capacity&&this.array.shift()},pop:function(){this.array.pop()},shift:function(){this.array.shift()},unshift:function(a){this.array.unshift(a),this.capacity&&this.array.length>this.capacity&&this.array.pop()},remove:function(a){BI.remove(this.array,a)},splice:function(){this.array.splice.apply(this.array,arguments)},slice:function(){this.array.slice.apply(this.array,arguments)},size:function(){return this.array.length},each:function(a,b){var b=b||window,a=a||null;if(null!=a&&"function"==typeof a)for(var c=0;c0?{children:c}:{})},toJSON:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSON(d))}),c},_toJSONWithNode:function(a){var b=this,c=[];return BI.each(a.getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),BI.extend({id:a.id},BI.deepClone(a.get("data")),{node:a},c.length>0?{children:c}:{})},toJSONWithNode:function(a){var b=this,c=[];return BI.each((a||this.root).getChildren(),function(a,d){c.push(b._toJSONWithNode(d))}),c},search:function(a,b,c){if(!(a instanceof BI.Node))return arguments.callee.apply(this,[this.root,a,b]);var d=this,e=null;return BI.isNull(b)?null:BI.isEqual(a[c||"id"],b)?a:(BI.any(a.getChildren(),function(a,f){if(e=d.search(f,b,c),null!==e)return!0}),e)},_traverse:function(a,b){var c=[];for(c.push(a);!BI.isEmpty(c);){var d=c.shift(),e=b&&b(d);if(e===!1)break;e!==!0&&null!=d&&(c=c.concat(d.getChildren()))}},traverse:function(a){this._traverse(this.root,a)},_recursion:function(a,b,c){var d=this;return BI.every(a.getChildren(),function(a,e){var f=BI.clone(b);f.push(e.id);var g=c&&c(e,f);return g!==!1&&(g===!0||d._recursion(e,f,c))})},recursion:function(a){this._recursion(this.root,[],a)},inOrderTraverse:function(a){this._inOrderTraverse(this.root,a)},_inOrderTraverse:function(a,b){null!=a&&(this._inOrderTraverse(a.getLeft()),b&&b(a),this._inOrderTraverse(a.getRight()))},nrInOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=b.pop(),a&&a(c),c=c.getRight()}},preOrderTraverse:function(a){this._preOrderTraverse(this.root,a)},_preOrderTraverse:function(a,b){null!=a&&(b&&b(a),this._preOrderTraverse(a.getLeft()),this._preOrderTraverse(a.getRight()))},nrPreOrderTraverse:function(a){for(var b=[],c=this.root;null!=c||!BI.isEmpty(b);){for(;null!=c;)a&&a(c),b.push(c),c=c.getLeft();c=b.pop(),c=c.getRight()}},postOrderTraverse:function(a){this._postOrderTraverse(this.root,a)},_postOrderTraverse:function(a,b){null!=a&&(this._postOrderTraverse(a.getLeft()),this._postOrderTraverse(a.getRight()),b&&b(a))},nrPostOrderTraverse:function(a){for(var b=[],c=this.root,d=null;null!=c||!BI.isEmpty(b);){for(;null!=c;)b.push(c),c=c.getLeft();c=BI.last(b),null==c.getRight()||c.getRight()==d?(a&&a(c),c=b.pop(),d=c,c=null):c=c.getRight()}}},BI.Node=function(a){BI.isObject(a)?BI.extend(this,a):this.id=a,this.clear.apply(this,arguments)},BI.Node.prototype={constructor:BI.Node,set:function(a,b){return BI.isObject(a)?void BI.extend(this,a):void(this[a]=b)},get:function(a){return this[a]},isLeaf:function(){return BI.isEmpty(this.children)},getChildren:function(){return this.children},getChildrenLength:function(){return this.children.length},getFirstChild:function(){return BI.first(this.children)},getLastChild:function(){return BI.last(this.children)},setLeft:function(a){this.left=a},getLeft:function(){return this.left},setRight:function(a){this.right=a},getRight:function(){return this.right},setParent:function(a){this.parent=a},getParent:function(){return this.parent},getChild:function(a){return this.children[a]},getChildIndex:function(a){return BI.findIndex(this.children,function(b,c){return c.get("id")===a})},removeChild:function(a){this.removeChildByIndex(this.getChildIndex(a))},removeChildByIndex:function(a){var b=this.getChild(a-1),c=this.getChild(a+1);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=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h)},getPosition:function(){var a=[];return a.push(this.x+this.w/2),a.push(this.y+this.h/2),a}},BI.BehaviorFactory={createBehavior:function(a,b){var c;switch(a){case"highlight":c=BI.HighlightBehavior;break;case"redmark":c=BI.RedMarkBehavior}return new c(b)}},BI.Behavior=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this,arguments),{rule:function(){return!0}})},_init:function(){BI.Behavior.superclass._init.apply(this,arguments)},doBehavior:function(){}}),BI.Layout=BI.inherit(BI.Widget,{props:function(){return{scrollable:null,scrollx:!1,scrolly:!1,items:[]}},render:function(){this._init4Margin(),this._init4Scroll()},_init4Margin:function(){this.options.top&&this.element.css("top",this.options.top),this.options.left&&this.element.css("left",this.options.left),this.options.bottom&&this.element.css("bottom",this.options.bottom),this.options.right&&this.element.css("right",this.options.right)},_init4Scroll:function(){switch(this.options.scrollable){case!0:this.element.css("overflow","auto");break;case!1:this.element.css("overflow","hidden")}this.options.scrollx&&this.element.css({"overflow-x":"auto","overflow-y":"hidden"}),this.options.scrolly&&this.element.css({"overflow-x":"hidden","overflow-y":"auto"})},appendFragment:function(a){this.element.append(a)},_mountChildren:function(){var a=this,b=BI.Widget._renderEngine.createFragment(),c=!1;BI.each(this._children,function(d,e){e.element!==a.element&&(b.appendChild(e.element[0]),c=!0)}),c===!0&&this.appendFragment(b)},_getChildName:function(a){return a+""},_addElement:function(a,b,c){var d,e=this;return this.hasWidget(this._getChildName(a))?d=this.getWidgetByName(this._getChildName(a)):(d=BI.createWidget(b,c),d.on(BI.Events.DESTROY,function(){BI.each(e._children,function(a,b){b===d&&(BI.remove(e._children,b),e.removeItemAt(0|a))})}),this.addWidget(this._getChildName(a),d)),d},_getOptions:function(a){return a instanceof BI.Widget&&(a=a.options),a=BI.stripEL(a),a instanceof BI.Widget&&(a=a.options),a},_compare:function(a,b){function c(a,b,e,f){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var g=Object.prototype.toString.call(a);switch(g){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var h="[object Array]"===g;if(!h){if(BI.isFunction(a)&&BI.isFunction(b))return!0;a=d._getOptions(a),b=d._getOptions(b)}e=e||[],f=f||[];for(var i=e.length;i--;)if(e[i]===a)return f[i]===b;if(e.push(a),f.push(b),h){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!c(a[i],b[i],e,f))return!1}else{var j,k=_.keys(a);if(i=k.length,_.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!_.has(b,j)||!c(a[j],b[j],e,f))return!1}return e.pop(),f.pop(),!0}var d=this;return c(a,b)},_getWrapper:function(){return this.element},_addItemAt:function(a,b){for(var c=this.options.items.length;c>a;c--)this._children[this._getChildName(c)]=this._children[this._getChildName(c-1)];delete this._children[this._getChildName(a)],this.options.items.splice(a,0,b)},_removeItemAt:function(a){for(var b=a;bthis.options.items.length)){this._addItemAt(a,b);var c=this._addElement(a,b);return a>0?this._children[this._getChildName(a-1)].element.after(c.element):c.element.prependTo(this._getWrapper()),c._mount(),c}},removeItemAt:function(a){a=BI.isArray(a)?a:[a];for(var b=[],c=[],d={},e=0,f=this.options.items.length;ethis.options.items.length-1)return!1;var c=this._children[this._getChildName(a)];return c.shouldUpdate?c.shouldUpdate(this._getOptions(b))===!0:null},updateItemAt:function(a,b){if(!(a<0||a>this.options.items.length-1)){var c,d=this._children[this._getChildName(a)];if(c=d.update(this._getOptions(b)))return c;var e=this._children[this._getChildName(a)];delete this._children[this._getChildName(a)],this.options.items.splice(a,1);var f=this._addElement(a,b);this.options.items.splice(a,0,b),this._children[this._getChildName(a)]=f,a>0?this._children[this._getChildName(a-1)].element.after(f.element):f.element.prependTo(this._getWrapper()),e._destroy(),f._mount()}},addItems:function(a,b){var c=this,d=this.options,e=BI.Widget._renderEngine.createFragment(),f=[];BI.each(a,function(a,g){var h=c._addElement(d.items.length,g,b);c._children[c._getChildName(d.items.length)]=h,d.items.push(g),f.push(h),e.appendChild(h.element[0])}),this._isMounted&&(this._getWrapper().append(e),BI.each(f,function(a,b){b._mount()}))},prependItems:function(a,b){var c=this;a=a||[];for(var d=BI.Widget._renderEngine.createFragment(),e=[],f=a.length-1;f>=0;f--){this._addItemAt(0,a[f]);var g=this._addElement(0,a[f],b);c._children[c._getChildName(0)]=g,this.options.items.unshift(a[f]),e.push(g),d.appendChild(g.element[0])}this._isMounted&&(this._getWrapper().prepend(d),BI.each(e,function(a,b){b._mount()}))},getValue:function(){var a,b=this,c=[];return BI.each(this.options.items,function(d){if(a=b._children[b._getChildName(d)]){var e=a.getValue();e=BI.isArray(e)?e:[e],c=c.concat(e)}}),c},setValue:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setValue(a)})},setText:function(a){var b,c=this;BI.each(this.options.items,function(d){(b=c._children[c._getChildName(d)])&&b.setText(a)})},patchItem:function(a,b,c){var d=this.shouldUpdateItem(c,b);if(d===!0||null===d&&!this._compare(a,b))return this.updateItemAt(c,b)},updateChildren:function(a,b){function c(a,b,c,d){return a=k._getOptions(a),b=k._getOptions(b),BI.isKey(a.key)?a.key===b.key:c>=0?c===d:void 0}function d(a,b){var c=k._getOptions(a),d=null==c.key?k._getChildName(b):c.key;return t[d]=k._addElement(d,a)}function e(a,b,c,e){for(;c<=e;++c){var f=d(b[c],c);g(f,a,!1,c)}}function f(a,b,c){for(;b<=c;++b){var d=a[b];if(BI.isNotNull(d)){var e=k._getOptions(d),f=null==e.key?k._getChildName(b):e.key;delete k._children[k._getChildName(f)],t[f]._destroy()}}}function g(a,b,c,d){a=k._getOptions(a),b=b&&k._getOptions(b);var e=BI.isKey(a.key)?a.key:k._getChildName(d);if(b&&t[b.key]){var f,g=BI.isKey(b.key)?b.key:k._getChildName(d);f=c?t[g].element.next():t[g].element,f.length>0?f.before(t[e].element):k._getWrapper().append(t[e].element)}else k._getWrapper().append(t[e].element)}function h(a,b,d,e){var f,g;for(f=d;f<=e;++f)a[f]&&c(a[f],b)&&(g=a[f]);return g}var i,j,k=this,l=0,m=0,n=a.length-1,o=a[0],p=a[n],q=b.length-1,r=b[0],s=b[q],t={};for(BI.each(a,function(a,b){b=k._getOptions(b);var c=null==b.key?a:b.key;BI.isKey(c)&&(t[c]=k._children[k._getChildName(a)])});l<=n&&m<=q;)if(BI.isNull(o))o=a[++l];else if(BI.isNull(p))p=a[--n];else if(c(o,r,l,m))j=this.patchItem(o,r,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],o=a[++l],r=b[++m];else if(c(p,s,n,q))j=this.patchItem(p,s,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],p=a[--n],s=b[--q];else if(c(o,s))j=this.patchItem(o,s,l)||j,t[null==o.key?this._getChildName(l):o.key]=this._children[this._getChildName(l)],g(o,p,!0),o=a[++l],s=b[--q];else if(c(p,r))j=this.patchItem(p,r,n)||j,t[null==p.key?this._getChildName(n):p.key]=this._children[this._getChildName(n)],g(p,o),p=a[--n],r=b[++m];else{var u=h(a,r,l,n);if(BI.isNull(u)){var v=d(r);g(v,o),r=b[++m]}else BI.each(a,function(b,d){d&&c(d,r)&&(j=k.patchItem(u,r,b)||j,t[null==u.key?k._getChildName(b):u.key]=k._children[k._getChildName(b)],a[b]=void 0,g(u,o))}),r=b[++m]}return l>n?(i=BI.isNull(b[q+1])?null:b[q+1],e(i,b,m,q)):m>q&&f(a,l,n),this._children={},BI.each(b,function(a,b){var c=k._getOptions(b),d=null==c.key?k._getChildName(a):c.key;t[d]._mount(),k._children[k._getChildName(a)]=t[d]}),j},update:function(a){var b=this.options,c=a.items||[],d=this.updateChildren(b.items,c);return this.options.items=c,d},stroke:function(a){var b=this;BI.each(a,function(a,c){c&&b._addElement(a,c)})},removeWidget:function(a){var b;BI.isWidget(a)?BI.each(this._children,function(c,d){d===a&&(b=c)}):b=a,b&&this._removeItemAt(0|b)},empty:function(){BI.Layout.superclass.empty.apply(this,arguments),this.options.items=[]},destroy:function(){BI.Layout.superclass.destroy.apply(this,arguments),this.options.items=[]},populate:function(a){this.options;return a=a||[],this._isMounted?void this.update({items:a}):(this.options.items=a,void this.stroke(a))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var a,b,c={},d={},e={};BI.extend(BI.Plugin,{getWidget:function(b,d){if(a&&a(b,d),e[b])for(var f=e[b].length-1;f>=0;f--)e[b][f](d);if(c[b])for(var g,f=c[b].length-1;f>=0;f--)if(g=c[b][f](d))return g;return d},config:function(c,d){a=c,b=d},configWidget:function(a,b){e[a]||(e[a]=[]),e[a].push(b)},registerWidget:function(a,b){c[a]||(c[a]=[]),c[a].length>0&&console.log("组件已经注册过了!"),c[a].push(b)},relieveWidget:function(a){delete c[a]},getObject:function(a,c){if(b&&b(a,c),d[a])for(var e,f=0,g=d[a].length;f0&&console.log("对象已经注册过了!"),d[a].push(b)},relieveObject:function(a){delete d[a]}})}(),BI.Action=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.Action.superclass._defaultConfig.apply(this,arguments),{src:null,tar:null})},_init:function(){BI.Action.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){},actionBack:function(a,b,c){}}),BI.ActionFactory={createAction:function(a,b){var c;switch(a){case"show":c=BI.ShowAction}return new c(b)}},BI.ShowAction=BI.inherit(BI.Action,{_defaultConfig:function(){return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ShowAction.superclass._init.apply(this,arguments)},actionPerformed:function(a,b,c){b=b||this.options.tar,b.setVisible(!0),c&&c()},actionBack:function(a,b,c){a=a||this.options.tar,a.setVisible(!1),c&&c()}}),function(){function isEmpty(a){var b=""===a||null===a||void 0===a;return b}function isInvalidDate(a){return"Invalid Date"==a||"NaN"==a}function _eFormat(a,b){function c(a,b){var c=a<0?(a*=-1,"-"):"",h="",i=a>0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;iBI.Widget._renderEngine.createElement("body").outerWidth()&&(l-=k.element.outerWidth()+15);var n=BI.Widget._renderEngine.createElement("body").outerHeight();return m+k.element.outerHeight()>n||j+k.element.outerHeight()>n?(m-=k.element.outerHeight()+15,!f.belowMouse&&(m=Math.min(m,h.top-k.element.outerHeight()-5))):!f.belowMouse&&(m=Math.max(m,j)),k.element.css({left:l<0?0:l+"px",top:m<0?0:m+"px"}),k.element.hover(function(){g.remove(b),e.element.trigger("mouseleave.title"+e.getName())}),this},add:function(a,b){return this.has(a)?this:(this.set(a,b),this)},get:function(a){return this.tooltipsManager[a]},set:function(a,b){this.tooltipsManager[a]=b},has:function(a){return null!=this.tooltipsManager[a]},remove:function(a){return this.has(a)?(this.tooltipsManager[a].destroy(),delete this.tooltipsManager[a],this):this}}),_.extend(BI,{Events:{KEYDOWN:"_KEYDOWN",BACKSPACE:"_BACKSPACE",SPACE:"_SPACE",ENTER:"_ENTER",CONFIRM:"_CONFIRM",ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",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"}}),_.extend(BI,{pushArray:function(a,b){for(var c=0;ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}}),_.extend(BI,{add:function(a,b){function c(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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),!function(){var a={};_.extend(BI,{addI18n:function(b){BI.extend(a,b)},i18nText:function(b){var c=a[b]||BI.i18n&&BI.i18n[b]||"";c||(c=b);var d=arguments.length;if(d>1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g1?d.toString():d[0]:d,BI.isNull(d))throw new Error("value cannot be null");var f=b.cardNameCreator(d);if(!b.cardLayout.isCardExisted(f)){var g=b.cardCreator(f);b.cardLayout.addCardByName(f,g),b.afterCardCreated(f)}b.cardLayout.showCardByName(f),BI.nextTick(function(){b.afterCardShow(f),a.fireEvent(BI.ShowListener.EVENT_CHANGE,f)})}})}}),BI.ShowListener.EVENT_CHANGE="EVENT_CHANGE",BI.StyleLoaderManager=BI.inherit(BI.OB,{_defaultConfig:function(){return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.StyleLoaderManager.superclass._init.apply(this,arguments),this.stylesManager={}},loadStyle:function(a,b){if(_global.document){var c=document,d=c.createElement("style");return c.getElementsByTagName("head")[0].appendChild(d),d.setAttribute("type","text/css"),d.styleSheet?d.styleSheet.cssText=b:d.appendChild(document.createTextNode(b)),this.stylesManager[a]=d,this}},get:function(a){return this.stylesManager[a]},has:function(a){return null!=this.stylesManager[a]},removeStyle:function(a){return this.has(a)?(this.stylesManager[a].parentNode.removeChild(this.stylesManager[a]),delete this.stylesManager[a],this):this}}),BI.Logic=BI.inherit(BI.OB,{createLogic:function(){return this.options||{}}}),BI.LogicFactory={Type:{Vertical:"vertical",Horizontal:"horizontal",Table:"table",HorizontalFill:"horizontal_fill"},createLogic:function(a,b){var c;switch(a){case BI.LogicFactory.Type.Vertical:c=BI.VerticalLayoutLogic;break;case BI.LogicFactory.Type.Horizontal:c=BI.HorizontalLayoutLogic;break;case BI.LogicFactory.Type.Table:c=BI.TableLayoutLogic;break;case BI.LogicFactory.Type.HorizontalFill:c=BI.HorizontalFillLayoutLogic;break;default:c=BI.Logic}return new c(b).createLogic()},createLogicTypeByDirection:function(a){switch(a){case BI.Direction.Top:case BI.Direction.Bottom:case BI.Direction.Custom:return BI.LogicFactory.Type.Vertical;case BI.Direction.Left:case BI.Direction.Right:return BI.LogicFactory.Type.Horizontal}},createLogicItemsByDirection:function(a){var b,c=Array.prototype.slice.call(arguments,1);switch(c=BI.map(c,function(a,b){return BI.isWidget(b)?{el:b,width:b.options.width,height:b.options.height}:b}),a){case BI.Direction.Bottom:b=BI.LogicFactory.Type.Vertical,c.reverse();break;case BI.Direction.Right:b=BI.LogicFactory.Type.Horizontal,c.reverse();break;case BI.Direction.Custom:c=c.slice(1)}return c}},BI.VerticalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical":"bi.vtape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.VerticalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.HorizontalLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,items:[],hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.vertical_adapt":"bi.htape",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,hgap:b.hgap,vgap:b.vgap,lgap:b.lgap,rgap:b.rgap,tgap:b.tgap,bgap:b.bgap,items:b.items}},_init:function(){BI.HorizontalLayoutLogic.superclass._init.apply(this,arguments)}}),BI.TableLayoutLogic=BI.inherit(BI.Logic,{_defaultConfig:function(){return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this,arguments),{dynamic:!1,scrollable:null,scrolly:!1,scrollx:!1,columns:0,rows:0,columnSize:[],rowSize:[],hgap:0,vgap:0,items:[]})},createLogic:function(){var a,b=this.options;return a=b.dynamic?"bi.table":"bi.window",{type:a,scrollable:b.scrollable,scrolly:b.scrolly,scrollx:b.scrollx,columns:b.columns,rows:b.rows,columnSize:b.columnSize,rowSize:b.rowSize, @@ -33,8 +33,8 @@ type:"bi.multilayer_single_level_tree",isDefaultInit:b.isDefaultInit,items:b.ite this.storeValue=a||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue={type:BI.Selection.Multi,value:b.value||[]},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",height:b.height,text:b.text,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue({type:BI.Selection.Multi,value:a.getValue()}),d.apply(a,arguments)})},value:{type:BI.Selection.Multi,value:b.value}}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE,function(){this.getSearcher().hasMatched()&&a._addItem(c)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM,function(){this.getSearcher().hasMatched()||(a._addItem(c),a.trigger.stopEditing())}),this.trigger.on(BI.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.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.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().updateSelectedValue(a.storeValue)}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_select_no_bar_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()})}},value:{type:BI.Selection.Multi,value:b.value},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.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]})},_addItem:function(a){var b=this,c=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[c]},function(){b.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(b.storeValue.value,c),b.combo.setValue(b.storeValue),b._setStartValue(c),a(),b.populate(),b._setStartValue("")})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(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.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),j.push(b))}),c.storeValue.value=j.concat(BI.values(h)),c._adjust(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.combo.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_no_bar_combo",BI.MultiSelectInsertNoBarCombo),BI.MultiSelectInsertTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_insert_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectInsertTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertTrigger.EVENT_START="EVENT_START",BI.MultiSelectInsertTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_trigger",BI.MultiSelectInsertTrigger),BI.MultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",logic:b.logic,toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,vgap:5},b.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)})))),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a-10)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_loader",BI.MultiSelectLoader),BI.MultiSelectNoBarLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget(BI.extend({type:"bi.list_pane",onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}},itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue},b.el)),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",cls:"bi-list-item-active",logic:this.options.logic,height:24,iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue.value)},getValue:function(){return{type:BI.Selection.Multi,value:this.button_group.getValue()}},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.element.css({"max-height":a+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.multi_select_searcher",height:b.height,text:b.text,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS)}),this.numberCounter=BI.createWidget(b.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,adapter:b.adapter,masker:b.masker,value:b.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var c=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),d=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:c,width:0},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){d.attr("items")[1].width=b===!0?a.numberCounter.element.outerWidth()+8:0,d.resize()})}),this.element.click(function(b){a.element.find(b.target).length>0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.MultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.MultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectTrigger.EVENT_START="EVENT_START",BI.MultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.MultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.MultiSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.shortcut("bi.multi_select_trigger",BI.MultiSelectTrigger),BI.MultiSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=BI.deepClone(b.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:a.storeValue.value})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=BI.deepClone(a.value)||[],e=BI.map(d,function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(b,c){return{text:c.text,title:c.text,value:c.value,selected:a.type===BI.Selection.All}})},setValue:function(a){this.storeValue=BI.deepClone(a),this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},isAllSelected:function(){return this.loader.isAllSelected()},hasMatched:function(){return this.tooltipClick.isVisible(); },setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.MultiSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_pane",BI.MultiSelectSearchPane),BI.MultiSelectCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectCheckSelectedButton.superclass._init.apply(this,arguments);var a=this,b=this.options;this.numberCounter=BI.createWidget({type:"bi.text_button",element:this,hgap:4,text:"0",textAlign:"center",textHeight:16,cls:"bi-high-light-background count-tip"}),this.numberCounter.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.numberCounter.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),this.numberCounter.element.hover(function(){a.numberCounter.setTag(a.numberCounter.getText()),a.numberCounter.setText(BI.i18nText("BI-Check_Selected"))},function(){a.numberCounter.setText(a.numberCounter.getTag())}),this.setVisible(!1),BI.isNotNull(b.value)&&this.setValue(b.value)},setValue:function(a){var b=this,c=this.options;return a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),a.type===BI.Selection.All?void c.itemsCreator({type:BI.MultiSelectCombo.REQ_GET_DATA_LENGTH},function(c){var d=c.count-a.value.length;BI.nextTick(function(){b.numberCounter.setText(d),b.setVisible(d>0)})}):void BI.nextTick(function(){b.numberCounter.setText(a.value.length),b.setVisible(a.value.length>0)})},getValue:function(){}}),BI.MultiSelectCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_check_selected_button",BI.MultiSelectCheckSelectedButton),BI.MultiSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-editor",el:{}})},_init:function(){BI.MultiSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},setTipType:function(a){this.editor.setTipType(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_insert_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectInsertSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectInsertSearcher.EVENT_START="EVENT_START",BI.MultiSelectInsertSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectInsertSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiSelectInsertSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_insert_searcher",BI.MultiSelectInsertSearcher),BI.MultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;if(a||(a={}),a.value||(a.value=[]),a.type===BI.Selection.All)if(0===a.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(a.assist)<=20){var c="";BI.each(a.assist,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi);else if(0===a.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(a.value)<=20){var c="";BI.each(a.value,function(a,d){c+=0===a?""+(b.valueFormatter(d+"")||d):","+(b.valueFormatter(d+"")||d)}),this.editor.setState(c)}else this.editor.setState(BI.Selection.Multi)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearcher.EVENT_START="EVENT_START",BI.MultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.MultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.MultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.multi_select_searcher",BI.MultiSelectSearcher),BI.MultiSelectCheckSelectedSwitcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-selected-switcher",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,el:{},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.button=BI.createWidget(b.el,{type:"bi.multi_select_check_selected_button",itemsCreator:b.itemsCreator,value:b.value}),this.button.on(BI.Events.VIEW,function(){a.fireEvent(BI.Events.VIEW,arguments)}),this.switcher=BI.createWidget({type:"bi.switcher",toggle:!1,element:this,el:this.button,popup:BI.extend({type:"bi.multi_select_check_pane",valueFormatter:b.valueFormatter,itemsCreator:b.itemsCreator,onClickContinueSelect:function(){a.switcher.hideView()},ref:function(b){a.checkPane=b},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE)}),this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW)}),this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW,function(){var a=this;BI.nextTick(function(){a.populate()})}),this.switcher.element.click(function(a){a.stopPropagation()})},adjustView:function(){this.switcher.adjustView()},hideView:function(){this.switcher.empty(),this.switcher.hideView()},setAdapter:function(a){this.switcher.setAdapter(a)},setValue:function(a){this.switcher.setValue(a)},updateSelectedValue:function(a){this.checkPane.setValue(a)},setButtonChecked:function(a){this.button.setValue(a)},getValue:function(){},populate:function(a){this.switcher.populate.apply(this.switcher,arguments)}}),BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.multi_select_check_selected_switcher",BI.MultiSelectCheckSelectedSwitcher),BI.MultiSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value||{};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)}),a._showAdapter()}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE)})}}],value:b.value}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={type:BI.Selection.Multi,value:b.value||[]};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:b.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),b.itemsCreator(c,d)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var b=a.trigger.getKeyword();a.trigger.hasMatched()||(a.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a.adapter.populate(),a.storeValue.type===BI.Selection.Multi&&a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE))}}]}),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.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(a.storeValue.value,b),a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(""),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var b=this.getKeywords(),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.MultiSelectInsertNoBarList.EVENT_CHANGE)}):a._join(this.getValue(),function(){c(),a.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)})}}],value:{type:BI.Selection.Multi,value:b.value||[]}}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_joinAll:function(a,b){var c=this,d=this.options;this._assertValue(a),d.itemsCreator({type:BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,keywords:[c.trigger.getKeyword()]},function(d){var e=BI.map(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 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)),b()})},_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 b()}this._joinAll(a,b)},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue={type:BI.Selection.Multi,value:a||[]},this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertNoBarList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={};var c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,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.map(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,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_list",BI.MultiSelectList),BI.MultiSelectTree=BI.inherit(BI.Single,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:b.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue() }:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return a.searcher.getKeyword()},itemsCreator:function(c,d){c.keyword=a.searcher.getKeyword(),b.itemsCreator(c,d)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){a._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){a._showAdapter(),BI.nextTick(function(){a.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){a.searcher.isSearching()?a.storeValue={value:a.searcherPane.getValue()}:a.storeValue={value:a.adapter.getValue()},a.setSelectedValue(a.storeValue.value),a.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){a._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,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)},resize:function(){},setSelectedValue:function(a){this.storeValue.value=a||{},this.adapter.setSelectedValue(a),this.searcherPane.setSelectedValue(a),this.searcher.setValue({value:a||{}})},setValue:function(a){this.adapter.setValue(a)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(a){this.adapter.updateValue(a)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:b.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(a){a||(a={}),this.popup.setValue(a)},setSelectedValue:function(a){a||(a={}),this.popup.setSelectedValue(a)},updateValue:function(a){this.popup.updateValue(a),this.popup.refresh()},populate:function(a){this.popup.stroke(a)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-pane bi-background",onClickContinueSelect:BI.emptyFn,el:{type:"bi.display_tree"}})},_init:function(){BI.MultiTreeCheckPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedValues={};var c=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-tree-check-selected"});c.on(BI.TextButton.EVENT_CHANGE,function(){b.onClickContinueSelect(),BI.nextTick(function(){a.empty()})});var d=BI.createWidget({type:"bi.left",cls:"multi-tree-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap,tgap:this.constants.tgap},{el:c,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(b.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(a,c){a.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,b.itemsCreator(a,c)},value:(b.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){a.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){d.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){d.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:d},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(a){this.display.stroke(a)},setValue:function(a){a||(a={}),this.display.setSelectedValue(a.value)},getValue:function(){}}),BI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK="EVENT_CONTINUE_CLICK",BI.shortcut("bi.multi_tree_check_pane",BI.MultiTreeCheckPane),BI.MultiTreeCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:c.itemsCreator},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_combo",BI.MultiTreeCombo),BI.MultiTreeInsertCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeInsertCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",text:c.text,itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value[b.trigger.getSearcher().getKeyword()]={},b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:{}}),b.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||{},this.combo.setValue({value:a||{}})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0})},_init:function(){function a(){h()?b.storeValue={value:b.trigger.getValue()}:i()&&(b.storeValue={value:b.combo.getValue()}),b.trigger.setValue(b.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var b=this,c=this.options,d=!1,e=!1;this.storeValue={value:c.value||[]},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",allowEdit:c.allowEdit,text:c.text,height:c.height,valueFormatter:c.valueFormatter,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_list_tree_searcher",itemsCreator:c.itemsCreator,popup:{type:"bi.multi_tree_search_insert_pane",el:{type:"bi.list_part_tree"},listeners:[{eventName:BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,action:function(){b.storeValue.value.unshift([b.trigger.getSearcher().getKeyword()]),b._assertShowValue(),b.combo.setValue(b.storeValue),b.trigger.stopEditing()}}]}},switcher:{el:{type:"bi.multi_tree_check_selected_button"},popup:{type:"bi.multi_tree_check_pane",el:{type:"bi.list_display_tree"},itemsCreator:c.itemsCreator}},value:{value:c.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:c.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){b.popup=this,b.trigger.setAdapter(this)},el:{type:"bi.list_async_tree"},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){b.trigger.getCounter().adjustView(),d=!0,e===!0&&a()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){f=!0;var a={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():[]};b.trigger.getSearcher().setState(a),b.trigger.getCounter().setButtonChecked(a),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){b.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){g=!0,b.setValue(),b._defaultState()}}],itemsCreator:c.itemsCreator,onLoaded:function(){BI.nextTick(function(){b.trigger.getCounter().adjustView(),b.trigger.getSearcher().adjustView()})}},value:{value:c.value||{}},hideChecker:function(a){return 0===j.element.find(a.target).length}});var f=!1,g=!1,h=function(){return b.trigger.getSearcher().isSearching()},i=function(){return b.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){b.storeValue={value:b.combo.getValue()},this.setValue(b.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){b.storeValue={value:this.getValue()},b.combo.setValue(b.storeValue),BI.nextTick(function(){i()&&b.combo.populate()}),b.fireEvent(BI.MultiTreeListCombo.EVENT_STOP)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(){b.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){e===!1&&(e=!0),d===!0&&(e=null,a())}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){b.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){b.combo.isViewVisible()||b.combo.showView()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var a=this.getSearcher().hasChecked(),c={type:BI.Selection.Multi,value:a?{1:1}:{}};this.getSearcher().setState(a?BI.Selection.Multi:BI.Selection.None),this.getCounter().setButtonChecked(c),b.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){h()||(f===!0&&(b.storeValue={value:b.combo.getValue()},f=!1),b.combo.setValue(b.storeValue),b.populate())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){h()?(b.trigger.stopEditing(),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)):i()&&(b.trigger.stopEditing(),b.storeValue={value:b.combo.getValue()},g===!0&&(b.storeValue={value:[]}),b.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM)),g=!1,f=!1});var j=BI.createWidget({type:"bi.trigger_icon_button",width:c.height,height:c.height,cls:"multi-select-trigger-icon-button"});j.on(BI.TriggerIconButton.EVENT_CHANGE,function(){b.trigger.getCounter().hideView(),b.combo.isViewVisible()?b.combo.hideView():b.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:j,right:0,top:0,bottom:0}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.trigger.getCounter().setButtonChecked(this.storeValue)},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},setValue:function(a){this.storeValue.value=a||[],this.combo.setValue({value:a||[]})},getValue:function(){return this.storeValue.value},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:100,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=b.value;this.selectedValues={},this.tree=BI.createWidget(b.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:b.itemsCreator,onLoaded:b.onLoaded,value:c.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){a.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(a){a||(a={}),this.tree.setSelectedValue(a.value)},populate:function(a){this.tree.stroke(a)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var a=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:BI.i18nText("BI-Check_Selected"),textAlign:"center",textHeight:15}),this.checkSelected.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.checkSelected.on(BI.TextButton.EVENT_CHANGE,function(){a.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE,arguments)}),BI.createWidget({type:"bi.horizontal",element:this,items:[this.indicator,this.checkSelected]}),this.element.hover(function(){a.indicator.setVisible(!1),a.checkSelected.setVisible(!0)},function(){a.indicator.setVisible(!0),a.checkSelected.setVisible(!1)}),this.setVisible(!1)},setValue:function(a){a||(a={}),this.setVisible(BI.size(a.value)>0)}}),BI.MultiTreeCheckSelectedButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_tree_check_selected_button",BI.MultiTreeCheckSelectedButton),BI.MultiTreeSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:24},props:{baseCls:"bi-multi-tree-search-insert-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,el:{type:"bi.part_tree"}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",items:[{el:{type:"bi.text_button",invisible:!0,ref:function(b){a.addTip=b},text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",handler:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}},top:5,left:0,right:0},{el:BI.extend({type:"bi.part_tree",tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(c,d){c.keyword=b.keywordGetter(),b.itemsCreator(c,function(c){d(c),a.setKeyword(b.keywordGetter(),c.items)})},ref:function(b){a.partTree=b},value:b.value,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}},{eventName:BI.TreeView.EVENT_CHANGE,action:function(){a.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE)}}]},b.el),left:0,top:0,bottom:0,right:0}]}},setKeyword:function(a,b){var c=BI.isEmptyArray(b);this.addTip.setVisible(c),this.partTree.setVisible(!c),c&&this.addTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_tree_search_insert_pane",BI.MultiTreeSearchInsertPane),BI.MultiTreeSearchPane=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(a,c){a.keyword=b.keywordGetter(),b.itemsCreator(a,c)},value:b.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(a){this.setSelectedValue(a.value)},setSelectedValue:function(a){a||(a={}),this.partTree.setSelectedValue(a)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(a){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",height:b.height}}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){var b=this.options;a||(a={}),a.value||(a.value=[]);var c=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var d="";BI.each(a.value,function(a,e){var f=BI.last(e);d+=(b.valueFormatter(f+"")||f)+"; ",c++}),c>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(d)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSearcher.EVENT_START="EVENT_START",BI.MultiListTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiListTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_list_tree_searcher",BI.MultiListTreeSearcher),BI.MultiTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(a){return a},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:b.height,el:{type:"bi.simple_state_editor",text:b.text,height:b.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(b,c){c({keyword:a.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){c.keyword=a.editor.getValue(),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){ -var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-number-interval",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS", +var b=this.getKeywords();a.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(a){this.searcher.setAdapter(a)},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setState:function(a){function b(a){var e="",f=0,g=BI.size(a);return BI.each(a,function(a,h){f++;var i=b(h);e+=(c.valueFormatter(a+"")||a)+(""===i?"":":"+i)+(f===g?"":","),""===i&&d++}),e}var c=this.options;a||(a={}),a.value||(a.value={});var d=0;if(BI.isNumber(a))this.editor.setState(a);else if(0===BI.size(a.value))this.editor.setState(BI.Selection.None);else{var e="";BI.each(a.value,function(a,f){var g=b(f);e+=(c.valueFormatter(a+"")||a)+(""===g?"":":"+g)+"; ",""===g&&d++}),d>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(e)}},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.MultiTreeSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearcher.EVENT_START="EVENT_START",BI.MultiTreeSearcher.EVENT_STOP="EVENT_STOP",BI.MultiTreeSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_tree_searcher",BI.MultiTreeSearcher),BI.NumberEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-number-editor bi-border bi-focus-shadow",validationChecker:function(){return!0},valueFormatter:function(a){return a},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:b.height-2,allowBlank:b.allowBlank,value:b.valueFormatter(b.value),validationChecker:b.validationChecker,errorText:b.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){b.value=BI.parseFloat(this.getValue()),a.fireEvent(BI.NumberEditor.EVENT_CHANGE)}),this.editor.on(BI.TextEditor.EVENT_CONFIRM,function(){this.setValue(BI.parseFloat(this.getValue())),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.topBtn=BI.createWidget({type:"bi.icon_button",forceNotSelected:!0,trigger:"lclick,",cls:"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12"}),this.topBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),this.bottomBtn=BI.createWidget({type:"bi.icon_button",trigger:"lclick,",forceNotSelected:!0,cls:"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12"}),this.bottomBtn.on(BI.IconButton.EVENT_CHANGE,function(){a._finetuning(-b.step),a.fireEvent(BI.NumberEditor.EVENT_CHANGE),a.fireEvent(BI.NumberEditor.EVENT_CONFIRM)}),BI.createWidget({type:"bi.htape",height:b.height-2,element:this,items:[this.editor,{el:{type:"bi.grid",columns:1,rows:2,items:[{column:0,row:0,el:this.topBtn},{column:0,row:1,el:this.bottomBtn}]},width:23}]})},focus:function(){this.editor.focus()},isEditing:function(){return this.editor.isEditing()},_finetuning:function(a){var b=BI.parseFloat(this.getValue());this.setValue(BI.add(b,a))},setUpEnable:function(a){this.topBtn.setEnable(!!a)},setDownEnable:function(a){this.bottomBtn.setEnable(!!a)},getValue:function(){return this.options.value},setValue:function(a){var b=this.options;b.value=a,this.editor.setValue(b.valueFormatter(a))}}),BI.NumberEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberEditor.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.number_editor",BI.NumberEditor),BI.NumberInterval=BI.inherit(BI.Single,{constants:{typeError:"typeBubble",numberError:"numberBubble",signalError:"signalBubble",editorWidth:114,columns:5,width:24,rows:1,numberErrorCls:"number-error",border:1,less:0,less_equal:1,numTip:"",adjustYOffset:2},_defaultConfig:function(){var a=BI.NumberInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:" hack",height:24,validation:"valid",closeMin:!0,allowBlank:!0,watermark:BI.i18nText("BI-Basic_Unrestricted")})},_init:function(){var a=this,b=this.constants,c=this.options;BI.NumberInterval.superclass._init.apply(this,arguments),this.smallEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.min,level:"warning",tipType:"success",title:function(){return a.smallEditor&&a.smallEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.smallEditorBubbleType=b.typeError,!1)},cls:"number-interval-small-editor bi-border"}),this.smallTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.smallEditor.element,items:[{el:this.smallTip,top:0,right:5}]}),this.bigEditor=BI.createWidget({type:"bi.number_interval_single_editor",height:c.height-2,watermark:c.watermark,allowBlank:c.allowBlank,value:c.max,level:"warning",tipType:"success",title:function(){return a.bigEditor&&a.bigEditor.getValue()},quitChecker:function(){return!1},validationChecker:function(c){return!!BI.isNumeric(c)||(a.bigEditorBubbleType=b.typeError,!1)},cls:"number-interval-big-editor bi-border"}),this.bigTip=BI.createWidget({type:"bi.label",text:c.numTip,height:c.height-2,invisible:!0}),BI.createWidget({type:"bi.absolute",element:this.bigEditor.element,items:[{el:this.bigTip,top:0,right:5}]}),this.smallCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMin===!0?this.smallCombo.setValue(1):this.smallCombo.setValue(0),this.bigCombo=BI.createWidget({type:"bi.icon_combo",cls:"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left",height:c.height-2,items:[{text:"("+BI.i18nText("BI-Less_Than")+")",iconCls:"less-font",value:0},{text:"("+BI.i18nText("BI-Less_And_Equal")+")",value:1,iconCls:"less-equal-font"}]}),c.closeMax===!0?this.bigCombo.setValue(1):this.bigCombo.setValue(0),this.label=BI.createWidget({type:"bi.label",text:BI.i18nText("BI-Basic_Value"),textHeight:c.height-2*b.border,width:b.width-2*b.border,height:c.height-2*b.border,level:"warning",tipType:"warning"}),this.left=BI.createWidget({type:"bi.htape",items:[{el:a.smallEditor},{el:a.smallCombo,width:b.width-b.border}]}),this.right=BI.createWidget({type:"bi.htape",items:[{el:a.bigCombo,width:b.width-b.border},{el:a.bigEditor,lgap:1}]}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:c.height,items:[{type:"bi.absolute",items:[{el:a.left,left:-15,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:0,right:-15,top:0,bottom:0}]}]}),BI.createWidget({element:a,type:"bi.horizontal_auto",items:[a.label]}),a._setValidEvent(a.bigEditor,b.bigEditor),a._setValidEvent(a.smallEditor,b.smallEditor),a._setErrorEvent(a.bigEditor,b.bigEditor),a._setErrorEvent(a.smallEditor,b.smallEditor),a._setBlurEvent(a.bigEditor),a._setBlurEvent(a.smallEditor),a._setFocusEvent(a.bigEditor),a._setFocusEvent(a.smallEditor),a._setComboValueChangedEvent(a.bigCombo),a._setComboValueChangedEvent(a.smallCombo),a._setEditorValueChangedEvent(a.bigEditor),a._setEditorValueChangedEvent(a.smallEditor),a._checkValidation()},_checkValidation:function(){var a=this,b=this.constants,c=this.options;if(a._setTitle(""),BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),!a.smallEditor.isValid()||!a.bigEditor.isValid())return a.element.removeClass("number-error"),c.validation="invalid",b.typeError;if(BI.isEmptyString(a.smallEditor.getValue())||BI.isEmptyString(a.bigEditor.getValue()))return a.element.removeClass("number-error"),c.validation="valid","";var d=parseFloat(a.smallEditor.getValue()),e=parseFloat(a.bigEditor.getValue()),f=a.bigCombo.getValue(),g=a.smallCombo.getValue();return f[0]===b.less_equal&&g[0]===b.less_equal?d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):(a.element.removeClass("number-error"),c.validation="valid",""):d>e?(a.element.addClass("number-error"),c.validation="invalid",b.numberError):d===e?(a.element.addClass("number-error"),c.validation="invalid",b.signalError):(a.element.removeClass("number-error"),c.validation="valid","")},_setTitle:function(a){var b=this;b.bigEditor.setTitle(a),b.smallEditor.setTitle(a),b.label.setTitle(a)},_setFocusEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(b._setTitle(""),b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(b.typeError),BI.Bubbles.hide(b.numberError),BI.Bubbles.hide(b.signalError),c._checkValidation()){case b.typeError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case b.numberError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case b.signalError:c._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:c._setTitle("")}})},_setErrorEvent:function(a){var b=this.constants,c=this;a.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){c._checkValidation(),BI.Bubbles.show(b.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),c,{offsetStyle:"left",adjustYOffset:b.adjustYOffset}),c.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(b._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),b,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}b.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),a.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){b.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(a){var b=this,c=this.constants;a.on(BI.IconCombo.EVENT_CHANGE,function(){switch(b._checkValidation()){case c.typeError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:b._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),b.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:b.fireEvent(BI.NumberInterval.EVENT_CHANGE),b.fireEvent(BI.NumberInterval.EVENT_CONFIRM),b.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(a){this.smallEditor.setEnable(a)},setCloseMinEnable:function(a){this.smallCombo.setEnable(a)},setMaxEnable:function(a){this.bigEditor.setEnable(a)},setCloseMaxEnable:function(a){this.bigCombo.setEnable(a)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){this.smallTip.setVisible(!1),this.bigTip.setVisible(!1)},setNumTip:function(a){this.smallTip.setText(a),this.bigTip.setText(a)},getNumTip:function(){return this.smallTip.getText()},setValue:function(a){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)),this._checkValidation()},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},destroyed:function(){var a=this.constants;BI.Bubbles.remove(a.typeError),BI.Bubbles.remove(a.numberError),BI.Bubbles.remove(a.signalError)}}),BI.NumberInterval.EVENT_CHANGE="EVENT_CHANGE",BI.NumberInterval.EVENT_CONFIRM="EVENT_CONFIRM",BI.NumberInterval.EVENT_VALID="EVENT_VALID",BI.NumberInterval.EVENT_ERROR="EVENT_ERROR",BI.shortcut("bi.number_interval",BI.NumberInterval),BI.NumberIntervalSingleEidtor=BI.inherit(BI.Single,{props:{baseCls:"bi-number-interval-single-editor",tipType:"success",title:""},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.editor",ref:function(b){a.editor=b},height:b.height-2,watermark:b.watermark,allowBlank:b.allowBlank,value:b.value,level:b.level,quitChecker:b.quitChecker,validationChecker:b.validationChecker,listeners:[{eventName:BI.Editor.EVENT_ERROR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR,arguments)}},{eventName:BI.Editor.EVENT_FOCUS,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,arguments)}},{eventName:BI.Editor.EVENT_BLUR,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR,arguments)}},{eventName:BI.Editor.EVENT_VALID,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID,arguments)}},{eventName:BI.Editor.EVENT_CHANGE,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,arguments)}},{eventName:BI.Editor.EVENT_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,arguments)}},{eventName:BI.Editor.EVENT_CHANGE_CONFIRM,action:function(){a.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM,arguments)}}]}]}},isValid:function(){return this.editor.isValid()},getValue:function(){return this.editor.getValue()},setTitle:function(a){return this.editor.setTitle(a)},setValue:function(a){return this.editor.setValue(a)}}),BI.NumberIntervalSingleEidtor.EVENT_FOCUS="EVENT_FOCUS",BI.NumberIntervalSingleEidtor.EVENT_BLUR="EVENT_BLUR",BI.NumberIntervalSingleEidtor.EVENT_ERROR="EVENT_ERROR",BI.NumberIntervalSingleEidtor.EVENT_VALID="EVENT_VALID",BI.NumberIntervalSingleEidtor.EVENT_CHANGE="EVENT_CHANGE",BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.NumberIntervalSingleEidtor.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.number_interval_single_editor",BI.NumberIntervalSingleEidtor),BI.QuarterCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-combo",behaviors:{},height:25})},_init:function(){BI.QuarterCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue="",this.trigger=BI.createWidget({type:"bi.quarter_trigger",value:b.value}),this.trigger.on(BI.QuarterTrigger.EVENT_FOCUS,function(){a.storeValue=this.getKey()}),this.trigger.on(BI.QuarterTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.QuarterTrigger.EVENT_STOP,function(){a.combo.isViewVisible()||a.combo.showView()}),this.trigger.on(BI.QuarterTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeValue?a.setValue(this.getKey()):this.getKey()||a.setValue(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM))}),this.popup=BI.createWidget({type:"bi.quarter_popup",behaviors:b.behaviors,value:b.value}),this.popup.on(BI.QuarterPopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.QuarterCombo.EVENT_CONFIRM)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,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.QuarterCombo.EVENT_BEFORE_POPUPVIEW)})},setValue:function(a){this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return BI.isNull(this.popup)?this.options.value||"":this.popup.getValue()||""}}),BI.QuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.quarter_combo",BI.QuarterCombo),BI.QuarterPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.QuarterPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-quarter-popup",behaviors:{}})},_init:function(){BI.QuarterPopup.superclass._init.apply(this,arguments);var a=this,b=this.options,c=[{text:BI.Date._QN[1],value:1},{text:BI.Date._QN[2],value:2},{text:BI.Date._QN[3],value:3},{text:BI.Date._QN[4],value:4}];c=BI.map(c,function(a,b){return BI.extend(b,{type:"bi.text_item",cls:"bi-list-item-active",textAlign:"left",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:25})}),this.quarter=BI.createWidget({type:"bi.button_group",element:this,behaviors:b.behaviors,items:BI.createItems(c,{}),layouts:[{type:"bi.vertical"}],value:b.value}),this.quarter.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.quarter.getValue()[0]},setValue:function(a){this.quarter.setValue([a])}}),BI.QuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.quarter_popup",BI.QuarterPopup),BI.QuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,textWidth:40},_defaultConfig:function(){return BI.extend(BI.QuarterTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-quarter-trigger bi-border",height:24})},_init:function(){BI.QuarterTrigger.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<=4},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,errorText:BI.i18nText("BI-Quarter_Trigger_Error_Text")}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.QuarterTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){a.fireEvent(BI.QuarterTrigger.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.QuarterTrigger.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.QuarterTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.QuarterTrigger.EVENT_STOP)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-quarter-text",text:BI.i18nText("BI-Multi_Date_Quarter"),width:c.textWidth},width:c.textWidth},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},setValue:function(a){a=a||"",this.editor.setState(a),this.editor.setValue(a),this.editor.setTitle(a)},getKey:function(){return this.editor.getValue()}}),BI.QuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.QuarterTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.QuarterTrigger.EVENT_START="EVENT_START",BI.QuarterTrigger.EVENT_STOP="EVENT_STOP",BI.QuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.quarter_trigger",BI.QuarterTrigger),BI.SearchMultiTextValueCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-combo bi-search-multi-text-value-combo",height:24,items:[]})},_init:function(){BI.SearchMultiTextValueCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,a._startValue):BI.pushDistinct(a.storeValue.value,a._startValue)),a._updateAllValue(),a._checkError(),a.trigger.getSearcher().setState(a.storeValue),a.trigger.getCounter().setButtonChecked(a.storeValue)};this.storeValue=BI.deepClone(b.value||{}),this._updateAllValue(),this._assertValue(this.storeValue),this._checkError(),this.requesting=!1,this.trigger=BI.createWidget({type:"bi.search_multi_select_trigger",text:b.text,height:b.height,masker:{offset:{left:0,top:0,right:0,bottom:25}},allValueGetter:function(){return a.allValue},valueFormatter:b.valueFormatter,itemsCreator:function(b,c){a._itemsCreator(b,function(d){1===b.times&&BI.isNotNull(b.keywords)&&a.trigger.setValue(BI.deepClone(a.getValue())),c.apply(a,arguments)})},value:this.storeValue,warningTitle:b.warningTitle}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){a._setStartValue(""),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){a._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a._join({type:BI.Selection.Multi,value:[b]},function(){a.combo.setValue(a.storeValue),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,container:b.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_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:BI.bind(a._itemsCreator,this),valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getCounter().adjustView(),a.trigger.getSearcher().adjustView()})}},value:b.value,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:(c(),a.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"multi-select-trigger-icon-button"});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}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(a){var b=this.options;a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[]),BI.remove(a.value,function(a,c){return!BI.contains(BI.map(b.items,"value"),c)})},_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.type===BI.Selection.Multi?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),d._adjust(b)}var d=this;this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_joinAll:function(a,b){var c=this;this.options;this._assertValue(a),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(d){var e=BI.map(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,c.storeValue.assist&&c.storeValue.assist.push(g[b]),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]])&&(c.storeValue.assist&&c.storeValue.assist.push(h[e[a]]),delete h[e[a]]),BI.isNull(i[e[a]])&&(BI.remove(c.storeValue.assist,b),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._updateAllValue(),c._checkError(),c.wants2Quit===!0&&(c.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;this._count?(b(),a()):this._itemsCreator({type:BI.SearchMultiTextValueCombo.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),BI.remove(c.storeValue.assist,b),d[b]=b)});var e=!1;return BI.each(a.assist,function(a,b){BI.isNotNull(d[b])&&(e=!0,c.storeValue.assist&&c.storeValue.assist.push(d[b]),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.popup.setStartValue(a)},_getItemsByTimes:function(a,b){for(var c=[],d=100*(b-1);a[d]&&d<100*b;d++)c.push(a[d]);return c},_hasNextByTimes:function(a,b){return 100*b0&&a.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch(),this.numberCounter.hideView()},setAdapter:function(a){this.searcher.setAdapter(a),this.numberCounter.setAdapter(a)},setValue:function(a){this.searcher.setValue(a),this.numberCounter.setValue(a)},setTipType:function(a){this.searcher.setTipType(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SearchMultiSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectTrigger.EVENT_START="EVENT_START",BI.SearchMultiSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.shortcut("bi.search_multi_select_trigger",BI.SearchMultiSelectTrigger),BI.SearchMultiSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-loader",logic:{dynamic:!0},el:{height:400},valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;a.storeValue&&(d=BI.extend(d||{},{selectedValues:BI.isKey(f)&&a.storeValue.type===BI.Selection.Multi?a.storeValue.value.concat(f):a.storeValue.value})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&a.storeValue){var i=BI.map(a.storeValue.value,function(c,d){var e=b.valueFormatter(d)||d;return{text:e,value:d,title:e,selected:a.storeValue.type===BI.Selection.Multi}});if(BI.isKey(a._startValue)&&!BI.contains(a.storeValue.value,a._startValue)){var j=b.valueFormatter(f)||f;i.unshift({text:j,value:f,title:j,selected:!0})}h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue.type===BI.Selection.All?BI.remove(a.storeValue.value,f):BI.pushDistinct(a.storeValue.value,f)),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(a){a||(a={}),a.type||(a.type=BI.Selection.Multi),a.value||(a.value=[])},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){arguments[0]=this._createItems(a),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SearchMultiSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.search_multi_select_loader",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(b){switch(b){case 0:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:a.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SearchMultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.search_multi_select_popup_view",BI.SearchMultiSelectPopupView),BI.SearchMultiSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.multi_select_editor",height:b.height,text:b.text,tipType:b.tipType,warningTitle:b.warningTitle}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options,c={};if(c.type=a.type,c.value=b.allValueGetter()||[],c.assist=a.assist,c.type===BI.Selection.All)if(0===c.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(c.assist)<=20){var d="";BI.each(c.assist,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi);else if(0===c.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(c.value)<=20){var d="";BI.each(c.value,function(a,c){d+=0===a?""+(b.valueFormatter(c+"")||c):","+(b.valueFormatter(c+"")||c)}),this.editor.setState(d)}else this.editor.setState(BI.Selection.Multi)},setTipType:function(a){this.editor.setTipType(a)},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SearchMultiSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SearchMultiSelectSearcher.EVENT_START="EVENT_START",BI.SearchMultiSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SearchMultiSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SearchMultiSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.search_multi_select_searcher",BI.SearchMultiSelectSearcher),BI.SelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-first-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.first_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_first_plus_group_node",BI.SelectTreeFirstPlusGroupNode),BI.SelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var a=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var a=this,b=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:b.height,height:b.height,hgap:b.hgap,text:b.text,value:b.value,keyword:b.keyword,py:b.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&(this.isSelected()?a.triggerExpand():a.triggerCollapse())});var c=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),d=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(c,BI.extend(b.logic,{items:d}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(a){BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(a)}}),BI.shortcut("bi.select_tree_plus_group_node",BI.SelectTreePlusGroupNode),BI.SelectTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-combo",height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SelectTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value}),this.popup=BI.createWidget({type:"bi.select_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView()})},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()},populate:function(a){this.combo.populate(a)}}),BI.shortcut("bi.select_tree_combo",BI.SelectTreeCombo),BI.SelectTreeExpander=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-tree-expander",trigger:"",toggle:!0,direction:"bottom",isDefaultInit:!0,el:{},popup:{}})},_init:function(){BI.SelectTreeExpander.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(b.el),this.trigger.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&this.isSelected()&&a.expander.setValue([]),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.expander=BI.createWidget({type:"bi.expander",element:this,trigger:b.trigger,toggle:b.toggle,direction:b.direction,isDefaultInit:b.isDefaultInit,el:this.trigger,popup:b.popup}),this.expander.on(BI.Controller.EVENT_CHANGE,function(b){b===BI.Events.CLICK&&a.trigger.setSelected(!1),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},setValue:function(a){BI.contains(a,this.trigger.getValue())?(this.trigger.setSelected(!0),this.expander.setValue([])):(this.trigger.setSelected(!1),this.expander.setValue(a))},getValue:function(){return this.trigger.isSelected()?[this.trigger.getValue()]:this.expander.getValue()},populate:function(a){this.expander.populate(a)}}),BI.shortcut("bi.select_tree_expander",BI.SelectTreeExpander),BI.SelectTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_formatItems:function(a,b,c){var d=this;return BI.each(a,function(e,f){var g={layer:b};f.id=f.id||BI.UUID(),g.pNode=c,f.isParent===!0||f.parent===!0||BI.isNotEmptyArray(f.children)?(g.type="bi.select_tree_mid_plus_group_node",e===a.length-1&&(g.type="bi.select_tree_last_plus_group_node",g.isLastNode=!0),0!==e||c||(g.type="bi.select_tree_first_plus_group_node"),0===e&&e===a.length-1&&(g.type="bi.select_tree_plus_group_node"),BI.defaults(f,g),d._formatItems(f.children,b+1,f)):(g.type="bi.mid_tree_leaf_item",0!==e||c||(g.type="bi.first_tree_leaf_item"),e===a.length-1&&(g.type="bi.last_tree_leaf_item"),BI.defaults(f,g))}),a},_init:function(){BI.SelectTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{type:"bi.select_tree_expander",isDefaultInit:!0},items:this._formatItems(BI.Tree.transformToTreeFormat(b.items),0),value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SelectTreePopup.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.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(a)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,element:this,logic:{dynamic:!1},value:b.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(d,e){a.storeValue&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(f){var g=f.keyword=b.keywordGetter();c=f.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=a._filterValues(a.storeValue);h=a._createItems(i)}e(h.concat(a._createItems(f.items)),g||""),1===d.times&&a.storeValue&&a.setValue(a.storeValue)})},hasNext:function(){return c}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(a){var b=this.options,c=b.keywordGetter(),d=a||[],e=BI.map(BI.isArray(d)?d:[d],function(a,c){return{text:b.valueFormatter(c)||c,value:c}});if(BI.isKey(c)){var f=BI.Func.getSearchResult(e,c);d=f.match.concat(f.find)}return BI.map(d,function(a,b){return{text:b.text,title:b.text,value:b.value,selected:!1}})},setValue:function(a){this.storeValue=a,this.button_group.setValue(a)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){a.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,b.keywordGetter())}}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{type:"bi.vertical",items:[this.tooltipClick,this.addNotMatchTip],height:this.constants.height},{el:this.loader}]})},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();this.tooltipClick.setVisible(c),this.addNotMatchTip.setVisible(!c),!c&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",a))},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.single_select_search_insert_pane",BI.SingleSelectSearchInsertPane),BI.SingleSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchPane.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.single_select_search_loader",allowNoSelect:b.allowNoSelect,keywordGetter:b.keywordGetter,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator.apply(a,[c,function(c){d(c),a.setKeyword(b.keywordGetter())}])},value:b.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.resizer=BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.tooltipClick,height:0},{el:this.loader}]}),this.tooltipClick.setVisible(!1)},setKeyword:function(a){var b,c=this.loader.getAllButtons().length>0&&(b=this.loader.getAllButtons()[0])&&a===b.getValue();c!==this.tooltipClick.isVisible()&&(this.tooltipClick.setVisible(c),this.resizer.attr("items")[0].height=c?this.constants.height:0,this.resizer.resize())},hasMatched:function(){return this.tooltipClick.isVisible()},setValue:function(a){this.loader.setValue(a)},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(a){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var b=this.getSearcher().getKeyword();a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this,d=this.options;this._count?(b(),a()):d.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(d){c._count=d.count,b(),a()})},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._count=null,this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectCombo.EVENT_FOCUS="EVENT_FOCUS", BI.SingleSelectCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_combo",BI.SingleSelectCombo),BI.SingleSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectInsertCombo.superclass._init.apply(this,arguments);var a=this,b=this.options,c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue),a.trigger.getSearcher().setState(a.storeValue)};this.storeValue=b.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:b.height,allowNoSelect:b.allowNoSelect,allowEdit:b.allowEdit,valueFormatter:b.valueFormatter,itemsCreator:function(c,d){b.itemsCreator(c,function(b){1===c.times&&BI.isNotNull(c.keywords)&&a.trigger.setValue(a.getValue()),d.apply(a,arguments)})},text:b.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){a.trigger.getSearcher().hasMatched()||(a.storeValue=a.trigger.getSearcher().getKeyword(),c(),a._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){a._setStartValue(),this.getSearcher().setValue(a.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){a._setStartValue(),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){var b=this.getSearcher().getKeyword();a.storeValue=b,a.combo.setValue(a.storeValue),a._setStartValue(b),c(),a.populate(),a._setStartValue()}),this.trigger.on(BI.SingleSelectTrigger.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())}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(b,d){a.storeValue=this.getValue(),c(),a._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){a.combo.isViewVisible()||a.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:b.allowNoSelect,ref:function(){a.popup=this,a.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){a.storeValue=this.getValue(),a._adjust(function(){c(),a._defaultState()}),a.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM)}}],itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:function(){BI.nextTick(function(){a.combo.adjustWidth(),a.combo.adjustHeight(),a.trigger.getSearcher().adjustView()})}},hideChecker:function(a){return 0===d.element.find(a.target).length},value:b.value}),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.SingleSelectInsertCombo.EVENT_CONFIRM)});var d=BI.createWidget({type:"bi.trigger_icon_button",width:b.height,height:b.height,cls:"single-select-trigger-icon-button"});d.on(BI.TriggerIconButton.EVENT_CHANGE,function(){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){},_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])&&BI.remove(d.storeValue.value,b)}),d._adjust(b)}var d=this,e=this.options;this._assertValue(this.storeValue),this.requesting=!0,e.itemsCreator({type:BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,keywords:a},function(a){var b=BI.map(a.items,"value");c(b)})},_adjust:function(a){function b(){c.wants2Quit===!0&&(c.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM),c.wants2Quit=!1),c.requesting=!1}var c=this;this.options;b(),a()},_setStartValue:function(a){this._startValue=a,this.popup.setStartValue(a)},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.SingleSelectInsertCombo,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.SingleSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.SingleSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.single_select_insert_combo",BI.SingleSelectInsertCombo),BI.SingleSelectComboItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},height:24})},_init:function(){BI.SingleSelectComboItem.superclass._init.apply(this,arguments);var a=this.options;this.radio=BI.createWidget({type:"bi.radio"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:a.height,height:a.height,hgap:a.hgap,text:a.text,keyword:a.keyword,value:a.value,py:a.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(a.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:26},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectComboItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(a){BI.SingleSelectComboItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(a)}}),BI.SingleSelectComboItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_combo_item",BI.SingleSelectComboItem),BI.SingleSelectList=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-select-list",direction:BI.Direction.Top,logic:{dynamic:!0},items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.list_pane"},allowNoSelect:!1})},_init:function(){BI.SingleSelectList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.list=BI.createWidget(b.el,{type:"bi.list_pane",items:b.items,itemsCreator:function(c,d){1===c.times&&a.toolbar&&a.toolbar.setVisible(!1),b.itemsCreator(c,function(b){d.apply(a,arguments),1===c.times&&(a.toolbar&&a.toolbar.setVisible(b&&b.length>0),a.toolbar&&a.toolbar.setEnable(b&&b.length>0))})},onLoaded:b.onLoaded,hasNext:b.hasNext,value:b.value}),this.list.on(BI.Controller.EVENT_CHANGE,function(b,c,d){b===BI.Events.CLICK&&a.fireEvent(BI.SingleSelectList.EVENT_CHANGE,c,d),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(b.direction),BI.extend({scrolly:!0},b.logic,{items:b.allowNoSelect?BI.LogicFactory.createLogicItemsByDirection(b.direction,{type:"bi.single_select_item",cls:"bi-list-item-active",height:24,forceNotSelected:!0,text:BI.i18nText("BI-Basic_No_Select"),ref:function(b){a.toolbar=b},listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(b){b===BI.Events.CLICK&&(a.list.setValue(),a.fireEvent(BI.SingleSelectList.EVENT_CHANGE)),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]},this.list):BI.LogicFactory.createLogicItemsByDirection(b.direction,this.list)}))))},hasPrev:function(){return this.list.hasPrev()},hasNext:function(){return this.list.hasNext()},prependItems:function(a){this.list.prependItems.apply(this.list,arguments)},addItems:function(a){this.list.addItems.apply(this.list,arguments)},setValue:function(a){this.list.setValue([a])},getValue:function(){return this.list.getValue()[0]},empty:function(){this.list.empty()},populate:function(a){this.list.populate.apply(this.list,arguments)},resetHeight:function(a){this.list.resetHeight?this.list.resetHeight(a):this.list.element.css({"max-height":a+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments)},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(a){return this.list.getIndexByValue(a)},getNodeById:function(a){return this.list.getNodeById(a)},getNodeByValue:function(a){return this.list.getNodeByValue(a)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var a=this,b=this.options,c=!1;this.storeValue=b.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:b.allowNoSelect,logic:b.logic,el:BI.extend({onLoaded:b.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},b.el),itemsCreator:function(d,e){var f=a._startValue;BI.isNotNull(a.storeValue)&&(d=BI.extend(d||{},{selectedValues:[a.storeValue]})),b.itemsCreator(d,function(g){c=g.hasNext;var h=[];if(1===d.times&&BI.isNotNull(a.storeValue)){var i=BI.map([a.storeValue],function(a,c){var d=b.valueFormatter(c)||c;return{text:d,value:c,title:d,selected:!0}});h=a._createItems(i)}e(h.concat(a._createItems(g.items)),g.keyword||""),1===d.times&&a.storeValue&&(BI.isKey(f)&&(a.storeValue=f),a.setValue(a.storeValue)),1===d.times&&a._scrollToTop()})},hasNext:function(){return c},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(a){return BI.createItems(a,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var a=this;BI.delay(function(){a.button_group.element.scrollTop(0)},30)},_assertValue:function(a){},setStartValue:function(a){this._startValue=a},setValue:function(a){this.storeValue=a,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(a){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(a){this.button_group.resetHeight(a)},resetWidth:function(a){this.button_group.resetWidth(a)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var a=this,b=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,onLoaded:b.onLoaded,value:b.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,element:this,el:this.loader,value:b.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE)})},setStartValue:function(a){this.loader.setStartValue(a)},setValue:function(a){this.popupView.setValue(a)},getValue:function(){return this.popupView.getValue()},populate:function(a){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(a){this.popupView.resetHeight(a)},resetWidth:function(a){this.popupView.resetWidth(a)}}),BI.SingleSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_popup_view",BI.SingleSelectPopupView),BI.SingleSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-trigger bi-border",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.SingleSelectTrigger.superclass._init.apply(this,arguments);var a=this,b=this.options;b.height&&this.setHeight(b.height-2),this.searcher=BI.createWidget(b.searcher,{type:"bi.single_select_searcher",allowNoSelect:b.allowNoSelect,text:b.text,height:b.height,itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,popup:{},adapter:b.adapter,masker:b.masker,value:b.value}),this.searcher.on(BI.SingleSelectSearcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_START)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS)}),this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR,arguments)});BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:BI.createWidget(),width:24}]});!b.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(a){this.searcher.setAdapter(a)},setValue:function(a){this.searcher.setValue(a)},getKey:function(){return this.searcher.getKey()},getValue:function(){return this.searcher.getValue()}}),BI.SingleSelectTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.SingleSelectTrigger.EVENT_COUNTER_CLICK="EVENT_COUNTER_CLICK",BI.SingleSelectTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectTrigger.EVENT_START="EVENT_START",BI.SingleSelectTrigger.EVENT_STOP="EVENT_STOP",BI.SingleSelectTrigger.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW="EVENT_BEFORE_COUNTER_POPUPVIEW",BI.SingleSelectTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectTrigger.EVENT_BLUR="EVENT_BLUR",BI.shortcut("bi.single_select_trigger",BI.SingleSelectTrigger),BI.SingleSelectInsertList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectInsertList.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value;var c=function(){BI.isKey(a._startValue)&&(a.storeValue=a._startValue)};this.adapter=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:b.allowNoSelect,cls:"popup-single-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:b.itemsCreator,valueFormatter:b.valueFormatter,logic:{dynamic:!0},el:{},value:b.value}),this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE,function(){a.storeValue=this.getValue(),c(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:b.valueFormatter,keywordGetter:function(){return a.trigger.getKeyword()},itemsCreator:function(c,d){c.keywords=[a.trigger.getKeyword()],this.setKeyword(c.keywords[0]),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,value:b.value,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();a.storeValue=b,a._showAdapter(),a.adapter.setValue(a.storeValue),a._setStartValue(b),c(),a.adapter.populate(),a._setStartValue(),a.fireEvent(BI.SingleSelectInsertList.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(){a.storeValue=this.getValue(),a.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,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(){},_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.type===BI.Selection.Single?BI.pushDistinct(d.storeValue.value,b):BI.remove(d.storeValue.value,b))}),b()}var d=this,e=this.options;this._assertValue(this.storeValue),this._allData?c(this._allData):e.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(a){d._allData=BI.map(a.items,"value"),c(d._allData)})},_setStartValue:function(a){this._startValue=a,this.adapter.setStartValue(a)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(a){this.storeValue=a,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{}})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.state_editor",element:this,height:b.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:b.value,text:b.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){a.fireEvent(BI.SingleSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(a){this.editor.setState(a)},setValue:function(a){this.editor.setValue(a)},getValue:function(){var a=this.editor.getState();return BI.isArray(a)&&a.length>0?a[a.length-1]:""},getKeywords:function(){var a=this.editor.getLastChangedValue(),b=a.match(/[\S]+/g);return BI.isEndWithBlank(a)?b.concat([" "]):b},populate:function(a){}}),BI.SingleSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.single_select_editor",BI.SingleSelectEditor),BI.SingleSelectSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},allowNoSelect:!1})},_init:function(){BI.SingleSelectSearcher.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget(b.el,{type:"bi.single_select_editor",height:b.height,text:b.text,listeners:[{eventName:BI.SingleSelectEditor.EVENT_FOCUS,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS)}},{eventName:BI.SingleSelectEditor.EVENT_BLUR,action:function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:b.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(a,b){b()},el:this.editor,popup:BI.extend({type:"bi.single_select_search_pane",allowNoSelect:b.allowNoSelect,valueFormatter:b.valueFormatter,keywordGetter:function(){return a.editor.getValue()},itemsCreator:function(c,d){var e=a.editor.getValue();c.keywords=[e],this.setKeyword(e),b.itemsCreator(c,d)},value:b.value},b.popup),adapter:b.adapter,masker:b.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),a.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){a.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var b=this.getKeywords();a.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING,b)}),BI.isNotNull(b.value)&&this.setState(b.value)},adjustView:function(){this.searcher.adjustView()},isSearching:function(){return this.searcher.isSearching()},stopSearch:function(){this.searcher.stopSearch()},getKeyword:function(){return this.editor.getValue()},hasMatched:function(){return this.searcher.hasMatched()},hasChecked:function(){return this.searcher.getView()&&this.searcher.getView().hasChecked()},setAdapter:function(a){this.searcher.setAdapter(a)},setState:function(a){var b=this.options;BI.isNull(a)?this.editor.setState(BI.Selection.None):this.editor.setState(b.valueFormatter(a+"")||a+"")},setValue:function(a){this.setState(a),this.searcher.setValue(a)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(a){this.searcher.populate.apply(this.searcher,arguments)}}),BI.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var a=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{baseCls:(a.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var a=this,b=this.options;this.editor=BI.createWidget({type:"bi.editor",height:b.height,hgap:4,vgap:2,value:b.value,validationChecker:b.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return a.getValue()},textAlign:b.textAlign,height:b.height,hgap:4,handler:function(){a._showInput(),a.editor.focus(),a.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){a.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){a._showHint(),a._checkText(),a.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){a._checkText()}),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()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(a){this.editor.setValue(a),this._checkText()},getValue:function(){return this.editor.getValue()},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.SignTextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.SignTextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.SignTextEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.shortcut("bi.sign_text_editor",BI.SignTextEditor),BI.SliderIconButton=BI.inherit(BI.Widget,{props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var a=this;return{type:"bi.absolute",ref:function(){a.wrapper=this},items:[{el:{type:"bi.text_button",width:16,height:16,forceNotSelected:!0,cls:"slider-button bi-list-item-select3 bi-high-light-border",ref:function(){a.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Widget,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){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});return d.element.click(function(d){if(a.enable&&a.isEnabled()){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&&ef-c.SLIDER_WIDTH&&(g=100);var h=BI.parseFloat(g.toFixed(1));a._setAllPosition(h);var i=a._getValueByPercent(h);i=b.digit===!1?i:i.toFixed(b.digit),a.label.setValue(i),a.value=i,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:b.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(b){return a._checkValidation(b)}}),this.label.element.hover(function(){a.label.element.removeClass("bi-border").addClass("bi-border")},function(){a.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=BI.parseFloat(this.getValue()),c=a._getPercentByValue(b),d=BI.parseFloat(c.toFixed(1));a._setAllPosition(d),this.setValue(b),a.value=b,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}),this._setVisible(!1),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:d,top:20,left:0,width:"100%"},{el:{type:"bi.vertical",items:[{type:"bi.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging"); var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m),c.value=m,c.fireEvent(BI.SingleSlider.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){var b=this.options,c=!1;if(BI.isNumeric(a)&&!(BI.isNull(a)||athis.max))if(b.digit===!1)c=!0;else{var d=(a+"").split(".")[1]||"";c=d.length===b.digit}return c},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(a){},_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),ab&&(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-Basic_Please_Enter_Number_Between",this.min,this.max)),BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max),this._setAllPosition(100)))}}),BI.SingleSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider",BI.SingleSlider),BI.SingleSliderLabel=BI.inherit(BI.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&&a.isEnabled()){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&&ef-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.horizontal_auto",items:[this.label]}],height:c.EDITOR_HEIGHT},top:0,left:0,width:"100%"}]})},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setLabelPosition(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.label.setValue(m+d.unit),c.value=m,c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrackWrapper:function(){return BI.createWidget({type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,width:"100%"},{el:this.blueTrack,top:0,left:0,width:"0%"}]}],hgap:8,height:8},top:8,left:0,width:"100%"}]})},_checkValidation:function(a){return BI.isNumeric(a)&&!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setLabelPosition:function(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)},_setEnable:function(a){BI.SingleSliderLabel.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},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),ab&&(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(){var a=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+a.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+a.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Widget,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var a=this,b=this._constant,c=this._createTrack();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:b.SLIDER_WIDTH_HALF,height:b.SLIDER_HEIGHT});return d.element.click(function(c){if(a.enable&&a.isEnabled()){var d=c.clientX-a.element.offset().left-b.SLIDER_WIDTH_HALF,e=a.track.element[0].scrollWidth,f=0;d<0&&(f=0),d>0&&de-b.SLIDER_WIDTH&&(f=100);var g=BI.parseFloat(f.toFixed(1));a._setAllPosition(g);var h=a._getValueByPercent(g);a.value=h,a.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:c,width:"100%",height:b.TRACK_HEIGHT}]}],hgap:7,height:b.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:d,top:0,left:0,width:"100%"}]}},_draggable:function(a){function b(a){return BI.clamp(a,0,c._getGrayTrackLength())}var c=this,d=this.options,e=!1,f=0,g=0,h=0,i=new BI.MouseMoveTracker(function(j){if(i.isDragging()){e=!0,g+=j,f=b(h+g),a.element.addClass("dragging");var k=100*f/c._getGrayTrackLength(),l=BI.parseFloat(k.toFixed(1));c._setBlueTrack(l),c._setSliderPosition(l);var m=c._getValueByPercent(l);m=d.digit===!1?m:m.toFixed(d.digit),c.value=m,c.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,m)}},function(){if(e===!0){f=b(f);var d=100*f/c._getGrayTrackLength(),j=BI.parseFloat(d.toFixed(1));c._setSliderPosition(j),f=0,g=0,h=f,e=!1}a.element.removeClass("dragging"),i.releaseMouseMoves(),c.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);a.element.on("mousedown",function(c){a.isEnabled()&&(h=this.offsetLeft,b(h),i.captureMouseMoves(c))})},_createTrack:function(){var a=this;this._constant;return 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.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{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%"}],ref:function(b){a.track=b}}},_checkValidation:function(a){return!(BI.isNull(a)||athis.max)},_setBlueTrack:function(a){this.blueTrack.element.css({width:a+"%"})},_setSliderPosition:function(a){this.slider.element.css({left:a+"%"})},_setAllPosition:function(a){this._setSliderPosition(a),this._setBlueTrack(a)},_setVisible:function(a){this.slider.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)},_setEnable:function(a){BI.SingleSliderNormal.superclass._setEnable.apply(this,[a]),a?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.value},setValue:function(a){var b=BI.parseFloat(a);isNaN(b)||(this._checkValidation(b)&&(this.value=b),b>this.max&&(this.value=this.max),bb&&(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,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?this._setAllPosition(this._getPercentByValue(this.value)):this._setAllPosition(100))}}),BI.SingleSliderNormal.EVENT_DRAG="EVENT_DRAG",BI.shortcut("bi.single_slider_normal",BI.SingleSliderNormal),BI.SingleTreeCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-combo",trigger:{},height:24,text:"",items:[],value:"",attributes:{tabIndex:0}})},_init:function(){BI.SingleTreeCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.trigger=BI.createWidget(BI.extend({type:"bi.single_tree_trigger",text:b.text,height:b.height,items:b.items,value:b.value},b.trigger)),this.popup=BI.createWidget({type:"bi.single_level_tree",items:b.items,value:b.value}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup}}),this.combo.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.popup.on(BI.SingleTreePopup.EVENT_CHANGE,function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE)})},populate:function(a){this.combo.populate(a)},setValue:function(a){a=BI.isArray(a)?a:[a],this.trigger.setValue(a),this.popup.setValue(a)},getValue:function(){return this.popup.getValue()}}),BI.SingleTreeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.single_tree_combo",BI.SingleTreeCombo),BI.SingleTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-level-tree",tipText:BI.i18nText("BI-No_Selected_Item"),items:[],value:""})},_init:function(){BI.SingleTreePopup.superclass._init.apply(this,arguments);var a=this,b=this.options;this.tree=BI.createWidget({type:"bi.level_tree",expander:{isDefaultInit:!0},items:b.items,value:b.value,chooseType:BI.Selection.Single}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.tree]}),this.tree.on(BI.Controller.EVENT_CHANGE,function(){a.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.tree.on(BI.LevelTree.EVENT_CHANGE,function(){a.fireEvent(BI.SingleTreePopup.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.SingleTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(a)}}),BI.SingleTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_level_tree",BI.SingleTreePopup),BI.SingleTreeTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-tree-trigger",height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var a=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:a.text,items:a.items,height:a.height,value:a.value})},_checkTitle:function(){var a=this,b=this.getValue();BI.any(this.options.items,function(c,d){if(BI.contains(b,d.value))return a.trigger.setTitle(d.text||d.value),!0})},setValue:function(a){a=BI.isArray(a)?a:[a],this.options.value=a,this.trigger.setValue(a),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(a){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(a)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var a=this,b=this.options;return{type:"bi.vtape",items:[{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",value:b.value,ref:function(b){a.timeSelect=b}}]},hgap:10,height:44},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Clears"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Now"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},setValue:function(a){this._checkValueValid(a)?this.timeSelect.setValue():this.timeSelect.setValue({hour:a.hour,minute:a.minute,second:a.second})},getValue:function(){return this.timeSelect.getValue()},_checkValueValid:function(a){return BI.isNull(a)||BI.isEmptyObject(a)||BI.isEmptyString(a)}}),BI.TimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.TimePopup.BUTTON_NOW_EVENT_CHANGE="BUTTON_NOW_EVENT_CHANGE",BI.TimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.time_popup",BI.TimePopup)}(),!function(){BI.TimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:80,popupWidth:240,comboAdjustHeight:1,border:1},props:{baseCls:"bi-time-combo bi-border bi-border-radius",width:78,height:22,format:"",allowEdit:!1},render:function(){var a=this,b=this.options;this.storeTriggerValue="",this.storeValue=b.value;var c={type:"bi.time_popup",value:b.value,listeners:[{eventName:BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.hidePopupView(),a.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}},{eventName:BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,action:function(){a._setNowTime()}}],ref:function(b){a.popup=b}};return{type:"bi.htape",items:[{type:"bi.absolute",items:[{el:{type:"bi.combo",container:b.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.time_trigger",allowEdit:b.allowEdit,watermark:b.watermark,format:b.format,value:b.value,ref:function(b){a.trigger=b},listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.combo.isViewVisible()&&a.combo.hideView()}},{eventName:"EVENT_STOP",action:function(){a.combo.isViewVisible()||a.combo.showView()}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.trigger.getKey(),a.combo.isViewVisible()||a.combo.showView(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_ERROR",action:function(){var b=BI.getDate();a.storeValue={hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()},a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}},{eventName:"EVENT_CONFIRM",action:function(){if(!a.combo.isViewVisible()){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)?(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())):BI.isEmptyString(c)&&(a.storeValue=null,a.trigger.setValue()),a.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:c,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(b){return 0===a.triggerBtn.element.find(b.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(b){a.combo=b}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.combo.isViewVisible()||a.combo.showView()}}],ref:function(b){a.triggerBtn=b}},top:0,right:0}]}]}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var a=BI.getDate(),b={hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds()};this.setValue(b),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var a=this,b=this.options;return this.storeTriggerValue="",this.storeValue=b.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:b.height,validationChecker:function(b){return a._dateCheck(b)},quitChecker:function(){return!1},ref:function(b){a.editor=b},value:this._formatValue(b.value),hgap:4,allowBlank:!0,watermark:BI.isKey(b.watermark)?b.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){a.fireEvent("EVENT_KEY_DOWN")}},{eventName:"EVENT_FOCUS",action:function(){a.storeTriggerValue=a.getKey(),a.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_STOP",action:function(){a.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){a.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){a.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var b=a.editor.getValue();if(BI.isNotNull(b)&&a.editor.setState(b),BI.isNotEmptyString(b)&&!BI.isEqual(a.storeTriggerValue,a.getKey())){var c=b.match(/\d+/g);a.storeValue={hour:0|c[0],minute:0|c[1],second:0|c[2]}}a.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){a.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.text",invisible:b.allowEdit,cls:"show-text",title:BI.bind(this._getTitle,this),hgap:4},left:0,right:0,top:0,bottom:0}]}},_dateCheck:function(a){var b=this._const;return BI.any(b.FORMAT_ARRAY,function(c,d){return BI.print(BI.parseDateTime(b.DEFAULT_DATE_STRING+" "+a,b.COMPLETE_COMPARE_FORMAT),d)===a})},_getTitle:function(){var a=this.storeValue||{},b=BI.getDate();return BI.print(BI.getDate(b.getFullYear(),0,1,a.hour,a.minute,a.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(a){var b=BI.getDate();return BI.isNotEmptyObject(a)?BI.print(BI.getDate(b.getFullYear(),b.getMonth(),b.getDay(),a.hour,a.minute,a.second),this._getFormatString()):BI.i18nText("BI-Basic_Unrestricted")},getKey:function(){return this.editor.getValue()},setValue:function(a){this.storeValue=a,this.editor.setValue(this._formatValue(a))},getValue:function(){return this.storeValue}}),BI.shortcut("bi.time_trigger",BI.TimeTrigger)}(),BI.DateInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.DateInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)}),d.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),d.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.DateInterval.EVENT_CHANGE))}),d},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d"),"%Y-%x-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e"),"%Y-%x-%e")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e"),"%Y-%X-%e")===a},_checkVoid:function(a){var b=this.options;return!BI.checkDateVoid(a.year,a.month,a.day,b.minDate,b.maxDate)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d"),b=BI.print(BI.parseDateTime(b,"%Y-%X-%d"),"%Y-%X-%d"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.DateInterval.EVENT_VALID="EVENT_VALID",BI.DateInterval.EVENT_ERROR="EVENT_ERROR",BI.DateInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_interval",BI.DateInterval),BI.TimeInterval=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0,timeErrorCls:"time-error"},_defaultConfig:function(){var a=BI.TimeInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(a,{extraCls:"bi-time-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var a=this,b=this.options;BI.TimeInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:a.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:a.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[a.label]})},_createCombo:function(a){var b=this,c=this.options,d=BI.createWidget({type:"bi.dynamic_date_time_combo",behaviors:c.behaviors,value:a});return d.on(BI.DynamicDateTimeCombo.EVENT_ERROR,function(){b._clearTitle(),BI.Bubbles.hide("error"),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)}),d.on(BI.DynamicDateTimeCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateTimeCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),b,{offsetStyle:"center"}),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls))}),d.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW,function(){b.left.hidePopupView(),b.right.hidePopupView()}),d.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var a=b.left.getKey(),c=b.right.getKey();b.left.isValid()&&b.right.isValid()&&b._check(a,c)&&b._compare(a,c)?(b._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),b.element.addClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_ERROR)):(b._clearTitle(),b.element.removeClass(b.constants.timeErrorCls),b.fireEvent(BI.TimeInterval.EVENT_CHANGE))}),d},_dateCheck:function(a){return BI.print(BI.parseDateTime(a,"%Y-%x-%d %H:%M:%S"),"%Y-%x-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%x-%e %H:%M:%S"),"%Y-%x-%e %H:%M:%S")===a||BI.print(BI.parseDateTime(a,"%Y-%X-%e %H:%M:%S"),"%Y-%X-%e %H:%M:%S")===a},_checkVoid:function(a){var b=this.options;return!BI.checkDateVoid(a.year,a.month,a.day,b.minDate,b.maxDate)[0]},_check:function(a,b){var c=a.match(/\d+/g),d=b.match(/\d+/g);return this._dateCheck(a)&&BI.checkDateLegal(a)&&this._checkVoid({year:c[0],month:c[1],day:c[2]})&&this._dateCheck(b)&&BI.checkDateLegal(b)&&this._checkVoid({year:d[0],month:d[1],day:d[2]})},_compare:function(a,b){return a=BI.print(BI.parseDateTime(a,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),b=BI.print(BI.parseDateTime(b,"%Y-%X-%d %H:%M:%S"),"%Y-%X-%d %H:%M:%S"),BI.isNotNull(a)&&BI.isNotNull(b)&&a>b},_setTitle:function(a){this.left.setTitle(a),this.right.setTitle(a),this.label.setTitle(a)},_clearTitle:function(){this.left.setTitle(""),this.right.setTitle(""),this.label.setTitle("")},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimeInterval.EVENT_VALID="EVENT_VALID",BI.TimeInterval.EVENT_ERROR="EVENT_ERROR",BI.TimeInterval.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_interval",BI.TimeInterval),!function(){BI.TimePeriods=BI.inherit(BI.Single,{constants:{height:24,width:24,lgap:15,offset:0},props:{extraCls:"bi-time-interval",value:{}},render:function(){var a=this,b=this.options;return{type:"bi.absolute",height:this.constants.height,items:[{el:{type:"bi.horizontal_auto",items:[{type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-",ref:function(b){a.label=b; }}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:BI.extend({ref:function(b){a.left=b}},this._createCombo(b.value.start)),left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:BI.extend({ref:function(b){a.right=b}},this._createCombo(b.value.end)),left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]},top:0,left:0,right:0,bottom:0}]}},_createCombo:function(a){var b=this;return{type:"bi.time_combo",value:a,listeners:[{eventName:BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,action:function(){b.left.hidePopupView(),b.right.hidePopupView()}},{eventName:BI.TimeCombo.EVENT_CHANGE,action:function(){b.fireEvent(BI.TimePeriods.EVENT_CHANGE)}},{eventName:BI.TimeCombo.EVENT_CONFIRM,action:function(){b.fireEvent(BI.TimePeriods.EVENT_CONFIRM)}}]}},setValue:function(a){a=a||{},this.left.setValue(a.start),this.right.setValue(a.end)},getValue:function(){return{start:this.left.getValue(),end:this.right.getValue()}}}),BI.TimePeriods.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimePeriods.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.time_periods",BI.TimePeriods)}(),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year))},getValue:function(){var a=this.item.getValue();return{year:0===a.offset?-a.value:a.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(a){var b=this.options,c=this._year,d=BI.createWidget({type:"bi.year_calendar",behaviors:b.behaviors,min:b.min,max:b.max,logic:{dynamic:!0},year:c+12*a});return d.setValue(this._year),d},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var a=this,b=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()-1),a._checkLeftValid(),a._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){a.navigation.setSelect(a.navigation.getSelect()+1),a._checkLeftValid(),a._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[a.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[a.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(a.selectedYear);var b=this.getSelectedCard();a.backBtn.setEnable(!b.isFrontYear()),a.preBtn.setEnable(!b.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){a.selectedYear=this.getValue(),a.fireEvent(BI.Controller.EVENT_CHANGE,arguments),a.fireEvent(BI.StaticYearCard.EVENT_CHANGE,a.selectedYear)}),BI.isKey(b.value)&&this.setValue(b.value)},_checkLeftValid:function(){var a=(this.options,!0);return this.backBtn.setEnable(a),a},_checkRightValid:function(){var a=(this.options,!0);return this.preBtn.setEnable(a),a},getValue:function(){return{year:this.selectedYear}},setValue:function(a){var b=this.options;a=a||{};var c=a.year;BI.checkDateVoid(c,1,1,b.min,b.max)[0]?(c=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(c),this.navigation.setSelect(BI.YearCalendar.getPageByYear(c)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:b.min,max:b.max,height:b.height,value:b.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=this.getKey()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM,function(){a.combo.isViewVisible()||(this.getKey()&&this.getKey()!==a.storeTriggerValue?(a.storeValue=a.trigger.getValue(),a.setValue(a.storeValue)):this.getKey()||(a.storeValue=null,a.setValue()),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM))}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicYearCombo.Static,value:{year:b.getFullYear()}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue}}),BI.DynamicYearCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_combo",BI.DynamicYearCombo),BI.extend(BI.DynamicYearCombo,{Static:1,Dynamic:2}),BI.DynamicYearPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this,b=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:b.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",textHeight:b.buttonHeight-1,cls:"bi-split-left bi-split-right bi-high-light bi-split-top",shadow:!0,text:BI.i18nText("BI-Basic_Current_Year"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:b.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear()}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},beforeInit:function(a){var b=this.options;b.title=BI.bind(this._titleCreator,this),a()},_init:function(){BI.DynamicYearTrigger.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)&&!BI.checkDateVoid(a,1,1,b.min,b.max)[0]},quitChecker:function(a){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(){return BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var b=a.editor.getValue();BI.isNotNull(b)&&a.editor.setValue(b),BI.isNotEmptyString(b)&&(a.storeValue={type:BI.DynamicDateCombo.Static,value:{year:b}}),a.fireEvent(BI.DynamicYearTrigger.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.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){a.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Date_Year"),width:b.height},width:b.height},{el:{type:"bi.trigger_icon_button",width:b.height},width:b.height}]}),this.setValue(b.value)},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==BI.parseInt(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){var c=BI.print(a,"%Y");this.editor.setState(c),this.editor.setValue(c)},_titleCreator:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;if(!this.editor.isValid())return"";switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,"%Y");return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return c=c||{},c.year}},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{},this.editor.setState(c.year),this.editor.setValue(c.year)}},getValue:function(){return this.storeValue},getKey:function(){return 0|this.editor.getValue()}}),BI.DynamicYearTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearTrigger.EVENT_START="EVENT_START",BI.DynamicYearTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearTrigger.EVENT_STOP="EVENT_STOP",BI.shortcut("bi.dynamic_year_trigger",BI.DynamicYearTrigger),BI.DynamicYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-month-card"},render:function(){var a=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){a.year=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]},{type:"bi.dynamic_date_param_item",dateType:BI.DynamicDateCard.TYPE.MONTH,ref:function(){a.month=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){a.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(a,b){return{dateType:a,value:Math.abs(b),offset:b>0?1:0}},setValue:function(a){a=a||{year:0,month:0},this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,a.year)),this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH,a.month))},getValue:function(){var a=this.year.getValue(),b=this.month.getValue();return{year:0===a.offset?-a.value:a.value,month:0===b.offset?-b.value:b.value}}}),BI.DynamicYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_card",BI.DynamicYearMonthCard),BI.StaticYearMonthCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-static-year-month-card",behaviors:{}},_createMonths:function(){var a=[1,7,2,8,3,9,4,10,5,11,6,12],b=[];return b.push(a.slice(0,2)),b.push(a.slice(2,4)),b.push(a.slice(4,6)),b.push(a.slice(6,8)),b.push(a.slice(8,10)),b.push(a.slice(10,12)),BI.map(b,function(a,b){return BI.map(b,function(a,b){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:b,text:b}})})},render:function(){var a=this,b=this.options;return{type:"bi.vertical",items:[{type:"bi.year_picker",ref:function(){a.yearPicker=this},behaviors:b.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var b=this.getValue();a.setValue({year:b,month:a.selectedMonth})}}]},{type:"bi.button_group",cls:"bi-split-top",behaviors:b.behaviors,ref:function(){a.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:b.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){a.selectedYear=a.yearPicker.getValue(),a.selectedMonth=this.getValue()[0],a.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(a){var b=this.options,c={};if(c.year=a.year||0,c.month=a.month||0,0===c.year||0===c.month||BI.checkDateVoid(c.year,c.month,1,b.min,b.max)[0]){var d=c.year||BI.getDate().getFullYear();this.selectedYear=d,this.selectedMonth="",this.yearPicker.setValue(d),this.month.setValue()}else this.selectedYear=BI.parseInt(c.year),this.selectedMonth=BI.parseInt(c.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var a=this,b=this.options;this.storeValue=b.value,this.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:b.min,max:b.max,height:b.height,value:b.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){a.combo.isViewVisible()&&a.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){a.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){a.combo.isViewVisible()&&a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){a.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){var b=a.storeTriggerValue,c=a.trigger.getKey();BI.isNotEmptyString(c)&&!BI.isEqual(c,b)&&(a.storeValue=a.trigger.getValue(),a.setValue(a.trigger.getValue())),a._checkDynamicValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS,function(){a.storeTriggerValue=a.trigger.getKey(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS)}),this.combo=BI.createWidget({type:"bi.combo",container:b.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:100,stopPropagation:!1,el:{type:"bi.dynamic_year_month_popup",ref:function(){a.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){a.setValue(),a.combo.hideView(),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var b=BI.getDate();a.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:b.getFullYear(),month:b.getMonth()+1}}),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){a.setValue(a.popup.getValue()),a.combo.hideView(),a.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:b.behaviors,min:b.min,max:b.max},value:b.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){a.popup.setValue(a.storeValue),a.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){a.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){a.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(b.value)},_checkDynamicValue:function(a){var b=null;switch(BI.isNotNull(a)&&(b=a.type),b){case BI.DynamicYearMonthCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},hideView:function(){this.combo.hideView()},setValue:function(a){this.storeValue=a,this.trigger.setValue(a),this._checkDynamicValue(a)},getValue:function(){return this.storeValue},getKey:function(){return this.trigger.getKey()},isValid:function(){return this.trigger.isValid()}}),BI.DynamicYearMonthCombo.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthCombo.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthCombo.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_month_combo",BI.DynamicYearMonthCombo),BI.extend(BI.DynamicYearMonthCombo,{Static:1,Dynamic:2}),BI.DynamicYearMonthPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-month-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var a=this,b=(this.options,this.constants);return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:b.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:b.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){a.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:b.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var a=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());a=BI.print(a,"%Y-%x"),this.textButton.setValue(a),this.textButton.setEnable(!1)}},_getTabJson:function(){var a=this,b=this.options;return{type:"bi.tab",ref:function(){a.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Month"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(c){switch(c){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_month_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){a._setInnerValue(a.year,c)}}],ref:function(){a.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_month_card",behaviors:b.behaviors,min:a.options.min,max:a.options.max,listeners:[{eventName:BI.StaticYearMonthCard.EVENT_CHANGE,action:function(){a.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE)}}],ref:function(){a.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var b=a.dateTab.getSelect();switch(b){case BI.DynamicYearCombo.Static:var c=BI.DynamicDateHelper.getCalculation(a.dynamicPane.getValue());a.year.setValue({year:c.getFullYear(),month:c.getMonth()+1}),a._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:a.storeValue&&a.storeValue.type===BI.DynamicYearCombo.Dynamic?a.dynamicPane.setValue(a.storeValue.value):a.dynamicPane.setValue({year:0}),a._setInnerValue()}}}]}},setValue:function(a){this.storeValue=a;var b,c,d=this;switch(a=a||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value||a,this.dateTab.setSelect(b),b){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(c),d._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(c),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearMonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_month_popup",BI.DynamicYearMonthPopup),BI.DynamicYearMonthTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-month-trigger",min:"1900-01-01",max:"2099-12-31",height:22},beforeInit:function(a){var b=this.options;b.title=BI.bind(this._titleCreator,this),a()},_init:function(){BI.DynamicYearMonthTrigger.superclass._init.apply(this,arguments);var a=this.options;this.yearEditor=this._createEditor(!0),this.monthEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:a.height},width:a.height}]},{type:"bi.htape",items:[this.monthEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Month"),width:a.height},width:a.height}]}]},{el:{type:"bi.trigger_icon_button",width:a.height},width:a.height}]}),this.setValue(a.value)},_createEditor:function(a){var b=this,c=this.options,d=this._const,e=BI.createWidget({type:"bi.sign_editor",height:c.height,validationChecker:function(b){return a?""===b||BI.isPositiveInteger(b)&&!BI.checkDateVoid(b,1,1,c.min,c.max)[0]:""===b||BI.isPositiveInteger(b)&&b>=1&&b<=12&&!BI.checkDateVoid(BI.getDate().getFullYear(),b,1,c.min,c.max)[0]},quitChecker:function(){return!1},watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(a){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},hgap:d.hgap,vgap:d.vgap,allowBlank:!0});return e.on(BI.SignEditor.EVENT_KEY_DOWN,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN)}),e.on(BI.SignEditor.EVENT_FOCUS,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS)}),e.on(BI.SignEditor.EVENT_STOP,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP)}),e.on(BI.SignEditor.EVENT_CONFIRM,function(){b._doEditorConfirm(e),b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM)}),e.on(BI.SignEditor.EVENT_SPACE,function(){e.isValid()&&e.blur()}),e.on(BI.SignEditor.EVENT_START,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START)}),e.on(BI.SignEditor.EVENT_ERROR,function(){b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR)}),e.on(BI.SignEditor.EVENT_VALID,function(){var a=b.yearEditor.getValue(),d=b.monthEditor.getValue();BI.isNotEmptyString(a)&&BI.isNotEmptyString(d)&&BI.isPositiveInteger(a)&&d>=1&&d<=12&&!BI.checkDateVoid(a,d,1,c.min,c.max)[0]&&b.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID)}),e.on(BI.SignEditor.EVENT_CHANGE,function(){a&&b._autoSwitch(e)}),e},_titleCreator:function(){var a=this.storeValue||{},b=a.type||BI.DynamicDateCombo.Static,c=a.value;if(!this.monthEditor.isValid()||!this.yearEditor.isValid())return"";switch(b){case BI.DynamicDateCombo.Dynamic:var d=this._getText(c),e=BI.getDate();e=BI.DynamicDateHelper.getCalculation(c);var f=BI.print(e,"%Y-%x");return BI.isEmptyString(d)?f:d+":"+f;case BI.DynamicDateCombo.Static:default:return c=c||{},this._getStaticTitle(c)}},_doEditorConfirm:function(a){var b=a.getValue();BI.isNotNull(b)&&a.setValue(b);var c=this.monthEditor.getValue();this.storeValue={type:BI.DynamicDateCombo.Static,value:{year:this.yearEditor.getValue(),month:BI.isEmptyString(this.monthEditor.getValue())?"":c}}},_yearCheck:function(a){var b=BI.print(BI.parseDateTime(a,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(a,"%Y"),"%Y")===a&&b>=this.options.min&&b<=this.options.max},_autoSwitch:function(a){var b=a.getValue();BI.isNotEmptyString(b)&&BI.checkDateLegal(b)&&4===b.length&&this._yearCheck(b)&&(this._doEditorConfirm(a),this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM),this.monthEditor.focus())},_getText:function(a){var b="";return BI.isNotNull(a.year)&&0!==BI.parseInt(a.year)&&(b+=Math.abs(a.year)+BI.i18nText("BI-Basic_Year")+(a.year<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),BI.isNotNull(a.month)&&0!==BI.parseInt(a.month)&&(b+=Math.abs(a.month)+BI.i18nText("BI-Basic_Month")+(a.month<0?BI.i18nText("BI-Basic_Front"):BI.i18nText("BI-Basic_Behind"))),b},_setInnerValue:function(a,b){this.yearEditor.setValue(a.getFullYear()),this.monthEditor.setValue(a.getMonth()+1)},_getStaticTitle:function(a){a=a||{};var b=!(BI.isNull(a.year)||BI.isEmptyString(a.year)),c=!(BI.isNull(a.month)||BI.isEmptyString(a.month));switch(b<<1|c){case 0:return"";case 1:return a.month;case 2:return a.year;case 3:default:return a.year+"-"+a.month}},setValue:function(a){var b,c,d=BI.getDate();switch(this.storeValue=a,BI.isNotNull(a)&&(b=a.type||BI.DynamicDateCombo.Static,c=a.value||a),b){case BI.DynamicDateCombo.Dynamic:var e=this._getText(c);d=BI.DynamicDateHelper.getCalculation(c),this._setInnerValue(d,e);break;case BI.DynamicDateCombo.Static:default:c=c||{};var f=BI.isNull(c.month)?null:c.month;this.yearEditor.setValue(c.year),this.monthEditor.setValue(f)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()},isValid:function(){return this.yearEditor.isValid()&&this.monthEditor.isValid()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:24,width:25,lgap:15,offset:-15,timeErrorCls:"time-error"},props:{extraCls:"bi-year-month-interval",minDate:"1900-01-01",maxDate:"2099-12-31"},_init:function(){var a=this,b=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),b.value=b.value||{},this.left=this._createCombo(b.value.start),this.right=this._createCombo(b.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:a,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{ diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 2647d2e17..b2e71a11b 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -11657,12 +11657,14 @@ if (!_global.BI) { invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -11751,6 +11753,9 @@ if (!_global.BI) { if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -11830,7 +11835,7 @@ if (!_global.BI) { lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); } @@ -60158,7 +60163,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/dist/utils.min.js b/dist/utils.min.js index c2ab7aa26..526cda414 100644 --- a/dist/utils.min.js +++ b/dist/utils.min.js @@ -1,4 +1,4 @@ -/*! fineui 2019-07-18 10:31:40 */ +/*! fineui 2019-07-18 23:29:54 */ var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),function(){function a(a,b,c){switch(c.length){case 0:return a.call(b);case 1:return a.call(b,c[0]);case 2:return a.call(b,c[0],c[1]);case 3:return a.call(b,c[0],c[1],c[2])}return a.apply(b,c)}function b(a,b,c,d){for(var e=-1,f=null==a?0:a.length;++e-1}function g(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function z(a,b){for(var c=a.length;c--&&o(b,a[c],0)>-1;);return c}function A(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function B(a,b){return null==a?Ie:a[b]}function C(a){return Cg.test(a)}function D(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function E(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function F(a,b){return function(c){return a(b(c))}}function G(a,b){for(var c=-1,d=a.length,e=0,f=[];++c-1}function ea(a,b){var c=this.__data__,d=xa(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function fa(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Ea(a,b,d,e,f,g){var h,i=b&Pe,j=b&Qe,k=bℜif(d&&(h=f?d(a,e,f,g):d(a)),h!==Ie)return h;if(!Sd(a))return a;var l=ti(a);if(l){if(h=xc(a),!i)return Qb(a,h)}else{var m=bi(a),n=m==uf||m==vf;if(ui(a))return Gb(a,i);if(m==zf||m==of||n&&!f){if(h=j||n?{}:yc(a),!i)return j?Tb(a,Aa(h,a)):Sb(a,za(h,a))}else{if(!Eg[m])return f?a:{};h=zc(a,m,i)}}g||(g=new oa);var o=g.get(a);if(o)return o;if(g.set(a,h),yi(a))return a.forEach(function(c){h.add(Ea(c,b,d,c,a,g))}),h;if(wi(a))return a.forEach(function(c,e){h.set(e,Ea(c,b,d,e,a,g))}),h;var p=k?j?nc:mc:j?me:le,q=l?Ie:p(a);return c(q||a,function(c,e){q&&(e=c,c=a[e]),wa(h,e,Ea(c,b,d,e,a,g))}),h}function Fa(a,b,c){if("function"!=typeof a)throw new TypeError(Le);return setTimeout(function(){a.apply(Ie,c)},b)}function Ga(a,b,c,d){var e=-1,i=f,j=!0,k=a.length,l=[],m=b.length;if(!k)return l;c&&(b=h(b,v(c))),d?(i=g,j=!1):b.length>=Ke&&(i=x,j=!1,b=new la(b));a:for(;++e0&&c(h)?b>1?Ka(h,b-1,c,d,e):i(e,h):d||(e[e.length]=h)}return e}function La(a,b){return a&&Vh(a,b,le)}function Ma(a,b){return a&&Wh(a,b,le)}function Na(a,b){return e(b,function(b){return Qd(a[b])})}function Oa(a,b){b=Eb(b,a);for(var c=0,d=b.length;null!=a&&cb}function Sa(a,b){return null!=a&&ah.call(a,b)}function Ta(a,b){return null!=a&&b in Object(a)}function Ua(a,b,c){for(var d=c?g:f,e=a[0].length,i=a.length,j=i,k=Array(i),l=1/0,m=[];j--;){var n=a[j];j&&b&&(n=h(n,v(b))),l=Ah(n.length,l),k[j]=!c&&(b||e>=120&&n.length>=120)?new la(j&&n):Ie}n=a[0];var o=-1,p=k[0];a:for(;++oe?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d=Ke){var l=b?null:Zh(a);if(l)return I(l);i=!1,e=x,k=new la}else k=b?[]:j;a:for(;++d=d?a:wb(a,b,c)}function Gb(a,b){if(b)return a.slice();var c=a.length,d=kh?kh(c):new a.constructor(c);return a.copy(d),d}function Hb(a){var b=new a.constructor(a.byteLength);return new jh(b).set(new jh(a)),b}function Ib(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Jb(a){var b=new a.constructor(a.source,cg.exec(a));return b.lastIndex=a.lastIndex,b}function Kb(a){return Rh?Object(Rh.call(a)):{}}function Lb(a,b){var c=b?Hb(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Mb(a,b){if(a!==b){var c=a!==Ie,d=null===a,e=a===a,f=Zd(a),g=b!==Ie,h=null===b,i=b===b,j=Zd(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Ob(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=zh(f-g,0),k=Array(i+j),l=!d;++h1?c[e-1]:Ie,g=e>2?c[2]:Ie;for(f=a.length>3&&"function"==typeof f?(e--,f):Ie,g&&Dc(c[0],c[1],g)&&(f=e<3?Ie:f,e=1),b=Object(b);++d-1?e[f?b[g]:g]:Ie}}function ac(a,b,c,d,e,f,g,h,i,j){function k(){for(var r=arguments.length,s=Array(r),t=r;t--;)s[t]=arguments[t];if(o)var u=pc(k),v=A(s,u);if(d&&(s=Ob(s,d,e,o)),f&&(s=Pb(s,f,g,o)),r-=v,o&&r1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var l=-1,m=!0,n=c&Te?new la:Ie;for(f.set(a,b),f.set(b,a);++l1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace($f,"{\n/* [wrapped with "+b+"] */\n")}function Bc(a){return ti(a)||si(a)||!!(ph&&a&&a[ph])}function Cc(a,b){var c=typeof a;return b=null==b?jf:b,!!b&&("number"==c||"symbol"!=c&&hg.test(a))&&a>-1&&a%1==0&&a0){if(++b>=cf)return arguments[0]}else b=0;return a.apply(Ie,arguments)}}function Uc(a){if("string"==typeof a||Zd(a))return a;var b=a+"";return"0"==b&&1/a==-hf?"-0":b}function Vc(a){if(null!=a){try{return _g.call(a)}catch(b){}try{return a+""}catch(b){}}return""}function Wc(a,b){return c(nf,function(c){var d="_."+c[0];b&c[1]&&!f(a,d)&&a.push(d)}),a.sort()}function Xc(a){if(a instanceof R)return a.clone();var b=new Q(a.__wrapped__,a.__chain__);return b.__actions__=Qb(a.__actions__),b.__index__=a.__index__,b.__values__=a.__values__,b}function Yc(a){for(var b=-1,c=null==a?0:a.length,d=0,e=[];++b0&&(c=b.apply(this,arguments)),a<=1&&(b=Ie),c}}function Bd(a,b,c){function d(b){var c=m,d=n;return m=n=Ie,s=b,p=a.apply(d,c)}function e(a){return s=a,q=setTimeout(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Ah(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===Ie||c>=b||c<0||u&&d>=o}function h(){var a=oi();return g(a)?i(a):void(q=setTimeout(h,f(a)))}function i(a){return q=Ie,v&&m?d(a):(m=n=Ie,p)}function j(){q!==Ie&&clearTimeout(q),s=0,m=r=n=q=Ie}function k(){return q===Ie?p:i(oi())}function l(){var a=oi(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===Ie)return e(r);if(u)return q=setTimeout(h,b),d(r)}return q===Ie&&(q=setTimeout(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(Le);return b=ce(b)||0,Sd(c)&&(t=!!c.leading,u="maxWait"in c,o=u?zh(ce(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Cd(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new TypeError(Le);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Cd.Cache||fa),c}function Dd(a){if("function"!=typeof a)throw new TypeError(Le);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Ed(a){return Ad(2,a)}function Fd(a,b){if("function"!=typeof a)throw new TypeError(Le);return b=b===Ie?b:be(b),ub(a,b)}function Gd(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new TypeError(Le);return Sd(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Bd(a,b,{leading:d,maxWait:b,trailing:e})}function Hd(a){return Ea(a,Re)}function Id(a){return Ea(a,Pe|Re)}function Jd(a,b){return a===b||a!==a&&b!==b}function Kd(a){return null!=a&&Rd(a.length)&&!Qd(a)}function Ld(a){return Td(a)&&Kd(a)}function Md(a){return a===!0||a===!1||Td(a)&&Qa(a)==rf}function Nd(a){if(null==a)return!0;if(Kd(a)&&(ti(a)||"string"==typeof a||"function"==typeof a.splice||ui(a)||zi(a)||si(a)))return!a.length;var b=bi(a);if(b==wf||b==Df)return!a.size;if(Ic(a))return!gb(a).length;for(var c in a)if(ah.call(a,c))return!1;return!0}function Od(a,b){return Za(a,b)}function Pd(a){return"number"==typeof a&&xh(a)}function Qd(a){if(!Sd(a))return!1;var b=Qa(a);return b==uf||b==vf||b==qf||b==Bf}function Rd(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=jf}function Sd(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function Td(a){return null!=a&&"object"==typeof a}function Ud(a){return Wd(a)&&a!=+a}function Vd(a){return null===a}function Wd(a){return"number"==typeof a||Td(a)&&Qa(a)==xf}function Xd(a){if(!Td(a)||Qa(a)!=zf)return!1;var b=lh(a);if(null===b)return!0;var c=ah.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&_g.call(c)==eh}function Yd(a){return"string"==typeof a||!ti(a)&&Td(a)&&Qa(a)==Ef}function Zd(a){return"symbol"==typeof a||Td(a)&&Qa(a)==Ff}function $d(a){return a===Ie}function _d(a){if(!a)return[];if(Kd(a))return Yd(a)?L(a):Qb(a);if(qh&&a[qh])return D(a[qh]());var b=bi(a),c=b==wf?E:b==Df?I:qe;return c(a)}function ae(a){if(!a)return 0===a?a:0;if(a=ce(a),a===hf||a===-hf){var b=a<0?-1:1;return b*kf}return a===a?a:0}function be(a){var b=ae(a),c=b%1;return b===b?c?b-c:b:0}function ce(a){if("number"==typeof a)return a;if(Zd(a))return lf;if(Sd(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=Sd(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Zf,"");var c=eg.test(a);return c||gg.test(a)?Hg(a.slice(2),c?2:8):dg.test(a)?lf:+a}function de(a){return Rb(a,me(a))}function ee(a){return null==a?"":yb(a)}function fe(a,b){var c=Th(a);return null==b?c:za(c,b)}function ge(a,b){return m(a,fb(b,3),La)}function he(a,b){return m(a,fb(b,3),Ma)}function ie(a,b,c){var d=null==a?Ie:Oa(a,b);return d===Ie?c:d}function je(a,b){return null!=a&&wc(a,b,Sa)}function ke(a,b){return null!=a&&wc(a,b,Ta); }function le(a){return Kd(a)?ua(a):gb(a)}function me(a){return Kd(a)?ua(a,!0):hb(a)}function ne(a,b){return oe(a,Dd(fb(b)))}function oe(a,b){if(null==a)return{};var c=h(nc(a),function(a){return[a]});return b=fb(b),qb(a,c,function(a,c){return b(a,c[0])})}function pe(a,b,c){b=Eb(b,a);var d=-1,e=b.length;for(e||(e=1,a=Ie);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=Ch();return Ah(a+e*(b-a+Gg("1e-"+((e+"").length-1))),b)}return sb(a,b)}function te(a){return a=ee(a),a&&Uf.test(a)?a.replace(Tf,Wg):a}function ue(a,b,c){if(a=ee(a),a&&(c||b===Ie))return a.replace(Zf,"");if(!a||!(b=yb(b)))return a;var d=L(a),e=L(b),f=y(d,e),g=z(d,e)+1;return Fb(d,f,g).join("")}function ve(a){return function(){return a}}function we(a){return a}function xe(a){return fb("function"==typeof a?a:Ea(a,Pe))}function ye(a){return kb(Ea(a,Pe))}function ze(a,b,d){var e=le(b),f=Na(b,e);null!=d||Sd(b)&&(f.length||!e.length)||(d=b,b=a,a=this,f=Na(b,le(b)));var g=!(Sd(d)&&"chain"in d&&!d.chain),h=Qd(a);return c(f,function(c){var d=b[c];a[c]=d,h&&(a.prototype[c]=function(){var b=this.__chain__;if(g||b){var c=a(this.__wrapped__),e=c.__actions__=Qb(this.__actions__);return e.push({func:d,args:arguments,thisArg:a}),c.__chain__=b,c}return d.apply(a,i([this.value()],arguments))})}),a}function Ae(){return Kg._===this&&(Kg._=fh),this}function Be(){}function Ce(a){return Ec(a)?q(Uc(a)):rb(a)}function De(){return[]}function Ee(){return!1}function Fe(a){var b=++bh;return ee(a)+b}function Ge(a){return a&&a.length?Ia(a,we,Ra):Ie}function He(a){return a&&a.length?Ia(a,we,ib):Ie}var Ie,Je="4.17.5",Ke=200,Le="Expected a function",Me="__lodash_hash_undefined__",Ne=500,Oe="__lodash_placeholder__",Pe=1,Qe=2,Re=4,Se=1,Te=2,Ue=1,Ve=2,We=4,Xe=8,Ye=16,Ze=32,$e=64,_e=128,af=256,bf=512,cf=800,df=16,ef=1,ff=2,gf=3,hf=1/0,jf=9007199254740991,kf=1.7976931348623157e308,lf=NaN,mf=4294967295,nf=[["ary",_e],["bind",Ue],["bindKey",Ve],["curry",Xe],["curryRight",Ye],["flip",bf],["partial",Ze],["partialRight",$e],["rearg",af]],of="[object Arguments]",pf="[object Array]",qf="[object AsyncFunction]",rf="[object Boolean]",sf="[object Date]",tf="[object Error]",uf="[object Function]",vf="[object GeneratorFunction]",wf="[object Map]",xf="[object Number]",yf="[object Null]",zf="[object Object]",Af="[object Promise]",Bf="[object Proxy]",Cf="[object RegExp]",Df="[object Set]",Ef="[object String]",Ff="[object Symbol]",Gf="[object Undefined]",Hf="[object WeakMap]",If="[object ArrayBuffer]",Jf="[object DataView]",Kf="[object Float32Array]",Lf="[object Float64Array]",Mf="[object Int8Array]",Nf="[object Int16Array]",Of="[object Int32Array]",Pf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Sf="[object Uint32Array]",Tf=/[&<>"']/g,Uf=RegExp(Tf.source),Vf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wf=/^\w*$/,Xf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/[\\^$.*+?()[\]{}|]/g,Zf=/^\s+|\s+$/g,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_f=/\{\n\/\* \[wrapped with (.+)\] \*/,ag=/,? & /,bg=/\\(\\)?/g,cg=/\w*$/,dg=/^[-+]0x[0-9a-f]+$/i,eg=/^0b[01]+$/i,fg=/^\[object .+?Constructor\]$/,gg=/^0o[0-7]+$/i,hg=/^(?:0|[1-9]\d*)$/,ig="\\ud800-\\udfff",jg="\\u0300-\\u036f",kg="\\ufe20-\\ufe2f",lg="\\u20d0-\\u20ff",mg=jg+kg+lg,ng="\\ufe0e\\ufe0f",og="["+ig+"]",pg="["+mg+"]",qg="\\ud83c[\\udffb-\\udfff]",rg="(?:"+pg+"|"+qg+")",sg="[^"+ig+"]",tg="(?:\\ud83c[\\udde6-\\uddff]){2}",ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vg="\\u200d",wg=rg+"?",xg="["+ng+"]?",yg="(?:"+vg+"(?:"+[sg,tg,ug].join("|")+")"+xg+wg+")*",zg=xg+wg+yg,Ag="(?:"+[sg+pg+"?",pg,tg,ug,og].join("|")+")",Bg=RegExp(qg+"(?="+qg+")|"+Ag+zg,"g"),Cg=RegExp("["+vg+ig+mg+ng+"]"),Dg={};Dg[Kf]=Dg[Lf]=Dg[Mf]=Dg[Nf]=Dg[Of]=Dg[Pf]=Dg[Qf]=Dg[Rf]=Dg[Sf]=!0,Dg[of]=Dg[pf]=Dg[If]=Dg[rf]=Dg[Jf]=Dg[sf]=Dg[tf]=Dg[uf]=Dg[wf]=Dg[xf]=Dg[zf]=Dg[Cf]=Dg[Df]=Dg[Ef]=Dg[Hf]=!1;var Eg={};Eg[of]=Eg[pf]=Eg[If]=Eg[Jf]=Eg[rf]=Eg[sf]=Eg[Kf]=Eg[Lf]=Eg[Mf]=Eg[Nf]=Eg[Of]=Eg[wf]=Eg[xf]=Eg[zf]=Eg[Cf]=Eg[Df]=Eg[Ef]=Eg[Ff]=Eg[Pf]=Eg[Qf]=Eg[Rf]=Eg[Sf]=!0,Eg[tf]=Eg[uf]=Eg[Hf]=!1;var Fg={"&":"&","<":"<",">":">",'"':""","'":"'"},Gg=parseFloat,Hg=parseInt,Ig="object"==typeof global&&global&&global.Object===Object&&global,Jg="object"==typeof self&&self&&self.Object===Object&&self,Kg=Ig||Jg||Function("return this")(),Lg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Mg=Lg&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Mg&&Mg.exports===Lg,Og=Ng&&Ig.process,Pg=function(){try{return Og&&Og.binding&&Og.binding("util")}catch(a){}}(),Qg=Pg&&Pg.isDate,Rg=Pg&&Pg.isMap,Sg=Pg&&Pg.isRegExp,Tg=Pg&&Pg.isSet,Ug=Pg&&Pg.isTypedArray,Vg=q("length"),Wg=r(Fg),Xg=Array.prototype,Yg=Function.prototype,Zg=Object.prototype,$g=Kg["__core-js_shared__"],_g=Yg.toString,ah=Zg.hasOwnProperty,bh=0,ch=function(){var a=/[^.]+$/.exec($g&&$g.keys&&$g.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),dh=Zg.toString,eh=_g.call(Object),fh=Kg._,gh=RegExp("^"+_g.call(ah).replace(Yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hh=Ng?Kg.Buffer:Ie,ih=Kg.Symbol,jh=Kg.Uint8Array,kh=hh?hh.allocUnsafe:Ie,lh=F(Object.getPrototypeOf,Object),mh=Object.create,nh=Zg.propertyIsEnumerable,oh=Xg.splice,ph=ih?ih.isConcatSpreadable:Ie,qh=ih?ih.iterator:Ie,rh=ih?ih.toStringTag:Ie,sh=function(){try{var a=sc(Object,"defineProperty");return a({},"",{}),a}catch(b){}}(),th=Math.ceil,uh=Math.floor,vh=Object.getOwnPropertySymbols,wh=hh?hh.isBuffer:Ie,xh=Kg.isFinite,yh=F(Object.keys,Object),zh=Math.max,Ah=Math.min,Bh=Date.now,Ch=Math.random,Dh=(Xg.reverse,sc(Kg,"DataView")),Eh=sc(Kg,"Map"),Fh=sc(Kg,"Promise"),Gh=sc(Kg,"Set"),Hh=sc(Kg,"WeakMap"),Ih=sc(Object,"create"),Jh=Hh&&new Hh,Kh={},Lh=Vc(Dh),Mh=Vc(Eh),Nh=Vc(Fh),Oh=Vc(Gh),Ph=Vc(Hh),Qh=ih?ih.prototype:Ie,Rh=Qh?Qh.valueOf:Ie,Sh=Qh?Qh.toString:Ie,Th=function(){function a(){}return function(b){if(!Sd(b))return{};if(mh)return mh(b);a.prototype=b;var c=new a;return a.prototype=Ie,c}}();O.prototype=P.prototype,O.prototype.constructor=O,Q.prototype=Th(P.prototype),Q.prototype.constructor=Q,R.prototype=Th(P.prototype),R.prototype.constructor=R,V.prototype.clear=W,V.prototype["delete"]=X,V.prototype.get=Y,V.prototype.has=Z,V.prototype.set=$,_.prototype.clear=aa,_.prototype["delete"]=ba,_.prototype.get=ca,_.prototype.has=da,_.prototype.set=ea,fa.prototype.clear=ga,fa.prototype["delete"]=ha,fa.prototype.get=ia,fa.prototype.has=ja,fa.prototype.set=ka,la.prototype.add=la.prototype.push=ma,la.prototype.has=na,oa.prototype.clear=pa,oa.prototype["delete"]=qa,oa.prototype.get=ra,oa.prototype.has=sa,oa.prototype.set=ta;var Uh=Wb(La),Vh=Xb(),Wh=Xb(!0),Xh=Jh?function(a,b){return Jh.set(a,b),a}:we,Yh=sh?function(a,b){return sh(a,"toString",{configurable:!0,enumerable:!1,value:ve(b),writable:!0})}:we,Zh=Gh&&1/I(new Gh([,-0]))[1]==hf?function(a){return new Gh(a)}:Be,$h=Jh?function(a){return Jh.get(a)}:Be,_h=vh?function(a){return null==a?[]:(a=Object(a),e(vh(a),function(b){return nh.call(a,b)}))}:De,ai=vh?function(a){for(var b=[];a;)i(b,_h(a)),a=lh(a);return b}:De,bi=Qa;(Dh&&bi(new Dh(new ArrayBuffer(1)))!=Jf||Eh&&bi(new Eh)!=wf||Fh&&bi(Fh.resolve())!=Af||Gh&&bi(new Gh)!=Df||Hh&&bi(new Hh)!=Hf)&&(bi=function(a){var b=Qa(a),c=b==zf?a.constructor:Ie,d=c?Vc(c):"";if(d)switch(d){case Lh:return Jf;case Mh:return wf;case Nh:return Af;case Oh:return Df;case Ph:return Hf}return b});var ci=Tc(Xh),di=Tc(Yh),ei=Lc(function(a){var b=[];return 46===a.charCodeAt(0)&&b.push(""),a.replace(Xf,function(a,c,d,e){b.push(d?e.replace(bg,"$1"):c||a)}),b}),fi=ub(function(a,b){return Ld(a)?Ga(a,Ka(b,1,Ld,!0)):[]}),gi=ub(function(a){var b=h(a,Db);return b.length&&b[0]===a[0]?Ua(b):[]}),hi=ub(function(a){return zb(Ka(a,1,Ld,!0))}),ii=ub(function(a,b){return Ld(a)?Ga(a,b):[]}),ji=ub(md),ki=(lc(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Ca(b,a)};return!(b>1||this.__actions__.length)&&d instanceof R&&Cc(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:qd,args:[e],thisArg:Ie}),new Q(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(Ie),a})):this.thru(e)}),Ub(function(a,b,c){ah.call(a,c)?++a[c]:Ba(a,c,1)})),li=_b(_c),mi=Ub(function(a,b,c){ah.call(a,c)?a[c].push(b):Ba(a,c,[b])}),ni=ub(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Dc(a,b[0],b[1])?b=[]:c>2&&Dc(b[0],b[1],b[2])&&(b=[b[0]]),ob(a,Ka(b,1),[])}),oi=function(){return Kg.Date.now()},pi=ub(function(a,b,c){var d=Ue;if(c.length){var e=G(c,pc(pi));d|=Ze}return fc(a,d,b,c,e)}),qi=ub(function(a,b){return Fa(a,1,b)}),ri=ub(function(a,b,c){return Fa(a,ce(b)||0,c)});Cd.Cache=fa;var si=Xa(function(){return arguments}())?Xa:function(a){return Td(a)&&ah.call(a,"callee")&&!nh.call(a,"callee")},ti=Array.isArray,ui=wh||Ee,vi=Qg?v(Qg):Ya,wi=Rg?v(Rg):_a,xi=Sg?v(Sg):cb,yi=Tg?v(Tg):db,zi=Ug?v(Ug):eb,Ai=Vb(function(a,b){Rb(b,me(b),a)}),Bi=ub(function(a,b){a=Object(a);var c=-1,d=b.length,e=d>2?b[2]:Ie;for(e&&Dc(b[0],b[1],e)&&(d=1);++c1),b}),Rb(a,nc(a),c),d&&(c=Ea(c,Pe|Qe|Re,hc));for(var e=b.length;e--;)Ab(c,b[e]);return c}),Ii=lc(function(a,b){return null==a?{}:pb(a,b)}),Ji=dc();O.assignIn=Ai,O.before=Ad,O.bind=pi,O.chain=od,O.compact=Yc,O.concat=Zc,O.countBy=ki,O.create=fe,O.debounce=Bd,O.defaults=Bi,O.defaultsDeep=Ci,O.defer=qi,O.delay=ri,O.difference=fi,O.drop=$c,O.filter=td,O.flatten=bd,O.flattenDeep=cd,O.groupBy=mi,O.initial=fd,O.intersection=gi,O.invert=Di,O.invertBy=Ei,O.iteratee=xe,O.keys=le,O.map=vd,O.matches=ye,O.merge=Fi,O.mixin=ze,O.negate=Dd,O.omit=Hi,O.omitBy=ne,O.once=Ed,O.pick=Ii,O.range=Ji,O.reject=xd,O.rest=Fd,O.slice=hd,O.sortBy=ni,O.take=id,O.takeRight=jd,O.tap=pd,O.throttle=Gd,O.thru=qd,O.toArray=_d,O.union=hi,O.uniq=kd,O.uniqBy=ld,O.unzip=md,O.values=qe,O.without=ii,O.zip=ji,O.zipObject=nd,O.extend=Ai,ze(O,O),O.clamp=re,O.clone=Hd,O.cloneDeep=Id,O.escape=te,O.every=sd,O.find=li,O.findIndex=_c,O.findKey=ge,O.findLastIndex=ad,O.findLastKey=he,O.forEach=ud,O.get=ie,O.has=je,O.head=dd,O.identity=we,O.indexOf=ed,O.isArguments=si,O.isArray=ti,O.isArrayLike=Kd,O.isBoolean=Md,O.isDate=vi,O.isEmpty=Nd,O.isEqual=Od,O.isFinite=Pd,O.isFunction=Qd,O.isNaN=Ud,O.isNull=Vd,O.isNumber=Wd,O.isObject=Sd,O.isPlainObject=Xd,O.isRegExp=xi,O.isString=Yd,O.isUndefined=$d,O.last=gd,O.max=Ge,O.min=He,O.noConflict=Ae,O.noop=Be,O.random=se,O.reduce=wd,O.result=pe,O.size=yd,O.some=zd,O.trim=ue,O.uniqueId=Fe,O.each=ud,O.first=dd,ze(O,function(){var a={};return La(O,function(b,c){ah.call(O.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),O.VERSION=Je,c(["drop","take"],function(a,b){R.prototype[a]=function(c){c=c===Ie?1:zh(be(c),0);var d=this.__filtered__&&!b?new R(this):this.clone();return d.__filtered__?d.__takeCount__=Ah(c,d.__takeCount__):d.__views__.push({size:Ah(c,mf),type:a+(d.__dir__<0?"Right":"")}),d},R.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),c(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==ef||c==gf;R.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:getIteratee(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),c(["head","last"],function(a,b){var c="take"+(b?"Right":"");R.prototype[a]=function(){return this[c](1).value()[0]}}),c(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");R.prototype[a]=function(){return this.__filtered__?new R(this):this[c](1)}}),R.prototype.compact=function(){return this.filter(we)},R.prototype.find=function(a){return this.filter(a).head()},R.prototype.findLast=function(a){return this.reverse().find(a)},R.prototype.invokeMap=ub(function(a,b){return"function"==typeof a?new R(this):this.map(function(c){return Wa(c,a,b)})}),R.prototype.reject=function(a){return this.filter(Dd(getIteratee(a)))},R.prototype.slice=function(a,b){a=be(a);var c=this;return c.__filtered__&&(a>0||b<0)?new R(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==Ie&&(b=be(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},R.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},R.prototype.toArray=function(){return this.take(mf)},La(R.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),d=/^(?:head|last)$/.test(b),e=O[d?"take"+("last"==b?"Right":""):b],f=d||/^find/.test(b);e&&(O.prototype[b]=function(){var b=this.__wrapped__,g=d?[1]:arguments,h=b instanceof R,j=g[0],k=h||ti(b),l=function(a){var b=e.apply(O,i([a],g));return d&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(h=k=!1);var m=this.__chain__,n=!!this.__actions__.length,o=f&&!m,p=h&&!n;if(!f&&k){b=p?b:new R(this);var q=a.apply(b,g);return q.__actions__.push({func:qd,args:[l],thisArg:Ie}),new Q(q,m)}return o&&p?a.apply(this,g):(q=this.thru(l),o?d?q.value()[0]:q.value():q)})}),c(["pop","push","shift","sort","splice","unshift"],function(a){var b=Xg[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var a=arguments;if(d&&!this.__chain__){var e=this.value();return b.apply(ti(e)?e:[],a)}return this[c](function(c){return b.apply(ti(c)?c:[],a)})}}),La(R.prototype,function(a,b){var c=O[b];if(c){var d=c.name+"",e=Kh[d]||(Kh[d]=[]);e.push({name:b,func:c})}}),Kh[ac(Ie,Ve).name]=[{name:"wrapper",func:Ie}],R.prototype.clone=S,R.prototype.reverse=T,R.prototype.value=U,O.prototype.first=O.prototype.head,qh&&(O.prototype[qh]=rd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kg._=O,define(function(){return O})):Mg?((Mg.exports=O)._=O,Lg._=O):Kg._=O}.call(this),_.extend(BI,{MAX:0x1000000000000000,MIN:-0x1000000000000000,EVENT_RESPONSE_TIME:200,zIndex_layer:1e5,zIndex_popover:1e6,zIndex_popup:1e7,zIndex_masker:1e8,zIndex_tip:1e9,emptyStr:"",emptyFn:function(){},empty:null,Key:{48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/"},KeyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},Status:{SUCCESS:1,WRONG:2,START:3,END:4,WAITING:5,READY:6,RUNNING:7,OUTOFBOUNDS:8,NULL:-1},Direction:{Top:"top",Bottom:"bottom",Left:"left",Right:"right",Custom:"custom"},Axis:{Vertical:"vertical",Horizontal:"horizontal"},Selection:{Default:-2,None:-1,Single:0,Multi:1,All:2},HorizontalAlign:{Left:"left",Right:"right",Center:"center",Stretch:"stretch"},VerticalAlign:{Middle:"middle",Top:"top",Bottom:"bottom",Stretch:"stretch"},StartOfWeek:1}),_.extend(BI,{pushArray:function(a,b){for(var c=0;c0){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}return c(b,a)},sub:function(a,b){function c(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)}return c(a,b)},mul:function(a,b){function c(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)}return c(b,a)},div:function(a,b){function c(a){var b=a.toString().split(/[eE]/),c=(b[0].split(".")[1]||"").length-+(b[1]||0);return c>0?c:0}function d(a){if(a.toString().indexOf("e")===-1)return Number(a.toString().replace(".",""));var b=c(a);return b>0?a*Math.pow(10,b):a}function e(a,b){for(var f=[],g=2;g0)return e.apply(void 0,[e(a,b),f[0]].concat(f.slice(1)));var h=d(a),i=d(b),j=c(a)+c(b),k=h*i;return k/Math.pow(10,j)}function f(a,b){for(var g=[],h=2;h0)return f.apply(void 0,[f(a,b),g[0]].concat(g.slice(1)));var i=d(a),j=d(b);return e(i/j,Math.pow(10,c(b)-c(a)))}return f(a,b)}}),_.extend(BI,{startWith:function(a,b){return a=a||"",!(null==b||""==b||0===a.length||b.length>a.length)&&a.substr(0,b.length)==b},endWith:function(a,b){return!(null==b||""==b||0===a.length||b.length>a.length)&&a.substring(a.length-b.length)==b},getQuery:function(a,b){var c=new RegExp("(^|&)"+b+"=([^&]*)(&|$)"),d=a.substr(a.indexOf("?")+1).match(c);return d?unescape(d[2]):null},appendQuery:function(a,b){if(!b)return a;var c=a;return c.indexOf("?")===-1&&(c+="?"),c.endWith("?")!==!1||(c+="&"),_.each(b,function(a,b){"string"==typeof b&&(c+=b+"="+a+"&")}),c=c.substr(0,c.length-1)},replaceAll:function(a,b,c){return a.replace(new RegExp(b,"gm"),c)},perfectStart:function(a,b){return a.startWith(b)?a:b+a},allIndexOf:function(a,b){if("string"!=typeof b)return[];for(var c=[],d=0;a.length>0;){var e=a.indexOf(b);if(e===-1)break;c.push(d+e),a=a.substring(e+b.length,a.length),d+=e+b.length}return c}}),BI.Date=BI.Date||{},BI.Date.SECOND=1e3,BI.Date.MINUTE=60*BI.Date.SECOND,BI.Date.HOUR=60*BI.Date.MINUTE,BI.Date.DAY=24*BI.Date.HOUR,BI.Date.WEEK=7*BI.Date.DAY,_.extend(BI,{getTimezone:function(a){return a.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(a,b){var c=a.getFullYear();return"undefined"==typeof b&&(b=a.getMonth()),0!=c%4||0==c%100&&0!=c%400||1!=b?BI.Date._MD[b]:29},getLastDateOfMonth:function(a){return BI.getDate(a.getFullYear(),a.getMonth(),BI.getMonthDays(a))},getDayOfYear:function(a){var b=BI.getDate(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),c=BI.getDate(a.getFullYear(),0,0,0,0,0),d=b-c;return Math.floor(d/BI.Date.DAY)},getWeekNumber:function(a){var b=BI.getDate(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),c=b.getDay(),d=BI.StartOfWeek%7,e=(d+3)%7;e=e||7;var f=ce&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+3*parseInt(b)),c},getQuarterStartMonth:function(a){var b=0,c=a.getMonth();return c<3&&(b=0),28&&(b=9),b},getQuarterStartDate:function(a){return BI.getDate(a.getFullYear(),BI.getQuarterStartMonth(a),1)},getQuarterEndDate:function(a){var b=BI.getQuarterStartMonth(a)+2;return BI.getDate(a.getFullYear(),b,BI.getMonthDays(a,b))},getOffsetMonth:function(a,b){var c=BI.getDate(BI.getTime(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds())),d=c.getDate(),e=BI.getMonthDays(BI.getDate(c.getFullYear(),c.getMonth()+parseInt(b),1));return d>e&&(d=e),c.setDate(d),c.setMonth(c.getMonth()+parseInt(b)),c},getWeekStartDate:function(a){var b=a.getDay(),c=BI.StartOfWeek%7;return BI.getOffsetDate(a,BI.Date._OFFSET[b=12,m=l?k-12:k,n=BI.getDayOfYear(a);0==m&&(m=12);var o=a.getMinutes(),p=a.getSeconds();j["%a"]=BI.Date._SDN[i],j["%A"]=BI.Date._DN[i],j["%b"]=BI.Date._SMN[c],j["%B"]=BI.Date._MN[c],j["%C"]=1+Math.floor(e/100),j["%d"]=d<10?"0"+d:d,j["%e"]=d,j["%H"]=k<10?"0"+k:k,j["%I"]=m<10?"0"+m:m,j["%j"]=n<100?n<10?"00"+n:"0"+n:n,j["%k"]=k+"",j["%l"]=m+"",j["%X"]=c<9?"0"+(1+c):1+c,j["%x"]=c+1,j["%M"]=o<10?"0"+o:o,j["%n"]="\n",j["%p"]=l?"PM":"AM",j["%P"]=l?"pm":"am",j["%s"]=Math.floor(a.getTime()/1e3),j["%S"]=p<10?"0"+p:p,j["%t"]="\t",j["%U"]=j["%W"]=j["%V"]=g<10?"0"+g:g,j["%u"]=i+1,j["%w"]=i,j["%y"]=f.substr(2,2),j["%Y"]=f,j["%%"]="%",j["%Q"]=h;var q=/%./g;if(BI.isKhtml=BI.isKhtml||function(){return!!_global.navigator&&/Konqueror|Safari|KHTML/i.test(navigator.userAgent)},!(b.indexOf("%Y")===-1&&b.indexOf("%y")===-1||b.indexOf("%W")===-1&&b.indexOf("%U")===-1&&b.indexOf("%V")===-1))switch(g){case 1:11===c&&(j["%y"]=parseInt(j["%y"])+1,j["%Y"]=parseInt(j["%Y"])+1);break;case 53:0===c&&(j["%y"]=parseInt(j["%y"])-1,j["%Y"]=parseInt(j["%Y"])-1)}if(!BI.isKhtml())return b.replace(q,function(a){return j[a]||a});for(var r=b.match(q),s=0;s-1?f===b?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j:(k=g.indexOf(b),k>-1&&Math.floor(k/f.length)===Math.floor((k+b.length-1)/f.length)&&(f===b||b.length===f.length?d?h.push(j):h[a]=j:d?i.push(j):i[a]=j))}}),{match:h,find:i}}}),_.extend(BI,{beforeFunc:function(a,b){var c=a;return function(){return b.apply(a,arguments)!==!1&&c.apply(a,arguments)}},afterFunc:function(a,b){var c=a;return function(){var d=c.apply(a,arguments);return d!==!1&&(b.apply(a,arguments),d)}}});var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(a){var b=function(a,b){return function(c,d,e){return a.call(b,d,c,e)}},c=function(a){return function(){return _[a].apply(_,arguments)}},d=function(a){return function(){var c=Array.prototype.slice.call(arguments,0);return c[1]=_.isFunction(c[1])?b(c[1],c[2]):c[1],_[a].apply(_,c)}};_.extend(BI,{assert:function(a,b){if(this.isFunction(b)){if(b(a))return!0;throw new Error(a+" error")}if(this.isArray(b)||(b=[b]),!this.deepContains(b,a))throw new Error(a+" error")},warn:function(a){console.warn(a)},UUID:function(){for(var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],b="",c=0;c<16;c++){var d=parseInt(a.length*Math.random(),10);b+=a[d]}return b},isWidget:function(a){return a instanceof BI.Widget||BI.View&&a instanceof BI.View},createWidgets:function(a,b,c){if(!BI.isArray(a))throw new Error("cannot create Widgets");return BI.isWidget(b)?(c=b,b={}):b||(b={}),BI.map(BI.flatten(a),function(a,c){return BI.createWidget(c,BI.deepClone(b))})},createItems:function(a,b,c){return b=BI.isArray(b)?b:BI.makeArray(BI.flatten(a).length,b||{}),c=BI.isArray(c)?c:BI.makeArray(BI.flatten(a).length,c||{}),BI.map(a,function(a,d){return BI.isArray(d)?BI.createItems(d,b,c):d instanceof BI.Widget?BI.extend({},b.shift(),c.shift(),{type:null,el:d}):b[0]instanceof BI.Widget?(c.shift(),BI.extend({},d,{el:b.shift()})):d.el instanceof BI.Widget||BI.View&&d.el instanceof BI.View?(b.shift(),BI.extend({},c.shift(),{type:null},d)):d.el?BI.extend({},c.shift(),d,{el:BI.extend({},b.shift(),d.el)}):BI.extend({},c.shift(),{el:BI.extend({},b.shift(),d)})})},packageItems:function(a,b){for(var c=b.length-1;c>=0;c--)a=BI.map(a,function(a,d){return BI.extend({},b[c],{items:[BI.extend({},b[c].el,{el:d})]})});return a},formatEL:function(a){return a&&!a.type&&a.el?a:{el:a}},stripEL:function(a){return a.type&&a||a.el||a},trans2Element:function(a){return BI.map(a,function(a,b){return b.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(a){BI[a]=c(a)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(a){"any"===a?BI[a]=d("some"):BI[a]=d(a)}),_.extend(BI,{count:function(a,b,c){var d;if(c)for(d=a;d=0;d--)b(d,a[d],a);return!1},backAny:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(b(d,a[d],a))return!0;return!1},backEvery:function(a,b,c){b=BI.iteratee(b,c);for(var d=a.length-1;d>=0;d--)if(!b(d,a[d],a))return!1;return!0},backFindKey:function(a,b,c){b=BI.iteratee(b,c);for(var d,e=_.keys(a),f=e.length-1;f>=0;f--)if(d=e[f],b(a[d],d,a))return d},backFind:function(a,b,c){var d;if(d=BI.isArray(a)?BI.findLastIndex(a,b,c):BI.backFindKey(a,b,c),void 0!==d&&d!==-1)return a[d]},remove:function(a,b,c){var d=BI.isFunction(b);b=d||BI.isArray(b)?b:[b];var e;if(BI.isArray(a))for(e=0;e(2147483646-a.charAt(d).charCodeAt(0)+c.charCodeAt(0))/26)return 0;return b},int2Abc:function(a){var b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],c=a,d="";if(0===a)return"";for(;0!==c;){var e=c%26;0===e&&(e=26),d=b[e-1]+d,c=(c-e)/26}return d}}),_.each(["first","initial","last","rest","compact","flatten","without","union","intersection","difference","zip","unzip","object","indexOf","lastIndexOf","sortedIndex","range","take","takeRight"],function(a){BI[a]=c(a)}),_.each(["findIndex","findLastIndex"],function(a){BI[a]=d(a)}),_.extend(BI,{makeArray:function(a,b){for(var c=[],d=0;d0;)BI.prepares.shift()()},has:function(a,b){return BI.isArray(b)?0!==b.length&&BI.every(b,function(b,c){return _.has(a,c)}):_.has.apply(_,arguments)},freeze:function(a){if(Object.freeze)return Object.freeze(a);if(!BI.isObject(a))throw new TypeError("Object.freeze can only be called on Objects.");return a},isKey:function(a){return BI.isNumber(a)||BI.isString(a)&&a.length>0},isCapitalEqual:function(a,b){return a=BI.isNull(a)?a:(""+a).toLowerCase(),b=BI.isNull(b)?b:(""+b).toLowerCase(),BI.isEqual(a,b)},isWidthOrHeight:function(a){return"number"==typeof a?a>=0:"string"==typeof a?/^\d{1,3}%$/.exec(a)||"auto"==a||/^\d+px$/.exec(a):void 0},isNotNull:function(a){return!BI.isNull(a)},isNull:function(a){return"undefined"==typeof a||null===a},isEmptyArray:function(a){return BI.isArray(a)&&BI.isEmpty(a)},isNotEmptyArray:function(a){return BI.isArray(a)&&!BI.isEmpty(a)},isEmptyObject:function(a){return BI.isEqual(a,{})},isNotEmptyObject:function(a){return BI.isPlainObject(a)&&!BI.isEmptyObject(a)},isEmptyString:function(a){return BI.isString(a)&&0===a.length},isNotEmptyString:function(a){return BI.isString(a)&&!BI.isEmptyString(a)},isWindow:function(a){return null!=a&&a==a.window}}),_.extend(BI,{deepClone:_.cloneDeep,deepExtend:_.merge,isDeepMatch:function(a,b){var c=BI.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;f=0},deepContains:function(a,b){return BI.isObject(b)?BI.any(a,function(a,c){if(BI.isEqual(c,b))return!0}):BI.contains(a,b)},deepIndexOf:function(a,b){for(var c=0;ce[0]?f=["y",1]:a>=d[0]&&a<=e[0]&&(a==d[0]&&(be[1]?f=["m",1]:b==e[1]&&c>e[2]&&(f=["d",1]))),f},checkDateLegal:function(a){var b=a.match(/\d+/g),c=0|b[0],d=0|b[1],e=0|b[2];if(b.length<=1)return!0;if(b.length<=2)return d>=1&&d<=12;var f=BI.Date._MD.slice(0);return f[1]=BI.isLeapYear(c)?29:28,d>=1&&d<=12&&e<=f[d-1]},parseDateTime:function(a,b){var c=BI.getDate(),d=0,e=0,f=1,g=a.split(/\W+/);if("%y%x"==b.toLowerCase()||"%y%x%d"==b.toLowerCase()){var h=4,i=2;g[0]=a.substring(0,h),g[1]=a.substring(h,h+i),g[2]=a.substring(h+i,h+2*i)}var j=b.match(/%./g),k=0,l=0,m=0,n=0,o=0;for(k=0;k29?1900:2e3);break;case"%b":case"%B":for(l=0;l<12;++l)if(BI.Date._MN[l].substr(0,g[k].length).toLowerCase()==g[k].toLowerCase()){e=l;break}break;case"%H":case"%I":case"%k":case"%l":m=parseInt(g[k],10);break;case"%P":case"%p":/pm/i.test(g[k])&&m<12?m+=12:/am/i.test(g[k])&&m>=12&&(m-=12);break;case"%M":n=parseInt(g[k],10);case"%S":o=parseInt(g[k],10)}if(isNaN(d)&&(d=c.getFullYear()),isNaN(e)&&(e=c.getMonth()),isNaN(f)&&(f=c.getDate()),isNaN(m)&&(m=c.getHours()),isNaN(n)&&(n=c.getMinutes()),isNaN(o)&&(o=c.getSeconds()),0!=d)return BI.getDate(d,e,f,m,n,o);for(d=0,e=-1,f=0,k=0;k31&&0==d?(d=parseInt(g[k],10),d<100&&(d+=d>29?1900:2e3)):0==f&&(f=g[k]);return 0==d&&(d=c.getFullYear()),e!=-1&&0!=f?BI.getDate(d,e,f,m,n,o):c},getDate:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}if(BI.isNotNull(BI.timeZone)&&(0===arguments.length||1===arguments.length&&BI.isNumber(arguments[0]))){var d=a.getTime(),e=6e4*(new Date).getTimezoneOffset(),f=d+e;return new Date(f+BI.timeZone)}return a},getTime:function(){var a,b=arguments.length,c=arguments;switch(b){case 0:a=new Date;break;case 1:a=new Date(c[0]);break;case 2:a=new Date(c[0],c[1]);break;case 3:a=new Date(c[0],c[1],c[2]);break;case 4:a=new Date(c[0],c[1],c[2],c[3]);break;case 5:a=new Date(c[0],c[1],c[2],c[3],c[4]);break;case 6:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 7:a=new Date(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);break;default:a=new Date}return BI.isNotNull(BI.timeZone)?a.getTime()-BI.timeZone-6e4*(new Date).getTimezoneOffset():a.getTime()}})}(),!function(){function a(){for(var a,b,c,d,e=arguments[0]||{},f=arguments.length,g=1;g0&&a<1?"floor":"ceil",j=Math[i](Math.log(a)/Math.log(10));if(!isFinite(j))return b.replace(/#/gi,"").replace(/\.e/gi,"E");a/=Math.pow(10,j),a>0&&a<1&&(a*=10,j-=1);var k=f(j,b);k>1&&(j-=k-1,a*=Math.pow(10,k-1)),j<0&&(h="-",j*=-1);var l=e(b),m=g(a);return a*=Math.pow(10,l),a=Math.round(a),m&&(a/=10,j+="-"===h?-1:1),a/=Math.pow(10,l),a=a.toFixed(l),j=d(b,j,h),c+a+"E"+j}function d(a,b,c){if(b+="",!/e/gi.test(a))return b;for(a=a.split(/e/gi)[1];b.length1?b[1].length:0}function f(a,b){if(!/e/gi.test(b))return 0;var c,d,e=b.split(/e/gi)[0].split(".")[0],f=e.length,g=0;for(c=0;c-1)return a>=0?_numberFormat(a+"",b.substring(0,c)):_numberFormat(-a+"",b.substr(c+1));if(+a<0&&"-"!==b.charAt(0))return _numberFormat(-a+"","-"+b);var d=b.split("."),e=d[0]||"",f=d[1]||"";a=_dealNumberPrecision(a,f);var g=a.split("."),h=g[0]||"",i=g[1]||"";if(/[%‰]$/.test(b)){var j=/[%]$/.test(b)?"00":"000";i+=j,h+=i.substr(0,j.length),h=h.replace(/^0+/gi,""),i=i.substr(j.length).replace(/0+$/gi,"")}var k=_dealWithRight(i,f);k.leftPlus&&(h=parseInt(h)+1+"",h=isNaN(h)?"1":h),k=k.num;var l=_dealWithLeft(h,e);return/[0-9]/.test(l)||(l+="0"),/[0-9]/.test(k)?l+"."+k:l+k}function _dealWithRight(a,b){for(var c="",d=0,e=0,f=b.length;e4){j.leftPlus=!0;var k=c.match(/^[0-9]+/);if(k){var l=k[0],m=l.length,n=parseInt(l)+1+"";n.length>m?n=n.substr(1):(n=BI.leftPad(n,m,"0"),j.leftPlus=!1),c=c.replace(/^[0-9]+/,n)}}return j.num=c,j}function _dealWithLeft(a,b){for(var c="",d=a.length-1,e=-1,f=-1,g=b.length-1;g>=0;g--){var h=b.charAt(g),i=a.charAt(d);switch(h){case"0":isEmpty(i)&&(i="0"),f=-1,c=i+c,d--;break;case"#":f=g,c=i+c,d--;break;case",":if(!isEmpty(i)){var j=b.match(/,[#0]+/);j&&(e=j[0].length-1),c=","+c}break;default:c=h+c}}if(f>-1){var k=a.substr(0,d+1);c=c.substr(0,f)+k+c.substr(f)}if(e>0){var l=c.match(/[0-9]+,/);if(l){l=l[0];for(var m="",n=l.length-1-e;n>=0;n-=e)m=l.substr(n,e)+","+m;var o=l.substr(0,n+e);isEmpty(o)||(m=o+","+m)}c=c.replace(/[0-9]+,/,m)}return c}var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),BI.cjkEncode=function(a){if("string"!=typeof a)return a;for(var b="",c=0;c=128||91===d||93===d?"["+d.toString(16)+"]":a.charAt(c)}return b},BI.cjkDecode=function(text){if(null==text)return"";if(!isNaN(text)||text.indexOf("[")==-1)return text;for(var newText="",i=0;ii+1){var subText=text.substring(i+1,rightIdx);subText.length>0&&(ch=String.fromCharCode(eval("0x"+subText))),i=rightIdx}}newText+=ch}return newText};var SPECIAL_TAGS={"&":"&",'"':""","<":"<",">":">"," ":" "};BI.htmlEncode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"",'&|"|<|>|\\s',function(a){return SPECIAL_TAGS[a]?SPECIAL_TAGS[a]:" "})},BI.htmlDecode=function(a){return BI.isNull(a)?"":BI.replaceAll(a+"","&|"|<|>| ",function(a){switch(a){case"&":return"&";case""":return'"';case"<":return"<";case">":return">";case" ":default:return" "}})},BI.cjkEncodeDO=function(a){if(BI.isPlainObject(a)){var b={};return _.each(a,function(a,c){"string"!=typeof a&&(a=BI.jsonEncode(a)),c=BI.cjkEncode(c),b[c]=BI.cjkEncode(a)}),b}return a},BI.jsonEncode=function(a){var b=!!{}.hasOwnProperty,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},d=function(a){return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,b){var d=c[b];return d?d:(d=b.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})+'"':'"'+a+'"'},e=function(a){var b,c,d,e=["["],f=a.length;for(c=0;c2?BI.Date._MN[b.getMonth()]:d<2?b.getMonth()+1:BI.leftPad(b.getMonth()+1+"",2,"0");break;case"d":c=d>1?BI.leftPad(b.getDate()+"",2,"0"):b.getDate();break;case"h":var f=b.getHours()%12;0===f&&(f=12),c=d>1?BI.leftPad(f+"",2,"0"):f;break;case"H":c=d>1?BI.leftPad(b.getHours()+"",2,"0"):b.getHours();break;case"m":c=d>1?BI.leftPad(b.getMinutes()+"",2,"0"):b.getMinutes();break;case"s":c=d>1?BI.leftPad(b.getSeconds()+"",2,"0"):b.getSeconds();break;case"a":c=b.getHours()<12?"am":"pm";break;case"z":c=BI.getTimezone(b);break;default:c=a.str}return c}if(!a)return"";var d=b.length,e="";if(d>0){for(var f=b.charAt(0),g=0,h=f,i=1;i1){if(!(c.indexOf("{R1}")>-1)){var e=Array.prototype.slice.call(arguments),f=1;return BI.replaceAll(c,"\\{\\s*\\}",function(){return e[f++]+""})}for(var g=1;g>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);f!=-1&&(b=f)}for(var g=[],h=0,i=0;i>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;a<64;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;g<16;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;j<4;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt); diff --git a/dist/widget.css b/dist/widget.css index c05a6e7e6..422bdfa8c 100644 --- a/dist/widget.css +++ b/dist/widget.css @@ -204,6 +204,11 @@ .bi-number-editor .pull-up-font { font-size: 12px; } +.bi-number-interval.hack { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-number-interval .number-interval-small-editor { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; diff --git a/dist/widget.js b/dist/widget.js index 460cabed0..731623090 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -15300,7 +15300,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { _defaultConfig: function () { var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-number-interval", + extraCls: "bi-number-interval" + (BI.isIE() && BI.getIEVersion() < 10) ? " hack" : "", height: 24, validation: "valid", closeMin: true, diff --git a/src/core/widget.js b/src/core/widget.js index 5ab10e772..d5d5dca55 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -21,12 +21,14 @@ invalid: false, baseCls: "", extraCls: "", - cls: "" + cls: "", + css: null }); }, // 覆盖父类的_constructor方法,widget不走ob的生命周期 - _constructor: function () {}, + _constructor: function () { + }, beforeInit: null, @@ -115,6 +117,9 @@ if (o.data) { this.element.data(o.data); } + if (o.css) { + this.element.css(o.css); + } this._children = {}; }, @@ -194,7 +199,7 @@ lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); - if(BI.isNotNull(this._parent)) { + if (BI.isNotNull(this._parent)) { !this._parent.isEnabled() && this._setEnable(false); !this._parent.isValid() && this._setValid(false); }