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

/*! fineui 2019-12-19 17:01:02 */
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
5 years ago
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._animationFrameID&&this._didMouseMove(),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[sw
}):removeIndex=nameOrWidget,removeIndex&&this._removeItemAt(0|removeIndex)},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 m
ERROR:"_ERROR",PAUSE:"_PAUSE",DESTROY:"_DESTROY",MOUNT:"_MOUNT",UNMOUNT:"_UNMOUNT",CLEAR:"_CLEAR",ADD:"_ADD",EDITING:"_EDITING",EMPTY:"_EMPTY",VIEW:"_VIEW",RESIZE:"_RESIZE",BEFOREEDIT:"_BEFOREEDIT",AFTEREDIT:"_AFTEREDIT",STARTEDIT:"_STARTEDIT",STOPEDIT:"_STOPEDIT",CHANGE:"_CHANGE",EXPAND:"_EXPAND",COLLAPSE:"_COLLAPSE",CALLBACK:"_CALLBACK",CLICK:"_CLICK",STATECHANGE:"_STATECHANGE",BEFORESTATECHANGE:"_BEFORESTATECHANGE",INIT:"_INIT",AFTERINIT:"_AFTERINIT",SCROLL:"_SCROLL",STARTLOAD:"_STARTLOAD",AFTERLOAD:"_AFTERLOAD",BS:"beforesubmit",AS:"aftersubmit",SC:"submitcomplete",SF:"submitfailure",SS:"submitsuccess",BVW:"beforeverifywrite",AVW:"afterverifywrite",AV:"afterverify",BW:"beforewrite",AW:"afterwrite",WS:"writesuccess",WF:"writefailure",BA:"beforeappend",AA:"afterappend",BD:"beforedelete",AD:"beforedelete",UC:"unloadcheck",BTOPDF:"beforetopdf",ATOPDF:"aftertopdf",BTOEXCEL:"beforetoexcel",ATOEXCEL:"aftertoexcel",BTOWORD:"beforetoword",ATOWORD:"aftertoword",BTOIMAGE:"beforetoimage",ATOIMAGE:"aftertoimage",BTOHTML:"beforetohtml",ATOHTML:"aftertohtml",BIMEXCEL:"beforeimportexcel",AIMEXCEL:"afterimportexcel",BPDFPRINT:"beforepdfprint",APDFPRINT:"afterpdfprint",BFLASHPRINT:"beforeflashprint",AFLASHPRINT:"afterflashprint",BAPPLETPRINT:"beforeappletprint",AAPPLETPRINT:"afterappletprint",BSEVERPRINT:"beforeserverprint",ASERVERPRINT:"afterserverprint",BEMAIL:"beforeemail",AEMAIL:"afteremail"}}),_.extend(BI,{pushArray:function(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-
};BI.ResizeDetector={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.in
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,{splitChar:""}))+"",py=BI.toUpperCase(py),this.empty();py.length>0&&textLeft.length>0;){var tidx=BI.toUpperCase(textLeft).indexOf(keyword),pidx=py.indexOf(keyword);if(pidx>=0&&(pidx=(pidx-Math.floor(pidx/(textLeft.length+1)))%textLeft.length),tidx>=0&&(pidx>tidx||pidx===-1))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),BI.isNotEmptyString(py)&&(py=BI.map(py.split(""),function(idx,ps){return ps.slice(tidx+keyword.length)}).join(""));else{if(!(pidx>=0)){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)))),BI.isNotEmptyString(py)&&(py=BI.map(py.split(""),function(idx,ps){return ps.slice(pidx+keyword.length)}).join("")),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
this._mount()}}),BI.shortcut("bi.flex_scrollable_horizontal",BI.FlexWrapperHorizontalLayout),BI.FlexWrapperVerticalCenter=BI.inherit(BI.Layout,{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.is
hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0,items:[{height:100,el:{type:"bi.button",text:"button1"}},{height:"fill",el:{type:"bi.button",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},appendFra
"axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS&&(deltaX=deltaY*-1,deltaY=0),delta=0===deltaY?deltaX:deltaY,"deltaY"in orgEvent&&(deltaY=orgEvent.deltaY*-1,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._load
if(BI.isNotEmptyArray(node.children)||checkState.half===!1)return void this._buildTree(map,path);var storeValues=BI.deepClone(this.options.paras.selectedValues),treeNode=this._getTree(storeValues,path);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&&th
this._rendered=!1):this.popupView&&this.popupView.invisible(),this.element.removeClass(this.options.comboClass),BI.Widget._renderEngine.createElement(document).unbind("mousedown."+this.getName()).unbind("mousewheel."+this.getName()),this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW)},_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.get
self.isExpanded()?(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.switcher),self.fireEvent(BI.Switcher.EVENT_EXPAND)):(self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.switcher),self.fireEvent(BI.Switcher.EVENT_COLLAPSE)))},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.super
}}),BI.shortcut("bi.list_view",BI.ListView),BI.VirtualList=BI.inherit(BI.Widget,{props:function(){return{baseCls:"bi-virtual-list",overscanHeight:100,blockSize:10,scrollTop:0,items:[]}},init:function(){var self=this;this.renderedIndex=-1,this.cache={}},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,{_default
}}),BI.IconTextIconNode.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_text_icon_node",BI.IconTextIconNode),BI.IconTextNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.IconTextNode.superclass._defaultConfig.apply(this,arguments);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.getVa
files:wrap.files}),input.value="",wrap.dom.input.parentNode.replaceChild(input,wrap.dom.input),wrap.dom.input=input,event.add(wrap.dom.input,"change",arguments.callee)}),wrap},_wrap:function(){var self=this,o=this.options,input=this.element[0];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_C
var childKey=setting.data.key.children;parentNode[childKey]||(parentNode[childKey]=[]),parentNode[childKey].length>0&&(parentNode[childKey][parentNode[childKey].length-1].isLastNode=!1,view.setNodeLineIcos(setting,parentNode[childKey][parentNode[childKey].length-1])),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},getSet
expandFlag===node.open&&!sonSign)return null;if(data.getRoot(setting).expandTriggerFlag=callbackFlag,!tools.canAsync(setting,node)&&sonSign)view.expandCollapseSonNode(setting,node,expandFlag,!0,function(){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
baseCls:(conf.baseCls||"")+" bi-icon-arrow-node bi-list-item",logic:{dynamic:!1},id:"",pId:"",open:!1,height:24,iconHeight:12,iconWidth:12,iconCls:""})},_init:function(){BI.IconArrowNode.superclass._init.apply(this,arguments);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:
}},{eventName:BI.ColorChooserPopup.EVENT_CHANGE,action:function(){fn(),self.combo.hideView()}}]},o.popup),width:230},value:o.value});var fn=function(){var color=self.colorPicker.getValue();self.trigger.setValue(color)};this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self.fireEvent(BI.ColorChooser.EVENT_CHANGE,arguments)})},_isRGBColor:function(color){return BI.isNotEmptyString(color)&&"transparent"!==color},isViewVisible:function(){return this.combo.isViewVisible()},hideView:function(){this.combo.hideView()},showView:function(){this.combo.showView()},setValue:function(color){this.combo.setValue(color)},getValue:function(){return this.combo.getValue()}}),BI.ColorChooser.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.color_chooser",BI.ColorChooser),BI.ColorChooserPopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-color-chooser-popup",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
self.text=this}},buttons:buttons}},populate:function(v){this.text.setText(v||this.options.text)}}),BI.TextBubblePopupBarView.EVENT_CHANGE="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.text_bubble_bar_popup_view",BI.TextBubblePopupBarView),BI.EditorIconCheckCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this,arguments),{baseClass:"bi-check-editor-combo",width:100,height:24,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:""})},_init:function(){BI.EditorIconCheckCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.trigger=BI.createWidget({type:"bi.editor_trigger",items:o.items,height:o.height,validationChecker:o.validationChecker,quitChecker:o.quitChecker,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.IconComb
this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(text){this.editor.setErrorText(text)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},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)
var selectAll=data.type===BI.ButtonGroup.CHOOSE_TYPE_ALL;this.setAllSelected(selectAll),this.list[selectAll?"setNotSelectedValue":"setValue"](data.value),this._checkAllSelected()},getValue:function(){return this.isAllSelected()===!1?{type:BI.ButtonGroup.CHOOSE_TYPE_MULTI,value:this.list.getValue(),assist:this.list.getNotSelectedValue()}:{type:BI.ButtonGroup.CHOOSE_TYPE_ALL,value:this.list.getNotSelectedValue(),assist:this.list.getValue()}},empty:function(){this.list.empty()},populate:function(items){this.toolbar.setVisible(!BI.isEmptyArray(items)),this.toolbar.setEnable(this.isEnabled()&&!BI.isEmptyArray(items)),this.list.populate.apply(this.list,arguments),this._checkAllSelected()},_setEnable:function(enable){BI.SelectList.superclass._setEnable.apply(this,arguments),this.toolbar.setEnable(enable)},resetHeight:function(h){var toolHeight=(this.toolbar.element.outerHeight()||25)*(this.toolbar.isVisible()?1:0);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(),
})},_init:function(){BI.ListDisplayTree.superclass._init.apply(this,arguments)},_configSetting:function(){function beforeCollapse(treeId,treeNode){return!1}function getFont(treeId,node){return node.isLeaf?{}:{color:"#999999"}}var setting={view:{selectedMulti:!1,dblClickExpand:!1,showIcon:!1,nameIsHTML:!0,showTitle:!1,fontCss:getFont},data:{key:{title:"title",name:"text"},simpleData:{enable:!0}},callback:{beforeCollapse:beforeCollapse}};return setting},_dealWidthNodes:function(nodes){nodes=BI.ListDisplayTree.superclass._dealWidthNodes.apply(this,arguments);var self=this,o=this.options;return BI.each(nodes,function(i,node){node.isParent=node.isParent||node.parent,null==node.text&&node.count>0&&(node.text=node.value+"("+BI.i18nText("BI-Basic_Altogether")+node.count+BI.i18nText("BI-Basic_Count")+")")}),nodes},initTree:function(nodes,setting){var setting=setting||this._configSetting();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",
return{type:"bi.static_date_pane_card",behaviors:o.behaviors,listeners:[{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}}],ref:function(){self.ymd=this}};case BI.DynamicDatePane.Dynamic:default:return{type:"bi.dynamic_date_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){self._checkValue(self.getValue())&&self.fireEvent("EVENT_CHANGE")}}],ref:function(){self.dynamicPane=this}}}}}]}},mounted:function(){this.setValue(this.options.value)},_checkValueValid:function(value){return BI.isNull(value)||BI.isEmptyObject(value)||BI.isEmptyString(value)},_checkValue:function(v){switch(v.type){case BI.DynamicDateCombo.Dynamic:return BI.isNotEmptyObject(v.value);case BI.DynamicDateCombo.Static:default:return!0}},setValue:function(v){v=v||{};var type=v.type||BI.DynamicDateCombo.Static,value=v.value||v;switch(this.switcher.setValue(type),this.dateTab.setSelect(type),type){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(value);break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(value)){var date=BI.getDate();this.ymd.setValue({year:date.getFullYear(),month:date.getMonth()+1})}else this.ymd.setValue(value)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.shortcut("bi.dynamic_date_pane",BI.DynamicDatePane),BI.extend(BI.DynamicDatePane,{Static:1,Dynamic:2}),BI.DateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:290,popupWidth:270,comboAdjustHeight:1,border:1},_defaultConfig:function(){return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-time-combo bi-border bi-border-radius",width:200,height:24,minDate:"1900-01-01",maxDate:"2099-12-31"})},_init:function(){BI.DateTimeCombo.superclass._init.apply(this,arguments);var self=this,opts=this.options,date=BI.getDate();this.storeValue=BI.isNotNull(opts.value)?opts.value:{year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate(),hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds()},this.trigger=BI.createWidget({type:"bi.date_time_trigger",min:opts.minDate,max:opts.maxDate,value:opts.value}),this.popup=BI.createWidget({type:"bi.date_time_popup",behaviors:opts.behaviors,min:opts.minDate,max:opts.maxDate,value:opts.value}),self.setValue(this.storeValue),this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE,function(){self.setValue(self.storeValue),self.hidePopupView(),self.fireEvent(BI.DateTimeCombo.EVENT_CANCEL)}),this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE,function(){self.storeValue=self.popup.getValue(),self.setValue(self.storeValue),self.hidePopupView(),self.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM)}),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._defaul
},setValue:function(v){v=v||{},this.position=v.position||BI.DynamicDateCard.OFFSET.CURRENT;var values=[],valuesItems=[];BI.isNotNull(v.year)&&(values.push(BI.DynamicDateCard.TYPE.YEAR),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR,v.year))),BI.isNotNull(v.quarter)&&(values.push(BI.DynamicDateCard.TYPE.QUARTER),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER,v.quarter))),BI.isNotNull(v.month)&&(values.push(BI.DynamicDateCard.TYPE.MONTH),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH,v.month))),BI.isNotNull(v.week)&&(values.push(BI.DynamicDateCard.TYPE.WEEK),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK,v.week))),BI.isNotNull(v.day)&&(values.push(BI.DynamicDateCard.TYPE.DAY),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.DAY,v.day))),BI.isNotNull(v.workDay)&&(values.push(BI.DynamicDateCard.TYPE.WORK_DAY),valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY,v.workDay))),this.checkgroup.setValue(values),this.workDayBox.setSelected(BI.isNotNull(v.workDay)),this.resultPane.populate(this._getParamJson(valuesItems,v.position))},getValue:function(){var self=this,valueMap={},selectValues=this.checkgroup.getValue(),buttons=this.resultPane.getAllButtons();if(0!==selectValues.length&&BI.each(buttons,function(idx,button){var value=button.getValue();switch(value.dateType){case BI.DynamicDateCard.TYPE.YEAR:valueMap.year=0===value.offset?-value.value:value.value;break;case BI.DynamicDateCard.TYPE.QUARTER:valueMap.quarter=0===value.offset?-value.value:value.value;break;case BI.DynamicDateCard.TYPE.MONTH:valueMap.month=0===value.offset?-value.value:value.value;break;case BI.DynamicDateCard.TYPE.WEEK:valueMap.week=0===value.offset?-value.value:value.value;break;case BI.DynamicDateCard.TYPE.DAY:valueMap.day=0===value.offset?-value.value:value.value}BI.isNull(value.dateType)&&(valueMap.position=self.position||BI.DynamicDateCard.OFFSET.CURRENT)}),this.workDayBox.isSelected()){var value=buttons[0].getValue();valueMap.workDay=0===value.offset?-value.value:value.value}return valueMap}}),BI.shortcut("bi.dynamic_date_card",BI.DynamicDateCard),BI.extend(BI.DynamicDateCard,{TYPE:{YEAR:1,QUARTER:2,MONTH:3,WEEK:4,DAY:5,WORK_DAY:6},OFFSET:{CURRENT:1,BEGIN:2,END:3}}),BI.DynamicDateCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1},props:{baseCls:"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var self=this,opts=this.options;this.storeTriggerValue="";var date=BI.getDate();return this.storeValue=opts.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:opts.height,height:opts.height,ref:function(){self.changeIcon=this}},width:opts.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:opts.container,ref:function(){self.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,destroyWhenHide:!0,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)}}
behaviors:o.behaviors,min:self.options.min,max:self.options.max,ref:function(){self.ymd=this}},{el:{type:"bi.dynamic_date_time_select",cls:"bi-split-top",ref:function(){self.timeSelect=this}},height:40}]}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var v=self.dateTab.getSelect();switch(v){case BI.DynamicDateCombo.Static:var date=BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());self.ymd.setValue({year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate()}),self.timeSelect.setValue(),self._setInnerValue();break;case BI.DynamicDateCombo.Dynamic:default:self.storeValue&&self.storeValue.type===BI.DynamicDateCombo.Dynamic?self.dynamicPane.setValue(self.storeValue.value):self.dynamicPane.setValue({year:0}),self._setInnerValue()}}}]}},_setInnerValue:function(){if(this.dateTab.getSelect()===BI.DynamicDateCombo.Static)this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today")),this.textButton.setEnable(!0);else{var date=BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());date=BI.print(date,"%Y-%X-%d"),this.textButton.setValue(date),this.textButton.setEnable(!1)}},_checkValueValid:function(value){return BI.isNull(value)||BI.isEmptyObject(value)||BI.isEmptyString(value)},setMinDate:function(minDate){this.options.min!==minDate&&(this.options.min=minDate,this.ymd.setMinDate(minDate))},setMaxDate:function(maxDate){this.options.max!==maxDate&&(this.options.max=maxDate,this.ymd.setMaxDate(maxDate))},setValue:function(v){this.storeValue=v;var self=this,type,value;switch(v=v||{},type=v.type||BI.DynamicDateCombo.Static,value=v.value||v,this.dateTab.setSelect(type),type){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(value),self._setInnerValue();break;case BI.DynamicDateCombo.Static:default:if(this._checkValueValid(value)){var date=BI.getDate();this.ymd.setValue({year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate()}),this.timeSelect.setValue(),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"))}else this.ymd.setValue(value),this.timeSelect.setValue({hour:value.hour,minute:value.minute,second:value.second}),this.textButton.setValue(BI.i18nText("BI-Multi_Date_Today"));this.textButton.setEnable(!0)}},getValue:function(){var type=this.dateTab.getSelect();return{type:type,value:type===BI.DynamicDateTimeCombo.Static?BI.extend(this.ymd.getValue(),this.timeSelect.getValue()):this.dynamicPane.getValue()}}}),BI.DynamicDateTimePopup.EVENT_CHANGE="EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.shortcut("bi.dynamic_date_time_popup",BI.DynamicDateTimePopup),BI.DynamicDateTimeSelect=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-select"},render:function(){var self=this;return{type:"bi.center_adapt",items:[{type:"bi.vertical_adapt",items:[{el:{type:"bi.number_editor",ref:function(){self.hour=this},validationChecker:function(v){return BI.isNaturalNumber(v)&&BI.parseInt(v)<24},errorText:function(v){return BI.isNumeric(v)?BI.i18nText("BI-Basic_Input_From_To_Number",'"00-23"'):BI.i18nText("BI-Numerical_Interval_Input_Data")},listeners:[{eventName:BI.SignEditor.EVENT_CONFIRM,action:function(){var value=this.getValue();self._checkHour(value),this.setValue(self._formatValueToDoubleDigit(value)),self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM)}},{eventName:BI.SignEditor.EVENT_CHANGE,action:function(){var value=self._autoSwitch(this.getValue(),BI.DynamicDateTimeSelect.HOUR);this.setValue(value)}}],width:60,height:24}},{type:"bi.label",text:":",width:20},{type:"bi.number_editor",ref:function(){self.minute=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._checkMinute(value),this.setValue(self._f
if(oldValueOne=BI.parseFloat(oldValueOne),oldValueTwo=BI.parseFloat(oldValueTwo),valueOne=BI.parseFloat(valueOne),valueTwo=BI.parseFloat(valueTwo),oldValueOne<=oldValueTwo&&valueOne>valueTwo||oldValueOne>=oldValueTwo&&valueOne<valueTwo){var isSliderOneLeft=BI.parseFloat(this.sliderOne.element[0].style.left)<BI.parseFloat(this.sliderTwo.element[0].style.left);this._resetLabelPosition(!isSliderOneLeft)}},_resetLabelPosition:function(needReverse){this.labelOne.element.css({left:needReverse?"100%":"0%"}),this.labelTwo.element.css({left:needReverse?"0%":"100%"})},_setSliderOnePosition:function(percent){this.sliderOne.element.css({left:percent+"%"})},_setSliderTwoPosition:function(percent){this.sliderTwo.element.css({left:percent+"%"})},_setBlueTrackLeft:function(percent){this.blueTrack.element.css({left:percent+"%"})},_setBlueTrackWidth:function(percent){this.blueTrack.element.css({width:percent+"%"})},_setBlueTrack:function(){var percentOne=this._getPercentByValue(this.labelOne.getValue()),percentTwo=this._getPercentByValue(this.labelTwo.getValue());percentOne<=percentTwo?(this._setBlueTrackLeft(percentOne),this._setBlueTrackWidth(percentTwo-percentOne)):(this._setBlueTrackLeft(percentTwo),this._setBlueTrackWidth(percentOne-percentTwo))},_setAllPosition:function(one,two){this._setSliderOnePosition(one),this._setSliderTwoPosition(two),this._setBlueTrack()},_setVisible:function(visible){this.sliderOne.setVisible(visible),this.sliderTwo.setVisible(visible),this.labelOne.setVisible(visible),this.labelTwo.setVisible(visible)},_setErrorText:function(){var errorText=BI.i18nText("BI-Basic_Please_Enter_Number_Between",this.min,this.max);this.labelOne.setErrorText(errorText),this.labelTwo.setErrorText(errorText)},_getGrayTrackLength:function(){return this.grayTrack.element[0].scrollWidth},_getValueByPercent:function(percent){var sub=this.calculation.accurateSubtraction(this.max,this.min),mul=this.calculation.accurateMultiplication(sub,percent),div=this.calculation.accurateDivisionTenExponent(mul,2);if(this.precision<0){var value=BI.parseFloat(this.calculation.accurateAddition(div,this.min)),reduceValue=Math.round(this.calculation.accurateDivisionTenExponent(value,-this.precision));return this.calculation.accurateMultiplication(reduceValue,Math.pow(10,-this.precision))}return BI.parseFloat(this.calculation.accurateAddition(div,this.min).toFixed(this.precision))},_getPercentByValue:function(v){return 100*(v-this.min)/(this.max-this.min)},_setDraggableEnable:function(enable){this.sliderOne.setEnable(enable),this.sliderTwo.setEnable(enable)},_getPrecision:function(){var sub=this.calculation.accurateSubtraction(this.max,this.min),pre=sub.toPrecision(4),eIndex=pre.indexOf("e"),arr=[];if(eIndex>-1){arr=pre.split("e");var decimalPartLength=BI.size(arr[0].split(".")[1]),sciencePartLength=BI.parseInt(arr[1].substring(1));return decimalPartLength-sciencePartLength}return arr=pre.split("."),arr.length>1?arr[1].length:0},_assertValue:function(value){return value<=this.min?this.min:value>=this.max?this.max:value},_setEnable:function(b){BI.IntervalSlider.superclass._setEnable.apply(this,[b]),b?this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"):this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track")},getValue:function(){return this.valueOne<=this.valueTwo?{min:this.valueOne,max:this.valueTwo}:{min:this.valueTwo,max:this.valueOne}},setMinAndMax:function(v){var minNumber=BI.parseFloat(v.min),maxNumber=BI.parseFloat(v.max);!isNaN(minNumber)&&!isNaN(maxNumber)&&maxNumber>=minNumber&&(this.min=minNumber,this.max=maxNumber,this.valueOne=minNumber,this.valueTwo=maxNumber,this.precision=this._getPrecision(),this._setDraggableEnable(!0)),maxNumber===minNumber&&this._setDraggableEnable(!1)},setValue:function(v){var o=this.options,valueOne=BI.parseFloat(v.min),valueTwo=BI.parseFloat(v.max);valueOne=o.digit===!1?valueOne:BI.parseFloat(valueOne.toFixed(o.digit)),valueTwo=o.digit===!1?valueTwo:BI.parseFloat(valueTwo.toFixed(o.digit)),isNaN(valueOne)||isNaN(valueTwo)||(this._checkValidation(valueOne)&&(this.va
}]};return o.allowEdit?content:{type:"bi.absolute",items:[{el:content,left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout"},left:0,right:24,top:0,bottom:0}]}},_initData:function(){var o=this.options;this.tree=new BI.Tree,this.nodes=BI.Tree.treeFormat(BI.deepClone(o.items)),this.tree.initTree(this.nodes)},_getSearchItems:function(keyword){var self=this,o=this.options,items=[];return this.tree.traverse(function(node){var find=BI.Func.getSearchResult(self.tree.isRoot(node)?[]:BI.concat([node.text],o.allowSearchValue?[node.value]:[]),keyword);if(find.find.length>0||find.match.length>0)return items.push(node),!0}),this._fillTreeStructure4Search(items,"id")},_createJson:function(node,open){return{id:node.id,pId:node.pId,text:node.text,value:node.value,isParent:BI.isNotEmptyArray(node.children),open:open}},_getChildren:function(node){var self=this;node.children=node.children||[];var nodes=[];return BI.each(node.children,function(idx,child){var children=self._getChildren(child);nodes=nodes.concat(children)}),node.children.concat(nodes)},_fillTreeStructure4Search:function(leaves){var self=this,result=[],queue=[];for(BI.each(leaves,function(idx,node){queue.push({pId:node.pId}),result.push(node),result=result.concat(self._getChildren(node))});BI.isNotEmptyArray(queue);){var node=queue.pop(),pNode=this.tree.search(this.tree.getRoot(),node.pId,"id");null!=pNode&&(pNode.open=!0,queue.push({pId:pNode.pId}),result.push(pNode))}return BI.uniqBy(BI.map(result,function(idx,node){return self._createJson(node,node.open)}),"id")},_digest:function(v){var o=this.options;if(o.itemsCreator===BI.emptyFn){var result=BI.find(o.items,function(i,item){return item.value===v});return BI.isNotNull(result)?result.text:o.text}return o.valueFormatter(v)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(items){this.options.items=items,this._initData(items)},setValue:function(v){this.editor.setState(this._digest(v[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSelectTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSelectTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSelectTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_select_tree_trigger",BI.MultiLayerSelectTreeTrigger),BI.MultiLayerSelectTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active",layer:0,id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=BI.createWidget({type:"bi.select_tree_first_plus_group_node",cls:"bi-list-item-none",stopPropagation:!0,logic:{dynamic:!0},id: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]})},isOnce:function(){return!0},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},isSelected:function(){return this.node.isSelected()},setSelected:function(b){BI.MultiLayerSelectTreeFirstPlusGroupNode.super
this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,isLastNode:o.isLastNode,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_plus_group_node",BI.MultiLayerSingleTreePlusGroupNode),BI.MultiLayerSingleTreeFirstTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.item=BI.createWidget({type:"bi.first_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.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this,arguments),this.item.setSelected(this.isSelected())},setSelected:function(v){BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this,arguments),this.item.setSelected(v)}}),BI.shortcut("bi.multilayer_single_tree_first_tree_leaf_item",BI.MultiLayerSingleTreeFirstTreeLeafItem),BI.MultiLayerSingleTreeLastTreeLeafItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active",logic:{dynamic:!1},layer:0,id:"",pId:"",height:24})},_init:function(){BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.item=BI.createWidget({type:"bi.last_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,argume
BI.nextTick(function(){self.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self._stopEditing(),self.requesting===!0?self.wants2Quit=!0:self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM)});var triggerBtn=BI.createWidget({type:"bi.trigger_icon_button",width:o.height,height:o.height,cls:"multi-select-trigger-icon-button"});triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE,function(){self.numberCounter.hideView(),self.combo.isViewVisible()?self.combo.hideView():self.combo.showView()}),this.numberCounter=BI.createWidget({type:"bi.multi_select_check_selected_switcher",masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:o.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:{type:BI.Selection.Multi,value:o.value}}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){self.combo.isViewVisible()||self.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){this.updateSelectedValue(self.storeValue)}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){self.trigger.element.find(e.target).length>0&&self.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:o.height,top:0,height:o.height}]})},_itemsCreator4Trigger:function(op,callback){var self=this,o=this.options;o.itemsCreator(op,function(res){1===op.times&&BI.isNotNull(op.keywords)&&self.trigger.setValue(BI.deepClone(self.getValue())),callback.apply(self,arguments)})},_addItem:function(assertShowValue){var self=this,keyword=this.trigger.getSearcher().getKeyword();this._join({type:BI.Selection.Multi,value:[keyword]},function(){self.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(self.storeValue.value,keyword),self.combo.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.populate(),self._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Multi?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void self._adjust(callback)}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&(self.storeValue.assist&&self.storeValue.assist.push(selectedMap[items[i]]),delete selectedMap[items[i]]),BI.isNull(notSelectedMap[items[i]])&&(BI.remove(self.storeValue.assist,item),newItems.push(item))}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),sel
height:o.height,watermark:o.watermark,allowBlank:!0,value:o.value,defaultText:o.text,text:o.text,tipType:o.tipType,warningTitle:o.warningTitle}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){self.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){self.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS)}),this.editor.on(BI.StateEditor.EVENT_BLUR,function(){self.fireEvent(BI.MultiSelectEditor.EVENT_BLUR)})},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setState:function(state){this.editor.setState(state)},setValue:function(v){this.editor.setValue(v)},setTipType:function(v){this.editor.setTipType(v)},getValue:function(){var v=this.editor.getState();return BI.isArray(v)&&v.length>0?v[v.length-1]:""},getKeywords:function(){var val=this.editor.getLastChangedValue(),keywords=val.match(/[\S]+/g);return BI.isEndWithBlank(val)?keywords.concat([" "]):keywords},populate:function(items){}}),BI.MultiSelectEditor.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectEditor.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectEditor.EVENT_PAUSE="EVENT_PAUSE",BI.shortcut("bi.multi_select_editor",BI.MultiSelectEditor),BI.MultiSelectInsertSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-searcher",itemsCreator:BI.emptyFn,el:{},popup:{},valueFormatter:BI.emptyFn,adapter:null,masker:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.MultiSelectInsertSearcher.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget(o.el,{type:"bi.multi_select_editor",watermark:o.watermark,height:o.height,text:o.text,listeners:[{eventName:BI.MultiSelectEditor.EVENT_FOCUS,action:function(){self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS)}},{eventName:BI.MultiSelectEditor.EVENT_BLUR,action:function(){self.fireEvent(BI.MultiSelectInsertSearcher.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_insert_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,listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM)}}]},o.popup),adapter:o.adapter,masker:o.masker}),this.searcher.on(BI.Searcher.EVENT_START,function(){self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE,arguments)}),this.searcher.on(BI.Searcher.EVENT_SEARCHING,function(){var keywords=this.getKeywords();self.fireEvent(BI.MultiSelectInsertSearcher.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.as
})},_init:function(){BI.MultiSelectTree.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue={value:{}},this.adapter=BI.createWidget({type:"bi.multi_select_tree_popup",itemsCreator:o.itemsCreator}),this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE,function(){self.searcher.isSearching()?self.storeValue={value:self.searcherPane.getValue()}:self.storeValue={value:self.adapter.getValue()},self.setSelectedValue(self.storeValue.value),self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_tree_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",keywordGetter:function(){return self.searcher.getKeyword()},itemsCreator:function(op,callback){op.keyword=self.searcher.getKeyword(),o.itemsCreator(op,callback)}}),this.searcherPane.setVisible(!1),this.searcher=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback({keyword:self.searcher.getKeyword()})},adapter:this.adapter,popup:this.searcherPane,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){self._showSearcherPane()}},{eventName:BI.Searcher.EVENT_STOP,action:function(){self._showAdapter(),BI.nextTick(function(){self.adapter.populate()})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){self.searcher.isSearching()?self.storeValue={value:self.searcherPane.getValue()}:self.storeValue={value:self.adapter.getValue()},self.setSelectedValue(self.storeValue.value),self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){self._showAdapter()}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.searcher,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},resize:function(){},setSelectedValue:function(v){this.storeValue.value=v||{},this.adapter.setSelectedValue(v),this.searcherPane.setSelectedValue(v),this.searcher.setValue({value:v||{}})},setValue:function(v){this.adapter.setValue(v)},stopSearch:function(){this.searcher.stopSearch()},updateValue:function(v){this.adapter.updateValue(v)},getValue:function(){return this.storeValue.value},populate:function(){this.searcher.populate.apply(this.searcher,arguments),this.adapter.populate.apply(this.adapter,arguments)}}),BI.MultiSelectTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree",BI.MultiSelectTree),BI.MultiSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiSelectTreePopup.superclass._init.apply(this,arguments);var self=this,o=this.options;this.popup=BI.createWidget({type:"bi.async_tree",element:this,itemsCreator:o.itemsCreator}),this.popup.on(BI.TreeView.EVENT_AFTERINIT,function(){self.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)}),this.popup.on(BI.TreeView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)})},hasChecked:function(){return this.popup.hasChecked()},getValue:function(){return this.popup.getValue()},setValue:function(v){v||(v={}),this.popup.setValue(v)},setSelectedValue:function(v){v||(v={}),this.popup.setSelectedValue(v)},updateValue:function(v){this.popup.updateValue(v),this.popup.refresh()},populate:function(config){this.popup.stroke(config)}}),BI.MultiSelectTreePopup.EVENT_AFTER_INIT="EVENT_AFTER_INIT",BI.MultiSelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_tree_popup",BI.MultiSelectTreePopup),BI.MultiTreeCheckPane=BI.inherit(BI.Pane,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig
return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-search-pane bi-card",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiTreeSearchPane.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.partTree=BI.createWidget({type:"bi.part_tree",element:this,tipText:BI.i18nText("BI-No_Select"),itemsCreator:function(op,callback){op.keyword=opts.keywordGetter(),opts.itemsCreator(op,callback)},value:opts.value}),this.partTree.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.partTree.on(BI.TreeView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE)})},hasChecked:function(){return this.partTree.hasChecked()},setValue:function(v){this.setSelectedValue(v.value)},setSelectedValue:function(v){v||(v={}),this.partTree.setSelectedValue(v)},getValue:function(){return this.partTree.getValue()},empty:function(){this.partTree.empty()},populate:function(op){this.partTree.stroke.apply(this.partTree,arguments)}}),BI.MultiTreeSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreeSearchPane.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_tree_search_pane",BI.MultiTreeSearchPane),BI.MultiListTreeSearcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-searcher",itemsCreator:BI.emptyFn,valueFormatter:function(v){return v},popup:{},adapter:null,masker:{}})},_init:function(){BI.MultiListTreeSearcher.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.multi_select_editor",height:o.height,text:o.text,watermark:o.watermark,el:{type:"bi.simple_state_editor",height:o.height}}),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.MultiListTreeSearcher.EVENT_START)}),this.searcher.on(BI.Searcher.EVENT_PAUSE,function(){this.hasMatched(),self.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE)}),this.searcher.on(BI.Searcher.EVENT_STOP,function(){self.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP)}),this.searcher.on(BI.Searcher.EVENT_CHANGE,function(){self.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE,arguments)}),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){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(idx,path){var childValue=BI.last(path);text+=(o.valueFormatter(childValue+"")||childValue)+"; ",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.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.MultiListTreeSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.MultiListTreeSea
count:items.length}):void callback({items:self._getItemsByTimes(items,options.times),hasNext:self._hasNextByTimes(items,options.times)})},_checkError:function(){var v=this.storeValue.value||[];if(BI.isNotEmptyArray(v)){v=BI.isArray(v)?v:[v];var result=BI.find(this.allValue,function(idx,value){return!BI.contains(v,value)});BI.isNull(result)?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))}else v.length===this.allValue.length?(BI.isNotNull(this.trigger)&&this.trigger.setTipType("success"),this.element.removeClass("combo-error")):(BI.isNotNull(this.trigger)&&this.trigger.setTipType("warning"),this.element.addClass("combo-error"))},_updateAllValue:function(){this.storeValue=this.storeValue||{},this.allValue=BI.deepClone(this.storeValue.value||[])},setValue:function(v){this.storeValue=BI.deepClone(v||{}),this._updateAllValue(),this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this._checkError()},getValue:function(){return BI.deepClone(this.storeValue)},_populate:function(){this._count=null,this.combo.populate()},populate:function(items){this.options.items=items,this._populate()}}),BI.extend(BI.SearchMultiTextValueCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.SearchMultiTextValueCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.search_multi_text_value_combo",BI.SearchMultiTextValueCombo),BI.SearchMultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-trigger bi-border",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,searcher:{},switcher:{},adapter:null,masker:{}})},_init:function(){BI.SearchMultiSelectTrigger.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.search_multi_select_searcher",height:o.height,itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,allValueGetter:o.allValueGetter,popup:{},adapter:o.adapter,masker:o.masker,value:o.value,text:o.text,tipType:o.tipType,warningTitle:o.warningTitle}),this.searcher.on(BI.MultiSelectSearcher.EVENT_START,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING,arguments)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP)}),this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE,arguments)}),this.numberCounter=BI.createWidget(o.switcher,{type:"bi.multi_select_check_selected_switcher",valueFormatter:o.valueFormatter,itemsCreator:o.itemsCreator,adapter:o.adapter,masker:o.masker,value:o.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK)}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW)});var wrapNumberCounter=BI.createWidget({type:"bi.right_vertical_adapt",hgap:4,items:[{el:this.numberCounter}]}),wrapper=BI.createWidget({type:"bi.htape",element:this,items:[{el:this.searcher,width:"fill"},{el:wrapNumberCounter,width:0},{el:BI.createWidget(),width:24}]});this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){wrapper.attr("items")[1].width=b===!0?self.numberCounter.element.outerWidth()+8:0,wrapper.resize()})}),this.element.click(function(e){self.element.find(e.target).length>0&&self.numberCounter.hideView()})},getCounter:function(){return this.numberCounter},getSearcher:function(){return this.se
},getValue:function(){return this.loader.getValue()},empty:function(){this.loader.empty()},populate:function(items){this.loader.populate.apply(this.loader,arguments)}}),BI.SingleSelectSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_pane",BI.SingleSelectSearchPane),BI.SingleSelectCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-combo",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.SingleSelectCombo.superclass._init.apply(this,arguments);var 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}),this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR,function(){self.fireEvent(BI.SingleSelectCombo.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.SingleSelectCombo.EVENT_STOP)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var keyword=this.getSearcher().getKeyword();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.SingleSelectCombo.EVENT_SEARCHING)}),this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE,function(value,obj){self.storeValue=this.getValue(),assertShowValue(),self._defaultState()}),this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK,function(){self.combo.isViewVisible()||self.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",container:o.container,toggle:!1,el:this.trigger,adjustLength:1,popup:{type:"bi.single_select_popup_view",allowNoSelect:o.allowNoSelect,ref:function(){self.popup=this,self.trigger.setAdapter(this)},listeners:[{eventName:BI.SingleSelectPopupView.EVENT_CHANGE,action:function(){self.storeValue=this.getValue(),self._adjust(function(){assertShowValue(),self._defaultState()}),self.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM)}}],itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,onLoaded:function(){BI.nextTick(function(){self.combo.adjustWidth(),self.combo.adjustHeight(),self.trigger.getSearcher().adjustView()})}},hideChecker:function(e){return 0===triggerBtn.element.find(e.target).length},value:o.value}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(self.storeValue),BI.nextTick(function(){self.populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self.trigger.stopEditing(),self.requesting===!0?self.wants2Quit=!0:self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM)});var triggerBtn=BI.createWidget({type:"bi.trigger_icon_button",width:o.height,height:o.height,cls:"single-select-trigger-icon-button"});triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE,function(){self.combo.isViewVisible()?self.combo.hideView():self.combo.showView()}),BI.createWidge
},setAdapter:function(adapter){this.searcher.setAdapter(adapter)},setState:function(v){var o=this.options;BI.isNull(v)?this.editor.setState(BI.Selection.None):this.editor.setState(o.valueFormatter(v+"")||v+"")},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.SingleSelectSearcher.EVENT_FOCUS="EVENT_FOCUS",BI.SingleSelectSearcher.EVENT_BLUR="EVENT_BLUR",BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.SingleSelectSearcher.EVENT_CHANGE="EVENT_CHANGE",BI.SingleSelectSearcher.EVENT_START="EVENT_START",BI.SingleSelectSearcher.EVENT_STOP="EVENT_STOP",BI.SingleSelectSearcher.EVENT_PAUSE="EVENT_PAUSE",BI.SingleSelectSearcher.EVENT_SEARCHING="EVENT_SEARCHING",BI.shortcut("bi.single_select_searcher",BI.SingleSelectSearcher),BI.SignTextEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.SignTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-sign-initial-editor",validationChecker:BI.emptyFn,text:"",height:24})},_init:function(){BI.SignTextEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,hgap:4,vgap:2,value:o.value,validationChecker:o.validationChecker,allowBlank:!1}),this.text=BI.createWidget({type:"bi.text_button",cls:"sign-editor-text",title:function(){return self.getValue()},textAlign:o.textAlign,height:o.height,hgap:4,handler:function(){self._showInput(),self.editor.focus(),self.editor.selectAll()}}),this.text.on(BI.TextButton.EVENT_CHANGE,function(){BI.nextTick(function(){self.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL)})}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.text,left:0,right:0,top:0,bottom:0}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){self._showHint(),self._checkText(),self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM,arguments)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){self._checkText()}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]}),this._showHint(),self._checkText()},_checkText:function(){var o=this.options;BI.nextTick(BI.bind(function(){if(""===this.editor.getValue())this.text.setValue(o.watermark||""),this.text.element.addClass("bi-water-mark");else{var v=this.editor.getValue();v=BI.isEmpty(v)||v==o.text?o.text:v+o.text,this.text.setValue(v),this.text.element.removeClass("bi-water-mark")}},this))},_showInput:function(){this.editor.visible(),this.text.invisible()},_showHint:function(){this.editor.invisible(),this.text.visible()},setTitle:function(title){this.text.setTitle(title)},setWarningTitle:function(title){this.text.setWarningTitle(title)},focus:function(){this._showInput(),this.editor.focus()},blur:function(){this.editor.blur(),this._showHint(),this._checkText()},doRedMark:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){""===this.editor.getValue()&&BI.isKey(this.options.watermark)||this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},isValid:function(){return this.editor.isValid()},setErrorText:function(text){this.editor.setErrorText(text)},getErrorText:function(){return this.editor.getErrorText()},isEditing:function(){return this.editor.isEditing()},getLastValidValue:function(){return this.editor.getLastValidValue()},getLastChangedValue:function(){return this.editor.getLastChangedValue()},setValue:function(v){this.editor.setValue(v),this._checkText(
self.combo.isViewVisible()||self.combo.showView(),self.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){self.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_ERROR",action:function(){var date=BI.getDate();self.storeValue={hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds()},self.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_VALID",action:function(){self.fireEvent("EVENT_VALID")}},{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}},{eventName:"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.fireEvent("EVENT_CONFIRM")}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:popup,width:this.constants.popupWidth,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.TimeCombo.EVENT_BEFORE_POPUPVIEW)}}],ref:function(_ref){self.combo=_ref}},top:0,left:0,right:22,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button time-font icon-size-16",width:22,height:22,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.combo.isViewVisible()||self.combo.showView()}}],ref:function(_ref){self.triggerBtn=_ref}},top:0,right:0}]}]}},setValue:function(v){this.storeValue=v,this.trigger.setValue(v)},getValue:function(){return this.storeValue},hidePopupView:function(){this.combo.hideView()},_setNowTime:function(){var date=BI.getDate(),nowTome={hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds()};this.setValue(nowTome),this.hidePopupView(),this.fireEvent(BI.TimeCombo.EVENT_CONFIRM)}}),BI.TimeCombo.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TimeCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.TimeCombo.EVENT_CHANGE="EVENT_CHANGE",BI.TimeCombo.EVENT_VALID="EVENT_VALID",BI.TimeCombo.EVENT_ERROR="EVENT_ERROR",BI.TimeCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.time_combo",BI.TimeCombo)}(),!function(){BI.TimeTrigger=BI.inherit(BI.Trigger,{_const:{COMPARE_FORMAT:"%H:%M:%S",COMPLETE_COMPARE_FORMAT:"%Y-%M-%d %H:%M:%S %P",FORMAT_ARRAY:["%H:%M:%S","%I:%M:%S","%l:%M:%S","%k:%M:%S","%l:%M:%S %p","%l:%M:%S %P","%H:%M:%S %p","%H:%M:%S %P","%l:%M","%k:%M","%I:%M","%H:%M","%M:%S"],DEFAULT_DATE_STRING:"2000-01-01"},props:{extraCls:"bi-time-trigger",value:{},format:"",allowEdit:!1},render:function(){var self=this,o=this.options;return this.storeTriggerValue="",this.storeValue=o.value,{type:"bi.absolute",items:[{el:{type:"bi.sign_editor",height:o.height,validationChecker:function(v){return self._dateCheck(v)},quitChecker:function(){return!1},ref:function(_ref){self.editor=_ref},value:this._formatValue(o.value),hgap:4,allowBlank:!0,watermark:BI.isKey(o.watermark)?o.watermark:BI.i18nText("BI-Basic_Unrestricted"),title:BI.bind(this._getTitle,this),listeners:[{eventName:"EVENT_KEY_DOWN",action:function(){self.fireEvent("EVENT_KEY_DOWN",arguments)}},{eventName:"EVENT_FOCUS",action:function(){self.storeTriggerValue=self.getKey(),self.fireEvent("EVENT_FOCUS")}},{eventName:"EVENT_BLUR",action:function(){self.fireEvent("EVENT_BLUR")}},{eventName:"EVENT_STOP",action:function(){self.fireEvent("EVENT_STOP")}},{eventName:"EVENT_VALID",action:function(){self.fireEvent("EVENT_VALID")}},{eventName:"EVENT_ERROR",action:function(){self.fireEvent("EVENT_ERROR")}},{eventName:"EVENT_CONFIRM",action:function(){var value=self.editor.getValue();if(BI.isNotNull(value)&&self.editor.setState(value),BI.isNotEmptyString(value)&&!BI.isEqual(self.storeTriggerValue,self.getKey())){var date=value.match(/\d+/g);self.storeValue={hour:0|date[0],minute:0|date[1],second:0|date[2]}}self.fireEvent("EVENT_CONFIRM")}},{eventName:"EVENT_START",action:function(){self.fireEvent("EVENT_START")}},{eventName:"EVENT_CHANGE",ac
items.push(month.slice(6,8)),items.push(month.slice(8,10)),items.push(month.slice(10,12)),BI.map(items,function(i,item){return BI.map(item,function(j,td){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:td,text:td,ref:function(_ref){self.monthMap[0===j?i:i+6]=_ref}}})})},render:function(){var self=this,o=this.options;return this.monthMap={},{type:"bi.vertical",items:[{type:"bi.year_picker",min:o.min,max:o.max,ref:function(){self.yearPicker=this},behaviors:o.behaviors,height:30,listeners:[{eventName:BI.YearPicker.EVENT_CHANGE,action:function(){var value=this.getValue();self._checkMonthStatus(value),self.setValue({year:value,month:self.selectedMonth})}}]},{type:"bi.button_group",cls:"bi-split-top",behaviors:o.behaviors,ref:function(){self.month=this},items:this._createMonths(),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:o.value,listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){self.selectedYear=self.yearPicker.getValue(),self.selectedMonth=this.getValue()[0],self.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE)}}]}]}},mounted:function(){this._checkMonthStatus(this.selectedYear)},_checkMonthStatus:function(year){var o=this.options,minDate=BI.parseDateTime(o.min,"%Y-%X-%d"),maxDate=BI.parseDateTime(o.max,"%Y-%X-%d"),minYear=minDate.getFullYear(),maxYear=maxDate.getFullYear(),minMonth=0,maxMonth=11;minYear===year&&(minMonth=minDate.getMonth()),maxYear===year&&(maxMonth=maxDate.getMonth());var yearInvalid=year<minYear||year>maxYear;BI.each(this.monthMap,function(month,obj){var monthInvalid=month<minMonth||month>maxMonth;obj.setEnable(!yearInvalid&&!monthInvalid)})},setMinDate:function(minDate){this.options.min!==minDate&&(this.options.min=minDate,this.yearPicker.setMinDate(minDate),this._checkMonthStatus(this.selectedYear))},setMaxDate:function(maxDate){this.options.max!==maxDate&&(this.options.max=maxDate,this.yearPicker.setMaxDate(maxDate),this._checkMonthStatus(this.selectedYear))},getValue:function(){return{year:this.selectedYear,month:this.selectedMonth}},setValue:function(obj){var o=this.options,newObj={};if(newObj.year=obj.year||0,newObj.month=obj.month||0,0===newObj.year||0===newObj.month||BI.checkDateVoid(newObj.year,newObj.month,1,o.min,o.max)[0]){var year=newObj.year||BI.getDate().getFullYear();this.selectedYear=year,this.selectedMonth="",this.yearPicker.setValue(year),this.month.setValue()}else this.selectedYear=BI.parseInt(newObj.year),this.selectedMonth=BI.parseInt(newObj.month),this.yearPicker.setValue(this.selectedYear),this.month.setValue(this.selectedMonth)}}),BI.StaticYearMonthCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_month_card",BI.StaticYearMonthCard),BI.DynamicYearMonthCombo=BI.inherit(BI.Single,{props:{baseCls:"bi-year-month-combo bi-border bi-focus-shadow",behaviors:{},minDate:"1900-01-01",maxDate:"2099-12-31",height:22},_init:function(){BI.DynamicYearMonthCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue=o.value,this.storeTriggerValue="",this.trigger=BI.createWidget({type:"bi.dynamic_year_month_trigger",min:o.minDate,max:o.maxDate,height:o.height,value:o.value||""}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP,function(){self.combo.showView()}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR,function(){self.combo.isViewVisible()&&self.combo.hideView(),self.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID,function(){self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID)}),this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM,function(){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmp
break;case BI.DynamicDateCombo.Static:default:this.year.setValue(value),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Quarter")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearQuarterPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_quarter_popup",BI.DynamicYearQuarterPopup),BI.DynamicYearQuarterTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},props:{extraCls:"bi-year-quarter-trigger",min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearQuarterTrigger.superclass._init.apply(this,arguments);var o=this.options;this.yearEditor=this._createEditor(!0),this.quarterEditor=this._createEditor(!1),BI.createWidget({element:this,type:"bi.htape",items:[{type:"bi.center",items:[{type:"bi.htape",items:[this.yearEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Year"),width:o.height},width:o.height}]},{type:"bi.htape",items:[this.quarterEditor,{el:{type:"bi.text_button",text:BI.i18nText("BI-Multi_Date_Quarter"),width:24},width:24}]}]},{el:{type:"bi.trigger_icon_button",width:o.height},width:o.height}]}),this.setValue(o.value)},_createEditor:function(isYear){var self=this,o=this.options,c=this._const,editor=BI.createWidget({type:"bi.sign_editor",height:o.height,validationChecker:function(v){return isYear?""===v||BI.isPositiveInteger(v)&&!BI.checkDateVoid(v,1,1,o.min,o.max)[0]:""===v||BI.isPositiveInteger(v)&&v>=1&&v<=4&&!BI.checkDateVoid(BI.getDate().getFullYear(),v,1,o.min,o.max)[0]},quitChecker:function(){return!1},errorText:function(v){return BI.i18nText("BI-Year_Trigger_Invalid_Text")},watermark:BI.i18nText("BI-Basic_Unrestricted"),hgap:c.hgap,vgap:c.vgap,title:"",allowBlank:!0});return editor.on(BI.SignEditor.EVENT_KEY_DOWN,function(){self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN)}),editor.on(BI.SignEditor.EVENT_FOCUS,function(){self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS)}),editor.on(BI.SignEditor.EVENT_STOP,function(){self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP)}),editor.on(BI.SignEditor.EVENT_CONFIRM,function(){self._doEditorConfirm(editor),self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM)}),editor.on(BI.SignEditor.EVENT_SPACE,function(){editor.isValid()&&editor.blur()}),editor.on(BI.SignEditor.EVENT_START,function(){self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START)}),editor.on(BI.SignEditor.EVENT_ERROR,function(){self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR)}),editor.on(BI.SignEditor.EVENT_CHANGE,function(){isYear&&self._autoSwitch(editor)}),editor},_doEditorConfirm:function(editor){var value=editor.getValue();BI.isNotNull(value)&&editor.setValue(value);var quarterValue=this.quarterEditor.getValue();this.storeValue={type:BI.DynamicYearQuarterCombo.Static,value:{year:this.yearEditor.getValue(),quarter:BI.isEmptyString(this.quarterEditor.getValue())?"":quarterValue}},this.setTitle(this._getStaticTitle(this.storeValue.value))},_yearCheck:function(v){var date=BI.print(BI.parseDateTime(v,"%Y-%X-%d"),"%Y-%X-%d");return BI.print(BI.parseDateTime(v,"%Y"),"%Y")===v&&date>=this.options.min&&date<=this.options.max},_autoSwitch:function(editor){var v=editor.getValue();BI.isNotEmptyString(v)&&BI.checkDateLegal(v)&&4===v.length&&this._yearCheck(v)&&(this._doEditorConfirm(editor),this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM),this.quarterEditor.focus())},_getStaticTitle:function(value){value=value||{};var hasYear=!(BI.isNull(value.year)||BI.isEmptyString(value.year)),hasMonth=!(BI.isNull(value.quarter)||BI.isEmptyString(value.quarter));switch(hasYear<<1|hasMonth){case 0:return"";case 1:return value.quarter;case 2:return value.year;case 3:default:return value.year+"-"+value.quarter}},_getText:function(obj){var value="";return BI.isNotNull(obj.year)&&0!==BI.parseInt(obj.year)&&(value+=
BI.ListTreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.list_tree_value_chooser_insert_combo",BI.ListTreeValueChooserInsertCombo),BI.TreeValueChooserInsertCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-insert-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserInsertCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;BI.isNotNull(o.items)&&this._initData(o.items),this.combo=BI.createWidget({type:"bi.multi_tree_insert_combo",allowEdit:o.allowEdit,text:o.text,value:o.value,watermark:o.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:o.width,height:o.height,listeners:[{eventName:BI.MultiTreeInsertCombo.EVENT_FOCUS,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeInsertCombo.EVENT_BLUR,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeInsertCombo.EVENT_STOP,action:function(){self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,action:function(){self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreeInsertCombo.EVENT_SEARCHING,action:function(){self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeInsertCombo.EVENT_CONFIRM,action:function(){self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM)}}]})},setValue:function(v){this.combo.setValue(v)},getValue:function(){return this.combo.getValue()},populate:function(items){this._initData(items),this.combo.populate.apply(this.combo,arguments)}}),BI.TreeValueChooserInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.TreeValueChooserInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.TreeValueChooserInsertCombo.EVENT_STOP="EVENT_STOP",BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.TreeValueChooserInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.TreeValueChooserInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.tree_value_chooser_insert_combo",BI.TreeValueChooserInsertCombo),BI.TreeValueChooserCombo=BI.inherit(BI.AbstractTreeValueChooser,{_defaultConfig:function(){return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-tree-value-chooser-combo",width:200,height:24,items:null,itemsCreator:BI.emptyFn})},_init:function(){BI.TreeValueChooserCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;BI.isNotNull(o.items)&&this._initData(o.items),this.combo=BI.createWidget({type:"bi.multi_tree_combo",text:o.text,allowEdit:o.allowEdit,value:o.value,watermark:o.watermark,element:this,itemsCreator:BI.bind(this._itemsCreator,this),valueFormatter:BI.bind(this._valueFormatter,this),width:o.width,height:o.height,listeners:[{eventName:BI.MultiTreeCombo.EVENT_FOCUS,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS)}},{eventName:BI.MultiTreeCombo.EVENT_BLUR,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR)}},{eventName:BI.MultiTreeCombo.EVENT_STOP,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP)}},{eventName:BI.MultiTreeCombo.EVENT_CLICK_ITEM,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM)}},{eventName:BI.MultiTreeCombo.EVENT_SEARCHING,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING)}},{eventName:BI.MultiTreeCombo.EVENT_CONFIRM,action:function(){self.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM)}}]})},setValue:function(v){this.combo.setValue(v)},getValue:function(){return this.combo.getValue()},populate:function(items){this._initData(items),this.combo.populate.apply(this.combo,argu
!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}});