fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 MiB

5 years ago
/*! fineui 2019-11-19 16:09:16 */
5 years ago
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}!function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var r={};o.m=e,o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=70)}([function(e,t,n){(function(t){var n=function(t){return t&&t.Math==Math&&t};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(74))},function(t,n,e){var r=e(0),o=e(20),i=e(41),u=e(53),c=r.Symbol,f=o("wks");t.exports=function(t){return f[t]||(f[t]=u&&c[t]||(u?c:i)("Symbol."+t))}},function(t,n,e){var s=e(0),l=e(24).f,p=e(6),v=e(11),d=e(40),h=e(77),y=e(51);t.exports=function(t,n){var e,r,o,i,u,c=t.target,f=t.global,a=t.stat;if(e=f?s:a?s[c]||d(c,{}):(s[c]||{}).prototype)for(r in n){if(i=n[r],o=t.noTargetGet?(u=l(e,r))&&u.value:e[r],!y(f?r:c+(a?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;h(i,o)}(t.sham||o&&o.sham)&&p(i,"sham",!0),v(e,r,i,t)}}},function(t,n,e){var r=e(7);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,e){var r=e(4);t.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(5),o=e(9),i=e(19);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(5),o=e(47),i=e(3),u=e(38),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(r){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){t.exports=e(0)},function(t,n,e){var c=e(0),r=e(20),f=e(6),a=e(8),s=e(40),o=e(48),i=e(16),u=i.get,l=i.enforce,p=String(o).split("toString");r("inspectSource",function(t){return o.call(t)}),(t.exports=function(t,n,e,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;"function"==typeof e&&("string"!=typeof n||a(e,"name")||f(e,"name",n),l(e).source=p.join("string"==typeof n?n:"")),t!==c?(o?!u&&t[n]&&(i=!0):delete t[n],i?t[n]=e:f(t,n,e)):i?t[n]=e:s(n,e)})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||o.call(this)})},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,n,e){var r=e(37),o=e(25);t.exports=function(t){return r(o(t))}},function(t,n){t.exports=!1},function(t,n,e){var r,o,i,u=e(76),c=e(0),f=e(7),a=e(6),s=e(8),l=e(26),p=e(27),v=c.WeakMap;if(u){var d=new v,h=d.get,y=d.has,g=d.set;r=function(t,n){return g.call(d,t,n),n},o=function(t){return h.call(d,t)||{}},i=function(t){return y.call(d,t)}}else{var x=l("state");p[x]=!0,r=function(t,n){return a(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor
S||(r=function(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(e){throw o?u():i=void 0,e}}i=void 0,t&&t.enter()},u=m?function(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(c=!0,f=document.createTextNode(""),new y(r).observe(f,{characterData:!0}),function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(void 0),s=a.then,function(){s.call(a,r)}):function(){d.call(l,r)}),t.exports=S||function(t){var n={fn:t,next:void 0};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){"use strict";var r=e(2),o=e(15),i=e(64),u=e(17),c=e(65),f=e(67),a=e(11);r({target:"Promise",proto:!0,real:!0},{"finally":function(n){var e=c(this,u("Promise")),t="function"==typeof n;return this.then(t?function(t){return f(e,n()).then(function(){return t})}:n,t?function(t){return f(e,n()).then(function(){throw t})}:n)}}),o||"function"!=typeof i||i.prototype["finally"]||a(i.prototype,"finally",u("Promise").prototype["finally"])},function(t,n,e){"use strict";var r=e(2),o=e(5),i=e(32),u=e(63),c=e(21),f=e(9),a=e(19),s=e(34),l=e(6),p=e(3),v=e(16),d=v.set,h=v.getterFor("AggregateError"),y=function(t,n){var e=this;if(!(e instanceof y))return new y(t,n);u&&(e=u(new Error(n),i(e)));var r=[];return s(t,r.push,r),o?d(e,{errors:r,type:"AggregateError"}):e.errors=r,void 0!==n&&l(e,"message",String(n)),e};y.prototype=c(Error.prototype,{constructor:a(5,y),message:a(5,""),name:a(5,"AggregateError"),toString:a(5,function(){var t=p(this).name;t=void 0===t?"AggregateError":String(t);var n=this.message;return t+": "+(n=void 0===n?"":String(n))})}),o&&f.f(y.prototype,"errors",{get:function(){return h(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(t,n,e){e(68)},function(t,n,e){"use strict";var r=e(2),o=e(23),i=e(35);r({target:"Promise",stat:!0},{"try":function(t){var n=o.f(this),e=i(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}})},function(t,n,e){"use strict";var r=e(2),l=e(13),p=e(17),o=e(23),i=e(35),v=e(34),d="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var f=this,n=o.f(f),a=n.resolve,s=n.reject,e=i(function(){var r=l(f.resolve),o=[],i=0,u=1,c=!1;v(t,function(t){var n=i++,e=!1;o.push(void 0),u++,r.call(f,t).then(function(t){e||c||(c=!0,a(t))},function(t){e||c||(e=!0,o[n]=t,--u||s(new(p("AggregateError"))(o,d)))})}),--u||s(new(p("AggregateError"))(o,d))});return e.error&&s(e.value),n.promise}})},function(t,n,e){t.exports=e(135)},function(t,n,e){e(136);var r=e(33);t.exports=r("String","replace")},function(t,n,e){"use strict";var r=e(137),w=e(3),p=e(18),P=e(28),E=e(29),i=e(25),A=e(139),T=e(140),L=Math.max,M=Math.min,v=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,h=/\$([$&'`]|\d\d?)/g;r("replace",2,function(o,S,O){function j(i,u,c,f,a,t){var s=c+i.length,l=f.length,n=h;return void 0!==a&&(a=p(a),n=d),S.call(t,n,function(t,n){var e;switch(n.charAt(0)){case"$":return"$";case"&":return i;case"`":return u.slice(0,c);case"'":return u.slice(s);case"<":e=a[n.slice(1,-1)];break;default:var r=+n;if(0==r)return t;if(l<r){var o=v(r/10);return 0===o?t:o<=l?void 0===f[o-1]?n.charAt(1):f[o-1]+n.charAt(1):t}e=f[r-1]}return void 0===e?"":e})}return[function(t,n){var e=i(this),r=void 0==t?void 0:t[o];return void 0!==r?r.call(t,e,n):S.call(String(e),t,n)},function(t,n){var e=O(S,t,this,n);if(e.done)return e.value;var r=w(t),o=String(this),i="function"==typeof n;i||(n=String(n));var u=r.global;if(u){var c=r.unicode;r.lastIndex=0}for(var f=[];;){var a=T(r,o);if(null===a)break;if(f.push(a),!u)break;""===String(a[0])&&(r.lastIndex=A(o,P(r.lastIndex),c))}for(var s,l="",p=0,v=0;v<f.length;v++){a=f[v];for(var d=String(a[0]),h=L(M(E(a.index),o.length),0),y=[],g=1;g<a.length;g++)y.push(void 0===(s=a[g])?s:String(s));var x=a.groups;if(i){var m=[d].concat(y,h,o);void 0!==x&&m.push(x);var b=String(n.apply(void 0,m))}else b=j(d,o,h,y,x,n);p<=h&&(l+=o.slice(p,h)+b,p=h+d.length)}return l+o.slice(p)}]})},function(t,n,e){"use strict";var l=e(6),p=e(11),v=e(4),d=e(1),h=e(69),y=d("species"),g=
var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):(!isObject(objValue)||srcIndex&&isFunction(objValue))&&(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack["delete"](srcValue)),assignMergeValue(object,key,newValue)}function baseOrderBy(collection,iteratees,orders){var index=-1;iteratees=arrayMap(iteratees.length?iteratees:[identity],baseUnary(baseIteratee));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path)})}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index<length;){var path=paths[index],value=baseGet(object,path);predicate(value,path)&&baseSet(result,castPath(path,object),value)}return result}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRange(start,end,step,fromRight){for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);length--;)result[fromRight?length:++index]=start,start+=step;return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSet(object,path,value,customizer){if(!isObject(object))return object;path=castPath(path,object);for(var index=-1,length=path.length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=toKey(path[index]),newValue=value;if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined,newValue===undefined&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),end=end>length?length:end,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return path=castP
var result=lodash(value);return result.__chain__=!0,result}function tap(value,interceptor){return interceptor(value),value}function thru(value,interceptor){return interceptor(value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){this.__values__===undefined&&(this.__values__=toArray(this.value()));var done=this.__index__>=this.__values__.length,value=done?undefined:this.__values__[this.__index__++];return{done:done,value:value}}function wrapperToIterator(){return this}function wrapperPlant(value){for(var result,parent=this;parent instanceof baseLodash;){var clone=wrapperClone(parent);clone.__index__=0,clone.__values__=undefined,result?previous.__wrapped__=clone:result=clone;var previous=clone;parent=parent.__wrapped__}return previous.__wrapped__=value,result}function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),wrapped=wrapped.reverse(),wrapped.__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,baseIteratee(predicate,3))}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,baseIteratee(predicate,3))}function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,baseIteratee(iteratee,3))}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee,3))}function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,baseIteratee(iteratee,4),accumulator,initAccum,baseEach)}function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(baseIteratee(predicate,3)))}function size(collection){if(null==collection)return 0;if(isArrayLike(collection))return isString(collection)?stringSize(collection):collection.length;var tag=getTag(collection);return tag==mapTag||tag==setTag?collection.size:baseKeys(collection).length}function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,baseIteratee(predicate,3))}function before(n,func){var result;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}function debounce(func,wait,options){function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();return shouldInvoke(time)?trailingEdge(time):void(timerId=setTimeout(timerExpired,remainingWait(time)))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function cancel(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined}functi
lodash.max=max,lodash.min=min,lodash.noConflict=noConflict,lodash.noop=noop,lodash.random=random,lodash.reduce=reduce,lodash.result=result,lodash.size=size,lodash.some=some,lodash.trim=trim,lodash.uniqueId=uniqueId,lodash.each=forEach,lodash.first=head,mixin(lodash,function(){var source={};return baseForOwn(lodash,function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)}),source}(),{chain:!1}),lodash.VERSION=VERSION,arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();return result.__filtered__?result.__takeCount__=nativeMin(n,result.__takeCount__):result.__views__.push({size:nativeMin(n,MAX_ARRAY_LENGTH),type:methodName+(result.__dir__<0?"Right":"")}),result},LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}}),arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||type==LAZY_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();return result.__iteratees__.push({iteratee:getIteratee(iteratee,3),type:type}),result.__filtered__=result.__filtered__||isFilter,result}}),arrayEach(["head","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}}),arrayEach(["initial","tail"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}}),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head()},LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate)},LazyWrapper.prototype.invokeMap=baseRest(function(path,args){return"function"==typeof path?new LazyWrapper(this):this.map(function(value){return baseInvoke(value,path,args)})}),LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)))},LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(end=toInteger(end),result=end<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH)},baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+("last"==methodName?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);lodashFunc&&(lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value),interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(result,chainAll)}return isUnwrapped&&onlyLazy?func.apply(this,args):(result=this.thru(interceptor),isUnwrapped?isTaker?result.value()[0]:result.value():result)})}),arrayEach(["pop","push","shift","sort","splice","unshift"],function(methodName){var func=arrayProto[methodName],chainName
},getText:function(){},setText:function(text){},getValue:function(){},setValue:function(value){},isEnabled:function(){return!this.options.disabled},isVisible:function(){return!this.options.invisible},disable:function(){this.setEnable(!1)},enable:function(){this.setEnable(!0)},valid:function(){this.setValid(!0)},invalid:function(){this.setValid(!1)},invisible:function(){this.setVisible(!1)},visible:function(){this.setVisible(!0)},__d:function(){this.beforeDestroy&&this.beforeDestroy(),BI.each(this._children,function(i,widget){widget&&widget._unMount&&widget._unMount()}),this._children={},this._parent=null,this._isMounted=!1,this.destroyed&&this.destroyed()},_unMount:function(){this.__d(),this.fireEvent(BI.Events.UNMOUNT),this.purgeListeners()},isolate:function(){this._parent&&this._parent.removeWidget(this),BI.DOM.hang([this])},empty:function(){BI.each(this._children,function(i,widget){widget&&widget._unMount&&widget._unMount()}),this._children={},this.element.empty()},_destroy:function(){this.__d(),this.element.destroy(),this.purgeListeners()},destroy:function(){this.__d(),this.element.destroy(),this.fireEvent(BI.Events.DESTROY),this._purgeRef(),this.purgeListeners()}}),BI.Widget.registerRenderEngine=function(engine){BI.Widget._renderEngine=engine},BI.Widget.registerRenderEngine({createElement:function(widget){if(BI.isWidget(widget)){var o=widget.options;return o.element?BI.$(o.element):BI.$(document.createElement(o.tagName))}return BI.$(widget)},createFragment:function(){return document.createDocumentFragment()}}),BI.mount=function(widget,container,predicate,hydrate){if(hydrate===!0){widget.element.data("__widgets",[widget]);var res=widget._mount(!0,!1,!1,function(w){BI.each(w._children,function(i,child){var ws=child.element.data("__widgets");ws||(ws=[]),ws.push(child),child.element.data("__widgets",ws)}),predicate&&predicate.apply(this,arguments)}),c=BI.Widget._renderEngine.createElement;BI.DOM.patchProps(widget.element,c(c(container).children()[0]));var triggerLifeHook=function(w){w.beforeMount&&w.beforeMount(),w.mounted&&w.mounted(),BI.each(w._children,function(i,child){triggerLifeHook(child)})};return triggerLifeHook(widget),res}return container&&BI.Widget._renderEngine.createElement(container).append(widget.element),widget._mount(!0,!1,!1,predicate)}}(),function(){var kv={};BI.shortcut=BI.component=function(xtype,cls){null!=kv[xtype]&&_global.console&&console.error("shortcut:["+xtype+"] has been registed"),kv[xtype]=cls};var createWidget=function(config){var cls=kv[config.type],widget=new cls;return widget._initProps(config),widget._init(),widget._initRef(),widget};BI.createWidget=function(item,options,context){BI.init();var el,w;if(item||(item={}),BI.isWidget(options)?(context=options,options={}):options||(options={}),BI.isEmpty(item)&&BI.isEmpty(options))return BI.createWidget({type:"bi.layout"});if(BI.isWidget(item))return item;if(item.type||options.type)return el=BI.extend({},options,item),w=BI.Plugin.getWidget(el.type,el),w.listeners=(w.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(el.type,this)}}]),w.type===el.type?createWidget(w):BI.createWidget(BI.extend({},item,{type:w.type},options));if(item.el&&(item.el.type||options.type))return el=BI.extend({},options,item.el),w=BI.Plugin.getWidget(el.type,el),w.listeners=(w.listeners||[]).concat([{eventName:BI.Events.MOUNT,action:function(){BI.Plugin.getObject(el.type,this)}}]),w.type===el.type?createWidget(w):BI.createWidget(BI.extend({},item,{type:w.type},options));if(BI.isWidget(item.el))return item.el;throw new Error("无法根据item创建组件")},BI.createElement=function(){var widget=BI.createWidget.apply(this,arguments);return widget.element}}(),!function(){BI.CRYPT_TYPE=BI.CRYPT_TYPE||{},BI.CRYPT_TYPE.AES="aes";var CryptoJS=CryptoJS||function(Math,undefined){var C={},C_lib=C.lib={},Base=C_lib.Base=function(){function F(){}return{extend:function(overrides){F.prototype=this;var subtype=new F;return overrides&&subtype.mixIn(overrides),subtype.hasOwnProperty("init")||(subtype.init=function(){subtype.$super.init.apply(th
offset=datum.offset+datum.size;for(var stop=start;offset<maxOffset&&stop<this._cellCount-1;)stop++,offset+=this.getSizeAndPositionOfCell(stop).size;return{start:start,stop:stop}},resetCell:function(index){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,index-1)},_binarySearch:function(high,low,offset){for(var middle,currentOffset;low<=high;){if(middle=low+Math.floor((high-low)/2),currentOffset=this.getSizeAndPositionOfCell(middle).offset,currentOffset===offset)return middle;currentOffset<offset?low=middle+1:currentOffset>offset&&(high=middle-1)}if(low>0)return low-1},_exponentialSearch:function(index,offset){for(var interval=1;index<this._cellCount&&this.getSizeAndPositionOfCell(index).offset<offset;)index+=interval,interval*=2;return this._binarySearch(Math.min(index,this._cellCount-1),Math.floor(index/2),offset)},_findNearestCell:function(offset){if(!isNaN(offset)){offset=Math.max(0,offset);var lastMeasuredCellSizeAndPosition=this.getSizeAndPositionOfLastMeasuredCell(),lastMeasuredIndex=Math.max(0,this._lastMeasuredIndex);return lastMeasuredCellSizeAndPosition.offset>=offset?this._binarySearch(lastMeasuredIndex,0,offset):this._exponentialSearch(lastMeasuredIndex,offset)}}},BI.ScalingCellSizeAndPositionManager=function(cellCount,cellSizeGetter,estimatedCellSize,maxScrollSize){this._cellSizeAndPositionManager=new BI.CellSizeAndPositionManager(cellCount,cellSizeGetter,estimatedCellSize),this._maxScrollSize=maxScrollSize||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(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize(),offsetPercentage=this._getOffsetPercentage(containerSize,offset,safeTotalSize);return Math.round(offsetPercentage*(safeTotalSize-totalSize))},getSizeAndPositionOfCell:function(index){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index)},getSizeAndPositionOfLastMeasuredCell:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()},getTotalSize:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())},getUpdatedOffsetForIndex:function(align,containerSize,currentOffset,targetIndex){currentOffset=this._safeOffsetToOffset(containerSize,currentOffset);var offset=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align,containerSize,currentOffset,targetIndex);return this._offsetToSafeOffset(containerSize,offset)},getVisibleCellRange:function(containerSize,offset){return offset=this._safeOffsetToOffset(containerSize,offset),this._cellSizeAndPositionManager.getVisibleCellRange(containerSize,offset)},resetCell:function(index){this._cellSizeAndPositionManager.resetCell(index)},_getOffsetPercentage:function(containerSize,offset,totalSize){return totalSize<=containerSize?0:offset/(totalSize-containerSize)},_offsetToSafeOffset:function(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize();if(totalSize===safeTotalSize)return offset;var offsetPercentage=this._getOffsetPercentage(containerSize,offset,totalSize);return Math.round(offsetPercentage*(safeTotalSize-containerSize))},_safeOffsetToOffset:function(containerSize,offset){var totalSize=this._cellSizeAndPositionManager.getTotalSize(),safeTotalSize=this.getTotalSize();if(totalSize===safeTotalSize)return offset;var offsetPercentage=this._getOffsetPercentage(containerSize,offset,safeTotalSize);return Math.round(offsetPercentage*(totalSize-containerSize))}},!function(){var _ChineseFirstPY="YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYY
this._onMoveEnd()}}}(),!function(){function normalizeWheel(event){var sX=0,sY=0,pX=0,pY=0;return"detail"in event&&(sY=event.detail),"wheelDelta"in event&&(sY=-event.wheelDelta/120),"wheelDeltaY"in event&&(sY=-event.wheelDeltaY/120),"wheelDeltaX"in event&&(sX=-event.wheelDeltaX/120),"axis"in event&&event.axis===event.HORIZONTAL_AXIS&&(sX=sY,sY=0),pX=sX*PIXEL_STEP,pY=sY*PIXEL_STEP,"deltaY"in event&&(pY=event.deltaY),"deltaX"in event&&(pX=event.deltaX),(pX||pY)&&event.deltaMode&&(1===event.deltaMode?(pX*=LINE_HEIGHT,pY*=LINE_HEIGHT):(pX*=PAGE_HEIGHT,pY*=PAGE_HEIGHT)),pX&&!sX&&(sX=pX<1?-1:1),pY&&!sY&&(sY=pY<1?-1:1),{spinX:sX,spinY:sY,pixelX:pX,pixelY:pY}}var PIXEL_STEP=10,LINE_HEIGHT=40,PAGE_HEIGHT=800,requestAnimationFrame=_global.requestAnimationFrame||_global.webkitRequestAnimationFrame||_global.mozRequestAnimationFrame||_global.oRequestAnimationFrame||_global.msRequestAnimationFrame||_global.setTimeout;BI.WheelHandler=function(onWheel,handleScrollX,handleScrollY,stopPropagation){this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=BI.bind(this._didWheel,this),"function"!=typeof handleScrollX&&(handleScrollX=handleScrollX?function(){return!0}:function(){return!1}),"function"!=typeof handleScrollY&&(handleScrollY=handleScrollY?function(){return!0}:function(){return!1}),"function"!=typeof stopPropagation&&(stopPropagation=stopPropagation?function(){return!0}:function(){return!1}),this._handleScrollX=handleScrollX,this._handleScrollY=handleScrollY,this._stopPropagation=stopPropagation,this._onWheelCallback=onWheel,this.onWheel=BI.bind(this.onWheel,this)},BI.WheelHandler.prototype={constructor:BI.WheelHandler,onWheel:function(event){var normalizedEvent=normalizeWheel(event),deltaX=this._deltaX+normalizedEvent.pixelX,deltaY=this._deltaY+normalizedEvent.pixelY,handleScrollX=this._handleScrollX(deltaX,deltaY),handleScrollY=this._handleScrollY(deltaY,deltaX);if(handleScrollX||handleScrollY){this._deltaX+=handleScrollX?normalizedEvent.pixelX:0,this._deltaY+=handleScrollY?normalizedEvent.pixelY:0,event.preventDefault?event.preventDefault():event.returnValue=!1;var changed;0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&(event.stopPropagation?event.stopPropagation():event.cancelBubble=!0),changed=!0),changed===!0&&null===this._animationFrameID&&(this._animationFrameID=requestAnimationFrame(this._didWheel))}},_didWheel:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}}(),function(){function defaultComparator(a,b){return a<b}BI.Heap=function(items,comparator){this._items=items||[],this._size=this._items.length,this._comparator=comparator||defaultComparator,this._heapify()},BI.Heap.prototype={constructor:BI.Heap,empty:function(){return 0===this._size},pop:function(){if(0!==this._size){var elt=this._items[0],lastElt=this._items.pop();return this._size--,this._size>0&&(this._items[0]=lastElt,this._sinkDown(0)),elt}},push:function(item){this._items[this._size++]=item,this._bubbleUp(this._size-1)},size:function(){return this._size},peek:function(){if(0!==this._size)return this._items[0]},_heapify:function(){for(var index=Math.floor((this._size+1)/2);index>=0;index--)this._sinkDown(index)},_bubbleUp:function(index){for(var elt=this._items[index];index>0;){var parentIndex=Math.floor((index+1)/2)-1,parentElt=this._items[parentIndex];if(this._comparator(parentElt,elt))return;this._items[parentIndex]=elt,this._items[index]=parentElt,index=parentIndex}},_sinkDown:function(index){for(var elt=this._items[index];;){var leftChildIndex=2*(index+1)-1,rightChildIndex=2*(index+1),swapIndex=-1;if(leftChildIndex<this._size){var leftChild=this._items[leftChildIndex];this._comparator(leftChild,elt)&&(swapIndex=leftChildIndex)}if(rightChildIndex<this._size){var rightChild=this._items[rightChildIndex];this._comparator(rightChild,elt)&&(swapIndex===-1||this._comparator(rightChild,this._items[swapIndex]))&&(swapIndex=rightChildIndex)}if(swapIndex===-1)return;this._items[index]=this._items[swapIndex],this._items[swapIndex]=elt,index=swapIndex}}}}(),!function(
},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(items){var self=this,o=this.options;return items=items||[],this._isMounted?void this.update({items:items}):(this.options.items=items,void this.stroke(items))},resize:function(){}}),BI.shortcut("bi.layout",BI.Layout),BI.Plugin=BI.Plugin||{},!function(){var _WidgetsPlugin={},_ObjectPlugin={},_ConfigPlugin={},_GlobalWidgetConfigFn,_GlobalObjectConfigFn;BI.extend(BI.Plugin,{getWidget:function(type,options){_GlobalWidgetConfigFn&&_GlobalWidgetConfigFn(type,options);var res;if(_ConfigPlugin[type])for(var i=_ConfigPlugin[type].length-1;i>=0;i--)(res=_ConfigPlugin[type][i](options))&&(options=res);if(_WidgetsPlugin[type])for(var i=_WidgetsPlugin[type].length-1;i>=0;i--)if(res=_WidgetsPlugin[type][i](options))return res;return options},config:function(widgetConfigFn,objectConfigFn){_GlobalWidgetConfigFn=widgetConfigFn,_GlobalObjectConfigFn=objectConfigFn},configWidget:function(type,fn){_ConfigPlugin[type]||(_ConfigPlugin[type]=[]),_ConfigPlugin[type].push(fn)},registerWidget:function(type,fn){_WidgetsPlugin[type]||(_WidgetsPlugin[type]=[]),_WidgetsPlugin[type].length>0&&console.log("组件已经注册过了!"),_WidgetsPlugin[type].push(fn)},relieveWidget:function(type){delete _WidgetsPlugin[type]},getObject:function(type,object){if(_GlobalObjectConfigFn&&_GlobalObjectConfigFn(type,object),_ObjectPlugin[type])for(var res,i=0,len=_ObjectPlugin[type].length;i<len;i++)(res=_ObjectPlugin[type][i](object))&&(object=res);return res||object},registerObject:function(type,fn){_ObjectPlugin[type]||(_ObjectPlugin[type]=[]),_ObjectPlugin[type].length>0&&console.log("对象已经注册过了!"),_ObjectPlugin[type].push(fn)},relieveObject:function(type){delete _ObjectPlugin[type]}})}(),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(src,tar,callback){},actionBack:function(tar,src,callback){}}),BI.ActionFactory={createAction:function(key,options){var action;switch(key){case"show":action=BI.ShowAction}return new action(options)}},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(src,tar,callback){tar=tar||this.options.tar,tar.setVisible(!0),callback&&callback()},actionBack:function(tar,src,callback){tar=tar||this.options.tar,tar.setVisible(!1),callback&&callback()}}),function(){function isEmpty(value){var result=""===value||null===value||void 0===value;return result}function isInvalidDate(date){return"Invalid Date"==date||"NaN"==date}function _eFormat(text,fmt){function eFormat(num,format){var neg=num<0?(num*=-1,"-"):"",magnitudeNeg="",funcName=num>0&&num<1?"floor":"ceil",magnitude=Math[funcName](Math.log(num)/Math.log(10));if(!isFinite(magnitude))return format.replace(/#/gi,"").replace(/\.e/gi,"E");num/=Math.pow(10,magnitude),num>0&&num<1&&(num*=10,magnitude-=1);var integerLen=getInteger(magnitude,format);integerLen>1&&(magnitude-=integerLen-1,num*=Math.pow(10,integerLen-1)),magnitude<0&&(magnitudeNeg="-",magnitude*=-1);var precision=getPrecision(format),isValueCarry=isValueCarried(num);return num*=Math.pow(10,precision),num=Math.round(num),isValueCarry&&(num/=10,magnitude+="-"===magnitudeNeg?-1:1),num/=Math.pow(10,precision),num=num.toFixed(precision),magnitude=formatExponential(format,magnitude,magnitudeNeg),neg+num+"E"+magnitude}function formatExponential(format,num,magnitudeNeg){if(num+="",!/e/gi.test(format))return num;for(format=format.split(/e/gi)[1];num.length<format.length;)num="0"+num;for(var isAllZero=!0,i=0,len=num.length;i<len;i++)isAllZero&&(isAllZero="0"===num.charAt(i));return magnitudeNeg=isAllZero?"":magnitudeNeg,magnitudeNeg+num}function getPrecisi
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(sArray,array){for(var i=0;i<array.length;i++)sArray.push(array[i])},pushDistinct:function(sArray,obj){BI.contains(sArray,obj)||sArray.push(obj)},pushDistinctArray:function(sArray,array){for(var i=0,len=array.length;i<len;i++)BI.pushDistinct(sArray,array[i])}}),BI.prepares.push(function(){BI.Date=BI.Date||{},BI.Date._DN=[BI.i18nText("BI-Basic_Sunday"),BI.i18nText("BI-Basic_Monday"),BI.i18nText("BI-Basic_Tuesday"),BI.i18nText("BI-Basic_Wednesday"),BI.i18nText("BI-Basic_Thursday"),BI.i18nText("BI-Basic_Friday"),BI.i18nText("BI-Basic_Saturday"),BI.i18nText("BI-Basic_Sunday")],BI.Date._SDN=[BI.i18nText("BI-Basic_Simple_Sunday"),BI.i18nText("BI-Basic_Simple_Monday"),BI.i18nText("BI-Basic_Simple_Tuesday"),BI.i18nText("BI-Basic_Simple_Wednesday"),BI.i18nText("BI-Basic_Simple_Thursday"),BI.i18nText("BI-Basic_Simple_Friday"),BI.i18nText("BI-Basic_Simple_Saturday"),BI.i18nText("BI-Basic_Simple_Sunday")],BI.Date._FD=1,BI.Date._MN=[BI.i18nText("BI-Basic_January"),BI.i18nText("BI-Basic_February"),BI.i18nText("BI-Basic_March"),BI.i18nText("BI-Basic_April"),BI.i18nText("BI-Basic_May"),BI.i18nText("BI-Basic_June"),BI.i18nText("BI-Basic_July"),BI.i18nText("BI-Basic_August"),BI.i18nText("BI-Basic_September"),BI.i18nText("BI-Basic_October"),BI.i18nText("BI-Basic_November"),BI.i18nText("BI-Basic_December")],BI.Date._SMN=[0,1,2,3,4,5,6,7,8,9,10,11],BI.Date._QN=["",BI.i18nText("BI-Quarter_1"),BI.i18nText("BI-Quarter_2"),BI.i18nText("BI-Quarter_3"),BI.i18nText("BI-Quarter_4")],BI.Date._MD=[31,28,31,30,31,30,31,31,30,31,30,31],BI.Date._OFFSET=[0,-1,-2,-3,-4,-5,-6]}),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(date){return date.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getMonthDays:function(date,month){var year=date.getFullYear();return"undefined"==typeof month&&(month=date.getMonth()),0!=year%4||0==year%100&&0!=year%400||1!=month?BI.Date._MD[month]:29},getLastDateOfMonth:function(date){return BI.getDate(date.getFullYear(),date.getMonth(),BI.getMonthDays(date))},getDayOfYear:function(date){var now=BI.getDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0),then=BI.getDate(date.getFullYear(),0,0,0,0,0),time=now-then;return Math.floor(time/BI.Date.DAY)},getWeekNumber:function(date){var d=BI.getDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0),week=d.getDay(),startOfWeek=BI.StartOfWeek%7,middleDay=(startOfWeek+3)%7;middleDay=middleDay||7;var offsetWeekStartCount=week<startOfWeek?7+week-startOfWeek:week-startOfWeek,offsetWeekMiddleCount=middleDay<startOfWeek?7+middle
addResizeListener:function(widget,fn){return addResizeListener(widget.element[0],fn),function(){removeResizeListener(widget.element[0],fn)}},removeResizeListener:function(widget,fn){removeResizeListener(widget.element[0],fn)}}}(),!function(){BI.DOM={},BI.extend(BI.DOM,{ready:function(fn){BI.Widget._renderEngine.createElement(document).ready(fn)}}),BI.extend(BI.DOM,{patchProps:function(fromElement,toElement){var elemData=BI.jQuery._data(fromElement[0]),events=elemData.events;BI.each(events,function(eventKey,event){BI.each(event,function(i,handler){toElement.on(eventKey+(handler.namespace?"."+handler.namespace:""),handler)})});var fromChildren=fromElement.children(),toChildren=toElement.children();if(fromChildren.length!==toChildren.length)throw new Error("不匹配");BI.each(fromChildren,function(i,child){BI.DOM.patchProps(BI.jQuery(child),BI.jQuery(toChildren[i]))}),BI.each(fromElement.data("__widgets"),function(i,widget){widget.element=toElement})},hang:function(doms){if(!BI.isEmpty(doms)){var frag=BI.Widget._renderEngine.createFragment();return BI.each(doms,function(i,dom){dom instanceof BI.Widget&&(dom=dom.element),dom instanceof BI.$&&dom[0]&&frag.appendChild(dom[0])}),frag}},isExist:function(obj){return BI.Widget._renderEngine.createElement("body").find(obj.element).length>0},preloadImages:function(srcArray,onload){function complete(){count++,count>=srcArray.length&&onload()}var count=0,images=[];BI.each(srcArray,function(i,src){images[i]=new Image,images[i].src=src,images[i].onload=function(){complete()},images[i].onerror=function(){complete()}})},getTextSizeWidth:function(text,fontSize){var span=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==fontSize&&(fontSize=12),fontSize+="px",span.css("font-size",fontSize).text(text);var width=span.width();return span.remove(),width},getTextSizeHeight:function(text,fontSize){var span=BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo("body");null==fontSize&&(fontSize=12),fontSize+="px",span.css("font-size",fontSize).text(text);var height=span.height();return span.remove(),height},getScrollWidth:function(){if(BI.isNull(this._scrollWidth)||0===this._scrollWidth){var ul=BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({position:"absolute",top:"-9999px",overflow:"scroll"}).appendTo("body");this._scrollWidth=ul[0].offsetWidth-ul[0].clientWidth,ul.destroy()}return this._scrollWidth},getImage:function(param,fillStyle,backgroundColor){var canvas=document.createElement("canvas"),ratio=2;BI.Widget._renderEngine.createElement("body").append(canvas);var ctx=canvas.getContext("2d");ctx.font="12px Georgia";var w=ctx.measureText(param).width+4;canvas.width=w*ratio,canvas.height=16*ratio,ctx.font=12*ratio+"px Georgia",ctx.fillStyle=fillStyle||"#3685f2",ctx.textBaseline="middle",ctx.fillText(param,2*ratio,9*ratio),BI.Widget._renderEngine.createElement(canvas).destroy();var backColor=backgroundColor||"rgba(54, 133, 242, 0.1)";return{width:w,height:16,src:canvas.toDataURL("image/png"),style:"background-color: "+backColor+";vertical-align: middle; margin: 0 1px; width:"+w+"px;height: 16px; max-width:"+w+"px;max-height: 16px; min-width:"+w+"px;min-height: 16px",param:param}}}),BI.extend(BI.DOM,{isColor:function(color){return color&&(this.isRGBColor(color)||this.isHexColor(color))},isRGBColor:function(color){return!!color&&"rgb"===color.substr(0,3)},isHexColor:function(color){return!!color&&("#"===color[0]&&7===color.length)},isDarkColor:function(hex){if(!hex||!this.isHexColor(hex))return!1;var rgb=this.rgb2json(this.hex2rgb(hex)),grayLevel=Math.round(.299*rgb.r+.587*rgb.g+.114*rgb.b);return grayLevel<192},getContrastColor:function(color){return color&&this.isColor(color)?this.isDarkColor(color)?"#ffffff":"#1a1a1a":""},rgb2hex:function(rgbColour){if(!rgbColour||"rgb"!=rgbColour.substr(0,3))return"";var rgbValues=rgbColour.match(/\d+(\.\d+)?/g),red=BI.parseInt(rgbValues[0]),green=BI.parseInt(rgbValues[1]),blue=BI.parseInt(rgbValues[2]),hexColour="#"+this.int2hex(red)+this.int2h
if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}if(finalDataType)return finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]}function ajaxConvert(s,response){var conv2,current,conv,tmp,converters={},i=0,dataTypes=s.dataTypes.slice(),prev=dataTypes[0];if(s.dataFilter&&(response=s.dataFilter(response,s.dataType)),dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(;current=dataTypes[++i];)if("*"!==current){if("*"!==prev&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.splice(i--,0,current));break}if(conv!==!0)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}prev=current}return{state:"success",data:response}}function createStandardXHR(){try{return new window.XMLHttpRequest}catch(e){}}function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function createFxNow(){return setTimeout(function(){fxNow=undefined}),fxNow=jQuery.now()}function createTweens(animation,props){jQuery.each(props,function(prop,value){for(var collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;index<length;index++)if(collection[index].call(animation,prop,value))return})}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),percent<1&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;index<length;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);index<length;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts))return result;return createTweens(animation,props),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function propFilter(props,specialEasing){var value,name,index,easing,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(v
return!1},val:function(value){var ret,hooks,isFunction,elem=this[0];{if(arguments.length)return isFunction=jQuery.isFunction(value),this.each(function(i){var val,self=jQuery(this);1===this.nodeType&&(val=isFunction?value.call(this,i,self.val()):value,null==val?val="":"number"==typeof val?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&hooks.set(this,val,"value")!==undefined||(this.value=val))});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;i<max;i++)if(option=options[i],(option.selected||i===index)&&(jQuery.support.optDisabled?!option.disabled:null===option.getAttribute("disabled"))&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){var values=jQuery.makeArray(value);return jQuery(elem).find("option").each(function(){this.selected=jQuery.inArray(jQuery(this).val(),values)>=0}),values.length||(elem.selectedIndex=-1),values}}},attr:function(elem,name,value){var hooks,notxml,ret,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return typeof elem.getAttribute===core_strundefined?jQuery.prop(elem,name,value):(notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook)),value===undefined?hooks&&notxml&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(typeof elem.getAttribute!==core_strundefined&&(ret=elem.getAttribute(name)),null==ret?undefined:ret):null!==value?hooks&&notxml&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem.setAttribute(name,value+""),value):void jQuery.removeAttr(elem,name))},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(core_rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)propName=jQuery.propFix[name]||name,rboolean.test(name)?!getSetAttribute&&ruseDefault.test(name)?elem[jQuery.camelCase("default-"+name)]=elem[propName]=!1:elem[propName]=!1:jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName)},attrHooks:{type:{set:function(elem,value){if(!jQuery.support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),value!==undefined?hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined}}}}),boolHook={get:function(elem,name){var prop=jQuery.prop(elem,name),attr="boolean"==typeof prop&&elem.getAttribute(name),detail="boolean"==typeof prop?getSetInput&&getSetAttr
if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,slice.call(seed,0)),results;break}}return compile(selector,match)(seed,context,documentIsXML,results,rsibling.test(selector)),results}function setFilters(){}var i,cachedruns,Expr,getText,isXML,compile,hasDuplicate,outermostContext,setDocument,document,docElem,documentIsXML,rbuggyQSA,rbuggyMatches,matches,contains,sortOrder,expando="sizzle"+-new Date,preferredDoc=window.document,support={},dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),strundefined=typeof undefined,MAX_NEGATIVE=1<<31,arr=[],pop=arr.pop,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){for(var i=0,len=this.length;i<len;i++)if(this[i]===elem)return i;return-1},whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),operators="([*^$|!~]?=)",attributes="\\["+whitespace+"*("+characterEncoding+")"+whitespace+"*(?:"+operators+whitespace+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+identifier+")|)|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+attributes.replace(3,8)+")*)|.*)\\)|)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([\\x20\\t\\r\\n\\f>+~])"+whitespace+"*"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),NAME:new RegExp("^\\[name=['\"]?("+characterEncoding+")['\"]?\\]"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rsibling=/[\x20\t\r\n\f]*[+~]/,rnative=/^[^{]+\{\s*\[native code/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rescape=/'|\\/g,rattributeQuotes=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,runescape=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,funescape=function(_,escaped){var high="0x"+escaped-65536;return high!==high?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)};try{slice.call(preferredDoc.documentElement.childNodes,0)[0].nodeType}catch(e){slice=function(i){for(var elem,results=[];elem=this[i++];)results.push(elem);return results}}isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return!!documentElement&&"HTML"!==documentElement.nodeName},setDocument=Sizzle.setDocument=function(node){var doc=node?node.ownerDocument||node:preferredDoc;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=doc.documentElement,documentIsXML=isXML(doc),support.tagNameNoComments=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.attributes=assert(function(div){div.innerHTML="<select></select>";var type=typeof div.lastChild.getAttribute("multiple");return"boolean"!==type&&"string"!==type}),support.getByClassName=assert(function(div){return div.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!div.getElementsByClassName||!div.getElementsByClassName("e").length)&&(div.lastChild.className="e",2===div.getElementsByClassName("e").length)}),support.getByName=assert(function(div){div.id=expando+0,div.innerHTML="<a name='"+expando+"'></a><div name='"+expando+"'></div>",docElem.insertBefore(div,docElem.firstChild);var pass=doc.getElementsByName&&doc.getElementsByName(expando).length===2+doc.getElementsByName(expando+0).length
core_deletedIds.push(id))}}});var iframe,getStyles,curCSS,ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rposition=/^(top|right|bottom|left)$/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rmargin=/^margin/,rnumsplit=new RegExp("^("+core_pnum+")(.*)$","i"),rnumnonpx=new RegExp("^("+core_pnum+")(?!px)[a-z%]+$","i"),rrelNum=new RegExp("^([+-])=("+core_pnum+")","i"),elemdisplay={BODY:"block"},cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssExpand=["Top","Right","Bottom","Left"],cssPrefixes=["Webkit","O","Moz","ms"];jQuery.fn.extend({css:function(name,value){return jQuery.access(this,function(elem,name,value){var len,styles,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;i<len;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){var bool="boolean"==typeof state;return this.each(function(){(bool?state:isHidden(this))?jQuery(this).show():jQuery(this).hide()})}}),jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":jQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],value===undefined)return hooks&&"get"in hooks&&(ret=hooks.get(elem,!1,extra))!==undefined?ret:style[name];if(type=typeof value,"string"===type&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),!(null==value||"number"===type&&isNaN(value)||("number"!==type||jQuery.cssNumber[origName]||(value+="px"),jQuery.support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&(value=hooks.set(elem,value,extra))===undefined)))try{style[name]=value}catch(e){}}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),val===undefined&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val},swap:function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret}}),window.getComputedStyle?(getStyles=function(elem){return window.getComputedStyle(elem,null)},curCSS=function(elem,name,_computed){var width,minWidth,maxWidth,computed=_computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:undefined,style=elem.style;return computed&&(""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),ret}):document.documentElement.currentStyle&&(getStyles=function(elem){return elem.currentStyle},curCSS=function(elem,name,_computed){var left,rs,rsLeft,computed=_computed||getStyles(elem),ret=computed?computed[name]:undefined,style=elem.style;return null==ret&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition
destroy:function(){this.remove(),BI.isIE()===!0&&(this[0].outerHTML="")},__textKeywordMarked__:function(text,keyword,py){if(!BI.isKey(keyword)||(text+"").length>100)return this.html(BI.htmlEncode(text));keyword+="",keyword=BI.toUpperCase(keyword);var textLeft=(text||"")+"";for(py=(py||BI.makeFirstPY(text))+"",null!=py&&(py=BI.toUpperCase(py)),this.empty();py.length>0&&textLeft.length>0;){var tidx=BI.toUpperCase(textLeft).indexOf(keyword),pidx=null;if(null!=py&&(pidx=py.indexOf(keyword),pidx>=0&&(pidx%=text.length)),tidx>=0)this.append(BI.htmlEncode(textLeft.substr(0,tidx))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(textLeft.substr(tidx,keyword.length)))),textLeft=textLeft.substr(tidx+keyword.length),null!=py&&(py=py.substr(tidx+keyword.length));else{if(!(null!=pidx&&pidx>=0&&Math.floor(pidx/text.length)===Math.floor((pidx+keyword.length-1)/text.length))){this.append(BI.htmlEncode(textLeft));break}this.append(BI.htmlEncode(textLeft.substr(0,pidx))),this.append(BI.$("<span>").addClass("bi-keyword-red-mark").html(BI.htmlEncode(textLeft.substr(pidx,keyword.length)))),null!=py&&(py=py.substr(pidx+keyword.length)),textLeft=textLeft.substr(pidx+keyword.length)}}return this},getDomHeight:function(parent){var clone=BI.$(this).clone();clone.appendTo(BI.$(parent||"body"));var height=clone.height();return clone.remove(),height},hasVerticalScroll:function(){return this.height()>0&&this[0].clientWidth<this[0].offsetWidth},hasHorizonScroll:function(){return this.width()>0&&this[0].clientHeight<this[0].offsetHeight},getStyle:function(name){var node=this[0],computedStyle=void 0;if(_global.getComputedStyle&&(computedStyle=_global.getComputedStyle(node,null)))return computedStyle.getPropertyValue(BI.hyphenate(name));if(document.defaultView&&document.defaultView.getComputedStyle){if(computedStyle=document.defaultView.getComputedStyle(node,null))return computedStyle.getPropertyValue(BI.hyphenate(name));if("display"===name)return"none"}return node.currentStyle?"float"===name?node.currentStyle.cssFloat||node.currentStyle.styleFloat:node.currentStyle[BI.camelize(name)]:node.style&&node.style[BI.camelize(name)]},__isMouseInBounds__:function(e){var offset2Body=this.get(0).getBoundingClientRect?this.get(0).getBoundingClientRect():this.offset(),width=offset2Body.width||this.outerWidth(),height=offset2Body.height||this.outerHeight();return!(e.pageX<Math.floor(offset2Body.left)||e.pageX>offset2Body.left+width||e.pageY<Math.floor(offset2Body.top)||e.pageY>offset2Body.top+height)},__hasZIndexMask__:function(zindex){return zindex&&null!=this.zIndexMask[zindex]},__buildZIndexMask__:function(zindex,domArray){this.zIndexMask=this.zIndexMask||{},this.indexMask=this.indexMask||[];var mask=BI.createWidget({type:"bi.center_adapt",cls:"bi-z-index-mask",items:domArray});return mask.element.css({"z-index":zindex}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:mask,left:0,right:0,top:0,bottom:0}]}),this.indexMask.push(mask),zindex&&(this.zIndexMask[zindex]=mask),mask.element},__releaseZIndexMask__:function(zindex){if(zindex&&this.zIndexMask[zindex])return BI.remove(this.indexMask,this.zIndexMask[zindex]),void this.zIndexMask[zindex].destroy();this.indexMask=this.indexMask||[];var indexMask=this.indexMask.pop();indexMask&&indexMask.destroy()}})),_.extend(BI,{$import:function(){function loadReady(src,must){var $scripts=BI.$("head script, body script");BI.$.each($scripts,function(i,item){item.src.indexOf(src)!=-1&&(_LOADED[src]=!0)});var $links=BI.$("head link");BI.$.each($links,function(i,item){item.href.indexOf(src)!=-1&&must&&(_LOADED[src]=!1,BI.$(item).remove())})}var _LOADED={};return function(src,ext,must){if(loadReady(src,must),_LOADED[src]!==!0)if("css"===ext){var link=document.createElement("link");link.rel="stylesheet",link.type="text/css",link.href=src;var head=document.getElementsByTagName("head")[0];head.appendChild(link),_LOADED[src]=!0}else BI.$.ajax({url:src,dataType:"script",async:!1,cache:!0,complete:function(res,status){"success"==status&&(_LOADED[src]=!0)}})}}()}),Number.prototype.toFixed&&"0.000"
props:function(){return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,scrollable:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var self=this,o=this.options;return{type:"bi.flex_scrollable_horizontal",ref:function(_ref){self.wrapper=_ref},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:o.horizontalAlign,columnSize:o.columnSize,scrollx:o.scrollx,scrolly:o.scrolly,scrollable:o.scrollable,hgap:o.hgap,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,items:o.items}},update:function(opt){return this.wrapper.update(opt)},populate:function(items){this.wrapper.populate(items)}}),BI.shortcut("bi.flex_scrollable_vertical_adapt",BI.FlexWrapperVerticalCenter),BI.shortcut("bi.flex_scrollable_vertical_center_adapt",BI.FlexWrapperVerticalCenter),BI.FlexWrapperVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-layout clearfix",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrollable:null,scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexWrapperVerticalLayout.superclass.render.apply(this,arguments);var o=this.options;this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-vertical-layout-wrapper h-"+o.horizontalAlign).addClass("v-"+o.verticalAlign),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative","flex-shrink":"0"}),o.rowSize[i]>0&&w.element.height(o.rowSize[i]),"fill"===o.rowSize[i]&&w.element.css("flex","1"),o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-top":(0===i?o.vgap:0)+o.tgap+(item.tgap||0)+(item.vgap||0)+"px"}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(items){BI.FlexWrapperVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_vertical",BI.FlexWrapperVerticalLayout),BI.AbsoluteLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this,arguments),{baseCls:"bi-absolute-layout",hgap:null,vgap:null,lgap:null,rgap:null,tgap:null,bgap:null})},render:function(){BI.AbsoluteLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.AbsoluteLayout.superclass._addElement.apply(this,arguments),left=0,right=0,top=0,bottom=0;return BI.isNotNull(item.left)&&(w.element.css({left:item.left}),left+=item.left),BI.isNotNull(item.right)&&(w.element.css({right:item.right}),right+=item.right),BI.isNotNull(item.top)&&(w.element.css({top:item.top}),top+=item.top),BI.isNotNull(item.bottom)&&(w.element.css({bottom:item.bottom}),bottom+=item.bottom),BI.isNotNull(o.hgap)&&(left+=o.hgap,w.element.css({left:left}),right+=o.hgap,w.element.css({right:right})),BI.isNotNull(o.vgap)&&(top+=o.vgap,w.element.css({top:top}),bottom+=o.vgap,w.element.css({bottom:bottom})),BI.isNotNull(o.lgap)&&(left+=o.lgap,w.element.css({left:left})),BI.isNotNull(o.rgap)&&(right+=o.rgap,w.element.css({right:right})),BI.isNotNull(o.tgap)&&(top+=o.tgap,w.element.css({top:top})),BI.isNotNull(o.bgap)&&(bottom+=o.bgap,w.element.css({bottom:bottom})),BI.isNotNull(item.width)&&w.element.css({width:item.width}),BI.isNotNull(item.h
text:"button2"}},{height:200,el:{type:"bi.button",text:"button3"}}]})},render:function(){BI.VTapeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},resize:function(){this.stroke(this.options.items)},addItem:function(item){throw new Error("cannot be added")},stroke:function(items){var self=this,o=this.options;items=BI.compact(items),BI.each(items,function(i,item){if(self.hasWidget(self.getName()+i+""))w=self.getWidgetByName(self.getName()+i+"");else{var w=BI.createWidget(item);self.addWidget(self.getName()+i+"",w)}w.element.css({position:"absolute",left:(item.lgap||0)+(item.hgap||0)+o.hgap+o.lgap+"px",right:+(item.hgap||0)+(item.rgap||0)+o.hgap+o.rgap+"px"})});var top={},bottom={};top[0]=0,bottom[items.length-1]=0,BI.any(items,function(i,item){var w=self.getWidgetByName(self.getName()+i+"");if(BI.isNull(top[i])&&(top[i]=top[i-1]+items[i-1].height+(items[i-1].tgap||0)+2*(items[i-1].vgap||0)+o.vgap+o.tgap+o.bgap),item.height<1&&item.height>=0?w.element.css({top:100*top[i]+"%",height:100*item.height+"%"}):w.element.css({top:top[i]+(item.vgap||0)+(item.tgap||0)+o.vgap+o.tgap+"px",height:BI.isNumber(item.height)?item.height:""}),!BI.isNumber(item.height))return!0}),BI.backAny(items,function(i,item){var w=self.getWidgetByName(self.getName()+i+"");if(BI.isNull(bottom[i])&&(bottom[i]=bottom[i+1]+items[i+1].height+(items[i+1].bgap||0)+2*(items[i+1].vgap||0)+o.vgap+o.tgap+o.bgap),item.height<1&&item.height>=0?w.element.css({bottom:100*bottom[i]+"%",height:100*item.height+"%"}):w.element.css({bottom:bottom[i]+(item.vgap||0)+(item.bgap||0)+o.vgap+o.bgap+"px",height:BI.isNumber(item.height)?item.height:""}),!BI.isNumber(item.height))return!0})},update:function(){},populate:function(items){BI.VTapeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.vtape",BI.VTapeLayout),BI.TdLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TdLayout.superclass.props.apply(this,arguments),{baseCls:"bi-td-layout",columnSize:[200,200,200],hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TdLayout.superclass.render.apply(this,arguments),this.$table=BI.Widget._renderEngine.createElement("<table>").attr({cellspacing:0,cellpadding:0}).css({position:"relative",width:"100%",height:"100%","border-spacing":"0px",border:"none","border-collapse":"separate"}),this.rows=0,this.populate(this.options.items)},_addElement:function(idx,arr){function firstElement(item,row,col){0===row&&item.addClass("first-row"),0===col&&item.addClass("first-col"),item.addClass(BI.isOdd(row+1)?"odd-row":"even-row"),item.addClass(BI.isOdd(col+1)?"odd-col":"even-col"),item.addClass("center-element")}function firstObject(item,row,col){var cls="";0===row&&(cls+=" first-row"),0===col&&(cls+=" first-col"),cls+=BI.isOdd(row+1)?" odd-row":" even-row",cls+=BI.isOdd(col+1)?" odd-col":" even-col",item.cls=(item.cls||"")+cls+" center-element"}function first(item,row,col){item instanceof BI.Widget?firstElement(item.element,row,col):item.el instanceof BI.Widget?firstElement(item.el.element,row,col):item.el?firstObject(item.el,row,col):firstObject(item,row,col)}for(var o=this.options,tr=BI.createWidget({type:"bi.default",tagName:"tr"}),i=0;i<arr.length;i++){var w=BI.createWidget(arr[i]);w.element.css({position:"relative",top:"0",left:"0",margin:"0px auto"}),arr[i].lgap&&w.element.css({"margin-left":arr[i].lgap+"px"}),arr[i].rgap&&w.element.css({"margin-right":arr[i].rgap+"px"}),arr[i].tgap&&w.element.css({"margin-top":arr[i].tgap+"px"}),arr[i].bgap&&w.element.css({"margin-bottom":arr[i].bgap+"px"}),first(w,this.rows++,i);var td=BI.createWidget({type:"bi.default",attributes:{width:o.columnSize[i]<=1?100*o.columnSize[i]+"%":o.columnSize[i]},tagName:"td",items:[w]});td.element.css({position:"relative","vertical-align":"middle",margin:"0",padding:"0",border:"none"}),tr.addItem(td)}return this.addWidget(this.getName()+idx,tr),tr},appendFragment:function(frag){this.$table.append(frag),this.element.append(this.$table)},resize:function(){},addItem:function(arr){if(!BI.isArra
delta=deltaY),"deltaX"in orgEvent&&(deltaX=orgEvent.deltaX,0===deltaY&&(delta=deltaX*-1)),0!==deltaY||0!==deltaX){if(1===orgEvent.deltaMode){var lineHeight=40;delta*=lineHeight,deltaY*=lineHeight,deltaX*=lineHeight}else if(2===orgEvent.deltaMode){var pageHeight=800;delta*=pageHeight,deltaY*=pageHeight,deltaX*=pageHeight}if(absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX)),(!lowestDelta||absDelta<lowestDelta)&&(lowestDelta=absDelta,shouldAdjustOldDeltas(orgEvent,absDelta)&&(lowestDelta/=40)),shouldAdjustOldDeltas(orgEvent,absDelta)&&(delta/=40,deltaX/=40,deltaY/=40),delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta),deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta),deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta),special.settings.normalizeOffset&&this.getBoundingClientRect){var boundingRect=this.getBoundingClientRect();offsetX=event.clientX-boundingRect.left,offsetY=event.clientY-boundingRect.top}return event.deltaX=deltaX,event.deltaY=deltaY,event.deltaFactor=lowestDelta,event.offsetX=offsetX,event.offsetY=offsetY,event.deltaMode=0,args.unshift(event,delta,deltaX,deltaY),nullLowestDeltaTimeout&&clearTimeout(nullLowestDeltaTimeout),nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200),($.event.dispatch||$.event.handle).apply(this,args)}}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&"mousewheel"===orgEvent.type&&absDelta%120===0}var toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice,nullLowestDeltaTimeout,lowestDelta;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;var special=$.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=toBind.length;i;)this.addEventListener(toBind[--i],handler,!1);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var i=toBind.length;i;)this.removeEventListener(toBind[--i],handler,!1);else this.onmousewheel=null},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}})}),BI.Pane=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pane.superclass._defaultConfig.apply(this,arguments),{_baseCls:"bi-pane",tipText:BI.i18nText("BI-No_Selected_Item"),overlap:!0,onLoaded:BI.emptyFn})},_assertTip:function(){var o=this.options;this._tipText||(this._tipText=BI.createWidget({type:"bi.label",cls:"bi-tips",text:o.tipText,height:25}),BI.createWidget({type:"bi.absolute_center_adapt",element:this,items:[this._tipText]}))},loading:function(){var self=this,o=this.options,isIE=BI.isIE(),loadingAnimation=BI.createWidget({type:"bi.horizontal",cls:"bi-loading-widget"+(isIE?" wave-loading hack":""),height:30,width:30,hgap:5,vgap:2.5,items:isIE?[]:[{type:"bi.layout",cls:"animate-rect rect1",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect2",height:25,width:3},{type:"bi.layout",cls:"animate-rect rect3",height:25,width:3}]});this.setTipVisible(!1),o.overlap===!0?(BI.Layers.has(this.getName())||BI.createWidget({type:"bi.absolute_center_adapt",cls:"loading-container",items:[{el:loadingAnimation}],element:BI.Layers.make(this.getName(),this)}),BI.Layers.show(self.getName())):BI.isNull(this._loading)&&(this._loading=loadingAnimation,this._loading.element.css("zIndex",1),BI.createWidget({type:"bi.absolute_center_adapt",element:this,cls:"loading-container",items:[{el:this._loading,left:0,right:0,top:0}]})),this.element.addClass("loading-status")},loaded:function(){var self=this,o=this.options;BI.Layers.remove(self.getName()),this._loading&&this._loading.destroy(),this._loading&&(this._loading=null),o.onLoaded(),self.fireEvent(BI.Pane.EVENT_LOADED),this.element.removeClass("loading-status")},check:function(){this.setTipVisible(BI.isEmpty(this.options.item
this._addTreeNode(map,parent,this._getNodeValue(node),treeNode)}},_getTree:function(map,values){var cur=map;return BI.any(values,function(i,value){return null==cur[value]||void(cur=cur[value])}),cur},_addTreeNode:function(map,values,key,value){var cur=map;BI.each(values,function(i,value){null==cur[value]&&(cur[value]={}),cur=cur[value]}),cur[key]=value},_buildTree:function(map,values){var cur=map;BI.each(values,function(i,value){null==cur[value]&&(cur[value]={}),cur=cur[value]})},_getSelectedValues:function(){function track(nodes){BI.each(nodes,function(i,node){var checkState=node.getCheckStatus();if(checkState.checked===!0||checkState.half===!0)if(checkState.half===!0)self._getHalfSelectedValues(hashMap,node);else{var parentValues=node.parentValues||self._getParentValues(node),values=parentValues.concat([self._getNodeValue(node)]);self._buildTree(hashMap,values)}})}var self=this,hashMap={},rootNoots=this.nodes.getNodes();return track(rootNoots),hashMap},_dealWidthNodes:function(nodes){var self=this,o=this.options,ns=BI.Tree.arrayFormat(nodes);return BI.each(ns,function(i,n){n.title=n.title||n.text||n.value,n.isParent=n.isParent||n.parent,BI.isKey(o.paras.keyword)?n.text=BI.$("<div>").__textKeywordMarked__(n.text,o.paras.keyword,n.py).html():n.text=BI.htmlEncode(n.text+"")}),nodes},_loadMore:function(){var self=this,o=this.options;this.tip.setLoading();var op=BI.extend({},o.paras,{times:++this.times});o.itemsCreator(op,function(res){if(self._stop!==!0){var hasNext=!!res.hasNext,nodes=res.items||[];hasNext?self.tip.setLoaded():self.tip.setEnd(),nodes.length>0&&self.nodes.addNodes(null,self._dealWidthNodes(nodes))}})},_initTree:function(setting){var self=this,o=this.options;self.fireEvent(BI.Events.INIT),this.times=1;var tree=this.tree;tree.empty(),this.loading(),this.tip.setVisible(!1);var callback=function(nodes){self._stop!==!0&&(self.nodes=BI.$.fn.zTree.init(tree.element,setting,nodes))},op=BI.extend({},o.paras,{times:1});o.itemsCreator(op,function(res){if(self._stop!==!0){var hasNext=!!res.hasNext,nodes=res.items||[];nodes.length>0&&callback(self._dealWidthNodes(nodes)),self.setTipVisible(nodes.length<=0),self.loaded(),hasNext?self.tip.setLoaded():self.tip.invisible(),1===op.times&&self.fireEvent(BI.Events.AFTERINIT)}})},initTree:function(nodes,setting){var setting=setting||{async:{enable:!1},check:{enable:!1},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},view:{showIcon:!1,expandSpeed:"",nameIsHTML:!0},callback:{}};this.nodes=BI.$.fn.zTree.init(this.tree.element,setting,nodes)},start:function(){this._stop=!1},stop:function(){this._stop=!0},stroke:function(config){delete this.options.keyword,BI.extend(this.options.paras,config);var setting=this._configSetting();this._createTree(),this.start(),this._initTree(setting)},populate:function(){this.stroke.apply(this,arguments)},hasChecked:function(){var treeObj=this.nodes;return treeObj.getCheckedNodes(!0).length>0},checkAll:function(checked){function setNode(children){BI.each(children,function(i,child){child.halfCheck=!1,setNode(child.children)})}this.nodes&&(BI.each(this.nodes.getNodes(),function(i,node){node.halfCheck=!1,setNode(node.children)}),this.nodes.checkAllNodes(checked))},expandAll:function(flag){this.nodes&&this.nodes.expandAll(flag)},setValue:function(value,param){this.checkAll(!1),this.updateValue(value,param),this.refresh()},setSelectedValue:function(value){this.options.paras.selectedValues=BI.deepClone(value||{})},updateValue:function(values,param){if(this.nodes){param||(param="value");var treeObj=this.nodes;BI.each(values,function(v,op){var nodes=treeObj.getNodesByParam(param,v,null);BI.each(nodes,function(j,node){BI.extend(node,{checked:!0},op),treeObj.updateNode(node)})})}},refresh:function(){this.nodes&&this.nodes.refresh()},getValue:function(){return this.nodes?this._getSelectedValues():null},destroyed:function(){this.stop(),this.nodes&&this.nodes.destroy()}}),BI.extend(BI.TreeView,{REQ_TYPE_INIT_DATA:1,REQ_TYPE_ADJUST_DATA:2,REQ_TYPE_SELECT_DATA:3,REQ_TYPE_GET_SELECTED_DATA:4}),BI.TreeView.EVENT_CHANGE="EVENT_CHANGE",BI.TreeView.EVENT_I
},_popupView:function(e){this._assertPopupViewRender(),this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW),this.popupView.visible(),this.adjustWidth(e),this.adjustHeight(e),this.element.addClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),BI.Widget._renderEngine.createElement(document).bind("mousedown."+this.getName(),BI.bind(this._hideIf,this)).bind("mousewheel."+this.getName(),BI.bind(this._hideIf,this)),this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW)},adjustWidth:function(e){var o=this.options;if(this.popupView&&o.isNeedAdjustWidth===!0){this.resetListWidth("");var width=this.popupView.element.outerWidth(),maxW=this.element.outerWidth()||o.width;width>maxW+80?maxW+=80:width>maxW&&(maxW=width),this.resetListWidth(maxW<100?100:maxW)}},adjustHeight:function(e){var o=this.options,p={};if(this.popupView){var isVisible=this.popupView.isVisible();this.popupView.visible();var combo=BI.isNotNull(e)?{element:{offset:function(){return{left:e.pageX,top:e.pageY}},bounds:function(){return{x:e.offsetX,y:e.offsetY,width:0,height:24}},outerWidth:function(){return 0},outerHeight:function(){return 24}}}:this.combo;switch(o.direction){case"bottom":case"bottom,right":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight,["bottom","top","right","left"],o.offsetStyle);break;case"top":case"top,right":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight,["top","bottom","right","left"],o.offsetStyle);break;case"left":case"left,bottom":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["left","right","bottom","top"],o.offsetStyle);break;case"right":case"right,bottom":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["right","left","bottom","top"],o.offsetStyle);break;case"top,left":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight,["top","bottom","left","right"],o.offsetStyle);break;case"bottom,left":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight,["bottom","top","left","right"],o.offsetStyle);break;case"left,top":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["left","right","top","bottom"],o.offsetStyle);break;case"right,top":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["right","left","top","bottom"],o.offsetStyle);break;case"right,innerRight":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["right","left","innerRight","innerLeft","bottom","top"],o.offsetStyle);break;case"right,innerLeft":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["right","left","innerLeft","innerRight","bottom","top"],o.offsetStyle);break;case"innerRight":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["innerRight","innerLeft","right","left","bottom","top"],o.offsetStyle);break;case"innerLeft":p=BI.DOM.getComboPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength,o.adjustYOffset,o.isNeedAdjustHeight,["innerLeft","innerRight","left","right","bottom","top"],o.offsetStyle);break;case"top,custom":case"custom,top":p=BI.DOM.getTopAdaptPosition(combo,this.popupView,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight);break;case"custom,bottom":case"bottom,custom":p=BI.DOM.getBottomAdaptPosition(combo,this.popupView,o.adjustYOffset||o.adjustLength,o.isNeedAdjustHeight);break;case"left,custom":case"custom,left":p=BI.DOM.getLeftAdaptPosition(combo,this.popupView,o.adjustXOffset||o.adjustLength),delete p.top,delete p.adaptHeight;break;case"custom,right
},BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}))}})},_initSwitcher:function(){this.switcher=BI.createWidget(this.options.el,{value:this.options.value})},_assertPopupView:function(){var self=this,o=this.options;this._created||(this.popupView=BI.createWidget(o.popup,{type:"bi.button_group",element:o.adapter&&BI.Maskers.create(this.getName(),o.adapter,BI.extend({container:this},o.masker)),cls:"switcher-popup",layouts:[{type:"bi.vertical",hgap:0,vgap:0}],value:o.value},this),this.popupView.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.Switcher.EVENT_CHANGE,value,obj)}),o.direction===BI.Direction.Custom||o.adapter||BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[{el:this.popupView}]}),this._created=!0,BI.nextTick(function(){self.fireEvent(BI.Switcher.EVENT_AFTER_INIT)}))},_hideView:function(){this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);var self=this,o=this.options;o.adapter?BI.Maskers.hide(self.getName()):self.popupView&&self.popupView.setVisible(!1),BI.nextTick(function(){o.adapter?BI.Maskers.hide(self.getName()):self.popupView&&self.popupView.setVisible(!1),self.element.removeClass(o.switcherClass),self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW)})},_popupView:function(){var self=this,o=this.options;this._assertPopupView(),this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW),o.adapter?BI.Maskers.show(this.getName()):self.popupView.setVisible(!0),BI.nextTick(function(name){o.adapter?BI.Maskers.show(name):self.popupView.setVisible(!0),self.element.addClass(o.switcherClass),self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW)},this.getName())},populate:function(items){this._assertPopupView(),this.popupView.populate.apply(this.popupView,arguments),this.switcher.populate.apply(this.switcher,arguments)},_setEnable:function(arg){BI.Switcher.superclass._setEnable.apply(this,arguments),!arg&&this.isViewVisible()&&this._hideView()},setValue:function(v){this.switcher.setValue(v),BI.isNull(this.popupView)?this.options.popup.value=v:this.popupView.setValue(v)},getValue:function(){return BI.isNull(this.popupView)?this.options.popup.value:this.popupView.getValue()},setAdapter:function(adapter){this.options.adapter=adapter,BI.Maskers.remove(this.getName())},isViewVisible:function(){return this.isEnabled()&&this.switcher.isEnabled()&&(this.options.adapter?BI.Maskers.isVisible(this.getName()):this.popupView&&this.popupView.isVisible())},isExpanded:function(){return this.isViewVisible()},showView:function(){this.isEnabled()&&this.switcher.isEnabled()&&this._popupView()},hideView:function(){this._hideView()},getView:function(){return this.popupView},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},getAllLeaves:function(){return this.popupView&&this.popupView.getAllLeaves()},getNodeById:function(id){return this.switcher.attr("id")===id?this.switcher:this.popupView&&this.popupView.getNodeById(id)},getNodeByValue:function(value){return this.switcher.getValue()===value?this.switcher:this.popupView&&this.popupView.getNodeByValue(value)},empty:function(){this.popupView&&this.popupView.empty()},destroy:function(){BI.Switcher.superclass.destroy.apply(this,arguments)}}),BI.Switcher.EVENT_EXPAND="EVENT_EXPAND",BI.Switcher.EVENT_COLLAPSE="EVENT_COLLAPSE",BI.Switcher.EVENT_TRIGGER_CHANGE="EVENT_TRIGGER_CHANGE",BI.Switcher.EVENT_CHANGE="EVENT_CHANGE",BI.Switcher.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.Switcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.Switcher.EVENT_AFTER_POPUPVIEW="EVENT_AFTER_POPUPVIEW",BI.Switcher.EVENT_BEFORE_HIDEVIEW="EVENT_BEFORE_HIDEVIEW",BI.Switcher.EVENT_AFTER_HIDEVIEW="EVENT_AFTER_HIDEVIEW",BI.shortcut("bi.switcher",BI.Switcher),BI.Tab=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Tab.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tab",direction:"top",single:!1,logic:{dynamic:!1},showIndex:!1,tab:!1,cardCreator:function(v){return BI.createWidget()}})},render:function(){var self=this,o=this.options;BI.isObject(o.tab)&&(this.tab=BI.cre
render:function(){var self=this,o=this.options;return{type:"bi.vertical",items:[{type:"bi.layout",ref:function(){self.topBlank=this}},{type:"bi.vertical",scrolly:!1,ref:function(){self.container=this}},{type:"bi.layout",ref:function(){self.bottomBlank=this}}],element:this}},mounted:function(){var self=this,o=this.options;this._populate(),this.element.scroll(function(e){o.scrollTop=self.element.scrollTop(),self._calculateBlocksToRender()}),BI.ResizeDetector.addResizeListener(this,function(){self._calculateBlocksToRender()})},_renderMoreIf:function(){for(var self=this,o=this.options,height=this.element.height(),minContentHeight=o.scrollTop+height+o.overscanHeight,index=this.cache[this.renderedIndex]&&this.cache[this.renderedIndex].index+o.blockSize||0,cnt=this.renderedIndex+1,lastHeight,getElementHeight=function(){return self.container.element.height()+self.topBlank.element.height()+self.bottomBlank.element.height()};(lastHeight=getElementHeight())<minContentHeight&&index<o.items.length;){var items=o.items.slice(index,index+o.blockSize);this.container.addItems(items,this);var addedHeight=getElementHeight()-lastHeight;this.cache[cnt]={index:index,scrollTop:lastHeight,height:addedHeight},this.tree.set(cnt,addedHeight),this.renderedIndex=cnt,cnt++,index+=o.blockSize}},_calculateBlocksToRender:function(){var o=this.options;this._renderMoreIf();for(var height=this.element.height(),minContentHeightFrom=o.scrollTop-o.overscanHeight,minContentHeightTo=o.scrollTop+height+o.overscanHeight,start=this.tree.greatestLowerBound(minContentHeightFrom),end=this.tree.leastUpperBound(minContentHeightTo),needDestroyed=[],i=0;i<start;i++){var index=this.cache[i].index;if(!this.cache[i].destroyed){for(var j=index;j<index+o.blockSize&&j<o.items.length;j++)needDestroyed.push(this.container._children[j]),this.container._children[j]=null;this.cache[i].destroyed=!0}}for(var i=end+1;i<=this.renderedIndex;i++){var index=this.cache[i].index;if(!this.cache[i].destroyed){for(var j=index;j<index+o.blockSize&&j<o.items.length;j++)needDestroyed.push(this.container._children[j]),this.container._children[j]=null;this.cache[i].destroyed=!0}}for(var firstFragment=BI.Widget._renderEngine.createFragment(),lastFragment=BI.Widget._renderEngine.createFragment(),currentFragment=firstFragment,i=start<0?0:start;i<=end&&i<=this.renderedIndex;i++){var index=this.cache[i].index;if(this.cache[i].destroyed||(currentFragment=lastFragment),this.cache[i].destroyed===!0){for(var j=index;j<index+o.blockSize&&j<o.items.length;j++){var w=this.container._addElement(j,BI.extend({root:!0},BI.stripEL(o.items[j])),this);currentFragment.appendChild(w.element[0])}this.cache[i].destroyed=!1}}this.container.element.prepend(firstFragment),this.container.element.append(lastFragment),this.topBlank.setHeight(this.cache[start<0?0:start].scrollTop);var lastCache=this.cache[Math.min(end,this.renderedIndex)];this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex)-lastCache.scrollTop-lastCache.height),BI.each(needDestroyed,function(i,child){child&&child._destroy()})},_populate:function(items){var o=this.options;items&&this.options.items!==items&&(this.options.items=items),this.tree=BI.PrefixIntervalTree.empty(Math.ceil(o.items.length/o.blockSize)),this._calculateBlocksToRender(),this.element.scrollTop(o.scrollTop)},_clearChildren:function(){BI.each(this.container._children,function(i,cell){cell&&cell._destroy()}),this.container._children={},this.container.attr("items",[])},restore:function(){this.renderedIndex=-1,this._clearChildren(),this.cache={},this.options.scrollTop=0,this.topBlank.setHeight(0),this.bottomBlank.setHeight(0)},populate:function(items){items&&this.options.items!==items&&this.restore(),this._populate()},destroyed:function(){this.restore()}}),BI.shortcut("bi.virtual_list",BI.VirtualList),BI.Pager=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Pager.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-pager",behaviors:{},layouts:[{type:"bi.horizontal",hgap:10,vgap:0}],dynamicShow:!0,dynamicShowFirstLast:!1,dynamicShowPrevNext:!1,pages:!1,curr:func
return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-icon-text-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextNode.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.icon,this.text)}))))},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doClick:function(){BI.IconTextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.IconTextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.IconTextNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_node",BI.IconTextNode),BI.TextIconNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.TextIconNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-text-icon-node",logic:{dynamic:!1},cls:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextIconNode.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconNode.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)}}),BI.TextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_node",BI.TextIconNode),BI.TextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.TextNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-text-node",textAlign:"left",whiteSpace:"nowrap",textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.TextNode.superclass._init.apply(this,arguments);var o=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:o.textAlign,whiteSpace:o.whiteSpace,textHeight:"nowrap"==o.whiteSpace?o.height:o.textHeight,height:o.height,hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py})},doClick:function(){BI.TextNode.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextNode.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:funct
return o.multiple===!0&&this.element.attr("multiple","multiple"),input.value="",this._events({dom:{input:input,disabled:!1},name:input.name,maxSize:o.maxSize?o.maxSize>>0:-1,files:[],clean:function(){this.files=[]},upload:function(handler){if(handler)for(var key in handler)this[key]=handler[key];return sendFiles(this,this.maxSize),this},hide:function(){this.dom.disabled&&(this.dom.disabled=!1,this.dom.input.removeAttribute("disabled"))},show:function(total,current,totalProp,currentProp){this.dom.disabled||(this.dom.disabled=!0,this.dom.input.setAttribute("disabled","disabled"))}})},select:function(){this.wrap&&BI.Widget._renderEngine.createElement(this.wrap.dom.input).click()},upload:function(handler){this.wrap&&this.wrap.upload(handler)},getValue:function(){return this.wrap?this.wrap.attach_array:[]},reset:function(){this.wrap&&(this.wrap.attach_array=[],this.wrap.attach_names=[],this.wrap.attachNum=0)},_setEnable:function(enable){BI.File.superclass._setEnable.apply(this,arguments),enable===!0?this.element.attr("disabled","disabled"):this.element.removeAttr("disabled")}}),BI.File.EVENT_CHANGE="EVENT_CHANGE",BI.File.EVENT_UPLOADSTART="EVENT_UPLOADSTART",BI.File.EVENT_ERROR="EVENT_ERROR",BI.File.EVENT_PROGRESS="EVENT_PROGRESS",BI.File.EVENT_UPLOADED="EVENT_UPLOADED",BI.shortcut("bi.file",BI.File)}(_global.document||{}),BI.Input=BI.inherit(BI.Single,{_defaultConfig:function(){var conf=BI.Input.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-input display-block overflow-dot",tagName:"input",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1})},_init:function(){BI.Input.superclass._init.apply(this,arguments);var self=this,ctrlKey=!1,keyCode=null,inputEventValid=!1,_keydown=BI.debounce(function(keyCode){self.onKeyDown(keyCode,ctrlKey),self._keydown_=!1},300),_clk=BI.debounce(BI.bind(this._click,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1});this._focusDebounce=BI.debounce(BI.bind(this._focus,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this._blurDebounce=BI.debounce(BI.bind(this._blur,this),BI.EVENT_RESPONSE_TIME,{leading:!0,trailing:!1}),this.element.keydown(function(e){inputEventValid=!1,ctrlKey=e.ctrlKey||e.metaKey,keyCode=e.keyCode,self.fireEvent(BI.Input.EVENT_QUICK_DOWN,arguments)}).keyup(function(e){keyCode=null,inputEventValid&&e.keyCode===BI.KeyCode.ENTER||(self._keydown_=!0,_keydown(e.keyCode))}).on("input propertychange",function(e){var originalEvent=e.originalEvent;(BI.isNull(originalEvent.propertyName)||"value"===originalEvent.propertyName)&&(inputEventValid=!0,self._keydown_=!0,_keydown(keyCode),keyCode=null)}).click(function(e){e.stopPropagation(),_clk()}).mousedown(function(e){self.element.val(self.element.val())}).focus(function(e){self._focusDebounce()}).focusout(function(e){self._blurDebounce()}),(BI.isKey(this.options.value)||BI.isEmptyString(this.options.value))&&this.setValue(this.options.value)},_focus:function(){this.element.addClass("bi-input-focus"),this._checkValidationOnValueChange(),this._isEditing=!0,""==this.getValue()&&(this.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EMPTY,this.getValue(),this),this.fireEvent(BI.Input.EVENT_EMPTY)),this.fireEvent(BI.Input.EVENT_FOCUS)},_blur:function(){function blur(){if(self.isValid()||self.options.quitChecker.apply(self,[BI.trim(self.getValue())])===!1||(self.element.val(self._lastValidValue?self._lastValidValue:""),self._checkValidationOnValueChange(),self._defaultState()),self.element.removeClass("bi-input-focus"),self._isEditing=!1,self._start=!1,self.isValid()){var lastValidValue=self._lastValidValue;self._lastValidValue=self.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CONFIRM,self.getValue(),self),self.fireEvent(BI.Input.EVENT_CONFIRM),self._lastValidValue!==lastValidValue&&self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM)}self.fireEvent(BI.Input.EVENT_BLUR)}var self=this;self._keydown_===!0?BI.delay(blur,300):blur()},_click:function(){this._isEditing!==!0&&(this.selectAll(),this.fireEvent(BI.Input.EVENT_CLICK))},onClick:function(){this._click()},o
parentNode.isParent=!0,parentNode[childKey]=parentNode[childKey].concat(nodes)},addSelectedNode:function(setting,node){var root=data.getRoot(setting);data.isSelectedNode(setting,node)||root.curSelectedList.push(node)},addCreatedNode:function(setting,node){if(setting.callback.onNodeCreated||setting.view.addDiyDom){var root=data.getRoot(setting);root.createdNodes.push(node)}},addZTreeTools:function(zTreeTools){_init.zTreeTools.push(zTreeTools)},exSetting:function(s){$.extend(!0,_setting,s)},fixPIdKeyValue:function(setting,node){setting.data.simpleData.enable&&(node[setting.data.simpleData.pIdKey]=node.parentTId?node.getParentNode()[setting.data.simpleData.idKey]:setting.data.simpleData.rootPId)},getAfterA:function(setting,node,array){for(var i=0,j=_init.afterA.length;i<j;i++)_init.afterA[i].apply(this,arguments)},getBeforeA:function(setting,node,array){for(var i=0,j=_init.beforeA.length;i<j;i++)_init.beforeA[i].apply(this,arguments)},getInnerAfterA:function(setting,node,array){for(var i=0,j=_init.innerAfterA.length;i<j;i++)_init.innerAfterA[i].apply(this,arguments)},getInnerBeforeA:function(setting,node,array){for(var i=0,j=_init.innerBeforeA.length;i<j;i++)_init.innerBeforeA[i].apply(this,arguments)},getCache:function(setting){return caches[setting.treeId]},getNextNode:function(setting,node){if(!node)return null;for(var childKey=setting.data.key.children,p=node.parentTId?node.getParentNode():data.getRoot(setting),i=0,l=p[childKey].length-1;i<=l;i++)if(p[childKey][i]===node)return i==l?null:p[childKey][i+1];return null},getNodeByParam:function(setting,nodes,key,value){if(!nodes||!key)return null;for(var childKey=setting.data.key.children,i=0,l=nodes.length;i<l;i++){if(nodes[i][key]==value)return nodes[i];var tmp=data.getNodeByParam(setting,nodes[i][childKey],key,value);if(tmp)return tmp}return null},getNodeCache:function(setting,tId){if(!tId)return null;var n=caches[setting.treeId].nodes[data.getNodeCacheId(tId)];return n?n:null},getNodeName:function(setting,node){var nameKey=setting.data.key.name;return""+node[nameKey]},getNodeTitle:function(setting,node){var t=""===setting.data.key.title?setting.data.key.name:setting.data.key.title;return""+node[t]},getNodes:function(setting){return data.getRoot(setting)[setting.data.key.children]},getNodesByParam:function(setting,nodes,key,value){if(!nodes||!key)return[];for(var childKey=setting.data.key.children,result=[],i=0,l=nodes.length;i<l;i++)nodes[i][key]==value&&result.push(nodes[i]),result=result.concat(data.getNodesByParam(setting,nodes[i][childKey],key,value));return result},getNodesByParamFuzzy:function(setting,nodes,key,value){if(!nodes||!key)return[];var childKey=setting.data.key.children,result=[];value=value.toLowerCase();for(var i=0,l=nodes.length;i<l;i++)"string"==typeof nodes[i][key]&&nodes[i][key].toLowerCase().indexOf(value)>-1&&result.push(nodes[i]),result=result.concat(data.getNodesByParamFuzzy(setting,nodes[i][childKey],key,value));return result},getNodesByFilter:function(setting,nodes,filter,isSingle,invokeParam){if(!nodes)return isSingle?null:[];for(var childKey=setting.data.key.children,result=isSingle?null:[],i=0,l=nodes.length;i<l;i++){if(tools.apply(filter,[nodes[i],invokeParam],!1)){if(isSingle)return nodes[i];result.push(nodes[i])}var tmpResult=data.getNodesByFilter(setting,nodes[i][childKey],filter,isSingle,invokeParam);if(isSingle&&tmpResult)return tmpResult;result=isSingle?tmpResult:result.concat(tmpResult)}return result},getPreNode:function(setting,node){if(!node)return null;for(var childKey=setting.data.key.children,p=node.parentTId?node.getParentNode():data.getRoot(setting),i=0,l=p[childKey].length;i<l;i++)if(p[childKey][i]===node)return 0==i?null:p[childKey][i-1];return null},getRoot:function(setting){return setting?roots[setting.treeId]:null},getRoots:function(){return roots},getSetting:function(treeId){return settings[treeId]},getSettings:function(){return settings},getZTreeTools:function(treeId){var r=this.getRoot(this.getSetting(treeId));return r?r.treeTools:null},initCache:function(setting){for(var i=0,j=_init.caches.length;i<j;i++)_init.cac
if(focus!==!1)try{$$(node,setting).focus().blur()}catch(e){}});else if(node.open=!expandFlag,view.switchNode(this.setting,node),focus!==!1)try{$$(node,setting).focus().blur()}catch(e){}return expandFlag},getNodes:function(){return data.getNodes(setting)},getNodeByParam:function(key,value,parentNode){return key?data.getNodeByParam(setting,parentNode?parentNode[setting.data.key.children]:data.getNodes(setting),key,value):null},getNodeByTId:function(tId){return data.getNodeCache(setting,tId)},getNodesByParam:function(key,value,parentNode){return key?data.getNodesByParam(setting,parentNode?parentNode[setting.data.key.children]:data.getNodes(setting),key,value):null},getNodesByParamFuzzy:function(key,value,parentNode){return key?data.getNodesByParamFuzzy(setting,parentNode?parentNode[setting.data.key.children]:data.getNodes(setting),key,value):null},getNodesByFilter:function(filter,isSingle,parentNode,invokeParam){return isSingle=!!isSingle,filter&&"function"==typeof filter?data.getNodesByFilter(setting,parentNode?parentNode[setting.data.key.children]:data.getNodes(setting),filter,isSingle,invokeParam):isSingle?null:[]},getNodeIndex:function(node){if(!node)return null;for(var childKey=setting.data.key.children,parentNode=node.parentTId?node.getParentNode():data.getRoot(setting),i=0,l=parentNode[childKey].length;i<l;i++)if(parentNode[childKey][i]==node)return i;return-1},getSelectedNodes:function(){for(var r=[],list=data.getRoot(setting).curSelectedList,i=0,l=list.length;i<l;i++)r.push(list[i]);return r},isSelectedNode:function(node){return data.isSelectedNode(setting,node)},reAsyncChildNodes:function(parentNode,reloadType,isSilent){if(this.setting.async.enable){var isRoot=!parentNode;if(isRoot&&(parentNode=data.getRoot(setting)),"refresh"==reloadType){for(var childKey=this.setting.data.key.children,i=0,l=parentNode[childKey]?parentNode[childKey].length:0;i<l;i++)data.removeNodeCache(setting,parentNode[childKey][i]);if(data.removeSelectedNode(setting),parentNode[childKey]=[],isRoot)this.setting.treeObj.empty();else{var ulObj=$$(parentNode,consts.id.UL,setting);ulObj.empty()}}view.asyncNode(this.setting,isRoot?null:parentNode,!!isSilent)}},refresh:function(){this.setting.treeObj.empty();var root=data.getRoot(setting),nodes=root[setting.data.key.children];data.initRoot(setting),root[setting.data.key.children]=nodes,data.initCache(setting),view.createNodes(setting,0,root[setting.data.key.children])},removeChildNodes:function(node){if(!node)return null;var childKey=setting.data.key.children,nodes=node[childKey];return view.removeChildNodes(setting,node),nodes?nodes:null},removeNode:function(node,callbackFlag){node&&(callbackFlag=!!callbackFlag,callbackFlag&&0==tools.apply(setting.callback.beforeRemove,[setting.treeId,node],!0)||(view.removeNode(setting,node),callbackFlag&&this.setting.treeObj.trigger(consts.event.REMOVE,[setting.treeId,node])))},selectNode:function(node,addFlag){if(node&&tools.uCanDo(setting)){if(addFlag=setting.view.selectedMulti&&addFlag,node.parentTId)view.expandCollapseParentNode(setting,node.getParentNode(),!0,!1,function(){try{$$(node,setting).focus().blur()}catch(e){}});else try{$$(node,setting).focus().blur()}catch(e){}view.selectNode(setting,node,addFlag)}},transformTozTreeNodes:function(simpleNodes){return data.transformTozTreeFormat(setting,simpleNodes)},transformToArray:function(nodes){return data.transformToArrayFormat(setting,nodes)},updateNode:function(node,checkTypeFlag){if(node){var nObj=$$(node,setting);nObj.get(0)&&tools.uCanDo(setting)&&(view.setNodeName(setting,node),view.setNodeTarget(setting,node),view.setNodeUrl(setting,node),view.setNodeLineIcos(setting,node),view.setNodeFontCss(setting,node))}}};return root.treeTools=zTreeTools,data.setZTreeTools(setting,zTreeTools),root[childKey]&&root[childKey].length>0?view.createNodes(setting,0,root[childKey]):setting.async.enable&&setting.async.url&&""!==setting.async.url&&view.asyncNode(setting),zTreeTools}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(BI.jQuery),function($){var _consts={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{S
var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.arrow_group_node_checkbox",width:24,stopPropagation:!0});var icon=BI.createWidget({type:"bi.icon_label",width:24,cls:o.iconCls,iconWidth:o.iconWidth,iconHeight:o.iconHeight});this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:16,el:this.checkbox},{width:16,el:icon},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items,rgap:5}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.IconArrowNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(v){BI.IconArrowNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.icon_arrow_node",BI.IconArrowNode),BI.LastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.LastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-last-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.LastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.LastPlusGroupNode.superclass.doClick.apply(this,arguments),this.checkbox.setSelected(this.isSelected())},setOpened:function(v){BI.LastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.last_plus_group_node",BI.LastPlusGroupNode),BI.MidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-mid-plus-group-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24})},_init:function(){BI.MidPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=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:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function()
width:230,height:145,simple:!1},render:function(){var self=this,o=this.options;this.colorEditor=BI.createWidget(o.editor,{type:o.simple?"bi.simple_color_picker_editor":"bi.color_picker_editor",value:o.value,cls:"bi-header-background bi-border-bottom",height:30}),this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE,function(){self.setValue(this.getValue()),self._dealStoreColors(),self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE,arguments)}),this.storeColors=BI.createWidget({type:"bi.color_picker",cls:"bi-border-bottom bi-border-right",items:[this._digestStoreColors(this._getStoreColors())],width:210,height:24,value:o.value}),this.storeColors.on(BI.ColorPicker.EVENT_CHANGE,function(){self.setValue(this.getValue()[0]),self._dealStoreColors(),self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.colorPicker=BI.createWidget({type:"bi.color_picker",width:210,height:50,value:o.value}),this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE,function(){self.setValue(this.getValue()[0]),self._dealStoreColors(),self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}),this.customColorChooser=BI.createWidget({type:"bi.custom_color_chooser",editor:o.editor});var panel=BI.createWidget({type:"bi.popup_panel",buttons:[BI.i18nText("BI-Basic_Cancel"),BI.i18nText("BI-Basic_Save")],title:BI.i18nText("BI-Custom_Color"),el:this.customColorChooser,stopPropagation:!1,bgap:-1,rgap:1,lgap:1,minWidth:227});return this.more=BI.createWidget({type:"bi.combo",cls:"bi-border-top",container:null,direction:"right,top",isNeedAdjustHeight:!1,el:{type:"bi.text_item",cls:"color-chooser-popup-more bi-list-item",textAlign:"center",height:24,textLgap:10,text:BI.i18nText("BI-Basic_More")+"..."},popup:panel}),this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){self.customColorChooser.setValue(self.getValue())}),panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.more.hideView();break;case 1:self.setValue(self.customColorChooser.getValue()),self._dealStoreColors(),self.more.hideView(),self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE,arguments)}}),{type:"bi.absolute",items:[{el:{type:"bi.vtape",items:[this.colorEditor,{el:{type:"bi.absolute",items:[{el:this.storeColors,left:10,right:10,top:5}]},height:29},{el:{type:"bi.absolute",items:[{el:this.colorPicker,left:10,right:10,top:5,bottom:5}]},height:60},{el:this.more,height:24}]},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"disable-mask",invisible:!o.disabled,ref:function(){self.mask=this}},left:0,right:0,top:0,bottom:0}]}},mounted:function(){var self=this,o=this.options;BI.isNotNull(o.value)&&this.setValue(o.value)},_setEnable:function(enable){BI.ColorChooserPopup.superclass._setEnable.apply(this,arguments),this.mask.setVisible(!enable)},_dealStoreColors:function(){var color=this.getValue(),colors=this._getStoreColors(),que=new BI.Queue(8);que.fromArray(colors),que.remove(color),que.unshift(color);var array=que.toArray();BI.Cache.setItem("colors",BI.array2String(array)),this.setStoreColors(array)},_digestStoreColors:function(colors){var items=BI.map(colors,function(i,color){return{value:color}});return BI.count(colors.length,8,function(i){items.push({value:"",disabled:!0})}),items},_getStoreColors:function(){var self=this,o=this.options,colorsArray=BI.string2Array(BI.Cache.getItem("colors")||"");return BI.filter(colorsArray,function(idx,color){return!o.simple||self._isRGBColor(color)})},_isRGBColor:function(color){return BI.isNotEmptyString(color)&&"transparent"!==color},setStoreColors:function(colors){BI.isArray(colors)&&this.storeColors.populate([this._digestStoreColors(colors)])},setValue:function(color){this.colorEditor.setValue(color),this.colorPicker.setValue(color),this.storeColors.setValue(color)},getValue:function(){return this.colorEditor.getValue()}}),BI.ColorChooserPopup.EVENT_VALUE_CHANGE="EVENT_VALUE_CHANGE",BI.ColorChooserPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser_popup",BI.ColorChooserPopup),BI.SimpleColorChooserPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleColorChooserPopup
allowBlank:o.allowBlank,watermark:o.watermark,errorText:o.errorText,value:o.value}),this.trigger.on(BI.EditorTrigger.EVENT_CHANGE,function(){self.popup.setValue(this.getValue()),self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup=BI.createWidget({type:"bi.text_value_check_combo_popup",chooseType:o.chooseType,items:o.items,value:o.value}),this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE,function(){self.setValue(self.popup.getValue()),self.editorIconCheckCombo.hideView(),self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editorIconCheckCombo=BI.createWidget({type:"bi.combo",container:o.container,element:this,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:300}})},setValue:function(v){this.editorIconCheckCombo.setValue(v)},getValue:function(){return this.trigger.getValue()},populate:function(items){this.options.items=items,this.editorIconCheckCombo.populate(items)}}),BI.EditorIconCheckCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_icon_check_combo",BI.EditorIconCheckCombo),BI.IconCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-combo",width:24,height:24,el:{},popup:{},minWidth:100,maxWidth:"auto",maxHeight:300,direction:"bottom",adjustLength:3,adjustXOffset:0,adjustYOffset:0,offsetStyle:"left",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.trigger=BI.createWidget(o.el,{type:"bi.icon_combo_trigger",iconCls:o.iconCls,title:o.title,items:o.items,width:o.width,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight,value:o.value}),this.popup=BI.createWidget(o.popup,{type:"bi.icon_combo_popup",chooseType:o.chooseType,items:o.items,value:o.value}),this.popup.on(BI.IconComboPopup.EVENT_CHANGE,function(){self.setValue(self.popup.getValue()),self.iconCombo.hideView(),self.fireEvent(BI.IconCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.iconCombo=BI.createWidget({type:"bi.combo",element:this,direction:o.direction,trigger:o.trigger,container:o.container,adjustLength:o.adjustLength,adjustXOffset:o.adjustXOffset,adjustYOffset:o.adjustYOffset,offsetStyle:o.offsetStyle,el:this.trigger,popup:{el:this.popup,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth}})},showView:function(){this.iconCombo.showView()},hideView:function(){this.iconCombo.hideView()},setValue:function(v){this.trigger.setValue(v),this.popup.setValue(v)},getValue:function(){var value=this.popup.getValue();return BI.isNull(value)?[]:BI.isArray(value)?value:[value]},populate:function(items){this.options.items=items,this.iconCombo.populate(items)}}),BI.IconCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_combo",BI.IconCombo),BI.IconComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi.icon-combo-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.IconComboPopup.superclass._init.apply(this,arguments);var o=this.options,self=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(o.items,{type:"bi.single_select_icon_text_item",height:24}),chooseType:o.chooseType,layouts:[{type:"bi.vertical"}],value:o.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(type,val,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.IconComboPopup.EVENT_CHANGE,val,obj)}),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(items){BI.IconComboPopup.superclass.populate.apply(this,arguments),items=BI.createItems(items,{type:"bi.single_select_icon_text_item",height:24}),this.popup.populate(items)},getValue:function(){return this.popup.getValue()},setValue:function(v){this.popup.setValue(v)}}),BI.IconCo
},setTextStyle:function(style){this.text.setStyle(style)},setValue:function(k){var o=this.options;this.editor.setValue(k),this._checkText()},getValue:function(){return this.editor.getValue()},getState:function(){return this.text.getValue()},setState:function(v){this._showHint(),this.text.setValue(v)}}),BI.ShelterEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ShelterEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ShelterEditor.EVENT_BLUR="EVENT_BLUR",BI.ShelterEditor.EVENT_CLICK="EVENT_CLICK",BI.ShelterEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ShelterEditor.EVENT_CLICK_LABEL="EVENT_CLICK_LABEL",BI.ShelterEditor.EVENT_START="EVENT_START",BI.ShelterEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ShelterEditor.EVENT_STOP="EVENT_STOP",BI.ShelterEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ShelterEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ShelterEditor.EVENT_VALID="EVENT_VALID",BI.ShelterEditor.EVENT_ERROR="EVENT_ERROR",BI.ShelterEditor.EVENT_ENTER="EVENT_ENTER",BI.ShelterEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ShelterEditor.EVENT_SPACE="EVENT_SPACE",BI.ShelterEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.shelter_editor",BI.ShelterEditor),BI.SignEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.SignEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-sign-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24})},_init:function(){BI.SignEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,hgap:o.hgap,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,tgap:o.tgap,bgap:o.bgap,value:o.value,validationChecker:o.validationChecker,quitChecker:o.quitChecker,allowBlank:o.allowBlank,watermark:o.watermark,errorText:o.errorText}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:o.title,warningTitle:o.warningTitle,tipType:o.tipType,textAlign:"left",height:o.height,hgap:o.hgap,handler:function(){self._showInput(),self.editor.focus(),self.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){self.fireEvent(BI.SignEditor.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(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,function(){self.fireEvent(BI.SignEditor.EVENT_FOCUS,arguments)}),this.editor.on(BI.Editor.EVENT_BLUR,function(){self.fireEvent(BI.SignEditor.EVENT_BLUR,arguments)}),this.editor.on(BI.Editor.EVENT_CLICK,function(){self.fireEvent(BI.SignEditor.EVENT_CLICK,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){self.fireEvent(BI.SignEditor.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(v){self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.Editor.EVENT_VALID,function(){self.fireEvent(BI.SignEditor.EVENT_VALID,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.SignEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_START,function(){self.fireEvent(BI.SignEditor.EVENT_START,arguments)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){self.fireEvent(BI.SignEditor.EVENT_PAUSE,arguments)}),this.editor.on(BI.Editor.EVENT_STOP,function(){self.fireEvent(BI.SignEditor.EVENT_STOP,arguments)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){self.fireEvent(BI.SignEditor.EVENT_SPACE,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){self._checkText(),self.fireEvent(BI.SignEditor.EVENT_ERROR,arguments)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){self.fireEvent(BI.SignEditor.EVENT_ENTER,arguments)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){self.fireEvent(BI.SignEditor.EVENT_RESTRICT,
this.list.resetHeight?this.list.resetHeight(h-toolHeight):this.list.element.css({"max-height":h-toolHeight+"px"})},setNotSelectedValue:function(){this.list.setNotSelectedValue.apply(this.list,arguments),this._checkAllSelected()},getNotSelectedValue:function(){return this.list.getNotSelectedValue()},getAllButtons:function(){return this.list.getAllButtons()},getAllLeaves:function(){return this.list.getAllLeaves()},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(value){return this.list.getIndexByValue(value)},getNodeById:function(id){return this.list.getNodeById(id)},getNodeByValue:function(value){return this.list.getNodeByValue(value)}}),BI.SelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_list",BI.SelectList),BI.LazyLoader=BI.inherit(BI.Widget,{_const:{PAGE:100},_defaultConfig:function(){return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-lazy-loader",el:{}})},_init:function(){var self=this,o=this.options;BI.LazyLoader.superclass._init.apply(this,arguments);var all=o.items.length;this.loader=BI.createWidget({type:"bi.loader",element:this,el:o.el,itemsCreator:function(options,populate){populate(self._getNextItems(options))},hasNext:function(option){return option.count<all}}),this.loader.on(BI.Loader.EVENT_CHANGE,function(obj){self.fireEvent(BI.LazyLoader.EVENT_CHANGE,obj)})},_getNextItems:function(options){var self=this,o=this.options,lastNum=o.items.length-this._const.PAGE*(options.times-1),lastItems=BI.takeRight(o.items,lastNum),nextItems=BI.take(lastItems,this._const.PAGE);return nextItems},populate:function(items){this.loader.populate(items)},addItems:function(items){this.loader.addItems(items)},empty:function(){this.loader.empty()},setNotSelectedValue:function(){this.loader.setNotSelectedValue.apply(this.loader,arguments)},getNotSelectedValue:function(){return this.loader.getNotSelectedValue()},setValue:function(){this.loader.setValue.apply(this.loader,arguments)},getValue:function(){return this.loader.getValue.apply(this.loader,arguments)},getAllButtons:function(){return this.loader.getAllButtons()},getAllLeaves:function(){return this.loader.getAllLeaves()},getSelectedButtons:function(){return this.loader.getSelectedButtons()},getNotSelectedButtons:function(){return this.loader.getNotSelectedButtons()},getIndexByValue:function(value){return this.loader.getIndexByValue(value)},getNodeById:function(id){return this.loader.getNodeById(id)},getNodeByValue:function(value){return this.loader.getNodeByValue(value)}}),BI.LazyLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.lazy_loader",BI.LazyLoader),BI.ListLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-list-loader",isDefaultInit:!0,el:{type:"bi.button_group"},items:[],itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn,count:!1,next:{},hasNext:BI.emptyFn})},_nextLoad:function(){var self=this,o=this.options;this.next.setLoading(),o.itemsCreator.apply(this,[{times:++this.times},function(){self.next.setLoaded(),self.addItems.apply(self,arguments)}])},_init:function(){BI.ListLoader.superclass._init.apply(this,arguments);var self=this,o=this.options;o.itemsCreator===!1&&(o.next=!1),this.button_group=BI.createWidget(o.el,{type:"bi.button_group",element:this,chooseType:0,items:o.items,behaviors:{},layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.ListLoader.EVENT_CHANGE,obj)}),o.next!==!1&&(this.next=BI.createWidget(BI.extend({type:"bi.loading_bar"},o.next)),this.next.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&self._nextLoad()})),BI.createWidget({type:"bi.vertical",element:this,items:[this.next]}),o.isDefaultInit&&BI.isEmpty(o.items)&&BI.nextTick(BI.bind(function(){this.populate()},this)),BI.isNotEmptyArray(o.items)&&this.populate(o.items)},hasN
this.nodes=BI.$.fn.zTree.init(this.tree.element,setting,nodes)},destroy:function(){BI.ListDisplayTree.superclass.destroy.apply(this,arguments)}}),BI.ListDisplayTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_display_tree",BI.ListDisplayTree),BI.SimpleTreeView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-simple-tree",itemsCreator:BI.emptyFn,items:null})},_init:function(){BI.SimpleTreeView.superclass._init.apply(this,arguments);var self=this,o=this.options;this.structure=new BI.Tree,this.tree=BI.createWidget({type:"bi.tree_view",element:this,itemsCreator:function(op,callback){var fn=function(items){callback({items:items}),self.structure.initTree(BI.Tree.transformToTreeFormat(items))};BI.isNotNull(o.items)?fn(o.items):o.itemsCreator(op,fn)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE,arguments)}),BI.isNotEmptyArray(o.items)&&this.populate(),BI.isNotNull(o.value)&&this.setValue(o.value)},populate:function(items,keyword){items&&(this.options.items=items),this.tree.stroke({keyword:keyword})},_digest:function(v){v||(v=[]);var self=this,map={},selected=[];return BI.each(v,function(i,val){var node=self.structure.search(val,"value");if(node){var p=node;for(p=p.getParent(),p&&(map[p.value]||(map[p.value]=0),map[p.value]++);p&&p.getChildrenLength()<=map[p.value];)selected.push(p.value),p=p.getParent(),p&&(map[p.value]||(map[p.value]=0),map[p.value]++)}}),BI.makeObject(v.concat(selected))},setValue:function(v){this.tree.setValue(this._digest(v))},_getValue:function(){var self=this,result=[],val=this.tree.getValue(),track=function(nodes){BI.each(nodes,function(key,node){BI.isEmpty(node)?result.push(key):track(node)})};return track(val),result},empty:function(){this.tree.empty()},getValue:function(){var self=this,result=[],val=this._getValue();return BI.each(val,function(i,key){var target=self.structure.search(key,"value");target&&self.structure._traverse(target,function(node){node.isLeaf()&&result.push(node.value)})}),result}}),BI.SimpleTreeView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.simple_tree",BI.SimpleTreeView),BI.EditorTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){var conf=BI.EditorTrigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-editor-trigger bi-border",height:24,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!1,watermark:"",errorText:""})},_init:function(){this.options.height-=2,BI.EditorTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:o.height,value:o.value,validationChecker:o.validationChecker,quitChecker:o.quitChecker,allowBlank:o.allowBlank,watermark:o.watermark,errorText:o.errorText,title:function(){return self.getValue()}}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.SignEditor.EVENT_CHANGE,function(){self.fireEvent(BI.EditorTrigger.EVENT_CHANGE,arguments)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.trigger_icon_button",width:o.triggerWidth||o.height},width:o.triggerWidth||o.height}]})},getValue:function(){return this.editor.getValue()},setValue:function(value){this.editor.setValue(value)},setText:function(text){this.editor.setState(text)}}),BI.EditorTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.editor_trigger",BI.EditorTrigger),BI.IconTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-icon-trigger",extraCls:"pull-down-font",el:{},height:24})},_init:function(){var o=this.options;BI.IconTrigger.superclass._init.apply(this,arguments),this.iconButton=BI.createWidget(o.el,{type:"bi.trigger_icon_button",element:this,width:o.width,height:o.height,extraCls:o.extraCls})}}),BI.shortcut("bi.icon_trigger",BI.IconTrigger),BI.IconTextTrigger=BI.inh
}),this.combo=BI.createWidget({type:"bi.combo",container:opts.container,toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,adjustLength:this.constants.comboAdjustHeight,popup:{el:this.popup,width:this.constants.popupWidth,stopPropagation:!1},hideChecker:function(e){return 0===triggerBtn.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){self.popup.setValue(self.storeValue),self.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW)});var triggerBtn=BI.createWidget({type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:24,height:24});triggerBtn.on(BI.IconButton.EVENT_CHANGE,function(){self.combo.isViewVisible()||self.combo.showView()}),BI.createWidget({type:"bi.htape",element:this,items:[{type:"bi.absolute",items:[{el:this.combo,top:0,left:0,right:0,bottom:0},{el:triggerBtn,top:0,right:0}]}]})},setValue:function(v){this.storeValue=v,this.popup.setValue(v),this.trigger.setValue(v)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()}}),BI.DateTimeCombo.EVENT_CANCEL="EVENT_CANCEL",BI.DateTimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DateTimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.date_time_combo",BI.DateTimeCombo),BI.DateTimePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-popup",width:268,height:374})},_init:function(){BI.DateTimePopup.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.cancelButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top bi-border-right",shadow:!0,text:BI.i18nText("BI-Basic_Cancel")}),this.cancelButton.on(BI.TextButton.EVENT_CHANGE,function(){self.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE)}),this.okButton=BI.createWidget({type:"bi.text_button",cls:"multidate-popup-button bi-border-top",shadow:!0,text:BI.i18nText("BI-Basic_OK")}),this.okButton.on(BI.TextButton.EVENT_CHANGE,function(){self.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE)}),this.dateCombo=BI.createWidget({type:"bi.date_calendar_popup",behaviors:opts.behaviors,min:self.options.min,max:self.options.max}),self.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE,function(){self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE)}),this.dateButton=BI.createWidget({type:"bi.grid",items:[[this.cancelButton,this.okButton]]}),BI.createWidget({element:this,type:"bi.vtape",items:[{el:this.dateCombo},{el:{type:"bi.center_adapt",cls:"bi-split-top",items:[{type:"bi.dynamic_date_time_select",ref:function(_ref){self.timeSelect=_ref}}]},height:50},{el:this.dateButton,height:30}]}),this.setValue(opts.value)},setValue:function(v){var value=v,date;BI.isNull(value)?(date=BI.getDate(),this.dateCombo.setValue({year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate()}),this.timeSelect.setValue({hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds()})):(this.dateCombo.setValue({year:value.year,month:value.month,day:value.day}),this.timeSelect.setValue({hour:value.hour,minute:value.minute,second:value.second}))},getValue:function(){return BI.extend({year:this.dateCombo.getValue().year,month:this.dateCombo.getValue().month,day:this.dateCombo.getValue().day},this.timeSelect.getValue())}}),BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE="BUTTON_CANCEL_EVENT_CHANGE",BI.DateTimePopup.CALENDAR_EVENT_CHANGE="CALENDAR_EVENT_CHANGE",BI.shortcut("bi.date_time_popup",BI.DateTimePopup),BI.DateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4},_defaultConfig:function(){return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,width:200})},_init:function(){BI.DateTimeTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",height:o.height,width:o.wid
{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:opts.height,height:opts.height,ref:function(){self.changeIcon=this}},width:opts.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:opts.container,ref:function(){self.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_trigger",min:opts.minDate,max:opts.maxDate,format:opts.format,allowEdit:opts.allowEdit,watermark:opts.watermark,height:opts.height,value:opts.value,ref:function(){self.trigger=this},listeners:[{eventName:BI.DynamicDateTrigger.EVENT_KEY_DOWN,action:function(){self.combo.isViewVisible()&&self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTrigger.EVENT_STOP,action:function(){self.combo.isViewVisible()||self.combo.showView()}},{eventName:BI.DynamicDateTrigger.EVENT_FOCUS,action:function(){self.storeTriggerValue=self.trigger.getKey(),self.combo.isViewVisible()||self.combo.showView(),self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTrigger.EVENT_BLUR,action:function(){self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTrigger.EVENT_ERROR,action:function(){self.storeValue={type:BI.DynamicDateCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1}},self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTrigger.EVENT_VALID,action:function(){self.fireEvent(BI.DynamicDateCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTrigger.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTrigger.EVENT_CONFIRM,action:function(){if(!self.combo.isViewVisible()){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmptyString(dateObj)&&!BI.isEqual(dateObj,dateStore)?(self.storeValue=self.trigger.getValue(),self.setValue(self.trigger.getValue())):BI.isEmptyString(dateObj)&&(self.storeValue=null,self.trigger.setValue()),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_popup",behaviors:opts.behaviors,min:opts.minDate,max:opts.maxDate,value:opts.value,ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicDateCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate()}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var value=self.popup.getValue();self._checkValue(value)&&self.setValue(value),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDatePopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},hideChecker:function(e){return 0===self.triggerBtn.element.find(e.target).length},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){self.popup.setValue(self.storeValue),self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW)}}]},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:opts.height,height:opts.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.combo.isViewVisible()||self.combo.showView()}}],ref:function(){self.triggerBtn=this}},top:0,right:0}]}],ref:function(_ref){self.comboWrapper=_ref}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(v){var o=this.options,type=null;switch(BI.isNotNull(v)&&(type=v.type),type){case BI.DynamicDateCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=o.height,this.comboWrapper.
var value=this.getValue();self._checkMinute(value),this.setValue(self._formatValueToDoubleDigit(value),BI.DynamicDateTimeSelect.MINUTE),self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var value=self._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.MINUTE);this.setValue(value)}}],width:60,height:24},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){self.second=this},validationChecker:function(v){return BI.isNaturalNumber(v)&&BI.parseInt(v)<60},errorText:function(v){return BI.isNumeric(v)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-59"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var value=this.getValue();self._checkSecond(value),this.setValue(self._formatValueToDoubleDigit(value)),self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}}],width:60,height:24}]}]}},_checkBorder:function(v){v=v||{},this._checkHour(v.hour),this._checkMinute(v.minute),this._checkSecond(v.second)},_checkHour:function(value){this.hour.setDownEnable(BI.parseInt(value)>0),this.hour.setUpEnable(BI.parseInt(value)<23)},_checkMinute:function(value){this.minute.setDownEnable(BI.parseInt(value)>0),this.minute.setUpEnable(BI.parseInt(value)<59)},_checkSecond:function(value){this.second.setDownEnable(BI.parseInt(value)>0),this.second.setUpEnable(BI.parseInt(value)<59)},_autoSwitch:function(v,type){var limit=0,value=v+"";switch(type){case BI.DynamicDateTimeSelect.HOUR:limit=2;break;case BI.DynamicDateTimeSelect.MINUTE:limit=5}if(1===value.length&&BI.parseInt(value)>limit&&(value="0"+value),2===value.length)switch(type){case BI.DynamicDateTimeSelect.HOUR:this.hour.isEditing()&&this.minute.focus();break;case BI.DynamicDateTimeSelect.MINUTE:this.minute.isEditing()&&this.second.focus();break;case BI.DynamicDateTimeSelect.SECOND:}return value},_formatValueToDoubleDigit:function(v){(BI.isNull(v)||BI.isEmptyString(v))&&(v=0);var value=BI.parseInt(v);return value<10&&(value="0"+value),value},_assertValue:function(v){return v=v||{},v.hour=this._formatValueToDoubleDigit(v.hour)||"00",v.minute=this._formatValueToDoubleDigit(v.minute)||"00",v.second=this._formatValueToDoubleDigit(v.second)||"00",v},getValue:function(){return{hour:BI.parseInt(this.hour.getValue()),minute:BI.parseInt(this.minute.getValue()),second:BI.parseInt(this.second.getValue())}},setValue:function(v){v=this._assertValue(v),this.hour.setValue(v.hour),this.minute.setValue(v.minute),this.second.setValue(v.second),this._checkBorder(v)}}),BI.DynamicDateTimeSelect.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.dynamic_date_time_select",BI.DynamicDateTimeSelect),BI.extend(BI.DynamicDateTimeSelect,{HOUR:1,MINUTE:2,SECOND:3}),BI.DynamicDateTimeTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2,yearLength:4,yearMonthLength:6,yearFullMonthLength:7,compareFormat:"%Y-%X-%d %H:%M:%S"},props:{extraCls:"bi-date-time-trigger",min:"1900-01-01",max:"2099-12-31",height:24,format:"",allowEdit:!0,watermark:""},_init:function(){BI.DynamicDateTimeTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options,c=this._const;this.storeTriggerValue="",this.editor=BI.createWidget({type:"bi.sign_editor",height:o.height,validationChecker:function(v){var formatStr=self._getStandardDateStr(v),date=formatStr.match(/\d+/g);return!BI.isKey(o.format)&&self._autoAppend(v,date),self._dateCheck(formatStr)&&BI.checkDateLegal(formatStr)&&self._checkVoid({year:0|date[0],month:0|date[1],day:0|date[2]})},quitChecker:function(){return!1},hgap:c.hgap,vgap:c.vgap,allowBlank:!0,watermark:BI.isKey(o.watermark)?o.watermark:BI.i18nText("BI-Basic_Unrestricted"),errorText:function(){var str="";return BI.isKey(o.format)||(str=self.editor.isEditing()?BI.i18nText("BI-Basic_Date_Time_Error_Text"):BI.i18nText("BI-Year_Trigger_Invalid_Text")),str},title:BI.bind(this._getTitle,this)}),this.editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,arguments)}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){self.storeTrigg
},reset:function(){this._setVisible(!1),this.enable=!1,this.valueOne="",this.valueTwo="",this.min=NaN,this.max=NaN,this._setBlueTrackWidth(0)},populate:function(){isNaN(this.min)||isNaN(this.max)||(this.enable=!0,this._setVisible(!0),this._setErrorText(),(BI.isNumeric(this.valueOne)||BI.isNotEmptyString(this.valueOne))&&(BI.isNumeric(this.valueTwo)||BI.isNotEmptyString(this.valueTwo))?(this.labelOne.setValue(this.valueOne),this.labelTwo.setValue(this.valueTwo),this._setAllPosition(this._getPercentByValue(this.valueOne),this._getPercentByValue(this.valueTwo))):(this.labelOne.setValue(this.min),this.labelTwo.setValue(this.max),this._setAllPosition(0,100)))}}),BI.IntervalSlider.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.interval_slider",BI.IntervalSlider),BI.AccurateCalculationModel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this,arguments),{baseCls:""})},_init:function(){BI.AccurateCalculationModel.superclass._init.apply(this,arguments)},_getMagnitude:function(n){for(var magnitude="1",i=0;i<n;i++)magnitude+="0";return BI.parseInt(magnitude)},_formatDecimal:function(stringNumber1,stringNumber2){if(stringNumber1.numDecimalLength!==stringNumber2.numDecimalLength){var magnitudeDiff=stringNumber1.numDecimalLength-stringNumber2.numDecimalLength;if(magnitudeDiff>0)var needAddZero=stringNumber2;else{var needAddZero=stringNumber1;magnitudeDiff=0-magnitudeDiff}for(var i=0;i<magnitudeDiff;i++)"0"===needAddZero.numDecimal&&0===i||(needAddZero.numDecimal+="0")}},_stringNumberFactory:function(num){var strNum=num.toString(),numStrArray=strNum.split("."),numInteger=numStrArray[0];if(1===numStrArray.length)var numDecimal="0",numDecimalLength=0;else var numDecimal=numStrArray[1],numDecimalLength=numStrArray[1].length;return{numInteger:numInteger,numDecimal:numDecimal,numDecimalLength:numDecimalLength}},_accurateSubtraction:function(num1,num2){function getDecimalMaxLength(num1,num2){return num1.numDecimal.length>=num2.numDecimal.length?num1.numDecimal.length:num2.numDecimal.length}function addZero(resultTemp,length){for(var diff=length-resultTemp.length,i=0;i<diff;i++)resultTemp="0"+resultTemp;return resultTemp}var stringNumber1=this._stringNumberFactory(num1),stringNumber2=this._stringNumberFactory(num2),integerResult=BI.parseInt(stringNumber1.numInteger)-BI.parseInt(stringNumber2.numInteger);this._formatDecimal(stringNumber1,stringNumber2);var decimalMaxLength=getDecimalMaxLength(stringNumber1,stringNumber2);if(BI.parseInt(stringNumber1.numDecimal)>=BI.parseInt(stringNumber2.numDecimal))var decimalResultTemp=(BI.parseInt(stringNumber1.numDecimal)-BI.parseInt(stringNumber2.numDecimal)).toString(),decimalResult=addZero(decimalResultTemp,decimalMaxLength);else{integerResult--;var borrow=this._getMagnitude(decimalMaxLength),decimalResultTemp=(borrow+BI.parseInt(stringNumber1.numDecimal)-BI.parseInt(stringNumber2.numDecimal)).toString(),decimalResult=addZero(decimalResultTemp,decimalMaxLength)}var result=integerResult+"."+decimalResult;return BI.parseFloat(result)},_accurateAddition:function(num1,num2){function addZero(resultTemp,length){for(var diff=length-resultTemp.length,i=0;i<diff;i++)resultTemp="0"+resultTemp;return resultTemp}var stringNumber1=this._stringNumberFactory(num1),stringNumber2=this._stringNumberFactory(num2),integerResult=BI.parseInt(stringNumber1.numInteger)+BI.parseInt(stringNumber2.numInteger);this._formatDecimal(stringNumber1,stringNumber2);var decimalResult=(BI.parseInt(stringNumber1.numDecimal)+BI.parseInt(stringNumber2.numDecimal)).toString();"0"!==decimalResult&&(decimalResult.length<=stringNumber1.numDecimal.length?decimalResult=addZero(decimalResult,stringNumber1.numDecimal.length):(integerResult++,decimalResult=decimalResult.slice(1)));var result=integerResult+"."+decimalResult;return BI.parseFloat(result)},_accurateMultiplication:function(num1,num2){var stringNumber1=this._stringNumberFactory(num1),stringNumber2=this._stringNumberFactory(num2),integerResult=BI.parseInt(stringNumber1.numInteger)*BI.parseInt(stringNumber2.numInteger)
this.node.setOpened(v)}}),BI.shortcut("bi.multilayer_select_tree_first_plus_group_node",BI.MultiLayerSelectTreeFirstPlusGroupNode),BI.MultiLayerSelectTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=BI.createWidget({type:"bi.select_tree_last_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:o.id,pId:o.pId,keyword:o.keyword,open:o.open,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(type){self.setSelected(self.isSelected()),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(b){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(b)},doClick:function(){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(v)}}),BI.shortcut("bi.multilayer_select_tree_last_plus_group_node",BI.MultiLayerSelectTreeLastPlusGroupNode),BI.MultiLayerSelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=BI.createWidget({type:"bi.select_tree_mid_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id:o.id,pId:o.pId,keyword:o.keyword,open:o.open,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py}),this.node.on(BI.Controller.EVENT_CHANGE,function(type){self.setSelected(self.isSelected()),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(b){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this,arguments),this.node.setSelected(b)},doClick:function(){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),this.node.setOpened(v)}}),BI.shortcut("bi.multilayer_select_tree_mid_plus_group_node",BI.MultiLayerSelectTreeMidPlusGroupNode),BI.MultiLayerSel
this.item.setSelected(v)}}),BI.shortcut("bi.multilayer_single_tree_last_tree_leaf_item",BI.MultiLayerSingleTreeLastTreeLeafItem),BI.MultiLayerSingleTreeMidTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.item=BI.createWidget({type:"bi.mid_tree_leaf_item",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword}),this.item.on(BI.Controller.EVENT_CHANGE,function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)});for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.item),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doHighLight:function(){this.item.doHighLight.apply(this.item,arguments)},unHighLight:function(){this.item.unHighLight.apply(this.item,arguments)},getId:function(){return this.options.id},getPId:function(){return this.options.pId},doClick:function(){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(v){BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(v)}}),BI.shortcut("bi.multilayer_single_tree_mid_tree_leaf_item",BI.MultiLayerSingleTreeMidTreeLeafItem),BI.MultiSelectCheckPane=BI.inherit(BI.Widget,{constants:{height:12,lgap:10,tgap:10,bgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-check-pane bi-background",items:[],itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,onClickContinueSelect:BI.emptyFn})},_init:function(){BI.MultiSelectCheckPane.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.storeValue=opts.value||{},this.display=BI.createWidget({type:"bi.display_selected_list",items:opts.items,itemsCreator:function(op,callback){return op=BI.extend(op||{},{selectedValues:self.storeValue.value}),self.storeValue.type===BI.Selection.Multi?void callback({items:BI.map(self.storeValue.value,function(i,v){var txt=opts.valueFormatter(v)||v;return{text:txt,value:v,title:txt}})}):void opts.itemsCreator(op,callback)}}),this.continueSelect=BI.createWidget({type:"bi.text_button",text:BI.i18nText("BI-Continue_Select"),cls:"multi-select-check-selected bi-high-light"}),this.continueSelect.on(BI.TextButton.EVENT_CHANGE,function(){opts.onClickContinueSelect()}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:{type:"bi.vertical_adapt",cls:"multi-select-continue-select",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Selected_Data")},lgap:this.constants.lgap},{el:this.continueSelect,lgap:this.constants.lgap}]},tgap:this.constants.tgap},{height:"fill",el:this.display,tgap:this.constants.bgap}]})},setValue:function(v){this.storeValue=v||{}},empty:function(){this.display.empty()},populate:function(){this.display.populate.apply(this.display,arguments)}}),BI.shortcut("bi.multi_select_check_pane",BI.MultiSelectCheckPane),BI.DisplaySelectedList=BI.inherit(BI.Pane,{constants:{height:24,lgap:10},_defaultConfig:function(){return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-display-list",itemsCreator:BI.emptyFn,items:[]})},_init:function(){BI.DisplaySelectedList.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.hasNext=!1,this.button_group=BI.createWidget({type:"bi.list_pa
this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),BI.remove(self.storeValue.assist,v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void self._adjust(callback)}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue={type:BI.Selection.Multi,value:v||[]},this.combo.setValue(this.storeValue),this.numberCounter.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 bi-border-radius",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{},allowEdit:!0})},_init:function(){BI.MultiSelectInsertTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options;o.height&&this.setHeight(o.height-2),this.searcher=BI.createWidget(o.searcher,{type:"bi.multi_select_insert_searcher",height:o.height,text:o.text,itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,watermark:o.watermark,popup:{},adapter:o.adapter,masker:o.masker,value:o.value}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE,arguments)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR)}),this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS,function(){self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS)}),this.wrapNumberCounter=BI.createWidget({type:"bi.layout"}),this.wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:this.wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]}),!o.allowEdit&&BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]})},refreshPlaceHolderWidth:function(width){this.wrapper.attr("items")[1].width=width,this.wrapper.resize()},getSearcher:function(){return this.searcher},stopEditing:function(){this.searcher.stopSearch()},setAdapter:function(adapter){this.searcher.setAdapter(adapter)},setValue:function(ob){this.searcher.setValue(ob)},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
}),this.editor.setState(state)}else this.editor.setState(BI.Selection.Multi)},setValue:function(ob){this.setState(ob),this.searcher.setValue(ob)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(items){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 self=this,o=this.options;this.editor=BI.createWidget(o.el,{type:"bi.multi_select_editor",height:o.height,text:o.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,height:o.height,isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback()},el:this.editor,popup:BI.extend({type:"bi.multi_select_search_pane",valueFormatter:o.valueFormatter,keywordGetter:function(){return self.editor.getValue()},itemsCreator:function(op,callback){var keyword=self.editor.getValue();op.keywords=[keyword],this.setKeyword(keyword),o.itemsCreator(op,callback)},value:o.value},o.popup),adapter:o.adapter,masker:o.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),self.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var keywords=this.getKeywords();self.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING,keywords)}),BI.isNotNull(o.value)&&this.setState(o.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(adapter){this.searcher.setAdapter(adapter)},setState:function(ob){var o=this.options;if(ob||(ob={}),ob.value||(ob.value=[]),ob.type===BI.Selection.All)if(0===ob.value.length)this.editor.setState(BI.Selection.All);else if(BI.size(ob.assist)<=20){var state="";BI.each(ob.assist,function(i,v){state+=0===i?""+(o.valueFormatter(v+"")||v):","+(o.valueFormatter(v+"")||v)}),this.editor.setState(state)}else this.editor.setState(BI.Selection.Multi);else if(0===ob.value.length)this.editor.setState(BI.Selection.None);else if(BI.size(ob.value)<=20){var state="";BI.each(ob.value,function(i,v){state+=0===i?""+(o.valueFormatter(v+"")||v):","+(o.valueFormatter(v+"")||v)}),this.editor.setState(state)}else this.editor.setState(BI.Selection.Multi)},setValue:function(ob){this.setState(ob),this.searcher.setValue(ob)},getKey:function(){return this.editor.get
opts.onClickContinueSelect(),BI.nextTick(function(){self.empty()})});var backToPopup=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:continueSelect,lgap:this.constants.lgap,tgap:this.constants.tgap}]});this.display=BI.createWidget(opts.el,{type:"bi.display_tree",cls:"bi-multi-tree-display",itemsCreator:function(op,callback){op.type=BI.TreeView.REQ_TYPE_GET_SELECTED_DATA,opts.itemsCreator(op,callback)},value:(opts.value||{}).value}),this.display.on(BI.Events.AFTERINIT,function(){self.fireEvent(BI.Events.AFTERINIT)}),this.display.on(BI.TreeView.EVENT_INIT,function(){backToPopup.setVisible(!1)}),this.display.on(BI.TreeView.EVENT_AFTERINIT,function(){backToPopup.setVisible(!0)}),BI.createWidget({type:"bi.vtape",element:this,items:[{height:this.constants.height,el:backToPopup},{height:"fill",el:this.display}]})},empty:function(){this.display.empty()},populate:function(configs){this.display.stroke(configs)},setValue:function(v){v||(v={}),this.display.setSelectedValue(v.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 showCounter(){isSearching()?self.storeValue={value:self.trigger.getValue()}:isPopupView()&&(self.storeValue={value:self.combo.getValue()}),self.trigger.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue)}BI.MultiTreeCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,isInit=!1,want2showCounter=!1;this.storeValue={value:o.value||{}},this.trigger=BI.createWidget({type:"bi.multi_select_trigger",height:o.height,valueFormatter:o.valueFormatter,text:o.text,watermark:o.watermark,masker:{offset:this.constants.offset},searcher:{type:"bi.multi_tree_searcher",itemsCreator:o.itemsCreator},value:{value:o.value||{}}}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:o.container,el:this.trigger,adjustLength:1,popup:{type:"bi.multi_tree_popup_view",ref:function(){self.popup=this,self.trigger.setAdapter(this),self.numberCounter.setAdapter(this)},listeners:[{eventName:BI.MultiTreePopup.EVENT_AFTERINIT,action:function(){self.numberCounter.adjustView(),isInit=!0,want2showCounter===!0&&showCounter()}},{eventName:BI.MultiTreePopup.EVENT_CHANGE,action:function(){change=!0;var val={type:BI.Selection.Multi,value:this.hasChecked()?this.getValue():{}};self.trigger.getSearcher().setState(val),self.numberCounter.setButtonChecked(val),self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CONFIRM,action:function(){self.combo.hideView()}},{eventName:BI.MultiTreePopup.EVENT_CLICK_CLEAR,action:function(){clear=!0,self.setValue(),self._defaultState()}}],itemsCreator:o.itemsCreator,onLoaded:function(){BI.nextTick(function(){self.numberCounter.adjustView(),self.trigger.getSearcher().adjustView()})}},value:{value:o.value||{}},hideChecker:function(e){return 0===triggerBtn.element.find(e.target).length&&0===self.numberCounter.element.find(e.target).length}});var change=!1,clear=!1,isSearching=function(){return self.trigger.getSearcher().isSearching()},isPopupView=function(){return self.combo.isViewVisible()};this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR,function(){self.fireEvent(BI.MultiTreeCombo.EVENT_BLUR)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_START,function(){self.storeValue={value:self.combo.getValue()},this.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){self.storeValue={value:this.getValue()}
masker:{}})},_init:function(){BI.MultiTreeSearcher.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",watermark:o.watermark,height:o.height,el:{type:"bi.simple_state_editor",text:o.text,height:o.height},listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR)}}]}),this.searcher=BI.createWidget({type:"bi.searcher",element:this,isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback({keyword:self.editor.getValue()})},el:this.editor,popup:BI.extend({type:"bi.multi_tree_search_pane",keywordGetter:function(){return self.editor.getValue()},itemsCreator:function(op,callback){op.keyword=self.editor.getValue(),o.itemsCreator(op,callback)},value:o.value},o.popup),adapter:o.adapter,masker:o.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){self.fireEvent(BI.MultiTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),self.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){self.fireEvent(BI.MultiTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var keywords=this.getKeywords();self.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING,keywords)}),BI.isNotNull(o.value)&&this.setState(o.value)},adjustView:function(){this.searcher.adjustView()},setAdapter:function(adapter){this.searcher.setAdapter(adapter)},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(ob){function getChildrenNode(ob){var text="",index=0,size=BI.size(ob);return BI.each(ob,function(name,children){index++;var childNodes=getChildrenNode(children);text+=(o.valueFormatter(name+"")||name)+(""===childNodes?"":":"+childNodes)+(index===size?"":","),""===childNodes&&count++}),text}var o=this.options;ob||(ob={}),ob.value||(ob.value={});var count=0;if(BI.isNumber(ob))this.editor.setState(ob);else if(0===BI.size(ob.value))this.editor.setState(BI.Selection.None);else{var text="";BI.each(ob.value,function(name,children){var childNodes=getChildrenNode(children);text+=(o.valueFormatter(name+"")||name)+(""===childNodes?"":":"+childNodes)+"; ",""===childNodes&&count++}),count>20?this.editor.setState(BI.Selection.Multi):this.editor.setState(text)}},setValue:function(ob){this.setState(ob),this.searcher.setValue(ob)},getKey:function(){return this.editor.getValue()},getValue:function(){return this.searcher.getValue()},populate:function(items){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(v){return v},value:0,allowBlank:!1,errorText:"",step:1})},_init:function(){BI.NumberEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.sign_editor",height:o.height-2,allowBlank:o.allowBlank,value:o.valueFormatter(o.value),validationChecker:o.validationChecker,errorText:o.errorText}),this.editor.on(BI.TextEditor.EVENT_CHANGE,function(){sel
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 self=this,opts=this.options,hasNext=!1;this.storeValue=opts.value||{},this._assertValue(this.storeValue),this.button_group=BI.createWidget({type:"bi.select_list",element:this,logic:opts.logic,el:BI.extend({onLoaded:opts.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},opts.el),itemsCreator:function(op,callback){var startValue=self._startValue;self.storeValue&&(op=BI.extend(op||{},{selectedValues:BI.isKey(startValue)&&self.storeValue.type===BI.Selection.Multi?self.storeValue.value.concat(startValue):self.storeValue.value})),opts.itemsCreator(op,function(ob){hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&self.storeValue){var json=BI.map(self.storeValue.value,function(i,v){var txt=opts.valueFormatter(v)||v;return{text:txt,value:v,title:txt,selected:self.storeValue.type===BI.Selection.Multi}});if(BI.isKey(self._startValue)&&!BI.contains(self.storeValue.value,self._startValue)){var txt=opts.valueFormatter(startValue)||startValue;json.unshift({text:txt,value:startValue,title:txt,selected:!0})}firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),ob.keyword||""),1===op.times&&self.storeValue&&(BI.isKey(startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,startValue):BI.pushDistinct(self.storeValue.value,startValue)),self.setValue(self.storeValue)),1===op.times&&self._scrollToTop()})},hasNext:function(){return hasNext},value:this.storeValue}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){self.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:"bi.multi_select_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:this.isAllSelected(),iconWrapperWidth:36})},_scrollToTop:function(){var self=this;BI.delay(function(){self.button_group.element.scrollTop(0)},30)},isAllSelected:function(){return this.button_group.isAllSelected()},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},setStartValue:function(v){this._startValue=v},setValue:function(v){this.storeValue=v||{},this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(items){arguments[0]=this._createItems(items),this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.resetHeight(h)},resetWidth:function(w){this.button_group.resetWidth(w)}}),BI.SearchMultiSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.search_multi_select_loader",BI.SearchMultiSelectLoader),BI.SearchMultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{
}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,o.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_adjust:function(callback){function adjust(){self.wants2Quit===!0&&(self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM),self.wants2Quit=!1),self.requesting=!1}var self=this,o=this.options;this._count?(adjust(),callback()):o.itemsCreator({type:BI.SingleSelectCombo.REQ_GET_DATA_LENGTH},function(res){self._count=res.count,adjust(),callback()})},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue=v,this._assertValue(this.storeValue),this.combo.setValue(this.storeValue)},getValue:function(){return this.storeValue},populate:function(){this._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 self=this,o=this.options,assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue=self._startValue),self.trigger.getSearcher().setState(self.storeValue)};this.storeValue=o.value,this.requesting=!1,this.trigger=BI.createWidget({type:"bi.single_select_trigger",height:o.height,allowNoSelect:o.allowNoSelect,allowEdit:o.allowEdit,valueFormatter:o.valueFormatter,itemsCreator:function(op,callback){o.itemsCreator(op,function(res){1===op.times&&BI.isNotNull(op.keywords)&&self.trigger.setValue(self.getValue()),callback.apply(self,arguments)})},text:o.text,value:this.storeValue,searcher:{popup:{type:"bi.single_select_search_insert_pane",listeners:[{eventName:BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){self.trigger.getSearcher().hasMatched()||(self.storeValue=self.trigger.getSearcher().getKeyword(),assertShowValue(),self._defaultState())}}]}}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){self.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_START,function(){self._setStartValue(),this.getSearcher().setValue(self.storeValue)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP,function(){self._setStartValue(),self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var keyword=this.getSearcher().getKeyword();self.storeValue=keyword,self.combo.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.populate(),self._setStartValue()}}),this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING,function(keywords){var last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.combo.setValue(self.storeValue),assertShowValue(),self.combo.populate(),self._setStartValue()):(self.combo.setValue(self.storeValue),assertShowValue())}),self.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(value,obj){self.storeValue=this.getValue(),assertShowValue(),self._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,functio
props:{baseCls:"bi-single-slider-button"},constants:{LARGE_SIZE:16,NORMAL_SIZE:12,LARGE_OFFSET:4,NORMAL_OFFSET:6},render:function(){var self=this;return{type:"bi.absolute",ref:function(){self.wrapper=this},items:[{el:{type:"bi.text_button",cls:"slider-button bi-high-light-border",ref:function(){self.slider=this}}}]}}}),BI.shortcut("bi.single_slider_button",BI.SliderIconButton),BI.SingleSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:90,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider bi-slider-track",digit:!1,unit:""},render:function(){var self=this,o=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 sliderVertical=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});return sliderVertical.element.click(function(e){if(self.enable&&self.isEnabled()){var offset=e.clientX-self.element.offset().left-c.SLIDER_WIDTH_HALF,trackLength=self.track.element[0].scrollWidth-c.TRACK_GAP,percent=0;offset<0&&(percent=0),offset>0&&offset<trackLength&&(percent=100*offset/self._getGrayTrackLength()),offset>=trackLength&&(percent=100);var significantPercent=BI.parseFloat(percent.toFixed(1));self._setAllPosition(significantPercent);var v=self._getValueByPercent(significantPercent);v=o.digit===!1?v:v.toFixed(o.digit),self.label.setValue(v),self.value=v,self.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),this.label=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:o.unit,width:c.EDITOR_WIDTH-2,allowBlank:!1,textAlign:"center",validationChecker:function(v){return self._checkValidation(v)}}),this.label.element.hover(function(){self.label.element.removeClass("bi-border").addClass("bi-border")},function(){self.label.element.removeClass("bi-border")}),this.label.on(BI.SignEditor.EVENT_CONFIRM,function(){var v=BI.parseFloat(this.getValue()),percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setAllPosition(significantPercent),this.setValue(v),self.value=v,self.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:c.TRACK_GAP_HALF,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},{el:sliderVertical,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(widget){function optimizeSize(s){return BI.clamp(s,0,self._getGrayTrackLength())}var self=this,o=this.options,startDrag=!1,size=0,offset=0,defaultSize=0,mouseMoveTracker=new BI.MouseMoveTracker(function(deltaX){if(mouseMoveTracker.isDragging()){startDrag=!0,offset+=deltaX,size=optimizeSize(defaultSize+offset),widget.element.addClass("dragging");var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setBlueTrack(significantPercent),self._setLabelPosition(significantPercent),self._setSliderPosition(significantPercent);var v=self._getValueByPercent(significantPercent);v=o.digit===!1?v:v.toFixed(o.digit),self.label.setValue(v),self.value=v}},function(){if(startDrag===!0){size=optimizeSize(size);var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderPosition(significantPercent),size=0,offset=0,defaultSize=size,startDrag=!1}widget.element.removeClass("dragging"),mouseMoveTracker.releaseMouseMoves(),self.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);widget.element.on("mousedown",function(event){widget.isEnabled()&&(defaultSize=this.offsetLeft,optimizeSize(def
return BI.print(BI.getDate(date.getFullYear(),0,1,storeValue.hour,storeValue.minute,storeValue.second),this._getFormatString())},_getFormatString:function(){return this.options.format||this._const.COMPARE_FORMAT},_formatValue:function(v){var now=BI.getDate();return BI.isNotEmptyObject(v)?BI.print(BI.getDate(now.getFullYear(),now.getMonth(),now.getDay(),v.hour,v.minute,v.second),this._getFormatString()):""},getKey:function(){return this.editor.getValue()},setValue:function(v){this.storeValue=v,this.editor.setValue(this._formatValue(v))},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 conf=BI.DateInterval.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-date-interval",minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){var self=this,o=this.options;BI.DateInterval.superclass._init.apply(this,arguments),o.value=o.value||{},this.left=this._createCombo(o.value.start),this.right=this._createCombo(o.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:self,type:"bi.center",height:this.constants.height,items:[{type:"bi.absolute",items:[{el:self.left,left:this.constants.offset,right:this.constants.width/2,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:self.right,left:this.constants.width/2,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[self.label]})},_createCombo:function(v){var self=this,o=this.options,combo=BI.createWidget({type:"bi.dynamic_date_combo",behaviors:o.behaviors,value:v});return combo.on(BI.DynamicDateCombo.EVENT_ERROR,function(){self._clearTitle(),BI.Bubbles.hide("error"),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.DateInterval.EVENT_ERROR)}),combo.on(BI.DynamicDateCombo.EVENT_VALID,function(){BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),self,{offsetStyle:"center"}),self.fireEvent(BI.DateInterval.EVENT_ERROR)):(self._clearTitle(),self.element.removeClass(self.constants.timeErrorCls))}),combo.on(BI.DynamicDateCombo.EVENT_FOCUS,function(){BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),BI.Bubbles.show("error",BI.i18nText("BI-Time_Interval_Error_Text"),self,{offsetStyle:"center"}),self.fireEvent(BI.DateInterval.EVENT_ERROR)):(self._clearTitle(),self.element.removeClass(self.constants.timeErrorCls))}),combo.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,function(){self.left.hidePopupView(),self.right.hidePopupView()}),combo.on(BI.DynamicDateCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),self.fireEvent(BI.DateInterval.EVENT_ERROR)):(self._clearTitle(),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.DateInterval.EVENT_CHANGE))}),combo},_dateCheck:function(date){return BI.print(BI.parseDateTime(date,"%Y-%x-%d"),"%Y-%x-%d")===date||BI.print(BI.parseDateTime(date,"%Y-%X-%d"),"%Y-%X-%d")===date||BI.print(BI.parseDateTime(date,"%Y-%x-%e"),"%Y-%x-%e")===date||BI.print(BI.parseDateTime(date,"%Y-%X-%e"),"%Y-%X-%e")===date},_checkVoid:function(obj){var o=this.options;return!BI.checkDateVoid(obj.year,obj.month,obj.day,o.minDate,o.maxDate)[0]},_check:function(small
ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicYearMonthPopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:o.behaviors,min:o.minDate,max:o.maxDate},value:o.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){self.popup.setValue(self.storeValue),self.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){self.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){self.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(o.value)},_checkDynamicValue:function(v){var type=null;switch(BI.isNotNull(v)&&(type=v.type),type){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(v){this.storeValue=v,this.trigger.setValue(v),this._checkDynamicValue(v)},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 self=this,opts=this.options,c=this.constants;return this.storeValue={type:BI.DynamicYearMonthCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-high-light bi-split-top",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_Current_Month"),ref:function(){self.textButton=this},listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-top bi-high-light",textHeight:c.buttonHeight-1,shadow:!0,text:BI.i18nText("BI-Basic_OK"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE)}}]}]]},height:24}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Basic_Current_Month")),this.textButton.setEnable(!0);else{var date=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());date=BI.print(date,"%Y-%x"),this.textButton.setValue(date),this.textButton.setEnable(!1)}},_getTabJson:function(){var self=this,o=thi
this._setInnerValue(date,text);break;case BI.DynamicYearQuarterCombo.Static:default:value=value||{};var quarter=BI.isNull(value.quarter)?null:value.quarter;this.yearEditor.setValue(value.year),this.yearEditor.setTitle(value.year),this.quarterEditor.setValue(quarter),this.quarterEditor.setTitle(quarter),this.setTitle(this._getStaticTitle(value))}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.quarterEditor.getValue()}}),BI.DynamicYearQuarterTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearQuarterTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearQuarterTrigger.EVENT_START="EVENT_START",BI.DynamicYearQuarterTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_quarter_trigger",BI.DynamicYearQuarterTrigger),BI.AbstractAllValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this,arguments),{width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(v){var text=v;return BI.isNotNull(this.items)&&BI.some(this.items,function(i,item){if(item.value===v||item.value+""===v)return text=item.text,!0}),text},_itemsCreator:function(options,callback){function call(items){var keywords=(options.keywords||[]).slice();options.keyword&&keywords.push(options.keyword);var resultItems=items;if(BI.isNotEmptyArray(keywords)&&(resultItems=[],BI.each(keywords,function(i,kw){var search=BI.Func.getSearchResult(items,kw);resultItems=resultItems.concat(search.match).concat(search.find)}),resultItems=BI.uniq(resultItems)),options.selectedValues){var filter=BI.makeObject(options.selectedValues,!0);resultItems=BI.filter(resultItems,function(i,ob){return!filter[ob.value]})}return options.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void callback({items:resultItems}):options.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void callback({count:resultItems.length}):void callback({items:resultItems,hasNext:!1})}var self=this,o=this.options;o.cache&&this.items?call(this.items):o.itemsCreator({},function(items){self.items=items,call(items)})}}),BI.AllValueChooserCombo=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;BI.isNotNull(o.items)&&(this.items=o.items),this.combo=BI.createWidget({type:"bi.multi_select_combo",text:o.text,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:o.width,height:o.height,value:{type:BI.Selection.Multi,value:o.value||[]}}),this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM,function(){self.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM)})},setValue:function(v){this.combo.setValue({type:BI.Selection.Multi,value:v||[]})},getValue:function(){var val=this.combo.getValue()||{};return val.type===BI.Selection.All?val.assist:val.value||[]},populate:function(items){this.items=items,this.combo.populate.apply(this,arguments)}}),BI.AllValueChooserCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.all_value_chooser_combo",BI.AllValueChooserCombo),BI.AllValueChooserPane=BI.inherit(BI.AbstractAllValueChooser,{_defaultConfig:function(){return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-all-value-chooser-pane",width:200,height:30,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.AllValueChooserPane.superclass._init.apply(this,arguments);var self=this,o=this.options;BI.isNotNull(o.items)&&(this.items=o.items),this.list=BI.createWidget({type:"bi.multi_select_list",element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:o.width,height:o.height
this.populate())},setSelectedValue:function(v){this.pane.setSelectedValue(v)},setValue:function(v){this.pane.setValue(v)},getValue:function(){return this.pane.getValue()},populate:function(){this.pane.populate.apply(this.pane,arguments)}}),BI.TreeValueChooserPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.tree_value_chooser_pane",BI.TreeValueChooserPane),BI.AbstractValueChooser=BI.inherit(BI.Widget,{_const:{perPage:100},_defaultConfig:function(){return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this,arguments),{items:null,itemsCreator:BI.emptyFn,cache:!0})},_valueFormatter:function(v){var text=v;return BI.isNotNull(this.items)&&BI.some(this.items,function(i,item){if(item.value===v||item.value+""===v)return text=item.text,!0}),text},_getItemsByTimes:function(items,times){for(var res=[],i=(times-1)*this._const.perPage;items[i]&&i<times*this._const.perPage;i++)res.push(items[i]);return res},_hasNextByTimes:function(items,times){return times*this._const.perPage<items.length},_itemsCreator:function(options,callback){function call(items){var keywords=(options.keywords||[]).slice(),resultItems=items;if(BI.isNotEmptyArray(keywords)&&(resultItems=[],BI.each(keywords,function(i,kw){var search=BI.Func.getSearchResult(items,kw);resultItems=resultItems.concat(search.match).concat(search.find)}),resultItems=BI.uniq(resultItems)),options.selectedValues){var filter=BI.makeObject(options.selectedValues,!0);resultItems=BI.filter(resultItems,function(i,ob){return!filter[ob.value]})}return options.type===BI.MultiSelectCombo.REQ_GET_ALL_DATA?void callback({items:resultItems}):options.type===BI.MultiSelectCombo.REQ_GET_DATA_LENGTH?void callback({count:resultItems.length}):void callback({items:self._getItemsByTimes(resultItems,options.times),hasNext:self._hasNextByTimes(resultItems,options.times)})}var self=this,o=this.options;o.cache&&this.items?call(this.items):o.itemsCreator({},function(items){self.items=items,call(items)})}}),BI.ValueChooserInsertCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function(){return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn,cache:!0})},_init:function(){BI.ValueChooserInsertCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;BI.isNotNull(o.items)&&(this.items=o.items),this.combo=BI.createWidget({type:"bi.multi_select_insert_combo",element:this,text:o.text,value:o.value,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:o.width,height:o.height,listeners:[{eventName:BI.MultiSelectCombo.EVENT_FOCUS,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS)}},{eventName:BI.MultiSelectCombo.EVENT_BLUR,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR)}},{eventName:BI.MultiSelectCombo.EVENT_STOP,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiSelectCombo.EVENT_CLICK_ITEM,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiSelectCombo.EVENT_SEARCHING,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiSelectCombo.EVENT_CONFIRM,action:function(){self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM)}}]})},setValue:function(v){this.combo.setValue(v)},getValue:function(){var val=this.combo.getValue()||{};return{type:val.type,value:val.value}},populate:function(items){this.items=items,this.combo.populate.apply(this,arguments)}}),BI.ValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.ValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.ValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.value_chooser_insert_combo",BI.ValueChooserInsertCombo),BI.ValueChooserCombo=BI.inherit(BI.AbstractValueChooser,{_defaultConfig:function()
!function(r){var n={};function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=141)}({141:function(e,t,r){e.exports=r(142)},142:function(e,t,r){"use strict";var n=function o(e){return e&&e.__esModule?e:{"default":e}}(r(143));BI.extend(BI,n["default"])},143:function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={Decorators:function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{"default":e};var t=c();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}r["default"]=e,t&&t.set(e,r);return r}(r(144))};t["default"]=n},144:function(e,t,r){"use strict";function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){e.prototype=Object.create(t.prototype),function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],u=Object.getOwnPropertyDescriptor(t,o);u&&u.configurable&&e[o]===undefined&&Object.defineProperty(e,o,u)}return e}(e.prototype.constructor=e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.shortcut=function o(){return function(e){BI.shortcut(e.xtype,e)}},t.model=function f(){return function(e){BI.model(e.xtype,e)}},t.store=function l(r){var n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype._store=function(){var e=n.props?n.props.apply(this):undefined;return BI.Models.getModel(r.xtype,e)},t}(e)}},t.Model=void 0;var n=function(o){function e(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i(u(e=o.call.apply(o,[this].concat(r))||this),"model",void 0),i(u(e),"store",void 0),i(u(e),"context",void 0),i(u(e),"actions",void 0),i(u(e),"childContext",void 0),i(u(e),"TYPE",void 0),i(u(e),"computed",void 0),e}return c(e,o),e.prototype.state=function(){return{}},e}(Fix.Model);t.Model=n}});