!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(_e.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function a(e){var t={};return pe.each(e.match(Se)||[],function(e,n){t[n]=!0}),t}function r(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",l),e.removeEventListener("load",l)):(ie.detachEvent("onreadystatechange",l),e.detachEvent("onload",l))}function l(){(ie.addEventListener||"load"===e.event.type||"complete"===ie.readyState)&&(r(),pe.ready())}function s(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(je,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Re.test(n)?pe.parseJSON(n):n)}catch(o){}pe.data(e,t,n)}else n=void 0}return n}function d(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(Pe(e)){var o,a,r=pe.expando,l=e.nodeType,s=l?pe.cache:e,d=l?e[r]:e[r]&&r;if(d&&s[d]&&(i||s[d].data)||void 0!==n||"string"!=typeof t)return d||(d=l?e[r]=ne.pop()||pe.guid++:r),s[d]||(s[d]=l?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?s[d]=pe.extend(s[d],t):s[d].data=pe.extend(s[d].data,t)),a=s[d],i||(a.data||(a.data={}),a=a.data),void 0!==n&&(a[pe.camelCase(t)]=n),"string"==typeof t?(o=a[t],null==o&&(o=a[pe.camelCase(t)])):o=a,o}}function u(e,t,n){if(Pe(e)){var i,o,a=e.nodeType,r=a?pe.cache:e,l=a?e[pe.expando]:pe.expando;if(r[l]){if(t&&(i=n?r[l]:r[l].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in i?t=[t]:(t=pe.camelCase(t),t=t in i?[t]:t.split(" ")),o=t.length;for(;o--;)delete i[t[o]];if(n?!d(i):!pe.isEmptyObject(i))return}(n||(delete r[l].data,d(r[l])))&&(a?pe.cleanData([e],!0):ue.deleteExpando||r!=r.window?delete r[l]:r[l]=void 0)}}}function h(e,t,n,i){var o,a=1,r=20,l=i?function(){return i.cur()}:function(){return pe.css(e,t,"")},s=l(),d=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==d&&+s)&&Le.exec(pe.css(e,t));if(c&&c[3]!==d){d=d||c[3],n=n||[],c=+s||1;do a=a||".5",c/=a,pe.style(e,t,c+d);while(a!==(a=l()/s)&&1!==a&&--r)}return n&&(c=+c||+s||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=d,i.start=c,i.end=o)),o}function p(e){var t=Qe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){var n,i,o=0,a="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!a)for(a=[],n=e.childNodes||e;null!=(i=n[o]);o++)!t||pe.nodeName(i,t)?a.push(i):pe.merge(a,f(i,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],a):a}function g(e,t){for(var n,i=0;null!=(n=e[i]);i++)pe._data(n,"globalEval",!t||pe._data(t[i],"globalEval"))}function m(e){He.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,i,o){for(var a,r,l,s,d,c,u,h=e.length,v=p(t),x=[],y=0;y<h;y++)if(r=e[y],r||0===r)if("object"===pe.type(r))pe.merge(x,r.nodeType?[r]:r);else if(Ge.test(r)){for(s=s||v.appendChild(t.createElement("div")),d=(qe.exec(r)||["",""])[1].toLowerCase(),u=Be[d]||Be._default,s.innerHTML=u[1]+pe.htmlPrefilter(r)+u[2],a=u[0];a--;)s=s.lastChild;if(!ue.leadingWhitespace&&Fe.test(r)&&x.push(t.createTextNode(Fe.exec(r)[0])),!ue.tbody)for(r="table"!==d||We.test(r)?"<table>"!==u[1]||We.test(r)?0:s:s.firstChild,a=r&&r.childNodes.length;a--;)pe.nodeName(c=r.childNodes[a],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(pe.merge(x,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=v.lastChild}else x.push(t.createTextNode(r));for(s&&v.removeChild(s),ue.appendChecked||pe.grep(f(x,"input"),m),y=0;r=x[y++];)if(i&&pe.inArray(r,i)>-1)o&&o.push(r);else if(l=pe.contains(r.ownerDocument,r),s=f(v.appendChild(r),"script"),l&&g(s),n)for(a=0;r=s[a++];)Ke.test(r.type||"")&&n.push(r);return s=null,v}function x(){return!0}function y(){return!1}function b(){try{return ie.activeElement}catch(e){}}function w(e,t,n,i,o,a){var r,l;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(l in t)w(e,l,n,i,t[l],a);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=y;else if(!o)return e;return 1===a&&(r=o,o=function(e){return pe().off(e),r.apply(this,arguments)},o.guid=r.guid||(r.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,o,i,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function I(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,i,o,a=pe._data(e),r=pe._data(t,a),l=a.events;if(l){delete r.handle,r.events={};for(n in l)for(i=0,o=l[n].length;i<o;i++)pe.event.add(t,n,l[n][i])}r.data&&(r.data=pe.extend({},r.data))}}function T(e,t){var n,i,o;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ue.noCloneEvent&&t[pe.expando]){o=pe._data(t);for(i in o.events)pe.removeEvent(t,i,o.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(_(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ue.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&He.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,i){t=ae.apply([],t);var o,a,r,l,s,d,c=0,u=e.length,h=u-1,p=t[0],g=pe.isFunction(p);if(g||u>1&&"string"==typeof p&&!ue.checkClone&&it.test(p))return e.each(function(o){var a=e.eq(o);g&&(t[0]=p.call(this,o,a.html())),N(a,t,n,i)});if(u&&(d=v(t,e[0].ownerDocument,!1,e,i),o=d.firstChild,1===d.childNodes.length&&(d=o),o||i)){for(l=pe.map(f(d,"script"),_),r=l.length;c<u;c++)a=d,c!==h&&(a=pe.clone(a,!0,!0),r&&pe.merge(l,f(a,"script"))),n.call(e[c],a,c);if(r)for(s=l[l.length-1].ownerDocument,pe.map(l,k),c=0;c<r;c++)a=l[c],Ke.test(a.type||"")&&!pe._data(a,"globalEval")&&pe.contains(s,a)&&(a.src?pe._evalUrl&&pe._evalUrl(a.src):pe.globalEval((a.text||a.textContent||a.innerHTML||"").replace(at,"")));d=o=null}return e}function E(e,t,n){for(var i,o=t?pe.filter(t,e):e,a=0;null!=(i=o[a]);a++)n||1!==i.nodeType||pe.cleanData(f(i)),i.parentNode&&(n&&pe.contains(i.ownerDocument,i)&&g(f(i,"script")),i.parentNode.removeChild(i));return e}function S(e,t){var n=pe(t.createElement(e)).appendTo(t.body),i=pe.css(n[0],"display");return n.detach(),i}function $(e){var t=ie,n=dt[e];return n||(n=S(e,t),"none"!==n&&n||(st=(st||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(st[0].contentWindow||st[0].contentDocument).document,t.write(),t.close(),n=S(e,t),st.detach()),dt[e]=n),n}function D(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function P(e){if(e in kt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=_t.length;n--;)if(e=_t[n]+t,e in kt)return e}function R(e,t){for(var n,i,o,a=[],r=0,l=e.length;r<l;r++)i=e[r],i.style&&(a[r]=pe._data(i,"olddisplay"),n=i.style.display,t?(a[r]||"none"!==n||(i.style.display=""),""===i.style.display&&Me(i)&&(a[r]=pe._data(i,"olddisplay",$(i.nodeName)))):(o=Me(i),(n&&"none"!==n||!o)&&pe._data(i,"olddisplay",o?n:pe.css(i,"display"))));for(r=0;r<l;r++)i=e[r],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?a[r]||"":"none"));return e}function j(e,t,n){var i=bt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function A(e,t,n,i,o){for(var a=n===(i?"border":"content")?4:"width"===t?1:0,r=0;a<4;a+=2)"margin"===n&&(r+=pe.css(e,n+Oe[a],!0,o)),i?("content"===n&&(r-=pe.css(e,"padding"+Oe[a],!0,o)),"margin"!==n&&(r-=pe.css(e,"border"+Oe[a]+"Width",!0,o))):(r+=pe.css(e,"padding"+Oe[a],!0,o),"padding"!==n&&(r+=pe.css(e,"border"+Oe[a]+"Width",!0,o)));return r}function L(e,t,n){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,a=ft(e),r=ue.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,a);if(o<=0||null==o){if(o=gt(e,t,a),(o<0||null==o)&&(o=e.style[t]),ut.test(o))return o;i=r&&(ue.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+A(e,t,n||(r?"border":"content"),i,a)+"px"}function O(e,t,n,i,o){return new O.prototype.init(e,t,n,i,o)}function M(){return e.setTimeout(function(){It=void 0}),It=pe.now()}function z(e,t){var n,i={height:e},o=0;for(t=t?1:0;o<4;o+=2-t)n=Oe[o],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function H(e,t,n){for(var i,o=(F.tweeners[t]||[]).concat(F.tweeners["*"]),a=0,r=o.length;a<r;a++)if(i=o[a].call(n,t,e))return i}function q(e,t,n){var i,o,a,r,l,s,d,c,u=this,h={},p=e.style,f=e.nodeType&&Me(e),g=pe._data(e,"fxshow");n.queue||(l=pe._queueHooks(e,"fx"),null==l.unqueued&&(l.unqueued=0,s=l.empty.fire,l.empty.fire=function(){l.unqueued||s()}),l.unqueued++,u.always(function(){u.always(function(){l.unqueued--,pe.queue(e,"fx").length||l.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],d=pe.css(e,"display"),c="none"===d?pe._data(e,"olddisplay")||$(e.nodeName):d,"inline"===c&&"none"===pe.css(e,"float")&&(ue.inlineBlockNeedsLayout&&"inline"!==$(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ue.shrinkWrapBlocks()||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(o=t[i],Nt.exec(o)){if(delete t[i],a=a||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;f=!0}h[i]=g&&g[i]||pe.style(e,i)}else d=void 0;if(pe.isEmptyObject(h))"inline"===("none"===d?$(e.nodeName):d)&&(p.display=d);else{g?"hidden"in g&&(f=g.hidden):g=pe._data(e,"fxshow",{}),a&&(g.hidden=!f),f?pe(e).show():u.done(function(){pe(e).hide()}),u.done(function(){var t;pe._removeData(e,"fxshow");for(t in h)pe.style(e,t,h[t])});for(i in h)r=H(f?g[i]:0,i,u),i in g||(g[i]=r.start,f&&(r.end=r.start,r.start="width"===i||"height"===i?1:0))}}function K(e,t){var n,i,o,a,r;for(n in e)if(i=pe.camelCase(n),o=t[i],a=e[n],pe.isArray(a)&&(o=a[1],a=e[n]=a[0]),n!==i&&(e[i]=a,delete e[n]),r=pe.cssHooks[i],r&&"expand"in r){a=r.expand(a),delete e[i];for(n in a)n in e||(e[n]=a[n],t[n]=o)}else t[i]=o}function F(e,t,n){var i,o,a=0,r=F.prefilters.length,l=pe.Deferred().always(function(){delete s.elem}),s=function(){if(o)return!1;for(var t=It||M(),n=Math.max(0,d.startTime+d.duration-t),i=n/d.duration||0,a=1-i,r=0,s=d.tweens.length;r<s;r++)d.tweens[r].run(a);return l.notifyWith(e,[d,a,n]),a<1&&s?n:(l.resolveWith(e,[d]),!1)},d=l.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:It||M(),duration:n.duration,tweens:[],createTween:function(t,n){var i=pe.Tween(e,d.opts,t,n,d.opts.specialEasing[t]||d.opts.easing);return d.tweens.push(i),i},stop:function(t){var n=0,i=t?d.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)d.tweens[n].run(1);return t?(l.notifyWith(e,[d,1,0]),l.resolveWith(e,[d,t])):l.rejectWith(e,[d,t]),this}}),c=d.props;for(K(c,d.opts.specialEasing);a<r;a++)if(i=F.prefilters[a].call(d,e,c,d.opts))return pe.isFunction(i.stop)&&(pe._queueHooks(d.elem,d.opts.queue).stop=pe.proxy(i.stop,i)),i;return pe.map(c,H,d),pe.isFunction(d.opts.start)&&d.opts.start.call(e,d),pe.fx.timer(pe.extend(s,{elem:e,anim:d,queue:d.opts.queue})),d.progress(d.opts.progress).done(d.opts.done,d.opts.complete).fail(d.opts.fail).always(d.opts.always)}function Q(e){return pe.attr(e,"class")||""}function B(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,a=t.toLowerCase().match(Se)||[];if(pe.isFunction(n))for(;i=a[o++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function G(e,t,n,i){function o(l){var s;return a[l]=!0,pe.each(e[l]||[],function(e,l){var d=l(t,n,i);return"string"!=typeof d||r||a[d]?r?!(s=d):void 0:(t.dataTypes.unshift(d),o(d),!1)}),s}var a={},r=e===Jt;return o(t.dataTypes[0])||!a["*"]&&o("*")}function W(e,t){var n,i,o=pe.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&pe.extend(!0,e,n),e}function V(e,t,n){for(var i,o,a,r,l=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(r in l)if(l[r]&&l[r].test(o)){s.unshift(r);break}if(s[0]in n)a=s[0];else{for(r in n){if(!s[0]||e.converters[r+" "+s[0]]){a=r;break}i||(i=r)}a=a||i}if(a)return a!==s[0]&&s.unshift(a),n[a]}function U(e,t,n,i){var o,a,r,l,s,d={},c=e.dataTypes.slice();if(c[1])for(r in e.converters)d[r.toLowerCase()]=e.converters[r];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!s&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=a,a=c.shift())if("*"===a)a=s;else if("*"!==s&&s!==a){if(r=d[s+" "+a]||d["* "+a],!r)for(o in d)if(l=o.split(" "),l[1]===a&&(r=d[s+" "+l[0]]||d["* "+l[0]])){r===!0?r=d[o]:d[o]!==!0&&(a=l[0],c.unshift(l[1]));break}if(r!==!0)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(u){return{state:"parsererror",error:r?u:"No conversion from "+s+" to "+a}}}return{state:"success",data:t}}function Y(e){return e.style&&e.style.display||pe.css(e,"display")}function X(e){if(!pe.contains(e.ownerDocument||ie,e))return!0;for(;e&&1===e.nodeType;){if("none"===Y(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function J(e,t,n,i){var o;if(pe.isArray(t))pe.each(t,function(t,o){n||on.test(e)?i(e,o):J(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==pe.type(t))i(e,t);else for(o in t)J(e+"["+o+"]",t[o],n,i)}function Z(){try{return new e.XMLHttpRequest}catch(t){}}function ee(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var ne=[],ie=e.document,oe=ne.slice,ae=ne.concat,re=ne.push,le=ne.indexOf,se={},de=se.toString,ce=se.hasOwnProperty,ue={},he="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},fe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ge=/^-ms-/,me=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:he,constructor:pe,selector:"",length:0,toArray:function(){return oe.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:oe.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:re,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(){var e,t,n,i,o,a,r=arguments[0]||{},l=1,s=arguments.length,d=!1;for("boolean"==typeof r&&(d=r,r=arguments[l]||{},l++),"object"==typeof r||pe.isFunction(r)||(r={}),l===s&&(r=this,l--);l<s;l++)if(null!=(o=arguments[l]))for(i in o)e=r[i],n=o[i],r!==n&&(d&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,a=e&&pe.isArray(e)?e:[]):a=e&&pe.isPlainObject(e)?e:{},r[i]=pe.extend(d,a,n)):void 0!==n&&(r[i]=n));return r},pe.extend({expando:"jQuery"+(he+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!ue.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?se[de.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,o=0;if(n(e))for(i=e.length;o<i&&t.call(e[o],o,e[o])!==!1;o++);else for(o in e)if(t.call(e[o],o,e[o])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(fe,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?pe.merge(i,"string"==typeof e?[e]:e):re.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(le)return le.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;)e[o++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[o++]=t[i++];return e.length=o,e},grep:function(e,t,n){for(var i,o=[],a=0,r=e.length,l=!n;a<r;a++)i=!t(e[a],a),i!==l&&o.push(e[a]);return o},map:function(e,t,i){var o,a,r=0,l=[];if(n(e))for(o=e.length;r<o;r++)a=t(e[r],r,i),null!=a&&l.push(a);else for(r in e)a=t(e[r],r,i),null!=a&&l.push(a);return ae.apply([],l)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(o=e[t],t=e,e=o),pe.isFunction(e))return n=oe.call(arguments,2),i=function(){return e.apply(t||this,n.concat(oe.call(arguments)))},i.guid=e.guid=e.guid||pe.guid++,i},now:function(){return+new Date},support:ue}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){se["[object "+t+"]"]=t.toLowerCase()});var xe=function(e){function t(e,t,n,i){var o,a,r,l,s,d,u,p,f=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!i&&((t?t.ownerDocument||t:H)!==P&&D(t),t=t||P,j)){if(11!==g&&(d=ve.exec(e)))if(o=d[1]){if(9===g){if(!(r=t.getElementById(o)))return n;if(r.id===o)return n.push(r),n}else if(f&&(r=f.getElementById(o))&&M(t,r)&&r.id===o)return n.push(r),n}else{if(d[2])return J.apply(n,t.getElementsByTagName(e)),n;if((o=d[3])&&w.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(o)),n}if(w.qsa&&!B[e+" "]&&(!A||!A.test(e))){if(1!==g)f=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(ye,"\\$&"):t.setAttribute("id",l=z),u=I(e),a=u.length,s=he.test(l)?"#"+l:"[id='"+l+"']";a--;)u[a]=s+" "+h(u[a]);p=u.join(","),f=xe.test(e)&&c(t.parentNode)||t}if(p)try{return J.apply(n,f.querySelectorAll(p)),n}catch(m){}finally{l===z&&t.removeAttribute("id")}}}return N(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[z]=!0,e}function o(e){var t=P.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function r(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||W)-(~e.sourceIndex||W);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function l(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function s(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function d(e){return i(function(t){return t=+t,i(function(n,i){for(var o,a=e([],n.length,t),r=a.length;r--;)n[o=a[r]]&&(n[o]=!(i[o]=n[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function u(){}function h(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=K++;return t.first?function(t,n,a){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,a)}:function(t,n,r){var l,s,d,c=[q,a];if(r){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,r))return!0}else for(;t=t[i];)if(1===t.nodeType||o){if(d=t[z]||(t[z]={}),s=d[t.uniqueID]||(d[t.uniqueID]={}),(l=s[i])&&l[0]===q&&l[1]===a)return c[2]=l[2];if(s[i]=c,c[2]=e(t,n,r))return!0}}}function f(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var o=0,a=n.length;o<a;o++)t(e,n[o],i);return i}function m(e,t,n,i,o){for(var a,r=[],l=0,s=e.length,d=null!=t;l<s;l++)(a=e[l])&&(n&&!n(a,i,o)||(r.push(a),d&&t.push(l)));return r}function v(e,t,n,o,a,r){return o&&!o[z]&&(o=v(o)),a&&!a[z]&&(a=v(a,r)),i(function(i,r,l,s){var d,c,u,h=[],p=[],f=r.length,v=i||g(t||"*",l.nodeType?[l]:l,[]),x=!e||!i&&t?v:m(v,h,e,l,s),y=n?a||(i?e:f||o)?[]:r:x;if(n&&n(x,y,l,s),o)for(d=m(y,p),o(d,[],l,s),c=d.length;c--;)(u=d[c])&&(y[p[c]]=!(x[p[c]]=u));if(i){if(a||e){if(a){for(d=[],c=y.length;c--;)(u=y[c])&&d.push(x[c]=u);a(null,y=[],d,s)}for(c=y.length;c--;)(u=y[c])&&(d=a?ee(i,u):h[c])>-1&&(i[d]=!(r[d]=u))}}else y=m(y===r?y.splice(f,y.length):y),a?a(null,r,y,s):J.apply(r,y)})}function x(e){for(var t,n,i,o=e.length,a=C.relative[e[0].type],r=a||C.relative[" "],l=a?1:0,s=p(function(e){return e===t},r,!0),d=p(function(e){return ee(t,e)>-1},r,!0),c=[function(e,n,i){var o=!a&&(i||n!==E)||((t=n).nodeType?s(e,n,i):d(e,n,i));return t=null,o}];l<o;l++)if(n=C.relative[e[l].type])c=[p(f(c),n)];else{if(n=C.filter[e[l].type].apply(null,e[l].matches),n[z]){for(i=++l;i<o&&!C.relative[e[i].type];i++);return v(l>1&&f(c),l>1&&h(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(le,"$1"),n,l<i&&x(e.slice(l,i)),i<o&&x(e=e.slice(i)),i<o&&h(e))}c.push(n)}return f(c)}function y(e,n){var o=n.length>0,a=e.length>0,r=function(i,r,l,s,d){var c,u,h,p=0,f="0",g=i&&[],v=[],x=E,y=i||a&&C.find.TAG("*",d),b=q+=null==x?1:Math.random()||.1,w=y.length;for(d&&(E=r===P||r||d);f!==w&&null!=(c=y[f]);f++){if(a&&c){for(u=0,r||c.ownerDocument===P||(D(c),l=!j);h=e[u++];)if(h(c,r||P,l)){s.push(c);break}d&&(q=b)}o&&((c=!h&&c)&&p--,i&&g.push(c))}if(p+=f,o&&f!==p){for(u=0;h=n[u++];)h(g,v,r,l);if(i){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=Y.call(s));v=m(v)}J.apply(s,v),d&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(s)}return d&&(q=b,E=x),g};return o?i(r):r}var b,w,C,_,k,I,T,N,E,S,$,D,P,R,j,A,L,O,M,z="sizzle"+1*new Date,H=e.document,q=0,K=0,F=n(),Q=n(),B=n(),G=function(e,t){return e===t&&($=!0),0},W=1<<31,V={}.hasOwnProperty,U=[],Y=U.pop,X=U.push,J=U.push,Z=U.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",re=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),se=new RegExp("^"+ne+"*,"+ne+"*"),de=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),ue=new RegExp(ae),he=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/[+~]/,ye=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){D()};try{J.apply(U=Z.call(H.childNodes),H.childNodes),U[H.childNodes.length].nodeType}catch(_e){J={apply:U.length?function(e,t){X.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}w=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},D=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:H;return i!==P&&9===i.nodeType&&i.documentElement?(P=i,R=P.documentElement,j=!k(P),(n=P.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),w.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=o(function(e){return e.appendChild(P.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(P.getElementsByClassName),w.getById=o(function(e){return R.appendChild(e).id=z,!P.getElementsByName||!P.getElementsByName(z).length}),w.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&j){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[o++];)1===n.nodeType&&i.push(n);return i}return a},C.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&j)return t.getElementsByClassName(e)},L=[],A=[],(w.qsa=me.test(P.querySelectorAll))&&(o(function(e){R.appendChild(e).innerHTML="<a id='"+z+"'></a><select id='"+z+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||A.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+z+"-]").length||A.push("~="),e.querySelectorAll(":checked").length||A.push(":checked"),e.querySelectorAll("a#"+z+"+*").length||A.push(".#.+[+~]")}),o(function(e){var t=P.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&A.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(w.matchesSelector=me.test(O=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&o(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),L.push("!=",ae)}),A=A.length&&new RegExp(A.join("|")),L=L.length&&new RegExp(L.join("|")),t=me.test(R.compareDocumentPosition),M=t||me.test(R.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return $=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===P||e.ownerDocument===H&&M(H,e)?-1:t===P||t.ownerDocument===H&&M(H,t)?1:S?ee(S,e)-ee(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return $=!0,0;var n,i=0,o=e.parentNode,a=t.parentNode,l=[e],s=[t];if(!o||!a)return e===P?-1:t===P?1:o?-1:a?1:S?ee(S,e)-ee(S,t):0;if(o===a)return r(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;l[i]===s[i];)i++;return i?r(l[i],s[i]):l[i]===H?-1:s[i]===H?1:0},P):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&D(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&j&&!B[n+" "]&&(!L||!L.test(n))&&(!A||!A.test(n)))try{var i=O.call(e,n);if(i||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(o){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&D(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&D(e);var n=C.attrHandle[t.toLowerCase()],i=n&&V.call(C.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==i?i:w.attributes||!j?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if($=!w.detectDuplicates,S=!w.sortStable&&e.slice(0),e.sort(G),$){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return S=null,e},_=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=_(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=I(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&F(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var a=t.attr(o,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var a="nth"!==e.slice(0,3),r="last"!==e.slice(-4),l="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,s){var d,c,u,h,p,f,g=a!==r?"nextSibling":"previousSibling",m=t.parentNode,v=l&&t.nodeName.toLowerCase(),x=!s&&!l,y=!1;if(m){if(a){for(;g;){for(h=t;h=h[g];)if(l?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&x){for(h=m,u=h[z]||(h[z]={}),c=u[h.uniqueID]||(u[h.uniqueID]={}),d=c[e]||[],p=d[0]===q&&d[1],y=p&&d[2],
h=p&&m.childNodes[p];h=++p&&h&&h[g]||(y=p=0)||f.pop();)if(1===h.nodeType&&++y&&h===t){c[e]=[q,p,y];break}}else if(x&&(h=t,u=h[z]||(h[z]={}),c=u[h.uniqueID]||(u[h.uniqueID]={}),d=c[e]||[],p=d[0]===q&&d[1],y=p),y===!1)for(;(h=++p&&h&&h[g]||(y=p=0)||f.pop())&&((l?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++y||(x&&(u=h[z]||(h[z]={}),c=u[h.uniqueID]||(u[h.uniqueID]={}),c[e]=[q,y]),h!==t)););return y-=o,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var o,a=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[z]?a(n):a.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=a(e,n),r=o.length;r--;)i=ee(e,o[r]),e[i]=!(t[i]=o[r])}):function(e){return a(e,0,o)}):a}},pseudos:{not:i(function(e){var t=[],n=[],o=T(e.replace(le,"$1"));return o[z]?i(function(e,t,n,i){for(var a,r=o(e,null,i,[]),l=e.length;l--;)(a=r[l])&&(e[l]=!(t[l]=a))}):function(e,i,a){return t[0]=e,o(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===R},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:d(function(){return[0]}),last:d(function(e,t){return[t-1]}),eq:d(function(e,t,n){return[n<0?n+t:n]}),even:d(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:d(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:d(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:d(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[b]=l(b);for(b in{submit:!0,reset:!0})C.pseudos[b]=s(b);return u.prototype=C.filters=C.pseudos,C.setFilters=new u,I=t.tokenize=function(e,n){var i,o,a,r,l,s,d,c=Q[e+" "];if(c)return n?0:c.slice(0);for(l=e,s=[],d=C.preFilter;l;){i&&!(o=se.exec(l))||(o&&(l=l.slice(o[0].length)||l),s.push(a=[])),i=!1,(o=de.exec(l))&&(i=o.shift(),a.push({value:i,type:o[0].replace(le," ")}),l=l.slice(i.length));for(r in C.filter)!(o=pe[r].exec(l))||d[r]&&!(o=d[r](o))||(i=o.shift(),a.push({value:i,type:r,matches:o}),l=l.slice(i.length));if(!i)break}return n?l.length:l?t.error(e):Q(e,s).slice(0)},T=t.compile=function(e,t){var n,i=[],o=[],a=B[e+" "];if(!a){for(t||(t=I(e)),n=t.length;n--;)a=x(t[n]),a[z]?i.push(a):o.push(a);a=B(e,y(o,i)),a.selector=e}return a},N=t.select=function(e,t,n,i){var o,a,r,l,s,d="function"==typeof e&&e,u=!i&&I(e=d.selector||e);if(n=n||[],1===u.length){if(a=u[0]=u[0].slice(0),a.length>2&&"ID"===(r=a[0]).type&&w.getById&&9===t.nodeType&&j&&C.relative[a[1].type]){if(t=(C.find.ID(r.matches[0].replace(be,we),t)||[])[0],!t)return n;d&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=pe.needsContext.test(e)?0:a.length;o--&&(r=a[o],!C.relative[l=r.type]);)if((s=C.find[l])&&(i=s(r.matches[0].replace(be,we),xe.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(o,1),e=i.length&&h(a),!e)return J.apply(n,i),n;break}}return(d||T(e,u))(i,t,!j,n,!t||xe.test(e)&&c(t.parentNode)||t),n},w.sortStable=z.split("").sort(G).join("")===z,w.detectDuplicates=!!$,D(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(P.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||a(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);pe.find=xe,pe.expr=xe.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=xe.uniqueSort,pe.text=xe.getText,pe.isXMLDoc=xe.isXML,pe.contains=xe.contains;var ye=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&pe(e).is(n))break;i.push(e)}return i},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Ce=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,_e=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?pe.find.matchesSelector(i,e)?[i]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],i=this,o=i.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t<o;t++)if(pe.contains(i[t],this))return!0}));for(t=0;t<o;t++)pe.find(e,i[t],n);return n=this.pushStack(o>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var ke,Ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Te=pe.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||ke,"string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ie.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),Ce.test(i[1])&&pe.isPlainObject(t))for(i in t)pe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if(o=ie.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return ke.find(e);this.length=1,this[0]=o}return this.context=ie,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};Te.prototype=pe.fn,ke=pe(ie);var Ne=/^(?:parents|prev(?:Until|All))/,Ee={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),i=n.length;return this.filter(function(){for(t=0;t<i;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,o=this.length,a=[],r=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?pe.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ye(e,"parentNode")},parentsUntil:function(e,t,n){return ye(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ye(e,"nextSibling")},prevAll:function(e){return ye(e,"previousSibling")},nextUntil:function(e,t,n){return ye(e,"nextSibling",n)},prevUntil:function(e,t,n){return ye(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,i){var o=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=pe.filter(i,o)),this.length>1&&(Ee[e]||(o=pe.uniqueSort(o)),Ne.test(e)&&(o=o.reverse())),this.pushStack(o)}});var Se=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?a(e):pe.extend({},e);var t,n,i,o,r=[],l=[],s=-1,d=function(){for(o=e.once,i=t=!0;l.length;s=-1)for(n=l.shift();++s<r.length;)r[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=r.length,n=!1);e.memory||(n=!1),t=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!t&&(s=r.length-1,l.push(n)),function i(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||r.push(n):n&&n.length&&"string"!==pe.type(n)&&i(n)})}(arguments),n&&!t&&d()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,r,n))>-1;)r.splice(n,1),n<=s&&s--}),this},has:function(e){return e?pe.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=l=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=!0,n||c.disable(),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],l.push(n),t||d()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,a){var r=pe.isFunction(e[t])&&e[t];o[a[1]](function(){var e=r&&r.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[a[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,i):i}},o={};return i.pipe=i.then,pe.each(t,function(e,a){var r=a[2],l=a[3];i[a[1]]=r.add,l&&r.add(function(){n=l},t[1^e][2].disable,t[2][2].lock),o[a[0]]=function(){return o[a[0]+"With"](this===o?i:this,arguments),this},o[a[0]+"With"]=r.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,a=oe.call(arguments),r=a.length,l=1!==r||e&&pe.isFunction(e.promise)?r:0,s=1===l?e:pe.Deferred(),d=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?oe.call(arguments):o,i===t?s.notifyWith(n,i):--l||s.resolveWith(n,i)}};if(r>1)for(t=new Array(r),n=new Array(r),i=new Array(r);o<r;o++)a[o]&&pe.isFunction(a[o].promise)?a[o].promise().progress(d(o,n,t)).done(d(o,i,a)).fail(s.reject):--l;return l||s.resolveWith(i,a),s.promise()}});var $e;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||($e.resolveWith(ie,[pe]),pe.fn.triggerHandler&&(pe(ie).triggerHandler("ready"),pe(ie).off("ready"))))}}),pe.ready.promise=function(t){if(!$e)if($e=pe.Deferred(),"complete"===ie.readyState||"loading"!==ie.readyState&&!ie.documentElement.doScroll)e.setTimeout(pe.ready);else if(ie.addEventListener)ie.addEventListener("DOMContentLoaded",l),e.addEventListener("load",l);else{ie.attachEvent("onreadystatechange",l),e.attachEvent("onload",l);var n=!1;try{n=null==e.frameElement&&ie.documentElement}catch(i){}n&&n.doScroll&&!function o(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(o,50)}r(),pe.ready()}}()}return $e.promise(t)},pe.ready.promise();var De;for(De in pe(ue))break;ue.ownFirst="0"===De,ue.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,i;n=ie.getElementsByTagName("body")[0],n&&n.style&&(t=ie.createElement("div"),i=ie.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ue.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ie.createElement("div");ue.deleteExpando=!0;try{delete e.test}catch(t){ue.deleteExpando=!1}e=null}();var Pe=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},Re=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,je=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!d(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return u(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return u(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,i,o,a=this[0],r=a&&a.attributes;if(void 0===e){if(this.length&&(o=pe.data(a),1===a.nodeType&&!pe._data(a,"parsedAttrs"))){for(n=r.length;n--;)r[n]&&(i=r[n].name,0===i.indexOf("data-")&&(i=pe.camelCase(i.slice(5)),s(a,i,o[i])));pe._data(a,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):a?s(a,e,pe.data(a,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=pe._data(e,t),n&&(!i||pe.isArray(n)?i=pe._data(e,t,pe.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),i=n.length,o=n.shift(),a=pe._queueHooks(e,t),r=function(){pe.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete a.stop,o.call(e,r,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=pe.Deferred(),a=this,r=this.length,l=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)n=pe._data(a[r],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(l));return l(),o.promise(t)}}),function(){var e;ue.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return n=ie.getElementsByTagName("body")[0],n&&n.style?(t=ie.createElement("div"),i=ie.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(ie.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Le=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),Oe=["Top","Right","Bottom","Left"],Me=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},ze=function(e,t,n,i,o,a,r){var l=0,s=e.length,d=null==n;if("object"===pe.type(n)){o=!0;for(l in n)ze(e,t,l,n[l],!0,a,r)}else if(void 0!==i&&(o=!0,pe.isFunction(i)||(r=!0),d&&(r?(t.call(e,i),t=null):(d=t,t=function(e,t,n){return d.call(pe(e),n)})),t))for(;l<s;l++)t(e[l],n,r?i:i.call(e[l],l,t(e[l],n)));return o?e:d?t.call(e):s?t(e[0],n):a},He=/^(?:checkbox|radio)$/i,qe=/<([\w:-]+)/,Ke=/^$|\/(?:java|ecma)script/i,Fe=/^\s+/,Qe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=ie.createElement("div"),t=ie.createDocumentFragment(),n=ie.createElement("input");e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ue.leadingWhitespace=3===e.firstChild.nodeType,ue.tbody=!e.getElementsByTagName("tbody").length,ue.htmlSerialize=!!e.getElementsByTagName("link").length,ue.html5Clone="<:nav></:nav>"!==ie.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),ue.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",ue.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=ie.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ue.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,ue.attributes=!e.getAttribute(pe.expando)}();var Be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ue.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td;var Ge=/<|&#?\w+;/,We=/<tbody/i;!function(){var t,n,i=ie.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ue[t]=n in e)||(i.setAttribute(n,"t"),ue[t]=i.attributes[n].expando===!1);i=null}();var Ve=/^(?:input|select|textarea)$/i,Ue=/^key/,Ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xe=/^(?:focusinfocus|focusoutblur)$/,Je=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,i,o){var a,r,l,s,d,c,u,h,p,f,g,m=pe._data(e);if(m){for(n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=pe.guid++),(r=m.events)||(r=m.events={}),(c=m.handle)||(c=m.handle=function(e){return"undefined"==typeof pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(Se)||[""],l=t.length;l--;)a=Je.exec(t[l])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p&&(d=pe.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=pe.event.special[p]||{},u=pe.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&pe.expr.match.needsContext.test(o),namespace:f.join(".")},s),(h=r[p])||(h=r[p]=[],h.delegateCount=0,d.setup&&d.setup.call(e,i,f,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,i,o){var a,r,l,s,d,c,u,h,p,f,g,m=pe.hasData(e)&&pe._data(e);if(m&&(c=m.events)){for(t=(t||"").match(Se)||[""],d=t.length;d--;)if(l=Je.exec(t[d])||[],p=g=l[1],f=(l[2]||"").split(".").sort(),p){for(u=pe.event.special[p]||{},p=(i?u.delegateType:u.bindType)||p,h=c[p]||[],l=l[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=h.length;a--;)r=h[a],!o&&g!==r.origType||n&&n.guid!==r.guid||l&&!l.test(r.namespace)||i&&i!==r.selector&&("**"!==i||!r.selector)||(h.splice(a,1),r.selector&&h.delegateCount--,u.remove&&u.remove.call(e,r));s&&!h.length&&(u.teardown&&u.teardown.call(e,f,m.handle)!==!1||pe.removeEvent(e,p,m.handle),delete c[p])}else for(p in c)pe.event.remove(e,p+t[d],n,i,!0);pe.isEmptyObject(c)&&(delete m.handle,pe._removeData(e,"events"))}},trigger:function(t,n,i,o){var a,r,l,s,d,c,u,h=[i||ie],p=ce.call(t,"type")?t.type:t,f=ce.call(t,"namespace")?t.namespace.split("."):[];if(l=c=i=i||ie,3!==i.nodeType&&8!==i.nodeType&&!Xe.test(p+pe.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),r=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:pe.makeArray(n,[t]),d=pe.event.special[p]||{},o||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!o&&!d.noBubble&&!pe.isWindow(i)){for(s=d.delegateType||p,Xe.test(s+p)||(l=l.parentNode);l;l=l.parentNode)h.push(l),c=l;c===(i.ownerDocument||ie)&&h.push(c.defaultView||c.parentWindow||e)}for(u=0;(l=h[u++])&&!t.isPropagationStopped();)t.type=u>1?s:d.bindType||p,a=(pe._data(l,"events")||{})[t.type]&&pe._data(l,"handle"),a&&a.apply(l,n),a=r&&l[r],a&&a.apply&&Pe(l)&&(t.result=a.apply(l,n),t.result===!1&&t.preventDefault());if(t.type=p,!o&&!t.isDefaultPrevented()&&(!d._default||d._default.apply(h.pop(),n)===!1)&&Pe(i)&&r&&i[p]&&!pe.isWindow(i)){c=i[r],c&&(i[r]=null),pe.event.triggered=p;try{i[p]()}catch(g){}pe.event.triggered=void 0,c&&(i[r]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,i,o,a,r=[],l=oe.call(arguments),s=(pe._data(this,"events")||{})[e.type]||[],d=pe.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!d.preDispatch||d.preDispatch.call(this,e)!==!1){for(r=pe.event.handlers.call(this,e,s),t=0;(o=r[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(a=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,i=((pe.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,l),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,a,r=[],l=t.delegateCount,s=e.target;if(l&&s.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;s!=this;s=s.parentNode||this)if(1===s.nodeType&&(s.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n<l;n++)a=t[n],o=a.selector+" ",void 0===i[o]&&(i[o]=a.needsContext?pe(o,this).index(s)>-1:pe.find(o,this,null,[s]).length),i[o]&&i.push(a);i.length&&r.push({elem:s,handlers:i})}return l<t.length&&r.push({elem:this,handlers:t.slice(l)}),r},fix:function(e){if(e[pe.expando])return e;var t,n,i,o=e.type,a=e,r=this.fixHooks[o];for(r||(this.fixHooks[o]=r=Ye.test(o)?this.mouseHooks:Ue.test(o)?this.keyHooks:{}),i=r.props?this.props.concat(r.props):this.props,e=new pe.Event(a),t=i.length;t--;)n=i[t],e[n]=a[n];return e.target||(e.target=a.srcElement||ie),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,r.filter?r.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,a=t.button,r=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ie,o=i.documentElement,n=i.body,e.pageX=t.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&r&&(e.relatedTarget=r===e.target?t.toElement:r),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var i=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(i,null,t),i.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=ie.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var i="on"+t;e.detachEvent&&("undefined"==typeof e[i]&&(e[i]=null),e.detachEvent(i,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?x:y):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:y,isPropagationStopped:y,isImmediatePropagationStopped:y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=x,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=x,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=x,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,a=e.handleObj;return o&&(o===i||pe.contains(i,o))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),ue.submit||(pe.event.special.submit={setup:function(){return!pe.nodeName(this,"form")&&void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return!pe.nodeName(this,"form")&&void pe.event.remove(this,"._submit")}}),ue.change||(pe.event.special.change={setup:function(){return Ve.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ve.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return pe.event.remove(this,"._change"),!Ve.test(this.nodeName)}}),ue.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=pe._data(i,t);o||i.addEventListener(e,n,!0),pe._data(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=pe._data(i,t)-1;o?pe._data(i,t,o):(i.removeEventListener(e,n,!0),pe._removeData(i,t))}}}),pe.fn.extend({on:function(e,t,n,i){return w(this,e,t,n,i)},one:function(e,t,n,i){return w(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,pe(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=y),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}});var Ze=/ jQuery\d+="(?:null|\d+)"/g,et=new RegExp("<(?:"+Qe+")[\\s/>]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/<script|<style|<link/i,it=/checked\s*(?:[^=]|=\s*.checked.)/i,ot=/^true\/(.*)/,at=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rt=p(ie),lt=rt.appendChild(ie.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var i,o,a,r,l,s=pe.contains(e.ownerDocument,e);if(ue.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?a=e.cloneNode(!0):(lt.innerHTML=e.outerHTML,lt.removeChild(a=lt.firstChild)),!(ue.noCloneEvent&&ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(i=f(a),l=f(e),r=0;null!=(o=l[r]);++r)i[r]&&T(o,i[r]);if(t)if(n)for(l=l||f(e),i=i||f(a),r=0;null!=(o=l[r]);r++)I(o,i[r]);else I(e,a);return i=f(a,"script"),i.length>0&&g(i,!s&&f(e,"script")),i=l=o=null,a},cleanData:function(e,t){for(var n,i,o,a,r=0,l=pe.expando,s=pe.cache,d=ue.attributes,c=pe.event.special;null!=(n=e[r]);r++)if((t||Pe(n))&&(o=n[l],a=o&&s[o])){if(a.events)for(i in a.events)c[i]?pe.event.remove(n,i):pe.removeEvent(n,i,a.handle);s[o]&&(delete s[o],d||"undefined"==typeof n.removeAttribute?n[l]=void 0:n.removeAttribute(l),ne.push(o))}}}),pe.fn.extend({domManip:N,detach:function(e){return E(this,e,!0)},remove:function(e){return E(this,e)},text:function(e){return ze(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ie).createTextNode(e))},null,e,arguments.length)},append:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.appendChild(e)}})},prepend:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(f(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return ze(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(ue.htmlSerialize||!et.test(e))&&(ue.leadingWhitespace||!Fe.test(e))&&!Be[(qe.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(f(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return N(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(f(this)),n&&n.replaceChild(t,this));
},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,i=0,o=[],a=pe(e),r=a.length-1;i<=r;i++)n=i===r?this:this.clone(!0),pe(a[i])[t](n),re.apply(o,n.get());return this.pushStack(o)}});var st,dt={HTML:"block",BODY:"block"},ct=/^margin/,ut=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),ht=function(e,t,n,i){var o,a,r={};for(a in t)r[a]=e.style[a],e.style[a]=t[a];o=n.apply(e,i||[]);for(a in t)e.style[a]=r[a];return o},pt=ie.documentElement;!function(){function t(){var t,c,u=ie.documentElement;u.appendChild(s),d.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=o=l=!1,i=r=!0,e.getComputedStyle&&(c=e.getComputedStyle(d),n="1%"!==(c||{}).top,l="2px"===(c||{}).marginLeft,o="4px"===(c||{width:"4px"}).width,d.style.marginRight="50%",i="4px"===(c||{marginRight:"4px"}).marginRight,t=d.appendChild(ie.createElement("div")),t.style.cssText=d.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",d.style.width="1px",r=!parseFloat((e.getComputedStyle(t)||{}).marginRight),d.removeChild(t)),d.style.display="none",a=0===d.getClientRects().length,a&&(d.style.display="",d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",d.childNodes[0].style.borderCollapse="separate",t=d.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",a=0===t[0].offsetHeight,a&&(t[0].style.display="",t[1].style.display="none",a=0===t[0].offsetHeight)),u.removeChild(s)}var n,i,o,a,r,l,s=ie.createElement("div"),d=ie.createElement("div");d.style&&(d.style.cssText="float:left;opacity:.5",ue.opacity="0.5"===d.style.opacity,ue.cssFloat=!!d.style.cssFloat,d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",ue.clearCloneStyle="content-box"===d.style.backgroundClip,s=ie.createElement("div"),s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",d.innerHTML="",s.appendChild(d),ue.boxSizing=""===d.style.boxSizing||""===d.style.MozBoxSizing||""===d.style.WebkitBoxSizing,pe.extend(ue,{reliableHiddenOffsets:function(){return null==n&&t(),a},boxSizingReliable:function(){return null==n&&t(),o},pixelMarginRight:function(){return null==n&&t(),i},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),r},reliableMarginLeft:function(){return null==n&&t(),l}}))}();var ft,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ft=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var i,o,a,r,l=e.style;return n=n||ft(e),r=n?n.getPropertyValue(t)||n[t]:void 0,""!==r&&void 0!==r||pe.contains(e.ownerDocument,e)||(r=pe.style(e,t)),n&&!ue.pixelMarginRight()&&ut.test(r)&&ct.test(t)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=n.width,l.width=i,l.minWidth=o,l.maxWidth=a),void 0===r?r:r+""}):pt.currentStyle&&(ft=function(e){return e.currentStyle},gt=function(e,t,n){var i,o,a,r,l=e.style;return n=n||ft(e),r=n?n[t]:void 0,null==r&&l&&l[t]&&(r=l[t]),ut.test(r)&&!mt.test(t)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===t?"1em":r,r=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),void 0===r?r:r+""||"auto"});var vt=/alpha\([^)]*\)/i,xt=/opacity\s*=\s*([^)]*)/i,yt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Ae+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Ct={letterSpacing:"0",fontWeight:"400"},_t=["Webkit","O","Moz","ms"],kt=ie.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ue.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,r,l=pe.camelCase(t),s=e.style;if(t=pe.cssProps[l]||(pe.cssProps[l]=P(l)||l),r=pe.cssHooks[t]||pe.cssHooks[l],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(e,!1,i))?o:s[t];if(a=typeof n,"string"===a&&(o=Le.exec(n))&&o[1]&&(n=h(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(pe.cssNumber[l]?"":"px")),ue.clearCloneStyle||""!==n||0!==t.indexOf("background")||(s[t]="inherit"),!(r&&"set"in r&&void 0===(n=r.set(e,n,i)))))try{s[t]=n}catch(d){}}},css:function(e,t,n,i){var o,a,r,l=pe.camelCase(t);return t=pe.cssProps[l]||(pe.cssProps[l]=P(l)||l),r=pe.cssHooks[t]||pe.cssHooks[l],r&&"get"in r&&(a=r.get(e,!0,n)),void 0===a&&(a=gt(e,t,i)),"normal"===a&&t in Ct&&(a=Ct[t]),""===n||n?(o=parseFloat(a),n===!0||isFinite(o)?o||0:a):a}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,i){if(n)return yt.test(pe.css(e,"display"))&&0===e.offsetWidth?ht(e,wt,function(){return L(e,t,i)}):L(e,t,i)},set:function(e,n,i){var o=i&&ft(e);return j(e,n,i?A(e,t,i,ue.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o),o):0)}}}),ue.opacity||(pe.cssHooks.opacity={get:function(e,t){return xt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,o=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",a=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(a.replace(vt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=vt.test(a)?a.replace(vt,o):a+" "+o)}}),pe.cssHooks.marginRight=D(ue.reliableMarginRight,function(e,t){if(t)return ht(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=D(ue.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ht(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var i=0,o={},a="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Oe[i]+t]=a[i]||a[i-2]||a[0];return o}},ct.test(e)||(pe.cssHooks[e+t].set=j)}),pe.fn.extend({css:function(e,t){return ze(this,function(e,t,n){var i,o,a={},r=0;if(pe.isArray(t)){for(i=ft(e),o=t.length;r<o;r++)a[t[r]]=pe.css(e,t[r],!1,i);return a}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return R(this,!0)},hide:function(){return R(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Me(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,i,o,a){this.elem=e,this.prop=n,this.easing=o||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var It,Tt,Nt=/^(?:toggle|show|hide)$/,Et=/queueHooks$/;pe.Animation=pe.extend(F,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,Le.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Se);for(var n,i=0,o=e.length;i<o;i++)n=e[i],F.tweeners[n]=F.tweeners[n]||[],F.tweeners[n].unshift(t)},prefilters:[q],prefilter:function(e,t){t?F.prefilters.unshift(e):F.prefilters.push(e)}}),pe.speed=function(e,t,n){var i=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return i.duration=pe.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in pe.fx.speeds?pe.fx.speeds[i.duration]:pe.fx.speeds._default,null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){pe.isFunction(i.old)&&i.old.call(this),i.queue&&pe.dequeue(this,i.queue)},i},pe.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Me).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=pe.isEmptyObject(e),a=pe.speed(t,n,i),r=function(){var t=F(this,pe.extend({},e),a);(o||pe._data(this,"finish"))&&t.stop(!0)};return r.finish=r,o||a.queue===!1?this.each(r):this.queue(a.queue,r)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",a=pe.timers,r=pe._data(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&Et.test(o)&&i(r[o]);for(o=a.length;o--;)a[o].elem!==this||null!=e&&a[o].queue!==e||(a[o].anim.stop(n),t=!1,a.splice(o,1));!t&&n||pe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),i=n[e+"queue"],o=n[e+"queueHooks"],a=pe.timers,r=i?i.length:0;for(n.finish=!0,pe.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<r;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(z(t,!0),e,i,o)}}),pe.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(It=pe.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),It=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){Tt||(Tt=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(Tt),Tt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e,t=ie.createElement("input"),n=ie.createElement("div"),i=ie.createElement("select"),o=i.appendChild(ie.createElement("option"));n=ie.createElement("div"),n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",ue.getSetAttribute="t"!==n.className,ue.style=/top/.test(e.getAttribute("style")),ue.hrefNormalized="/a"===e.getAttribute("href"),ue.checkOn=!!t.value,ue.optSelected=o.selected,ue.enctype=!!ie.createElement("form").enctype,i.disabled=!0,ue.optDisabled=!o.disabled,t=ie.createElement("input"),t.setAttribute("value",""),ue.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ue.radioValue="t"===t.value}();var St=/\r/g,$t=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=pe.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,pe(this).val()):e,null==o?o="":"number"==typeof o?o+="":pe.isArray(o)&&(o=pe.map(o,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=pe.valHooks[o.type]||pe.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace($t," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,a="select-one"===e.type||o<0,r=a?null:[],l=a?o+1:i.length,s=o<0?l:a?o:0;s<l;s++)if(n=i[s],(n.selected||s===o)&&(ue.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),a)return t;r.push(t)}return r},set:function(e,t){for(var n,i,o=e.options,a=pe.makeArray(t),r=o.length;r--;)if(i=o[r],pe.inArray(pe.valHooks.option.get(i),a)>-1)try{i.selected=n=!0}catch(l){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),o}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},ue.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Dt,Pt,Rt=pe.expr.attrHandle,jt=/^(?:checked|selected)$/i,At=ue.getSetAttribute,Lt=ue.input;pe.fn.extend({attr:function(e,t){return ze(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var i,o,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===a&&pe.isXMLDoc(e)||(t=t.toLowerCase(),o=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Pt:Dt)),void 0!==n?null===n?void pe.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=pe.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ue.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,o=0,a=t&&t.match(Se);if(a&&1===e.nodeType)for(;n=a[o++];)i=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Lt&&At||!jt.test(n)?e[i]=!1:e[pe.camelCase("default-"+n)]=e[i]=!1:pe.attr(e,n,""),e.removeAttribute(At?n:i)}}),Pt={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Lt&&At||!jt.test(n)?e.setAttribute(!At&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Rt[t]||pe.find.attr;Lt&&At||!jt.test(t)?Rt[t]=function(e,t,i){var o,a;return i||(a=Rt[t],Rt[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,Rt[t]=a),o}:Rt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Lt&&At||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Dt&&Dt.set(e,t,n)}}),At||(Dt={set:function(e,t,n){var i=e.getAttributeNode(n);if(i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n))return t}},Rt.id=Rt.name=Rt.coords=function(e,t,n){var i;if(!n)return(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Dt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Dt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ue.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Mt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return ze(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var i,o,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,o=pe.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ue.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ue.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),ue.enctype||(pe.propFix.enctype="encoding");var zt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,i,o,a,r,l,s=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(Se)||[];n=this[s++];)if(o=Q(n),i=1===n.nodeType&&(" "+o+" ").replace(zt," ")){for(r=0;a=t[r++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");l=pe.trim(i),o!==l&&pe.attr(n,"class",l)}return this},removeClass:function(e){var t,n,i,o,a,r,l,s=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Se)||[];n=this[s++];)if(o=Q(n),i=1===n.nodeType&&(" "+o+" ").replace(zt," ")){for(r=0;a=t[r++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");l=pe.trim(i),o!==l&&pe.attr(n,"class",l)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,i,o,a;if("string"===n)for(i=0,o=pe(this),a=e.match(Se)||[];t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+Q(n)+" ").replace(zt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Ht=e.location,qt=pe.now(),Kt=/\?/,Ft=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,o=pe.trim(t+"");return o&&!pe.trim(o.replace(Ft,function(e,t,o,a){return n&&t&&(i=0),0===i?e:(n=o||t,i+=!a-!o,"")}))?Function("return "+o)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new e.DOMParser,n=i.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(o){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var Qt=/#.*$/,Bt=/([?&])_=[^&]*/,Gt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Wt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Yt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Xt={},Jt={},Zt="*/".concat("*"),en=Ht.href,tn=Yt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Wt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?W(W(e,pe.ajaxSettings),t):W(pe.ajaxSettings,e)},ajaxPrefilter:B(Xt),ajaxTransport:B(Jt),ajax:function(t,n){function i(t,n,i,o){var a,u,x,y,w,_=n;2!==b&&(b=2,s&&e.clearTimeout(s),c=void 0,l=o||"",C.readyState=t>0?4:0,a=t>=200&&t<300||304===t,i&&(y=V(h,C,i)),y=U(h,y,C,a),a?(h.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(pe.lastModified[r]=w),w=C.getResponseHeader("etag"),w&&(pe.etag[r]=w)),204===t||"HEAD"===h.type?_="nocontent":304===t?_="notmodified":(_=y.state,u=y.data,x=y.error,a=!x)):(x=_,!t&&_||(_="error",t<0&&(t=0))),C.status=t,C.statusText=(n||_)+"",a?g.resolveWith(p,[u,_,C]):g.rejectWith(p,[C,_,x]),C.statusCode(v),v=void 0,d&&f.trigger(a?"ajaxSuccess":"ajaxError",[C,h,a?u:x]),m.fireWith(p,[C,_]),d&&(f.trigger("ajaxComplete",[C,h]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,a,r,l,s,d,c,u,h=pe.ajaxSetup({},n),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),v=h.statusCode||{},x={},y={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!u)for(u={};t=Gt.exec(l);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?l:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,x[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),i(0,t),this}};if(g.promise(C).complete=m.add,C.success=C.done,C.error=C.fail,h.url=((t||h.url||en)+"").replace(Qt,"").replace(Ut,tn[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=pe.trim(h.dataType||"*").toLowerCase().match(Se)||[""],null==h.crossDomain&&(o=Yt.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===tn[1]&&o[2]===tn[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=pe.param(h.data,h.traditional)),G(Xt,h,n,C),2===b)return C;d=pe.event&&h.global,d&&0===pe.active++&&pe.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Vt.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(Kt.test(r)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Bt.test(r)?r.replace(Bt,"$1_="+qt++):r+(Kt.test(r)?"&":"?")+"_="+qt++)),h.ifModified&&(pe.lastModified[r]&&C.setRequestHeader("If-Modified-Since",pe.lastModified[r]),pe.etag[r]&&C.setRequestHeader("If-None-Match",pe.etag[r])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Zt+"; q=0.01":""):h.accepts["*"]);for(a in h.headers)C.setRequestHeader(a,h.headers[a]);if(h.beforeSend&&(h.beforeSend.call(p,C,h)===!1||2===b))return C.abort();w="abort";for(a in{success:1,error:1,complete:1})C[a](h[a]);if(c=G(Jt,h,n,C)){if(C.readyState=1,d&&f.trigger("ajaxSend",[C,h]),2===b)return C;h.async&&h.timeout>0&&(s=e.setTimeout(function(){C.abort("timeout")},h.timeout));try{b=1,c.send(x,i)}catch(_){if(!(b<2))throw _;i(-1,_)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,i,o){return pe.isFunction(n)&&(o=o||i,i=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:o,data:n,success:i},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return ue.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:X(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,on=/\[\]$/,an=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,ln=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,i=[],o=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){o(this.name,this.value)});else for(n in e)J(n,e[n],t,o);return i.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&ln.test(this.nodeName)&&!rn.test(e)&&(this.checked||!He.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(an,"\r\n")}}):{name:t.name,value:n.replace(an,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():ie.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var sn=0,dn={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in dn)dn[e](void 0,!0)}),ue.cors=!!cn&&"withCredentials"in cn,cn=ue.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||ue.cors){var n;return{send:function(i,o){var a,r=t.xhr(),l=++sn;if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)r[a]=t.xhrFields[a];t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)void 0!==i[a]&&r.setRequestHeader(a,i[a]+"");r.send(t.hasContent&&t.data||null),n=function(e,i){var a,s,d;if(n&&(i||4===r.readyState))if(delete dn[l],n=void 0,r.onreadystatechange=pe.noop,i)4!==r.readyState&&r.abort();else{d={},a=r.status,"string"==typeof r.responseText&&(d.text=r.responseText);try{s=r.statusText}catch(c){s=""}a||!t.isLocal||t.crossDomain?1223===a&&(a=204):a=d.text?200:404}d&&o(a,s,d,r.getAllResponseHeaders())},t.async?4===r.readyState?e.setTimeout(n):r.onreadystatechange=dn[l]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ie.head||pe("head")[0]||ie.documentElement;return{send:function(i,o){t=ie.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||o(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var un=[],hn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=un.pop()||pe.expando+"_"+qt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,i){var o,a,r,l=t.jsonp!==!1&&(hn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&hn.test(t.data)&&"data");if(l||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,l?t[l]=t[l].replace(hn,"$1"+o):t.jsonp!==!1&&(t.url+=(Kt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return r||pe.error(o+" was not called"),r[0]},t.dataTypes[0]="json",a=e[o],e[o]=function(){r=arguments},i.always(function(){void 0===a?pe(e).removeProp(o):e[o]=a,t[o]&&(t.jsonpCallback=n.jsonpCallback,un.push(o)),r&&pe.isFunction(a)&&a(r[0]),r=a=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ie;var i=Ce.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=v([e],t,o),o&&o.length&&pe(o).remove(),pe.merge([],i.childNodes))};var pn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var i,o,a,r=this,l=e.indexOf(" ");return l>-1&&(i=pe.trim(e.slice(l,e.length)),e=e.slice(0,l)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),r.length>0&&pe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,r.html(i?pe("<div>").append(pe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){r.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var i,o,a,r,l,s,d,c=pe.css(e,"position"),u=pe(e),h={};"static"===c&&(e.style.position="relative"),l=u.offset(),a=pe.css(e,"top"),s=pe.css(e,"left"),d=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[a,s])>-1,d?(i=u.position(),r=i.top,o=i.left):(r=parseFloat(a)||0,o=parseFloat(s)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},l))),null!=t.top&&(h.top=t.top-l.top+r),null!=t.left&&(h.left=t.left-l.left+o),"using"in t?t.using.call(e,h):u.css(h)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return t=a.documentElement,pe.contains(t,o)?("undefined"!=typeof o.getBoundingClientRect&&(i=o.getBoundingClientRect()),n=te(a),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===pe.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(i,"marginTop",!0),left:t.left-n.left-pe.css(i,"marginLeft",!0)}}},offsetParent:function(){
return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(i){return ze(this,function(e,i,o){var a=te(e);return void 0===o?a?t in a?a[t]:a.document.documentElement[i]:e[i]:void(a?a.scrollTo(n?pe(a).scrollLeft():o,n?o:pe(a).scrollTop()):e[i]=o)},e,i,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=D(ue.pixelPosition,function(e,n){if(n)return n=gt(e,t),ut.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){pe.fn[i]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),r=n||(i===!0||o===!0?"margin":"border");return ze(this,function(t,n,i){var o;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?pe.css(t,n,r):pe.style(t,n,i,r)},t,a?i:void 0,a,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var fn=e.jQuery,gn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=gn),t&&e.jQuery===pe&&(e.jQuery=fn),pe},t||(e.jQuery=e.$=pe),pe}),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url",icon:"icon"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),t[e.data.key.children]=[],t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(e){var t=e.treeObj,n=consts.event;t.bind(n.NODECREATED,function(t,n,i){tools.apply(e.callback.onNodeCreated,[t,n,i])}),t.bind(n.CLICK,function(t,n,i,o,a){tools.apply(e.callback.onClick,[n,i,o,a])}),t.bind(n.EXPAND,function(t,n,i){tools.apply(e.callback.onExpand,[t,n,i])}),t.bind(n.COLLAPSE,function(t,n,i){tools.apply(e.callback.onCollapse,[t,n,i])}),t.bind(n.ASYNC_SUCCESS,function(t,n,i,o){tools.apply(e.callback.onAsyncSuccess,[t,n,i,o])}),t.bind(n.ASYNC_ERROR,function(t,n,i,o,a,r){tools.apply(e.callback.onAsyncError,[t,n,i,o,a,r])}),t.bind(n.REMOVE,function(t,n,i){tools.apply(e.callback.onRemove,[t,n,i])}),t.bind(n.SELECTED,function(t,n,i){tools.apply(e.callback.onSelected,[n,i])}),t.bind(n.UNSELECTED,function(t,n,i){tools.apply(e.callback.onUnSelected,[n,i])})},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),i="",o=null,a="",r="",l=null,s=null,d=null;if(tools.eqs(e.type,"mousedown")?r="mousedown":tools.eqs(e.type,"mouseup")?r="mouseup":tools.eqs(e.type,"contextmenu")?r="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(i=tools.getNodeMainDom(t).id,a="switchNode"):(d=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),d&&(i=tools.getNodeMainDom(d).id,a="clickNode")):tools.eqs(e.type,"dblclick")&&(r="dblclick",d=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),d&&(i=tools.getNodeMainDom(d).id,a="switchNode")),r.length>0&&0==i.length&&(d=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]),d&&(i=tools.getNodeMainDom(d).id)),i.length>0)switch(o=data.getNodeCache(n,i),a){case"switchNode":o.isParent&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(n.view.dblClickExpand,[n.treeId,o],n.view.dblClickExpand))?l=handler.onSwitchNode:a="";break;case"clickNode":l=handler.onClickNode}switch(r){case"mousedown":s=handler.onZTreeMousedown;break;case"mouseup":s=handler.onZTreeMouseup;break;case"dblclick":s=handler.onZTreeDblclick;break;case"contextmenu":s=handler.onZTreeContextmenu}var c={stop:!1,node:o,nodeEventType:a,nodeEventCallback:l,treeEventType:r,treeEventCallback:s};return c},_initNode=function(e,t,n,i,o,a,r){if(n){var l=data.getRoot(e),s=e.data.key.children;n.level=t,n.tId=e.treeId+"_"+ ++l.zId,n.parentTId=i?i.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open,n[s]&&n[s].length>0?(n.isParent=!0,n.zAsync=!0):(n.isParent="string"==typeof n.isParent?tools.eqs(n.isParent,"true"):!!n.isParent,n.open=!(!n.isParent||e.async.enable)&&n.open,n.zAsync=!n.isParent),n.isFirstNode=o,n.isLastNode=a,n.getParentNode=function(){return data.getNodeCache(e,n.parentTId)},n.getPreNode=function(){return data.getPreNode(e,n)},n.getNextNode=function(){return data.getNextNode(e,n)},n.getIndex=function(){return data.getNodeIndex(e,n)},n.getPath=function(){return data.getNodePath(e,n)},n.isAjaxing=!1,data.fixPIdKeyValue(e,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,n,i){var o,a=e.data.key.children;t[a]?n>=t[a].length&&(n=-1):(t[a]=[],n=-1),t[a].length>0&&0===n?(t[a][0].isFirstNode=!1,view.setNodeLineIcos(e,t[a][0])):t[a].length>0&&n<0&&(t[a][t[a].length-1].isLastNode=!1,view.setNodeLineIcos(e,t[a][t[a].length-1])),t.isParent=!0,n<0?t[a]=t[a].concat(i):(o=[n,0].concat(i),t[a].splice.apply(t[a],o))},addSelectedNode:function(e,t){var n=data.getRoot(e);data.isSelectedNode(e,t)||n.curSelectedList.push(t)},addCreatedNode:function(e,t){if(e.callback.onNodeCreated||e.view.addDiyDom){var n=data.getRoot(e);n.createdNodes.push(t)}},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,n){for(var i=0,o=_init.afterA.length;i<o;i++)_init.afterA[i].apply(this,arguments)},getBeforeA:function(e,t,n){for(var i=0,o=_init.beforeA.length;i<o;i++)_init.beforeA[i].apply(this,arguments)},getInnerAfterA:function(e,t,n){for(var i=0,o=_init.innerAfterA.length;i<o;i++)_init.innerAfterA[i].apply(this,arguments)},getInnerBeforeA:function(e,t,n){for(var i=0,o=_init.innerBeforeA.length;i<o;i++)_init.innerBeforeA[i].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNodeIndex:function(e,t){if(!t)return null;for(var n=e.data.key.children,i=t.parentTId?t.getParentNode():data.getRoot(e),o=0,a=i[n].length-1;o<=a;o++)if(i[n][o]===t)return o;return-1},getNextNode:function(e,t){if(!t)return null;for(var n=e.data.key.children,i=t.parentTId?t.getParentNode():data.getRoot(e),o=0,a=i[n].length-1;o<=a;o++)if(i[n][o]===t)return o==a?null:i[n][o+1];return null},getNodeByParam:function(e,t,n,i){if(!t||!n)return null;for(var o=e.data.key.children,a=0,r=t.length;a<r;a++){if(t[a][n]==i)return t[a];var l=data.getNodeByParam(e,t[a][o],n,i);if(l)return l}return null},getNodeCache:function(e,t){if(!t)return null;var n=caches[e.treeId].nodes[data.getNodeCacheId(t)];return n?n:null},getNodeName:function(e,t){var n=e.data.key.name;return""+t[n]},getNodePath:function(e,t){if(!t)return null;var n;return n=t.parentTId?t.getParentNode().getPath():[],n&&n.push(t),n},getNodeTitle:function(e,t){var n=""===e.data.key.title?e.data.key.name:e.data.key.title;return""+t[n]},getNodes:function(e){return data.getRoot(e)[e.data.key.children]},getNodesByParam:function(e,t,n,i){if(!t||!n)return[];for(var o=e.data.key.children,a=[],r=0,l=t.length;r<l;r++)t[r][n]==i&&a.push(t[r]),a=a.concat(data.getNodesByParam(e,t[r][o],n,i));return a},getNodesByParamFuzzy:function(e,t,n,i){if(!t||!n)return[];var o=e.data.key.children,a=[];i=i.toLowerCase();for(var r=0,l=t.length;r<l;r++)"string"==typeof t[r][n]&&t[r][n].toLowerCase().indexOf(i)>-1&&a.push(t[r]),a=a.concat(data.getNodesByParamFuzzy(e,t[r][o],n,i));return a},getNodesByFilter:function(e,t,n,i,o){if(!t)return i?null:[];for(var a=e.data.key.children,r=i?null:[],l=0,s=t.length;l<s;l++){if(tools.apply(n,[t[l],o],!1)){if(i)return t[l];r.push(t[l])}var d=data.getNodesByFilter(e,t[l][a],n,i,o);if(i&&d)return d;r=i?d:r.concat(d)}return r},getPreNode:function(e,t){if(!t)return null;for(var n=e.data.key.children,i=t.parentTId?t.getParentNode():data.getRoot(e),o=0,a=i[n].length;o<a;o++)if(i[n][o]===t)return 0==o?null:i[n][o-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,n=_init.caches.length;t<n;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,n,i,o,a){for(var r=0,l=_init.nodes.length;r<l;r++)_init.nodes[r].apply(this,arguments)},initRoot:function(e){for(var t=0,n=_init.roots.length;t<n;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var n=data.getRoot(e),i=0,o=n.curSelectedList.length;i<o;i++)if(t===n.curSelectedList[i])return!0;return!1},removeNodeCache:function(e,t){var n=e.data.key.children;if(t[n])for(var i=0,o=t[n].length;i<o;i++)data.removeNodeCache(e,t[n][i]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var n=data.getRoot(e),i=0,o=n.curSelectedList.length;i<o;i++)t!==n.curSelectedList[i]&&data.getNodeCache(e,n.curSelectedList[i].tId)||(n.curSelectedList.splice(i,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,t]),i--,o--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var n=0,i=_init.zTreeTools.length;n<i;n++)_init.zTreeTools[n].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var n=e.data.key.children,i=[];if(tools.isArray(t))for(var o=0,a=t.length;o<a;o++)i.push(t[o]),t[o][n]&&(i=i.concat(data.transformToArrayFormat(e,t[o][n])));else i.push(t),t[n]&&(i=i.concat(data.transformToArrayFormat(e,t[n])));return i},transformTozTreeFormat:function(e,t){var n,i,o=e.data.simpleData.idKey,a=e.data.simpleData.pIdKey,r=e.data.key.children;if(!o||""==o||!t)return[];if(tools.isArray(t)){var l=[],s={};for(n=0,i=t.length;n<i;n++)s[t[n][o]]=t[n];for(n=0,i=t.length;n<i;n++)s[t[n][a]]&&t[n][o]!=t[n][a]?(s[t[n][a]][r]||(s[t[n][a]][r]=[]),s[t[n][a]][r].push(t[n])):l.push(t[n]);return l}return[t]}},event={bindEvent:function(e){for(var t=0,n=_init.bind.length;t<n;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,n=_init.unbind.length;t<n;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},n=e.treeObj;e.view.txtSelectedEnable||n.bind("selectstart",handler.onSelectStart).css({"-moz-user-select":"-moz-none"}),n.bind("click",t,event.proxy),n.bind("dblclick",t,event.proxy),n.bind("mouseover",t,event.proxy),n.bind("mouseout",t,event.proxy),n.bind("mousedown",t,event.proxy),n.bind("mouseup",t,event.proxy),n.bind("contextmenu",t,event.proxy)},unbindTree:function(e){var t=e.treeObj;t.unbind("selectstart",handler.onSelectStart).unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],n=0,i=_init.proxys.length;n<i;n++){var o=_init.proxys[n].apply(this,arguments);if(t.push(o),o.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var n=event.doProxy(e),i=!0,o=!1,a=0,r=n.length;a<r;a++){var l=n[a];l.nodeEventCallback&&(o=!0,i=l.nodeEventCallback.apply(l,[e,l.node])&&i),l.treeEventCallback&&(o=!0,i=l.treeEventCallback.apply(l,[e,l.node])&&i)}return i}},handler={onSwitchNode:function(e,t){var n=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(n.callback.beforeCollapse,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}else{if(0==tools.apply(n.callback.beforeExpand,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}return!0},onClickNode:function(e,t){var n=data.getSetting(e.data.treeId),i=n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(n,t)?0:n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&n.view.selectedMulti?2:1;return 0==tools.apply(n.callback.beforeClick,[n.treeId,t,i],!0)||(0===i?view.cancelPreSelectedNode(n,t):view.selectNode(n,t,2===i),n.treeObj.trigger(consts.event.CLICK,[e,n.treeId,t,i]),!0)},onZTreeMousedown:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseDown,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseDown,[e,n.treeId,t]),!0},onZTreeMouseup:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseUp,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseUp,[e,n.treeId,t]),!0},onZTreeDblclick:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeDblClick,[n.treeId,t],!0)&&tools.apply(n.callback.onDblClick,[e,n.treeId,t]),!0},onZTreeContextmenu:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeRightClick,[n.treeId,t],!0)&&tools.apply(n.callback.onRightClick,[e,n.treeId,t]),"function"!=typeof n.callback.onRightClick},onSelectStart:function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}},tools={apply:function(e,t,n){return"function"==typeof e?e.apply(zt,t?t:[]):n},canAsync:function(e,t){var n=e.data.key.children;return e.async.enable&&t&&t.isParent&&!(t.zAsync||t[n]&&t[n].length>0)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var n in e)t[n]=e[n]instanceof Date?new Date(e[n].getTime()):"object"==typeof e[n]?tools.clone(e[n]):e[n];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},$:function(e,t,n){return t&&"string"!=typeof t&&(n=t,t=""),"string"==typeof e?$(e,n?n.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,n?n.treeObj:null)},getMDom:function(e,t,n){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var i=0,o=n.length;t.tagName&&i<o;i++)if(tools.eqs(t.tagName,n[i].tagName)&&null!==t.getAttribute(n[i].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return $(e).closest("#"+t).length>0},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,n,i,o){if(!e.data.keep.leaf||!t||t.isParent)if(tools.isArray(i)||(i=[i]),e.data.simpleData.enable&&(i=data.transformTozTreeFormat(e,i)),t){var a=$$(t,consts.id.SWITCH,e),r=$$(t,consts.id.ICON,e),l=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,a,consts.folder.CLOSE),view.replaceIcoClass(t,r,consts.folder.CLOSE),t.open=!1,l.css({display:"none"})),data.addNodesData(e,t,n,i),view.createNodes(e,t.level+1,i,t,n),o||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),n,i),view.createNodes(e,0,i,null,n)},appendNodes:function(e,t,n,i,o,a,r){if(!n)return[];var l,s,d=[],c=e.data.key.children,u=i?i:data.getRoot(e),h=u[c];(!h||o>=h.length-n.length)&&(o=-1);for(var p=0,f=n.length;p<f;p++){var g=n[p];a&&(l=(0===o||h.length==n.length)&&0==p,s=o<0&&p==n.length-1,data.initNode(e,t,g,i,l,s,r),data.addNodeCache(e,g));var m=[];g[c]&&g[c].length>0&&(m=view.appendNodes(e,t+1,g[c],g,-1,a,r&&g.open)),r&&(view.makeDOMNodeMainBefore(d,e,g),view.makeDOMNodeLine(d,e,g),data.getBeforeA(e,g,d),view.makeDOMNodeNameBefore(d,e,g),data.getInnerBeforeA(e,g,d),view.makeDOMNodeIcon(d,e,g),data.getInnerAfterA(e,g,d),view.makeDOMNodeNameAfter(d,e,g),data.getAfterA(e,g,d),g.isParent&&g.open&&view.makeUlHtml(e,g,d,m.join("")),view.makeDOMNodeMainAfter(d,e,g),data.addCreatedNode(e,g))}return d},appendParentULDom:function(e,t){var n=[],i=$$(t,e);!i.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),i=$$(t,e));var o=$$(t,consts.id.UL,e);o.get(0)&&o.remove();var a=e.data.key.children,r=view.appendNodes(e,t.level+1,t[a],t,-1,!1,!0);view.makeUlHtml(e,t,n,r.join("")),i.append(n.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l;if(node&&!node.isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"","class":consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={};for(i=0,l=setting.async.autoParam.length;node&&i<l;i++){var pKey=setting.async.autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}if(tools.isArray(setting.async.otherParam))for(i=0,l=setting.async.otherParam.length;i<l;i+=2)tmpParam[setting.async.otherParam[i]]=setting.async.otherParam[i+1];else for(var p in setting.async.otherParam)tmpParam[p]=setting.async.otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:setting.async.contentType.indexOf("application/json")>-1?JSON.stringify(tmpParam):tmpParam,dataType:setting.async.dataType,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(err){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,-1,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,-1,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,n){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,n]))}}),!0},cancelPreSelectedNode:function(e,t,n){var i,o,a=data.getRoot(e).curSelectedList;for(i=a.length-1;i>=0;i--)if(o=a[i],t===o||!t&&(!n||n!==o)){if($$(o,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t);break}a.splice(i,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,o])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);t.createdNodes.length>0;){var n=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,n]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,n])}},createNodes:function(e,t,n,i,o){if(n&&0!=n.length){var a=data.getRoot(e),r=e.data.key.children,l=!i||i.open||!!$$(i[r][0],e).get(0);a.createdNodes=[];var s,d,c=view.appendNodes(e,t,n,i,o,!0,l);if(i){var u=$$(i,consts.id.UL,e);u.get(0)&&(s=u)}else s=e.treeObj;s&&(o>=0&&(d=s.children()[o]),o>=0&&d?$(d).before(c.join("")):s.append(c.join(""))),view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,n,i,o){var a,r,l=data.getRoot(e),s=e.data.key.children;if(!t)return void tools.apply(o,[]);if(l.expandTriggerFlag&&(r=o,a=function(){r&&r(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},o=a,l.expandTriggerFlag=!1),!t.open&&t.isParent&&(!$$(t,consts.id.UL,e).get(0)||t[s]&&t[s].length>0&&!$$(t[s][0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open==n)return void tools.apply(o,[]);var d=$$(t,consts.id.UL,e),c=$$(t,consts.id.SWITCH,e),u=$$(t,consts.id.ICON,e);t.isParent?(t.open=!t.open,t.iconOpen&&t.iconClose&&u.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,c,consts.folder.OPEN),view.replaceIcoClass(t,u,consts.folder.OPEN),0==i||""==e.view.expandSpeed?(d.show(),tools.apply(o,[])):t[s]&&t[s].length>0?d.slideDown(e.view.expandSpeed,o):(d.show(),tools.apply(o,[]))):(view.replaceSwitchClass(t,c,consts.folder.CLOSE),view.replaceIcoClass(t,u,consts.folder.CLOSE),0!=i&&""!=e.view.expandSpeed&&t[s]&&t[s].length>0?d.slideUp(e.view.expandSpeed,o):(d.hide(),tools.apply(o,[])))):tools.apply(o,[])},expandCollapseParentNode:function(e,t,n,i,o){if(t){if(!t.parentTId)return void view.expandCollapseNode(e,t,n,i,o);view.expandCollapseNode(e,t,n,i),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),n,i,o)}},expandCollapseSonNode:function(e,t,n,i,o){var a=data.getRoot(e),r=e.data.key.children,l=t?t[r]:a[r],s=!t&&i,d=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,l)for(var c=0,u=l.length;c<u;c++)l[c]&&view.expandCollapseSonNode(e,l[c],n,s);data.getRoot(e).expandTriggerFlag=d,view.expandCollapseNode(e,t,n,i,o)},isSelectedNode:function(e,t){if(!t)return!1;var n,i=data.getRoot(e).curSelectedList;for(n=i.length-1;n>=0;n--)if(t===i[n])return!0;return!1},makeDOMNodeIcon:function(e,t,n){var i=data.getNodeName(t,n),o=t.view.nameIsHTML?i:i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.push("<span id='",n.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,n),"' style='",view.makeNodeIcoStyle(t,n),"'></span><span id='",n.tId,consts.id.SPAN,"' class='",consts.className.NAME,"'>",o,"</span>")},makeDOMNodeLine:function(e,t,n){e.push("<span id='",n.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,n),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,n){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,n){e.push("<li id='",n.tId,"' class='",consts.className.LEVEL,n.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,n){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,n){var i=data.getNodeTitle(t,n),o=view.makeNodeUrl(t,n),a=view.makeNodeFontCss(t,n),r=[];for(var l in a)r.push(l,":",a[l],";");e.push("<a id='",n.tId,consts.id.A,"' class='",consts.className.LEVEL,n.level,"' treeNode",consts.id.A,' onclick="',n.click||"",'" ',null!=o&&o.length>0?"href='"+o+"'":""," target='",view.makeNodeTarget(n),"' style='",r.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,n],t.view.showTitle)&&i&&e.push("title='",i.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeIcoClass:function(e,t){var n=["ico"];return t.isAjaxing||(n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],t.isParent?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)),consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var i=t.isParent&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];i&&n.push("background:url(",i,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("width:0px;height:0px;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),t.isParent?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,i){n.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),n.push(i),n.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=e.data.key.children,i=t[n];if(i){for(var o=0,a=i.length;o<a;o++)data.removeNodeCache(e,i[o]);if(data.removeSelectedNode(e),delete t[n],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{t.isParent=!1,t.open=!1;var r=$$(t,consts.id.SWITCH,e),l=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,r,consts.folder.DOCU),view.replaceIcoClass(t,l,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},scrollIntoView:function(e){e&&(Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){function t(t,n,i,o){return!1===e||i<=t+o&&t<=n+o?Math.min(i,Math.max(n,t)):(n+i)/2}function n(e,t,i,o){return{left:e,top:t,width:i,height:o,right:e+i,bottom:t+o,translate:function(a,r){return n(a+e,r+t,i,o)},relativeFromTo:function(r,l){var s=e,d=t;if(r=r.offsetParent,l=l.offsetParent,r===l)return a;for(;r;r=r.offsetParent)s+=r.offsetLeft+r.clientLeft,d+=r.offsetTop+r.clientTop;for(;l;l=l.offsetParent)s-=l.offsetLeft+l.clientLeft,d-=l.offsetTop+l.clientTop;return n(s,d,i,o)}}}for(var i,o=this,a=n(this.offsetLeft,this.offsetTop,this.offsetWidth,this.offsetHeight);tools.isElement(i=o.parentNode);){var r=i.offsetLeft+i.clientLeft,l=i.offsetTop+i.clientTop;a=a.relativeFromTo(o,i).translate(-r,-l),i.scrollLeft=t(i.scrollLeft,a.right-i.clientWidth,a.left,i.clientWidth),i.scrollTop=t(i.scrollTop,a.bottom-i.clientHeight,a.top,i.clientHeight),a=a.translate(r-i.scrollLeft,l-i.scrollTop),o=i}}),e.scrollIntoViewIfNeeded())},setFirstNode:function(e,t){var n=e.data.key.children,i=t[n].length;i>0&&(t[n][0].isFirstNode=!0)},setLastNode:function(e,t){var n=e.data.key.children,i=t[n].length;i>0&&(t[n][i-1].isLastNode=!0)},removeNode:function(e,t){var n=data.getRoot(e),i=e.data.key.children,o=t.parentTId?t.getParentNode():n;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var a=0,r=o[i].length;a<r;a++)if(o[i][a].tId==t.tId){o[i].splice(a,1);break}view.setFirstNode(e,o),view.setLastNode(e,o);var l,s,d,c=o[i].length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&c>0){var u=o[i][c-1];if(l=$$(u,consts.id.UL,e),s=$$(u,consts.id.SWITCH,e),d=$$(u,consts.id.ICON,e),o==n)if(1==o[i].length)view.replaceSwitchClass(u,s,consts.line.ROOT);else{var h=$$(o[i][0],consts.id.SWITCH,e);view.replaceSwitchClass(o[i][0],h,consts.line.ROOTS),view.replaceSwitchClass(u,s,consts.line.BOTTOM)}else view.replaceSwitchClass(u,s,consts.line.BOTTOM);l.removeClass(consts.line.LINE)}}else o.isParent=!1,o.open=!1,l=$$(o,consts.id.UL,e),s=$$(o,consts.id.SWITCH,e),d=$$(o,consts.id.ICON,e),view.replaceSwitchClass(o,s,consts.folder.DOCU),view.replaceIcoClass(o,d,consts.folder.DOCU),l.css("display","none")}},replaceIcoClass:function(e,t,n){if(t&&!e.isAjaxing){var i=t.attr("class");if(void 0!=i){var o=i.split("_");switch(n){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:o[o.length-1]=n}t.attr("class",o.join("_"))}}},replaceSwitchClass:function(e,t,n){if(t){var i=t.attr("class");if(void 0!=i){var o=i.split("_");switch(n){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:o[0]=view.makeNodeLineClassEx(e)+n;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:o[1]=n}t.attr("class",o.join("_")),n!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,n){n||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[e.treeId,t])},setNodeFontCss:function(e,t){var n=$$(t,consts.id.A,e),i=view.makeNodeFontCss(e,t);i&&n.css(i)},setNodeLineIcos:function(e,t){if(t){var n=$$(t,consts.id.SWITCH,e),i=$$(t,consts.id.UL,e),o=$$(t,consts.id.ICON,e),a=view.makeUlLineClass(e,t);0==a.length?i.removeClass(consts.line.LINE):i.addClass(a),n.attr("class",view.makeNodeLineClass(e,t)),t.isParent?n.removeAttr("disabled"):n.attr("disabled","disabled"),o.removeAttr("style"),o.attr("style",view.makeNodeIcoStyle(e,t)),o.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var n=data.getNodeTitle(e,t),i=$$(t,consts.id.SPAN,e);if(i.empty(),e.view.nameIsHTML?i.html(data.getNodeName(e,t)):i.text(data.getNodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle)){var o=$$(t,consts.id.A,e);o.attr("title",n?n:"")}},setNodeTarget:function(e,t){var n=$$(t,consts.id.A,e);n.attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var n=$$(t,consts.id.A,e),i=view.makeNodeUrl(e,t);null==i||0==i.length?n.removeAttr("href"):n.attr("href",i)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){
var t=data.getZTreeTools(e);return t?t:null},destroy:function(e){if(e&&e.length>0)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,n){var i=tools.clone(_setting);$.extend(!0,i,t),i.treeId=e.attr("id"),i.treeObj=e,i.treeObj.empty(),settings[i.treeId]=i,"undefined"==typeof document.body.style.maxHeight&&(i.view.expandSpeed=""),data.initRoot(i);var o=data.getRoot(i),a=i.data.key.children;n=n?tools.clone(tools.isArray(n)?n:[n]):[],i.data.simpleData.enable?o[a]=data.transformTozTreeFormat(i,n):o[a]=n,data.initCache(i),event.unbindTree(i),event.bindTree(i),event.unbindEvent(i),event.bindEvent(i);var r={setting:i,addNodes:function(e,t,n,o){function a(){view.addNodes(i,e,t,l,1==o)}if(e||(e=null),e&&!e.isParent&&i.data.keep.leaf)return null;var r=parseInt(t,10);if(isNaN(r)?(o=!!n,n=t,t=-1):t=r,!n)return null;var l=tools.clone(tools.isArray(n)?n:[n]);return tools.canAsync(i,e)?view.asyncNode(i,e,o,a):a(),l},cancelSelectedNode:function(e){view.cancelPreSelectedNode(i,e)},destroy:function(){view.destroy(i)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(i,null,e,!0),e},expandNode:function(e,t,n,o,a){function r(){var t=$$(e,i).get(0);t&&o!==!1&&view.scrollIntoView(t)}return e&&e.isParent?(t!==!0&&t!==!1&&(t=!e.open),a=!!a,a&&t&&0==tools.apply(i.callback.beforeExpand,[i.treeId,e],!0)?null:a&&!t&&0==tools.apply(i.callback.beforeCollapse,[i.treeId,e],!0)?null:(t&&e.parentTId&&view.expandCollapseParentNode(i,e.getParentNode(),t,!1),t!==e.open||n?(data.getRoot(i).expandTriggerFlag=a,!tools.canAsync(i,e)&&n?view.expandCollapseSonNode(i,e,t,!0,r):(e.open=!t,view.switchNode(this.setting,e),r()),t):null)):null},getNodes:function(){return data.getNodes(i)},getNodeByParam:function(e,t,n){return e?data.getNodeByParam(i,n?n[i.data.key.children]:data.getNodes(i),e,t):null},getNodeByTId:function(e){return data.getNodeCache(i,e)},getNodesByParam:function(e,t,n){return e?data.getNodesByParam(i,n?n[i.data.key.children]:data.getNodes(i),e,t):null},getNodesByParamFuzzy:function(e,t,n){return e?data.getNodesByParamFuzzy(i,n?n[i.data.key.children]:data.getNodes(i),e,t):null},getNodesByFilter:function(e,t,n,o){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(i,n?n[i.data.key.children]:data.getNodes(i),e,t,o):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=i.data.key.children,n=e.parentTId?e.getParentNode():data.getRoot(i),o=0,a=n[t].length;o<a;o++)if(n[t][o]==e)return o;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(i).curSelectedList,n=0,o=t.length;n<o;n++)e.push(t[n]);return e},isSelectedNode:function(e){return data.isSelectedNode(i,e)},reAsyncChildNodes:function(e,t,n){if(this.setting.async.enable){var o=!e;if(o&&(e=data.getRoot(i)),"refresh"==t){for(var a=this.setting.data.key.children,r=0,l=e[a]?e[a].length:0;r<l;r++)data.removeNodeCache(i,e[a][r]);if(data.removeSelectedNode(i),e[a]=[],o)this.setting.treeObj.empty();else{var s=$$(e,consts.id.UL,i);s.empty()}}view.asyncNode(this.setting,o?null:e,!!n)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(i),t=e[i.data.key.children];data.initRoot(i),e[i.data.key.children]=t,data.initCache(i),view.createNodes(i,0,e[i.data.key.children],null,-1)},removeChildNodes:function(e){if(!e)return null;var t=i.data.key.children,n=e[t];return view.removeChildNodes(i,e),n?n:null},removeNode:function(e,t){e&&(t=!!t,t&&0==tools.apply(i.callback.beforeRemove,[i.treeId,e],!0)||(view.removeNode(i,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[i.treeId,e])))},selectNode:function(e,t,n){function o(){if(!n){var t=$$(e,i).get(0);view.scrollIntoView(t)}}if(e&&tools.uCanDo(i)){if(t=i.view.selectedMulti&&t,e.parentTId)view.expandCollapseParentNode(i,e.getParentNode(),!0,!1,o);else if(!n)try{$$(e,i).focus().blur()}catch(a){}view.selectNode(i,e,t)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(i,e)},transformToArray:function(e){return data.transformToArrayFormat(i,e)},updateNode:function(e,t){if(e){var n=$$(e,i);n.get(0)&&tools.uCanDo(i)&&(view.setNodeName(i,e),view.setNodeTarget(i,e),view.setNodeUrl(i,e),view.setNodeLineIcos(i,e),view.setNodeFontCss(i,e))}}};return o.treeTools=r,data.setZTreeTools(i,r),o[a]&&o[a].length>0?view.createNodes(i,0,o[a],null,-1):i.async.enable&&i.async.url&&""!==i.async.url&&view.asyncNode(i),r}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},n={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},i=function(e){var t=w.getRoot(e);t.radioCheckedList=[]},o=function(e){},a=function(e){var t=e.treeObj,n=y.event;t.bind(n.CHECK,function(t,n,i,o){t.srcEvent=n,x.apply(e.callback.onCheck,[t,i,o])})},r=function(e){var t=e.treeObj,n=y.event;t.unbind(n.CHECK)},l=function(e){var t=e.target,n=w.getSetting(e.data.treeId),i="",o=null,a="",r="",l=null,s=null;if(x.eqs(e.type,"mouseover")?n.check.enable&&x.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+y.id.CHECK)&&(i=x.getNodeMainDom(t).id,a="mouseoverCheck"):x.eqs(e.type,"mouseout")?n.check.enable&&x.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+y.id.CHECK)&&(i=x.getNodeMainDom(t).id,a="mouseoutCheck"):x.eqs(e.type,"click")&&n.check.enable&&x.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+y.id.CHECK)&&(i=x.getNodeMainDom(t).id,a="checkNode"),i.length>0)switch(o=w.getNodeCache(n,i),a){case"checkNode":l=p.onCheckNode;break;case"mouseoverCheck":l=p.onMouseoverCheck;break;case"mouseoutCheck":l=p.onMouseoutCheck}var d={stop:"checkNode"===a,node:o,nodeEventType:a,nodeEventCallback:l,treeEventType:r,treeEventCallback:s};return d},s=function(e,t,n,i,o,a,r){if(n){var l=e.data.key.checked;if("string"==typeof n[l]&&(n[l]=x.eqs(n[l],"true")),n[l]=!!n[l],n.checkedOld=n[l],"string"==typeof n.nocheck&&(n.nocheck=x.eqs(n.nocheck,"true")),n.nocheck=!!n.nocheck||e.check.nocheckInherit&&i&&!!i.nocheck,"string"==typeof n.chkDisabled&&(n.chkDisabled=x.eqs(n.chkDisabled,"true")),n.chkDisabled=!!n.chkDisabled||e.check.chkDisabledInherit&&i&&!!i.chkDisabled,"string"==typeof n.halfCheck&&(n.halfCheck=x.eqs(n.halfCheck,"true")),n.halfCheck=!!n.halfCheck,n.check_Child_State=-1,n.check_Focus=!1,n.getCheckStatus=function(){return w.getCheckStatus(e,n)},e.check.chkStyle==y.radio.STYLE&&e.check.radioType==y.radio.TYPE_ALL&&n[l]){var s=w.getRoot(e);s.radioCheckedList.push(n)}}},d=function(e,t,n){e.data.key.checked;e.check.enable&&(w.makeChkFlag(e,t),n.push("<span ID='",t.tId,y.id.CHECK,"' class='",b.makeChkClass(e,t),"' treeNode",y.id.CHECK,t.nocheck===!0?" style='display:none;'":"","></span>"))},c=function(e,t){t.checkNode=function(e,t,n,i){var o=this.setting.data.key.checked;if(e.chkDisabled!==!0&&(t!==!0&&t!==!1&&(t=!e[o]),i=!!i,(e[o]!==t||n)&&(!i||0!=x.apply(this.setting.callback.beforeCheck,[this.setting.treeId,e],!0))&&x.uCanDo(this.setting)&&this.setting.check.enable&&e.nocheck!==!0)){e[o]=t;var a=C(e,y.id.CHECK,this.setting);(n||this.setting.check.chkStyle===y.radio.STYLE)&&b.checkNodeRelation(this.setting,e),b.setChkClass(this.setting,a,e),b.repairParentChkClassWithSelf(this.setting,e),i&&this.setting.treeObj.trigger(y.event.CHECK,[null,this.setting.treeId,e])}},t.checkAllNodes=function(e){b.repairAllChk(this.setting,!!e)},t.getCheckedNodes=function(e){var t=this.setting.data.key.children;return e=e!==!1,w.getTreeCheckedNodes(this.setting,w.getRoot(this.setting)[t],e)},t.getChangeCheckedNodes=function(){var e=this.setting.data.key.children;return w.getTreeChangeCheckedNodes(this.setting,w.getRoot(this.setting)[e])},t.setChkDisabled=function(e,t,n,i){t=!!t,n=!!n,i=!!i,b.repairSonChkDisabled(this.setting,e,t,i),b.repairParentChkDisabled(this.setting,e.getParentNode(),t,n)};var n=t.updateNode;t.updateNode=function(e,i){if(n&&n.apply(t,arguments),e&&this.setting.check.enable){var o=C(e,this.setting);if(o.get(0)&&x.uCanDo(this.setting)){var a=C(e,y.id.CHECK,this.setting);1!=i&&this.setting.check.chkStyle!==y.radio.STYLE||b.checkNodeRelation(this.setting,e),b.setChkClass(this.setting,a,e),b.repairParentChkClassWithSelf(this.setting,e)}}}},u={getRadioCheckedList:function(e){for(var t=w.getRoot(e).radioCheckedList,n=0,i=t.length;n<i;n++)w.getNodeCache(e,t[n].tId)||(t.splice(n,1),n--,i--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var n=e.data.key.checked,i={checked:t[n],half:t.halfCheck?t.halfCheck:e.check.chkStyle==y.radio.STYLE?2===t.check_Child_State:t[n]?t.check_Child_State>-1&&t.check_Child_State<2:t.check_Child_State>0};return i},getTreeCheckedNodes:function(e,t,n,i){if(!t)return[];var o=e.data.key.children,a=e.data.key.checked,r=n&&e.check.chkStyle==y.radio.STYLE&&e.check.radioType==y.radio.TYPE_ALL;i=i?i:[];for(var l=0,s=t.length;l<s&&(t[l].nocheck===!0||t[l].chkDisabled===!0||t[l][a]!=n||(i.push(t[l]),!r))&&(w.getTreeCheckedNodes(e,t[l][o],n,i),!(r&&i.length>0));l++);return i},getTreeChangeCheckedNodes:function(e,t,n){if(!t)return[];var i=e.data.key.children,o=e.data.key.checked;n=n?n:[];for(var a=0,r=t.length;a<r;a++)t[a].nocheck!==!0&&t[a].chkDisabled!==!0&&t[a][o]!=t[a].checkedOld&&n.push(t[a]),w.getTreeChangeCheckedNodes(e,t[a][i],n);return n},makeChkFlag:function(e,t){if(t){var n=e.data.key.children,i=e.data.key.checked,o=-1;if(t[n])for(var a=0,r=t[n].length;a<r;a++){var l=t[n][a],s=-1;if(e.check.chkStyle==y.radio.STYLE){if(s=l.nocheck===!0||l.chkDisabled===!0?l.check_Child_State:l.halfCheck===!0?2:l[i]?2:l.check_Child_State>0?2:0,2==s){o=2;break}0==s&&(o=0)}else if(e.check.chkStyle==y.checkbox.STYLE){if(s=l.nocheck===!0||l.chkDisabled===!0?l.check_Child_State:l.halfCheck===!0?1:l[i]?l.check_Child_State===-1||2===l.check_Child_State?2:1:l.check_Child_State>0?1:0,1===s){o=1;break}if(2===s&&o>-1&&a>0&&s!==o){o=1;break}if(2===o&&s>-1&&s<2){o=1;break}s>-1&&(o=s)}}t.check_Child_State=o}}},h={},p={onCheckNode:function(e,t){if(t.chkDisabled===!0)return!1;var n=w.getSetting(e.data.treeId),i=n.data.key.checked;if(0==x.apply(n.callback.beforeCheck,[n.treeId,t],!0))return!0;t[i]=!t[i],b.checkNodeRelation(n,t);var o=C(t,y.id.CHECK,n);return b.setChkClass(n,o,t),b.repairParentChkClassWithSelf(n,t),n.treeObj.trigger(y.event.CHECK,[e,n.treeId,t]),!0},onMouseoverCheck:function(e,t){if(t.chkDisabled===!0)return!1;var n=w.getSetting(e.data.treeId),i=C(t,y.id.CHECK,n);return t.check_Focus=!0,b.setChkClass(n,i,t),!0},onMouseoutCheck:function(e,t){if(t.chkDisabled===!0)return!1;var n=w.getSetting(e.data.treeId),i=C(t,y.id.CHECK,n);return t.check_Focus=!1,b.setChkClass(n,i,t),!0}},f={},g={checkNodeRelation:function(e,t){var n,i,o,a=e.data.key.children,r=e.data.key.checked,l=y.radio;if(e.check.chkStyle==l.STYLE){var s=w.getRadioCheckedList(e);if(t[r])if(e.check.radioType==l.TYPE_ALL){for(i=s.length-1;i>=0;i--)n=s[i],n[r]&&n!=t&&(n[r]=!1,s.splice(i,1),b.setChkClass(e,C(n,y.id.CHECK,e),n),n.parentTId!=t.parentTId&&b.repairParentChkClassWithSelf(e,n));s.push(t)}else{var d=t.parentTId?t.getParentNode():w.getRoot(e);for(i=0,o=d[a].length;i<o;i++)n=d[a][i],n[r]&&n!=t&&(n[r]=!1,b.setChkClass(e,C(n,y.id.CHECK,e),n))}else if(e.check.radioType==l.TYPE_ALL)for(i=0,o=s.length;i<o;i++)if(t==s[i]){s.splice(i,1);break}}else t[r]&&(!t[a]||0==t[a].length||e.check.chkboxType.Y.indexOf("s")>-1)&&b.setSonNodeCheckBox(e,t,!0),t[r]||t[a]&&0!=t[a].length&&!(e.check.chkboxType.N.indexOf("s")>-1)||b.setSonNodeCheckBox(e,t,!1),t[r]&&e.check.chkboxType.Y.indexOf("p")>-1&&b.setParentNodeCheckBox(e,t,!0),!t[r]&&e.check.chkboxType.N.indexOf("p")>-1&&b.setParentNodeCheckBox(e,t,!1)},makeChkClass:function(e,t){var n=e.data.key.checked,i=y.checkbox,o=y.radio,a="";a=t.chkDisabled===!0?i.DISABLED:t.halfCheck?i.PART:e.check.chkStyle==o.STYLE?t.check_Child_State<1?i.FULL:i.PART:t[n]?2===t.check_Child_State||t.check_Child_State===-1?i.FULL:i.PART:t.check_Child_State<1?i.FULL:i.PART;var r=e.check.chkStyle+"_"+(t[n]?i.TRUE:i.FALSE)+"_"+a;return r=t.check_Focus&&t.chkDisabled!==!0?r+"_"+i.FOCUS:r,y.className.BUTTON+" "+i.DEFAULT+" "+r},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===y.checkbox.STYLE)for(var n=e.data.key.checked,i=e.data.key.children,o=w.getRoot(e),a=0,r=o[i].length;a<r;a++){var l=o[i][a];l.nocheck!==!0&&l.chkDisabled!==!0&&(l[n]=t),b.setSonNodeCheckBox(e,l,t)}},repairChkClass:function(e,t){if(t&&(w.makeChkFlag(e,t),t.nocheck!==!0)){var n=C(t,y.id.CHECK,e);b.setChkClass(e,n,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var n=t.getParentNode();b.repairChkClass(e,n),b.repairParentChkClass(e,n)}},repairParentChkClassWithSelf:function(e,t){if(t){var n=e.data.key.children;t[n]&&t[n].length>0?b.repairParentChkClass(e,t[n][0]):b.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,n,i){if(t){var o=e.data.key.children;if(t.chkDisabled!=n&&(t.chkDisabled=n),b.repairChkClass(e,t),t[o]&&i)for(var a=0,r=t[o].length;a<r;a++){var l=t[o][a];b.repairSonChkDisabled(e,l,n,i)}}},repairParentChkDisabled:function(e,t,n,i){t&&(t.chkDisabled!=n&&i&&(t.chkDisabled=n),b.repairChkClass(e,t),b.repairParentChkDisabled(e,t.getParentNode(),n,i))},setChkClass:function(e,t,n){t&&(n.nocheck===!0?t.hide():t.show(),t.attr("class",b.makeChkClass(e,n)))},setParentNodeCheckBox:function(e,t,n,i){var o=e.data.key.children,a=e.data.key.checked,r=C(t,y.id.CHECK,e);if(i||(i=t),w.makeChkFlag(e,t),t.nocheck!==!0&&t.chkDisabled!==!0&&(t[a]=n,b.setChkClass(e,r,t),e.check.autoCheckTrigger&&t!=i&&e.treeObj.trigger(y.event.CHECK,[null,e.treeId,t])),t.parentTId){var l=!0;if(!n)for(var s=t.getParentNode()[o],d=0,c=s.length;d<c;d++)if(s[d].nocheck!==!0&&s[d].chkDisabled!==!0&&s[d][a]||(s[d].nocheck===!0||s[d].chkDisabled===!0)&&s[d].check_Child_State>0){l=!1;break}l&&b.setParentNodeCheckBox(e,t.getParentNode(),n,i)}},setSonNodeCheckBox:function(e,t,n,i){if(t){var o=e.data.key.children,a=e.data.key.checked,r=C(t,y.id.CHECK,e);i||(i=t);var l=!1;if(t[o])for(var s=0,d=t[o].length;s<d;s++){var c=t[o][s];b.setSonNodeCheckBox(e,c,n,i),c.chkDisabled===!0&&(l=!0)}t!=w.getRoot(e)&&t.chkDisabled!==!0&&(l&&t.nocheck!==!0&&w.makeChkFlag(e,t),t.nocheck!==!0&&t.chkDisabled!==!0?(t[a]=n,l||(t.check_Child_State=t[o]&&t[o].length>0?n?2:0:-1)):t.check_Child_State=-1,b.setChkClass(e,r,t),e.check.autoCheckTrigger&&t!=i&&t.nocheck!==!0&&t.chkDisabled!==!0&&e.treeObj.trigger(y.event.CHECK,[null,e.treeId,t]))}}},m={tools:f,view:g,event:h,data:u};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,m);var v=e.fn.zTree,x=v._z.tools,y=v.consts,b=v._z.view,w=v._z.data,C=(v._z.event,x.$);w.exSetting(n),w.addInitBind(a),w.addInitUnBind(r),w.addInitCache(o),w.addInitNode(s),w.addInitProxy(l,!0),w.addInitRoot(i),w.addBeforeA(d),w.addZTreeTools(c);var _=b.createNodes;b.createNodes=function(e,t,n,i,o){_&&_.apply(b,arguments),n&&b.repairParentChkClassWithSelf(e,i)};var k=b.removeNode;b.removeNode=function(e,t){var n=t.getParentNode();k&&k.apply(b,arguments),t&&n&&(b.repairChkClass(e,n),b.repairParentChkClass(e,n))};var I=b.appendNodes;b.appendNodes=function(e,t,n,i,o,a,r){var l="";return I&&(l=I.apply(b,arguments)),i&&w.makeChkFlag(e,i),l}}(jQuery),function(e){var t={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},n={edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}},i=function(e){var t=b.getRoot(e),n=b.getRoots();t.curEditNode=null,t.curEditInput=null,t.curHoverNode=null,t.dragFlag=0,t.dragNodeShowBefore=[],t.dragMaskList=new Array,n.showHoverDom=!0},o=function(e){},a=function(e){var t=e.treeObj,n=x.event;t.bind(n.RENAME,function(t,n,i,o){v.apply(e.callback.onRename,[t,n,i,o])}),t.bind(n.DRAG,function(t,n,i,o){v.apply(e.callback.onDrag,[n,i,o])}),t.bind(n.DRAGMOVE,function(t,n,i,o){v.apply(e.callback.onDragMove,[n,i,o])}),t.bind(n.DROP,function(t,n,i,o,a,r,l){v.apply(e.callback.onDrop,[n,i,o,a,r,l])})},r=function(e){var t=e.treeObj,n=x.event;t.unbind(n.RENAME),t.unbind(n.DRAG),t.unbind(n.DRAGMOVE),t.unbind(n.DROP)},l=function(e){var t=e.target,n=b.getSetting(e.data.treeId),i=e.relatedTarget,o="",a=null,r="",l="",s=null,d=null,c=null;if(v.eqs(e.type,"mouseover")?(c=v.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+x.id.A}]),c&&(o=v.getNodeMainDom(c).id,r="hoverOverNode")):v.eqs(e.type,"mouseout")?(c=v.getMDom(n,i,[{tagName:"a",attrName:"treeNode"+x.id.A}]),c||(o="remove",r="hoverOutNode")):v.eqs(e.type,"mousedown")&&(c=v.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+x.id.A}]),c&&(o=v.getNodeMainDom(c).id,r="mousedownNode")),o.length>0)switch(a=b.getNodeCache(n,o),r){case"mousedownNode":s=h.onMousedownNode;break;case"hoverOverNode":s=h.onHoverOverNode;break;case"hoverOutNode":s=h.onHoverOutNode}var u={stop:!1,node:a,nodeEventType:r,nodeEventCallback:s,treeEventType:l,treeEventCallback:d};return u},s=function(e,t,n,i,o,a,r){n&&(n.isHover=!1,n.editNameFlag=!1)},d=function(e,t){t.cancelEditName=function(e){var t=b.getRoot(this.setting);t.curEditNode&&y.cancelCurEditNode(this.setting,e?e:null,!0)},t.copyNode=function(e,t,n,i){function o(){y.addNodes(a.setting,e,-1,[r],i)}if(!t)return null;if(e&&!e.isParent&&this.setting.data.keep.leaf&&n===x.move.TYPE_INNER)return null;var a=this,r=v.clone(t);return e||(e=null,n=x.move.TYPE_INNER),n==x.move.TYPE_INNER?v.canAsync(this.setting,e)?y.asyncNode(this.setting,e,i,o):o():(y.addNodes(this.setting,e.parentNode,-1,[r],i),y.moveNode(this.setting,e,r,n,!1,i)),r},t.editName=function(e){e&&e.tId&&e===b.getNodeCache(this.setting,e.tId)&&(e.parentTId&&y.expandCollapseParentNode(this.setting,e.getParentNode(),!0),y.editNode(this.setting,e))},t.moveNode=function(e,t,n,i){function o(){y.moveNode(a.setting,e,t,n,!1,i)}if(!t)return t;if(e&&!e.isParent&&this.setting.data.keep.leaf&&n===x.move.TYPE_INNER)return null;if(e&&(t.parentTId==e.tId&&n==x.move.TYPE_INNER||w(t,this.setting).find("#"+e.tId).length>0))return null;e||(e=null);var a=this;return v.canAsync(this.setting,e)&&n===x.move.TYPE_INNER?y.asyncNode(this.setting,e,i,o):o(),t},t.setEditable=function(e){return this.setting.edit.enable=e,this.refresh()}},c={setSonNodeLevel:function(e,t,n){if(n){var i=e.data.key.children;if(n.level=t?t.level+1:0,n[i])for(var o=0,a=n[i].length;o<a;o++)n[i][o]&&b.setSonNodeLevel(e,n,n[i][o])}}},u={},h={onHoverOverNode:function(e,t){var n=b.getSetting(e.data.treeId),i=b.getRoot(n);i.curHoverNode!=t&&h.onHoverOutNode(e),i.curHoverNode=t,y.addHoverDom(n,t)},onHoverOutNode:function(e,t){var n=b.getSetting(e.data.treeId),i=b.getRoot(n);i.curHoverNode&&!b.isSelectedNode(n,i.curHoverNode)&&(y.removeTreeDom(n,i.curHoverNode),i.curHoverNode=null)},onMousedownNode:function(n,i){function o(n){function i(){C=null,P="",R=x.move.TYPE_INNER,m.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null)}if(0==c.dragFlag&&Math.abs(j-n.clientX)<d.edit.drag.minMoveSize&&Math.abs(A-n.clientY)<d.edit.drag.minMoveSize)return!0;var o,r,l,s,h,p=d.data.key.children;if(T.css("cursor","pointer"),0==c.dragFlag){if(0==v.apply(d.callback.beforeDrag,[d.treeId,f],!0))return a(n),!0;for(o=0,r=f.length;o<r;o++)0==o&&(c.dragNodeShowBefore=[]),l=f[o],l.isParent&&l.open?(y.expandCollapseNode(d,l,!l.open),c.dragNodeShowBefore[l.tId]=!0):c.dragNodeShowBefore[l.tId]=!1;c.dragFlag=1,u.showHoverDom=!1,v.showIfameMask(d,!0);var S=!0,O=-1;if(f.length>1){var M=f[0].parentTId?f[0].getParentNode()[p]:b.getNodes(d);for(h=[],o=0,r=M.length;o<r;o++)if(void 0!==c.dragNodeShowBefore[M[o].tId]&&(S&&O>-1&&O+1!==o&&(S=!1),h.push(M[o]),O=o),f.length===h.length){f=h;break}}for(S&&(_=f[0].getPreNode(),k=f[f.length-1].getNextNode()),g=w("<ul class='zTreeDragUL'></ul>",d),o=0,r=f.length;o<r;o++)l=f[o],l.editNameFlag=!1,y.selectNode(d,l,o>0),y.removeTreeDom(d,l),o>d.edit.drag.maxShowNodeNum-1||(s=w("<li id='"+l.tId+"_tmp'></li>",d),s.append(w(l,x.id.A,d).clone()),s.css("padding","0"),s.children("#"+l.tId+x.id.A).removeClass(x.node.CURSELECTED),g.append(s),o==d.edit.drag.maxShowNodeNum-1&&(s=w("<li id='"+l.tId+"_moretmp'><a>  ...  </a></li>",d),g.append(s)));g.attr("id",f[0].tId+x.id.UL+"_tmp"),g.addClass(d.treeObj.attr("class")),g.appendTo(T),m=w("<span class='tmpzTreeMove_arrow'></span>",d),m.attr("id","zTreeMove_arrow_tmp"),m.appendTo(T),d.treeObj.trigger(x.event.DRAG,[n,d.treeId,f])}if(1==c.dragFlag){if(C&&m.attr("id")==n.target.id&&P&&n.clientX+I.scrollLeft()+2>e("#"+P+x.id.A,C).offset().left){var z=e("#"+P+x.id.A,C);n.target=z.length>0?z.get(0):n.target}else C&&(C.removeClass(x.node.TMPTARGET_TREE),P&&e("#"+P+x.id.A,C).removeClass(x.node.TMPTARGET_NODE+"_"+x.move.TYPE_PREV).removeClass(x.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(x.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER));C=null,P=null,N=!1,E=d;var H=b.getSettings();for(var q in H)H[q].treeId&&H[q].edit.enable&&H[q].treeId!=d.treeId&&(n.target.id==H[q].treeId||e(n.target).parents("#"+H[q].treeId).length>0)&&(N=!0,E=H[q]);var K=I.scrollTop(),F=I.scrollLeft(),Q=E.treeObj.offset(),B=E.treeObj.get(0).scrollHeight,G=E.treeObj.get(0).scrollWidth,W=n.clientY+K-Q.top,V=E.treeObj.height()+Q.top-n.clientY-K,U=n.clientX+F-Q.left,Y=E.treeObj.width()+Q.left-n.clientX-F,X=W<d.edit.drag.borderMax&&W>d.edit.drag.borderMin,J=V<d.edit.drag.borderMax&&V>d.edit.drag.borderMin,Z=U<d.edit.drag.borderMax&&U>d.edit.drag.borderMin,ee=Y<d.edit.drag.borderMax&&Y>d.edit.drag.borderMin,te=W>d.edit.drag.borderMin&&V>d.edit.drag.borderMin&&U>d.edit.drag.borderMin&&Y>d.edit.drag.borderMin,ne=X&&E.treeObj.scrollTop()<=0,ie=J&&E.treeObj.scrollTop()+E.treeObj.height()+10>=B,oe=Z&&E.treeObj.scrollLeft()<=0,ae=ee&&E.treeObj.scrollLeft()+E.treeObj.width()+10>=G;if(n.target&&v.isChildOrSelf(n.target,E.treeId)){for(var re=n.target;re&&re.tagName&&!v.eqs(re.tagName,"li")&&re.id!=E.treeId;)re=re.parentNode;var le=!0;for(o=0,r=f.length;o<r;o++){if(l=f[o],re.id===l.tId){le=!1;break}if(w(l,d).find("#"+re.id).length>0){le=!1;break}}le&&n.target&&v.isChildOrSelf(n.target,re.id+x.id.A)&&(C=e(re),P=re.id)}l=f[0],te&&v.isChildOrSelf(n.target,E.treeId)&&(!C&&(n.target.id==E.treeId||ne||ie||oe||ae)&&(N||!N&&l.parentTId)&&(C=E.treeObj),X?E.treeObj.scrollTop(E.treeObj.scrollTop()-10):J&&E.treeObj.scrollTop(E.treeObj.scrollTop()+10),Z?E.treeObj.scrollLeft(E.treeObj.scrollLeft()-10):ee&&E.treeObj.scrollLeft(E.treeObj.scrollLeft()+10),C&&C!=E.treeObj&&C.offset().left<E.treeObj.offset().left&&E.treeObj.scrollLeft(E.treeObj.scrollLeft()+C.offset().left-E.treeObj.offset().left)),g.css({top:n.clientY+K+3+"px",left:n.clientX+F+3+"px"});var se=0,de=0;if(C&&C.attr("id")!=E.treeId){var ce=null==P?null:b.getNodeCache(E,P),ue=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy,he=!(!_||P!==_.tId),pe=!(!k||P!==k.tId),fe=l.parentTId&&l.parentTId==P,ge=(ue||!pe)&&v.apply(E.edit.drag.prev,[E.treeId,f,ce],!!E.edit.drag.prev),me=(ue||!he)&&v.apply(E.edit.drag.next,[E.treeId,f,ce],!!E.edit.drag.next),ve=(ue||!fe)&&!(E.data.keep.leaf&&!ce.isParent)&&v.apply(E.edit.drag.inner,[E.treeId,f,ce],!!E.edit.drag.inner);if(ge||me||ve){var xe=e("#"+P+x.id.A,C),ye=ce.isLastNode?null:e("#"+ce.getNextNode().tId+x.id.A,C.next()),be=xe.offset().top,we=xe.offset().left,Ce=ge?ve?.25:me?.5:1:-1,_e=me?ve?.75:ge?.5:0:-1,ke=(n.clientY+K-be)/xe.height();if((1==Ce||ke<=Ce&&ke>=-.2)&&ge?(se=1-m.width(),de=be-m.height()/2,R=x.move.TYPE_PREV):(0==_e||ke>=_e&&ke<=1.2)&&me?(se=1-m.width(),de=null==ye||ce.isParent&&ce.open?be+xe.height()-m.height()/2:ye.offset().top-m.height()/2,R=x.move.TYPE_NEXT):ve?(se=5-m.width(),de=be,R=x.move.TYPE_INNER):i(),C&&(m.css({display:"block",top:de+"px",left:we+se+"px"}),xe.addClass(x.node.TMPTARGET_NODE+"_"+R),$==P&&D==R||(L=(new Date).getTime()),ce&&ce.isParent&&R==x.move.TYPE_INNER)){var Ie=!0;window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==ce.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===ce.tId&&(Ie=!1),Ie&&(window.zTreeMoveTimer=setTimeout(function(){R==x.move.TYPE_INNER&&ce&&ce.isParent&&!ce.open&&(new Date).getTime()-L>E.edit.drag.autoOpenTime&&v.apply(E.callback.beforeDragOpen,[E.treeId,ce],!0)&&(y.switchNode(E,ce),E.edit.drag.autoExpandTrigger&&E.treeObj.trigger(x.event.EXPAND,[E.treeId,ce]))},E.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=ce.tId)}}else i()}else R=x.move.TYPE_INNER,C&&v.apply(E.edit.drag.inner,[E.treeId,f,null],!!E.edit.drag.inner)?C.addClass(x.node.TMPTARGET_TREE):C=null,m.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);$=P,D=R,d.treeObj.trigger(x.event.DRAGMOVE,[n,d.treeId,f])}return!1}function a(n){function i(){if(N){if(!p)for(var e=0,t=f.length;e<t;e++)y.removeNode(d,f[e]);R==x.move.TYPE_INNER?y.addNodes(E,_,-1,k):y.addNodes(E,_.getParentNode(),R==x.move.TYPE_PREV?_.getIndex():_.getIndex()+1,k)}else if(p&&R==x.move.TYPE_INNER)y.addNodes(E,_,-1,k);else if(p)y.addNodes(E,_.getParentNode(),R==x.move.TYPE_PREV?_.getIndex():_.getIndex()+1,k);else if(R!=x.move.TYPE_NEXT)for(e=0,t=k.length;e<t;e++)y.moveNode(E,_,k[e],R,!1);else for(e=-1,t=k.length-1;e<t;t--)y.moveNode(E,_,k[t],R,!1);y.selectNodes(E,k);var i=w(k[0],d).get(0);y.scrollIntoView(i),d.treeObj.trigger(x.event.DROP,[n,E.treeId,k,_,R,p])}if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),$=null,D=null,I.unbind("mousemove",o),I.unbind("mouseup",a),I.unbind("selectstart",r),T.css("cursor","auto"),C&&(C.removeClass(x.node.TMPTARGET_TREE),P&&e("#"+P+x.id.A,C).removeClass(x.node.TMPTARGET_NODE+"_"+x.move.TYPE_PREV).removeClass(x.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(x.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER)),v.showIfameMask(d,!1),u.showHoverDom=!0,0!=c.dragFlag){c.dragFlag=0;var l,s,h;for(l=0,s=f.length;l<s;l++)h=f[l],h.isParent&&c.dragNodeShowBefore[h.tId]&&!h.open&&(y.expandCollapseNode(d,h,!h.open),delete c.dragNodeShowBefore[h.tId]);g&&g.remove(),m&&m.remove();var p=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy;if(!p&&C&&P&&f[0].parentTId&&P==f[0].parentTId&&R==x.move.TYPE_INNER&&(C=null),C){var _=null==P?null:b.getNodeCache(E,P);if(0==v.apply(d.callback.beforeDrop,[E.treeId,f,_,R,p],!0))return void y.selectNodes(S,f);var k=p?v.clone(f):f;R==x.move.TYPE_INNER&&v.canAsync(E,_)?y.asyncNode(E,_,!1,i):i()}else y.selectNodes(S,f),d.treeObj.trigger(x.event.DROP,[n,d.treeId,f,null,null,null])}}function r(){return!1}var l,s,d=b.getSetting(n.data.treeId),c=b.getRoot(d),u=b.getRoots();if(2==n.button||!d.edit.enable||!d.edit.drag.isCopy&&!d.edit.drag.isMove)return!0;var h=n.target,p=b.getRoot(d).curSelectedList,f=[];if(b.isSelectedNode(d,i))for(l=0,s=p.length;l<s;l++){if(p[l].editNameFlag&&v.eqs(h.tagName,"input")&&null!==h.getAttribute("treeNode"+x.id.INPUT))return!0;if(f.push(p[l]),f[0].parentTId!==p[l].parentTId){f=[i];break}}else f=[i];y.editNodeBlur=!0,y.cancelCurEditNode(d);var g,m,C,_,k,I=e(d.treeObj.get(0).ownerDocument),T=e(d.treeObj.get(0).ownerDocument.body),N=!1,E=d,S=d,$=null,D=null,P=null,R=x.move.TYPE_INNER,j=n.clientX,A=n.clientY,L=(new Date).getTime();return v.uCanDo(d)&&I.bind("mousemove",o),I.bind("mouseup",a),I.bind("selectstart",r),n.preventDefault&&n.preventDefault(),!0}},p={getAbs:function(e){var t=e.getBoundingClientRect(),n=document.body.scrollTop+document.documentElement.scrollTop,i=document.body.scrollLeft+document.documentElement.scrollLeft;return[t.left+i,t.top+n]},inputFocus:function(e){e.get(0)&&(e.focus(),v.setCursorPosition(e.get(0),e.val().length))},inputSelect:function(e){e.get(0)&&(e.focus(),e.select())},setCursorPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},showIfameMask:function(e,t){for(var n=b.getRoot(e);n.dragMaskList.length>0;)n.dragMaskList[0].remove(),n.dragMaskList.shift();if(t)for(var i=w("iframe",e),o=0,a=i.length;o<a;o++){var r=i.get(o),l=v.getAbs(r),s=w("<div id='zTreeMask_"+o+"' class='zTreeMask' style='top:"+l[1]+"px; left:"+l[0]+"px; width:"+r.offsetWidth+"px; height:"+r.offsetHeight+"px;'></div>",e);s.appendTo(w("body",e)),n.dragMaskList.push(s)}}},f={addEditBtn:function(e,t){if(!(t.editNameFlag||w(t,x.id.EDIT,e).length>0)&&v.apply(e.edit.showRenameBtn,[e.treeId,t],e.edit.showRenameBtn)){var n=w(t,x.id.A,e),i="<span class='"+x.className.BUTTON+" edit' id='"+t.tId+x.id.EDIT+"' title='"+v.apply(e.edit.renameTitle,[e.treeId,t],e.edit.renameTitle)+"' treeNode"+x.id.EDIT+" style='display:none;'></span>";n.append(i),w(t,x.id.EDIT,e).bind("click",function(){return!(!v.uCanDo(e)||0==v.apply(e.callback.beforeEditName,[e.treeId,t],!0))&&(y.editNode(e,t),!1)}).show()}},addRemoveBtn:function(e,t){if(!(t.editNameFlag||w(t,x.id.REMOVE,e).length>0)&&v.apply(e.edit.showRemoveBtn,[e.treeId,t],e.edit.showRemoveBtn)){var n=w(t,x.id.A,e),i="<span class='"+x.className.BUTTON+" remove' id='"+t.tId+x.id.REMOVE+"' title='"+v.apply(e.edit.removeTitle,[e.treeId,t],e.edit.removeTitle)+"' treeNode"+x.id.REMOVE+" style='display:none;'></span>";n.append(i),w(t,x.id.REMOVE,e).bind("click",function(){return!(!v.uCanDo(e)||0==v.apply(e.callback.beforeRemove,[e.treeId,t],!0))&&(y.removeNode(e,t),e.treeObj.trigger(x.event.REMOVE,[e.treeId,t]),!1)}).bind("mousedown",function(e){return!0}).show()}},addHoverDom:function(e,t){b.getRoots().showHoverDom&&(t.isHover=!0,e.edit.enable&&(y.addEditBtn(e,t),y.addRemoveBtn(e,t)),v.apply(e.view.addHoverDom,[e.treeId,t]))},cancelCurEditNode:function(e,t,n){var i=b.getRoot(e),o=e.data.key.name,a=i.curEditNode;if(a){var r=i.curEditInput,l=t?t:n?a[o]:r.val();if(v.apply(e.callback.beforeRename,[e.treeId,a,l,n],!0)===!1)return!1;a[o]=l;var s=w(a,x.id.A,e);s.removeClass(x.node.CURSELECTED_EDIT),r.unbind(),y.setNodeName(e,a),a.editNameFlag=!1,i.curEditNode=null,i.curEditInput=null,y.selectNode(e,a,!1),e.treeObj.trigger(x.event.RENAME,[e.treeId,a,n])}return i.noSelection=!0,!0},editNode:function(e,t){var n=b.getRoot(e);if(y.editNodeBlur=!1,b.isSelectedNode(e,t)&&n.curEditNode==t&&t.editNameFlag)return void setTimeout(function(){v.inputFocus(n.curEditInput)},0);var i=e.data.key.name;t.editNameFlag=!0,y.removeTreeDom(e,t),y.cancelCurEditNode(e),y.selectNode(e,t,!1),w(t,x.id.SPAN,e).html("<input type=text class='rename' id='"+t.tId+x.id.INPUT+"' treeNode"+x.id.INPUT+" >");var o=w(t,x.id.INPUT,e);o.attr("value",t[i]),e.edit.editNameSelectAll?v.inputSelect(o):v.inputFocus(o),o.bind("blur",function(t){y.editNodeBlur||y.cancelCurEditNode(e)}).bind("keydown",function(t){"13"==t.keyCode?(y.editNodeBlur=!0,y.cancelCurEditNode(e)):"27"==t.keyCode&&y.cancelCurEditNode(e,null,!0)}).bind("click",function(e){return!1}).bind("dblclick",function(e){return!1}),w(t,x.id.A,e).addClass(x.node.CURSELECTED_EDIT),n.curEditInput=o,n.noSelection=!1,n.curEditNode=t},moveNode:function(e,t,n,i,o,a){var r=b.getRoot(e),l=e.data.key.children;if(t!=n&&(!e.data.keep.leaf||!t||t.isParent||i!=x.move.TYPE_INNER)){var s=n.parentTId?n.getParentNode():r,d=null===t||t==r;d&&null===t&&(t=r),d&&(i=x.move.TYPE_INNER);var c=t.parentTId?t.getParentNode():r;i!=x.move.TYPE_PREV&&i!=x.move.TYPE_NEXT&&(i=x.move.TYPE_INNER),i==x.move.TYPE_INNER&&(d?n.parentTId=null:(t.isParent||(t.isParent=!0,
t.open=!!t.open,y.setNodeLineIcos(e,t)),n.parentTId=t.tId));var u,h;if(d)u=e.treeObj,h=u;else{if(a||i!=x.move.TYPE_INNER?a||y.expandCollapseNode(e,t.getParentNode(),!0,!1):y.expandCollapseNode(e,t,!0,!1),u=w(t,e),h=w(t,x.id.UL,e),u.get(0)&&!h.get(0)){var p=[];y.makeUlHtml(e,t,p,""),u.append(p.join(""))}h=w(t,x.id.UL,e)}var f=w(n,e);f.get(0)?u.get(0)||f.remove():f=y.appendNodes(e,n.level,[n],null,-1,!1,!0).join(""),h.get(0)&&i==x.move.TYPE_INNER?h.append(f):u.get(0)&&i==x.move.TYPE_PREV?u.before(f):u.get(0)&&i==x.move.TYPE_NEXT&&u.after(f);var g,m,v=-1,C=0,_=null,k=null,I=n.level;if(n.isFirstNode)v=0,s[l].length>1&&(_=s[l][1],_.isFirstNode=!0);else if(n.isLastNode)v=s[l].length-1,_=s[l][v-1],_.isLastNode=!0;else for(g=0,m=s[l].length;g<m;g++)if(s[l][g].tId==n.tId){v=g;break}if(v>=0&&s[l].splice(v,1),i!=x.move.TYPE_INNER)for(g=0,m=c[l].length;g<m;g++)c[l][g].tId==t.tId&&(C=g);if(i==x.move.TYPE_INNER?(t[l]||(t[l]=new Array),t[l].length>0&&(k=t[l][t[l].length-1],k.isLastNode=!1),t[l].splice(t[l].length,0,n),n.isLastNode=!0,n.isFirstNode=1==t[l].length):t.isFirstNode&&i==x.move.TYPE_PREV?(c[l].splice(C,0,n),k=t,k.isFirstNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!0,n.isLastNode=!1):t.isLastNode&&i==x.move.TYPE_NEXT?(c[l].splice(C+1,0,n),k=t,k.isLastNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!0):(i==x.move.TYPE_PREV?c[l].splice(C,0,n):c[l].splice(C+1,0,n),n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!1),b.fixPIdKeyValue(e,n),b.setSonNodeLevel(e,n.getParentNode(),n),y.setNodeLineIcos(e,n),y.repairNodeLevelClass(e,n,I),!e.data.keep.parent&&s[l].length<1){s.isParent=!1,s.open=!1;var T=w(s,x.id.UL,e),N=w(s,x.id.SWITCH,e),E=w(s,x.id.ICON,e);y.replaceSwitchClass(s,N,x.folder.DOCU),y.replaceIcoClass(s,E,x.folder.DOCU),T.css("display","none")}else _&&y.setNodeLineIcos(e,_);k&&y.setNodeLineIcos(e,k),e.check&&e.check.enable&&y.repairChkClass&&(y.repairChkClass(e,s),y.repairParentChkClassWithSelf(e,s),s!=n.parent&&y.repairParentChkClassWithSelf(e,n)),a||y.expandCollapseParentNode(e,n.getParentNode(),!0,o)}},removeEditBtn:function(e,t){w(t,x.id.EDIT,e).unbind().remove()},removeRemoveBtn:function(e,t){w(t,x.id.REMOVE,e).unbind().remove()},removeTreeDom:function(e,t){t.isHover=!1,y.removeEditBtn(e,t),y.removeRemoveBtn(e,t),v.apply(e.view.removeHoverDom,[e.treeId,t])},repairNodeLevelClass:function(e,t,n){if(n!==t.level){var i=w(t,e),o=w(t,x.id.A,e),a=w(t,x.id.UL,e),r=x.className.LEVEL+n,l=x.className.LEVEL+t.level;i.removeClass(r),i.addClass(l),o.removeClass(r),o.addClass(l),a.removeClass(r),a.addClass(l)}},selectNodes:function(e,t){for(var n=0,i=t.length;n<i;n++)y.selectNode(e,t[n],n>0)}},g={tools:p,view:f,event:u,data:c};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,g);var m=e.fn.zTree,v=m._z.tools,x=m.consts,y=m._z.view,b=m._z.data,w=(m._z.event,v.$);b.exSetting(n),b.addInitBind(a),b.addInitUnBind(r),b.addInitCache(o),b.addInitNode(s),b.addInitProxy(l),b.addInitRoot(i),b.addZTreeTools(d);var C=y.cancelPreSelectedNode;y.cancelPreSelectedNode=function(e,t){for(var n=b.getRoot(e).curSelectedList,i=0,o=n.length;i<o&&(t&&t!==n[i]||(y.removeTreeDom(e,n[i]),!t));i++);C&&C.apply(y,arguments)};var _=y.createNodes;y.createNodes=function(e,t,n,i,o){_&&_.apply(y,arguments),n&&y.repairParentChkClassWithSelf&&y.repairParentChkClassWithSelf(e,i)};var k=y.makeNodeUrl;y.makeNodeUrl=function(e,t){return e.edit.enable?null:k.apply(y,arguments)};var I=y.removeNode;y.removeNode=function(e,t){var n=b.getRoot(e);n.curEditNode===t&&(n.curEditNode=null),I&&I.apply(y,arguments)};var T=y.selectNode;y.selectNode=function(e,t,n){var i=b.getRoot(e);return(!b.isSelectedNode(e,t)||i.curEditNode!=t||!t.editNameFlag)&&(T&&T.apply(y,arguments),y.addHoverDom(e,t),!0)};var N=v.uCanDo;v.uCanDo=function(e,t){var n=b.getRoot(e);return!(!t||!(v.eqs(t.type,"mouseover")||v.eqs(t.type,"mouseout")||v.eqs(t.type,"mousedown")||v.eqs(t.type,"mouseup")))||(n.curEditNode&&(y.editNodeBlur=!1,n.curEditInput.focus()),!n.curEditNode&&(!N||N.apply(y,arguments)))}}(jQuery);var _typeof="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};(function(){"use strict";var e=this,t=this,n=t?t.document:null,i=(t?t.document.documentElement:null,/^(["'](\\.|[^"\\\n\r])*?["']|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/),o=/^-ms-/,a=/[\-_]([\da-z])/gi,r=/([A-Z])/g,l=/\./,s=/[-|+]?[\D]/gi,d=/\D/gi,c=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),u=/&/g,h=/=/,p=/[ ]+/g,f={},g=void 0,m=void 0;f.guid=1,f.getGuid=function(){return f.guid++},f.info=g=function(){function e(e,i){return e={href:t.location.href,param:t.location.search,referrer:n.referrer,pathname:t.location.pathname,hostname:t.location.hostname,port:t.location.port},i=e.href.split(/[\?#]/),e.param=e.param.replace("?",""),e.url=i[0],e.href.search("#")>-1&&(e.hashdata=m.last(i)),i=null,e.baseUrl=m.left(e.href,"?").replace(e.pathname,""),e}function i(e,t,n){return g.errorMsg&&g.errorMsg[e]?{className:e,errorCode:t,methodName:n,msg:g.errorMsg[e][t]}:{className:e,errorCode:t,methodName:n}}var o=arguments,a="1.4.117",r="",l=function(){console.error(m.toArray(o).join(":"))},s={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34,INSERT:45,SPACE:32},d=[{label:"SUN"},{label:"MON"},{label:"TUE"},{label:"WED"},{label:"THU"},{label:"FRI"},{label:"SAT"}],c=function(e,n,i,o,a,r){return t&&t.navigator?(e=navigator.userAgent.toLowerCase(),n=e.search(/mobile/g)!=-1,r,e.search(/iphone/g)!=-1?{name:"iphone",version:0,mobile:!0}:e.search(/ipad/g)!=-1?{name:"ipad",version:0,mobile:!0}:e.search(/android/g)!=-1?(o=/(android)[ \/]([\w.]+)/.exec(e)||[],r=o[2]||"0",{name:"android",version:r,mobile:n}):(i="",o=/(opr)[ \/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],a=o[1]||"",r=o[2]||"0","msie"==a&&(a="ie"),{name:a,version:r,mobile:n})):{}}(),u=!("undefined"==typeof window||"undefined"==typeof navigator||!t.document),h=t&&/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel",p={},f=!!t&&("ontouchstart"in t||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),v=!!t&&(t.FileReader&&t.File&&t.FileList&&t.Blob);return{errorMsg:p,version:a,baseUrl:r,onerror:l,eventKeys:s,weekNames:d,browser:c,isBrowser:u,supportTouch:f,supportFileApi:v,wheelEnm:h,urlUtil:e,getError:i}}(),f.util=m=function(){function v(e,t){if(O(e))return[];var n=void 0,i=0,o=e.length,a=void 0===o||"function"==typeof e;if(a){for(n in e)if("undefined"!=typeof e[n]&&t.call(e[n],n,e[n])===!1)break}else for(;i<o&&("undefined"==typeof e[i]||t.call(e[i],i,e[i++])!==!1););return e}function x(e,t){if(O(e))return[];var n=void 0,i=0,o=e.length,a=[],r=void 0;if($(e)){for(n in e)if("undefined"!=typeof e[n]){if(r=void 0,(r=t.call(e[n],n,e[n]))===!1)break;a.push(r)}}else for(;i<o;)if("undefined"!=typeof e[i]){if(r=void 0,(r=t.call(e[i],i,e[i++]))===!1)break;a.push(r)}return a}function y(e,t){if(O(e))return-1;if($(e))for(var n in e){if("undefined"!=typeof e[n]&&P(t)&&t.call(e[n],n,e[n]))return n;if(e[n]==t)return n}else for(var i=0,o=e.length;i<o;i++){if("undefined"!=typeof e[i]&&P(t)&&t.call(e[i],i,e[i]))return i;if(e[i]==t)return i}return-1}function b(e,t,n){var i=void 0,o=void 0,a=void 0;if(P(t)&&"undefined"==typeof n&&(n=t,t=0),"undefined"==typeof t&&(t=0),D(e)){for(i=0,o=e.length;i<o;i++)if("undefined"!=typeof e[i]){if((a=n.call(e[i],e[i]))===!1)break;"undefined"!=typeof a&&(t+=a)}return t}if($(e)){for(i in e)if("undefined"!=typeof e[i]){if((a=n.call(e[i],e[i]))===!1)break;"undefined"!=typeof a&&(t+=a)}return t}return console.error("argument error : ax5.util.sum - use Array or Object"),t}function w(e,t,n){var i=void 0,o=void 0,a=void 0;if(P(t)&&"undefined"==typeof n&&(n=t,t=0),"undefined"==typeof t&&(t=0),D(e)){for(i=0,o=e.length;i<o;i++)if("undefined"!=typeof e[i]){if((a=n.call(e[i],e[i]))===!1)break;"undefined"!=typeof a&&(t+=a)}return t/o}if($(e)){o=0;for(i in e)if("undefined"!=typeof e[i]){if((a=n.call(e[i],e[i]))===!1)break;"undefined"!=typeof a&&(t+=a),++o}return t/o}return console.error("argument error : ax5.util.sum - use Array or Object"),t}function C(t,n){var i,o,a;if(D(t)){for(i=0,o=t.length,a=t[i];i<o-1&&("undefined"==typeof t[i]||(a=n.call(e,a,t[++i]))!==!1););return a}if($(t)){for(i in t)if("undefined"!=typeof t[i]&&(a=n.call(e,a,t[i]))===!1)break;return a}return console.error("argument error : ax5.util.reduce - use Array or Object"),null}function _(t,n){for(var i=t.length-1,o=t[i];i>0&&("undefined"==typeof t[i]||(o=n.call(e,o,t[--i]))!==!1););return o}function k(e,t){if(O(e))return[];var n,i,o=0,a=e.length,r=[];if($(e))for(n in e)"undefined"!=typeof e[n]&&(i=t.call(e[n],n,e[n]))&&r.push(e[n]);else for(;o<a;)"undefined"!=typeof e[o]&&((i=t.call(e[o],o,e[o]))&&r.push(e[o]),o++);return r}function I(e){var t="";if(f.util.isArray(e)){var n=0,i=e.length;for(t+="[";n<i;n++)n>0&&(t+=","),t+=I(e[n]);t+="]"}else if(f.util.isObject(e)){t+="{";var o=[];v(e,function(e,t){o.push('"'+e+'": '+I(t))}),t+=o.join(", "),t+="}"}else t=f.util.isString(e)?'"'+e+'"':f.util.isNumber(e)?e:f.util.isUndefined(e)?"undefined":f.util.isFunction(e)?'"{Function}"':e;return t}function T(e,t){if(!t&&!i.test(e))return{error:500,msg:"syntax error"};try{return new Function("","return "+e)()}catch(n){return{error:500,msg:"syntax error"}}}function N(e){var t;return null!=e&&e==e.window?t="window":e&&1==e.nodeType?t="element":e&&11==e.nodeType?t="fragment":null===e?t="null":"undefined"==typeof e?t="undefined":"[object Object]"==be.call(e)?t="object":"[object Array]"==be.call(e)?t="array":"[object String]"==be.call(e)?t="string":"[object Number]"==be.call(e)?t="number":"[object NodeList]"==be.call(e)?t="nodelist":"function"==typeof e&&(t="function"),t}function E(e){return null!=e&&e==e.window}function S(e){return!(!e||1!=e.nodeType&&11!=e.nodeType)}function $(e){return"[object Object]"==be.call(e)}function D(e){return"[object Array]"==be.call(e)}function P(e){return"function"==typeof e}function R(e){return"[object String]"==be.call(e)}function j(e){return"[object Number]"==be.call(e)}function A(e){return!!("[object NodeList]"==be.call(e)||"undefined"!=typeof e&&e&&e[0]&&1==e[0].nodeType)}function L(e){return"undefined"==typeof e}function O(e){return"undefined"==typeof e||null===e||""===e}function M(e){return e instanceof Date&&!isNaN(e.valueOf())}function z(e){var t=!1;if(e)if(e instanceof Date&&!isNaN(e.valueOf()))t=!0;else{if(e.length>7&&ie(e)instanceof Date)return!0;if(e=e.replace(/\D/g,""),e.length>7){var n=e.substr(4,2),i=e.substr(6,2);e=ie(e),e.getMonth()==n-1&&e.getDate()==i&&(t=!0)}}else;return t}function H(e){if($(e)){var t=Object.keys(e),n={};return n[t[0]]=e[t[0]],n}return D(e)?e[0]:void console.error("ax5.util.object.first","argument type error")}function q(e){if($(e)){var t=Object.keys(e),n={};return n[t[t.length-1]]=e[t[t.length-1]],n}return D(e)?e[e.length-1]:void console.error("ax5.util.object.last","argument type error")}function K(e,t,i,o){var a;return"number"==typeof i&&(a=new Date,a.setDate(a.getDate()+i)),o=o||{},n.cookie=[escape(e),"=",escape(t),a?"; expires="+a.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}function F(e){for(var t=e+"=",i=n.cookie.split(";"),o=0,a=i.length;o<a;o++){for(var r=i[o];" "==r.charAt(0);)r=r.substring(1);if(r.indexOf(t)!=-1)return unescape(r.substring(t.length,r.length))}return""}function Q(e){return t.alert(I(e)),e}function B(e,t){return"undefined"==typeof e||"undefined"==typeof t?"":R(t)?e.indexOf(t)>-1?e.substr(0,e.indexOf(t)):"":j(t)?e.substr(0,t):""}function G(e,t){return"undefined"==typeof e||"undefined"==typeof t?"":(e=""+e,R(t)?e.lastIndexOf(t)>-1?e.substr(e.lastIndexOf(t)+1):"":j(t)?e.substr(e.length-t):"")}function W(e){return e.replace(o,"ms-").replace(a,function(e,t){return t.toUpperCase()})}function V(e){return W(e).replace(r,function(e,t){return"-"+t.toLowerCase()})}function U(e,t){var n,i,o,a=(""+e).split(l);return i=Number(a[0].replace(/,/g,""))<0||"-0"==a[0],o=0,a[0]=a[0].replace(s,""),a[1]?(a[1]=a[1].replace(d,""),o=Number(a[0]+"."+a[1])||0):o=Number(a[0])||0,n=i?-o:o,v(t,function(e,t){"round"==e&&(n=j(t)?t<0?+(Math.round(n+"e-"+Math.abs(t))+"e+"+Math.abs(t)):+(Math.round(n+"e+"+t)+"e-"+t):Math.round(n)),"floor"==e&&(n=Math.floor(n)),"ceil"==e?n=Math.ceil(n):"money"==e?n=function(e){var t=""+e;if(isNaN(t)||""==t)return"";var n=t.split(".");n[0]+=".";do n[0]=n[0].replace(c,"$1,$2");while(c.test(n[0]));return n.length>1?n.join(""):n[0].split(".")[0]}(n):"abs"==e?n=Math.abs(Number(n)):"byte"==e&&(n=function(e){e=Number(n);var t="KB",i=e/1024;return i/1024>1&&(t="MB",i/=1024),i/1024>1&&(t="GB",i/=1024),U(i,{round:1})+t}(n))}),n}function Y(e){return"undefined"!=typeof e.length?Array.prototype.slice.call(e):[]}function X(e,t){var n=t.length,i=e.length,o=0;if("number"==typeof n)for(;o<n;o++)e[i++]=t[o];else for(;void 0!==t[o];)e[i++]=t[o++];return e.length=i,e}function J(e,t){var n;return R(e)&&"undefined"!=typeof t&&"param"==t?e:R(e)&&"undefined"!=typeof t&&"object"==t||R(e)&&"undefined"==typeof t?(n={},v(e.split(u),function(){var e=this.split(h);n[e[0]]?(R(n[e[0]])&&(n[e[0]]=[n[e[0]]]),n[e[0]].push(e[1])):n[e[0]]=e[1]}),n):(n=[],v(e,function(e,t){n.push(e+"="+escape(t))}),n.join("&"))}function Z(e){return encodeURIComponent(e)}function ee(e){return decodeURIComponent(e)}function te(){f.info.onerror.apply(this,arguments)}function ne(e,t,n,i,o,a){var r,l;return l=new Date,t<0&&(t=0),"undefined"==typeof i&&(i=12),"undefined"==typeof o&&(o=0),r=new Date(Date.UTC(e,t,n||1,i,o,a||0)),0==t&&1==n&&r.getUTCHours()+r.getTimezoneOffset()/60<0?r.setUTCHours(0):r.setUTCHours(r.getUTCHours()+r.getTimezoneOffset()/60),r}function ie(e,t){var n=void 0,i=void 0,o=void 0,a=void 0,r=void 0,l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,h=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,p=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(R(e))if(0==e.length)e=new Date;else if(e.length>15)p.test(e)||h.test(e)?e=new Date(e):(l=e.split(/ /g),c=l[0].split(/\D/g),n=c[0],i=parseFloat(c[1]),o=parseFloat(c[2]),d=l[1]||"09:00",s=d.substring(0,5).split(":"),a=parseFloat(s[0]),r=parseFloat(s[1]),"AM"!==G(d,2)&&"PM"!==G(d,2)||(a+=12),e=ne(n,i-1,o,a,r));else if(14==e.length)u=e.replace(/\D/g,""),e=ne(u.substr(0,4),u.substr(4,2)-1,U(u.substr(6,2)),U(u.substr(8,2)),U(u.substr(10,2)),U(u.substr(12,2)));else if(e.length>7)u=e.replace(/\D/g,""),e=ne(u.substr(0,4),u.substr(4,2)-1,U(u.substr(6,2)));else if(e.length>4)u=e.replace(/\D/g,""),e=ne(u.substr(0,4),u.substr(4,2)-1,1);else{if(e.length>2)return u=e.replace(/\D/g,""),ne(u.substr(0,4),u.substr(4,2)-1,1);e=new Date}return"undefined"==typeof t||"undefined"==typeof e?e:("add"in t&&(e=function(e,t){var n=void 0,i=void 0,o=void 0,a=void 0,r=864e5;return"undefined"!=typeof t.d?e.setTime(e.getTime()+t.d*r):"undefined"!=typeof t.m?(n=e.getFullYear(),i=e.getMonth(),o=e.getDate(),n+=parseInt(t.m/12),i+=t.m%12,a=re(n,i),a<o&&(o=a),e=new Date(n,i,o,12)):"undefined"!=typeof t.y?e.setTime(e.getTime()+365*t.y*r):"undefined"!=typeof t.h&&e.setTime(e.getTime()+1e3*t.h*60*60),e}(new Date(e),t.add)),"set"in t&&(e=function(e,t){var n=void 0,i=void 0,o=void 0,a={firstDayOfMonth:function(e){return n=e.getFullYear(),i=e.getMonth(),o=1,new Date(n,i,o,12)},lastDayOfMonth:function(e){return n=e.getFullYear(),i=e.getMonth(),o=re(n,i),new Date(n,i,o,12)}};return t in a?a[t](e):e}(new Date(e),t.set)),"return"in t?function(){var n=t["return"],i=void 0,o=void 0,a=void 0,r=void 0,l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,h=void 0,p=void 0,f=void 0,m=void 0,v=void 0,x=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,k=void 0;return i=e.getUTCFullYear(),o=le(e.getMonth()+1,2),a=le(e.getDate(),2),r=le(e.getHours(),2),l=le(e.getMinutes(),2),s=le(e.getSeconds(),2),d=e.getDay(),c=/[^y]*(yyyy)[^y]*/gi,c.exec(n),u=RegExp.$1,h=/[^m]*(MM)[^m]*/g,h.exec(n),p=RegExp.$1,f=/[^d]*(dd)[^d]*/gi,f.exec(n),m=RegExp.$1,v=/[^h]*(hh)[^h]*/gi,v.exec(n),x=RegExp.$1,y=/[^m]*(mm)[^i]*/g,y.exec(n),b=RegExp.$1,w=/[^s]*(ss)[^s]*/gi,w.exec(n),C=RegExp.$1,_=/[^d]*(dw)[^w]*/gi,_.exec(n),k=RegExp.$1,"yyyy"===u&&(n=n.replace(u,G(i,u.length))),"MM"===p&&(1==p.length&&(o=e.getMonth()+1),n=n.replace(p,o)),"dd"===m&&(1==m.length&&(a=e.getDate()),n=n.replace(m,a)),"hh"===x&&(n=n.replace(x,r)),"mm"===b&&(n=n.replace(b,l)),"ss"===C&&(n=n.replace(C,s)),"dw"==k&&(n=n.replace(k,g.weekNames[d].label)),n}():e)}function oe(e,t){function n(e){return Math.floor(e.getTime()/r)*r}var i,o,a=ie(e),r=864e5,l=new Date;return"undefined"==typeof t?i=U((n(a)-n(l))/r,{floor:!0}):(i=U((n(a)-n(l))/r,{floor:!0}),t.today&&(l=ie(t.today),i=U((n(a)-n(l))/r,{floor:!0})),t.thisYear&&(o=new Date(l.getFullYear(),a.getMonth(),a.getDate()),i=U((n(o)-n(l))/r,{floor:!0}),i<0&&(o=new Date(l.getFullYear()+1,a.getMonth(),a.getDate()),i=U((n(o)-n(l))/r,{floor:!0}))),t.age&&(o=new Date(l.getFullYear(),a.getMonth(),a.getDate()),i=o.getFullYear()-a.getFullYear()),i)}function ae(e){var t=ie(e);return{year:t.getFullYear(),month:t.getMonth()+1,count:parseInt(t.getDate()/7+1)}}function re(e,t){return 3==t||5==t||8==t||10==t?30:1==t?e%4==0&&e%100!=0||e%400==0?29:28:31}function le(e,t,n,i){var o=e.toString(i||10);return se(n||"0",t-o.length)+o}function se(e,t){return t<1?"":new Array(t+1).join(e)}function de(e,t){if(e)for(;function(){var n=!0;if("undefined"==typeof t)e=!!e.parentNode&&e.parentNode;else if(P(t))n=t(e);else if($(t))for(var i in t)if("tagname"===i){if(e.tagName.toLocaleLowerCase()!=t[i]){n=!1;break}}else if("clazz"===i||"class_name"===i){if(!("className"in e)){n=!1;break}for(var o=e.className.split(p),a=!1,r=0;r<o.length;r++)if(o[r]==t[i]){a=!0;break}n=a}else{if(!e.getAttribute){n=!1;break}if(e.getAttribute(i)!=t[i]){n=!1;break}}return!n}();){if(!e.parentNode||!e.parentNode.parentNode){e=!1;break}e=e.parentNode}return e}function ce(e){var t=/\D?(\d+)([a-zA-Z%]*)/i,n=(""+e).match(t),i=n[2]||"px";return n[1]+i}function ue(e){var t;if($(e)){t="";for(var n in e)t+=n+":"+e[n]+";";return t}if(R(e)){t={};var i=e.split(/[ ]*;[ ]*/g);return i.forEach(function(e){if(""!==(e=e.trim())){var n=e.split(/[ ]*:[ ]*/g);t[n[0]]=n[1]}}),t}}function he(e){if(!e)var e=window.event;return e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}function pe(e,t,n){function i(t){var n=h,i=p;return h=p=void 0,x=t,g=e.apply(i,n)}function o(e){return x=e,m=setTimeout(l,t),y?i(e):g}function a(e){var n=e-v,i=e-x,o=t-n;return b?Math.min(o,f-i):o}function r(e){var n=e-v,i=e-x;return void 0===v||n>=t||n<0||b&&i>=f}function l(){var e=Date.now();return r(e)?s(e):void(m=setTimeout(l,a(e)))}function s(e){return m=void 0,w&&h?i(e):(h=p=void 0,g)}function d(){void 0!==m&&clearTimeout(m),x=0,h=v=p=m=void 0}function c(){return void 0===m?g:s(Date.now())}function u(){for(var e=Date.now(),n=r(e),a=arguments.length,s=Array(a),d=0;d<a;d++)s[d]=arguments[d];if(h=s,p=this,v=e,n){if(void 0===m)return o(v);if(b)return m=setTimeout(l,t),i(v)}return void 0===m&&(m=setTimeout(l,t)),g}var h=void 0,p=void 0,f=void 0,g=void 0,m=void 0,v=void 0,x=0,y=!1,b=!1,w=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return t=+t||0,$(n)&&(y=!!n.leading,b="maxWait"in n,f=b?Math.max(+n.maxWait||0,t):f,w="trailing"in n?!!n.trailing:w),u.cancel=d,u.flush=c,u}function fe(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return $(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),pe(e,t,{leading:i,maxWait:t,trailing:o})}function ge(e){var t,n;if("object"==("undefined"==typeof e?"undefined":_typeof(e))){if(m.isArray(e)){n=e.length,t=new Array(n);for(var i=0;i<n;i++)t[i]=ge(e[i]);return t}return jQuery.extend({},e)}return e}function me(e){return"[object String]"!=be.call(e)?e:e?e.replace(/[\<\>\&\"]/gm,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case'"':return"&quot;";default:return e}}):""}function ve(e){return"[object String]"!=be.call(e)?e:e?e.replace(/(&lt;)|(&gt;)|(&amp;)|(&quot;)/gm,function(e){switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&quot;":return'"';default:return e}}):""}function xe(e){return new function(e){this.value=e,this.toString=function(){return this.value},this.format=function(){for(var e=[],t=0,n=arguments.length;t<n;t++)e=e.concat(arguments[t]);return this.value.replace(/{(\d+)}/g,function(t,n){return"undefined"!=typeof e[n]?e[n]:t})},this.escape=function(){return me(this.value)},this.unescape=function(){return ve(this.value)},this.encode=function(){return Z(this.value)},this.decode=function(){return ee(this.value)},this.left=function(e){return B(this.value,e)},this.right=function(e){return G(this.value,e)},this.camelCase=function(){return W(this.value)},this.snakeCase=function(){return V(this.value)}}(e)}function ye(e){function t(e){return"string"==typeof e&&e.indexOf(".")!=-1&&1===parseFloat(e)}function n(e){return"string"==typeof e&&e.indexOf("%")!=-1}function i(e){return e<=1&&(e=100*e+"%"),e}function o(e){return f.util.number(Math.min(255,Math.max(e,0)),{round:2})}function a(e){return le(Math.round(e).toString(16),2)}function r(e,i){t(e)&&(e="100%");var o=n(e);return e=Math.min(i,Math.max(0,parseFloat(e))),o&&(e=parseInt(e*i,10)/100),Math.abs(e-i)<1e-6?1:e%i/parseFloat(i)}function l(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var i,o,a=Math.max(e,t,n),l=Math.min(e,t,n),s=(a+l)/2;if(a==l)i=o=0;else{var d=a-l;switch(o=s>.5?d/(2-a-l):d/(a+l),a){case e:i=(t-n)/d+(t<n?6:0);break;case t:i=(n-e)/d+2;break;case n:i=(e-t)/d+4}i/=6}return{h:i,s:o,l:s}}function s(e,t,n){function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var o=void 0,a=void 0,l=void 0;if(e=r(e,360),t=r(t,100),n=r(n,100),0===t)o=a=l=n;else{var s=n<.5?n*(1+t):n+t-n*t,d=2*n-s;o=i(d,s,e+1/3),a=i(d,s,e),l=i(d,s,e-1/3)}return{r:255*o,g:255*a,b:255*l}}var d=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}(),c=function(e){var t=void 0;return(t=d.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=d.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=d.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=d.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=d.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=d.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=d.hex8.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:parseInt(t[4]/255,16),format:"hex8"}:(t=d.hex6.exec(e))?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),format:"hex"}:(t=d.hex4.exec(e))?{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),a:parseInt(t[4]+""+t[4],16),format:"hex8"}:!!(t=d.hex3.exec(e))&&{r:parseInt(t[1]+""+t[1],16),g:parseInt(t[2]+""+t[2],16),b:parseInt(t[3]+""+t[3],16),format:"hex"}};return new function(e){this._originalValue=e,e=c(e),this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a||1,this._format=e.format,this._hex=a(this.r)+a(this.g)+a(this.b),this.getHexValue=function(){return this._hex},this.lighten=function(e){e=0===e?0:e||10;var t=l(this.r,this.g,this.b),n={};return t.l+=e/100,t.l=Math.min(1,Math.max(0,t.l)),t.h=360*t.h,n=s(t.h,i(t.s),i(t.l)),ye("rgba("+o(n.r)+", "+o(n.g)+", "+o(n.b)+", "+this.a+")")},this.darken=function(e){e=0===e?0:e||10;var t=l(this.r,this.g,this.b),n={};return t.l-=e/100,t.l=Math.min(1,Math.max(0,t.l)),t.h=360*t.h,n=s(t.h,i(t.s),i(t.l)),ye("rgba("+o(n.r)+", "+o(n.g)+", "+o(n.b)+", "+this.a+")")},this.getBrightness=function(){return(299*this.r+587*this.g+114*this.b)/1e3},this.isDark=function(){return this.getBrightness()<128},this.isLight=function(){return!this.isDark()},this.getHsl=function(){var e=l(this.r,this.g,this.b);return e.l=Math.min(1,Math.max(0,e.l)),e.h=360*e.h,{h:e.h,s:e.s,l:e.l}}}(e)}var be=Object.prototype.toString,we=function(){var e={textRange:{selectAll:function(e,t,n){},arr:function(e,t,n){t.moveStart("character",n[0]),t.collapse(),t.moveEnd("character",n[1])},start:function(e,t,n){t.moveStart("character",0),t.collapse()},end:function(e,t,n){t.moveStart("character",t.text.length),t.collapse()}},range:{selectAll:function(e,t,n){t.selectNodeContents(e)},arr:function(e,t,n){$(n[0])?(t.setStart(n[0].node,n[0].offset),t.setEnd(n[1].node,n[1].offset)):(t.setStart(e.firstChild,n[0]),t.setEnd(e.firstChild,n[1]))},start:function(e,t,n){t.selectNodeContents(e),t.collapse(!0)},end:function(e,t,n){t.selectNodeContents(e),t.collapse(!1)}}};return function(t,i){var o,a,r;if(t instanceof jQuery&&(t=t.get(0)),t){if(n.body.createTextRange?(o=document.body.createTextRange(),o.moveToElementText(t),a="textRange"):window.getSelection&&(r=window.getSelection(),o=document.createRange(),a="range"),"undefined"==typeof i)e[a].selectAll.call(this,t,o,i);else if(D(i))e[a].arr.call(this,t,o,i);else for(var l in e[a])if(i==l){e[a][l].call(this,t,o,i);break}n.body.createTextRange?(o.select(),t.focus()):window.getSelection&&(t.focus(),r.removeAllRanges(),r.addRange(o))}}}();return{alert:Q,each:v,map:x,search:y,reduce:C,reduceRight:_,filter:k,sum:b,avg:w,toJson:I,parseJson:T,first:H,last:q,deepCopy:ge,left:B,right:G,getType:N,isWindow:E,isElement:S,isObject:$,isArray:D,isFunction:P,isString:R,isNumber:j,isNodelist:A,isUndefined:L,isNothing:O,setCookie:K,getCookie:F,camelCase:W,snakeCase:V,number:U,toArray:Y,merge:X,param:J,error:te,date:ie,dday:oe,daysOfMonth:re,weeksOfMonth:ae,setDigit:le,times:se,findParentNode:de,cssNumber:ce,css:ue,isDate:M,isDateFormat:z,stopEvent:he,selectRange:we,debounce:pe,throttle:fe,escapeHtml:me,unescapeHtml:ve,string:xe,color:ye}}(),"object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)?module.exports=f:e.ax5=function(){return f}()}).call("undefined"!=typeof window?window:void 0),ax5.def={},ax5.info.errorMsg.ax5dialog={501:"Duplicate call error"},ax5.info.errorMsg.ax5picker={401:"Can not find target element",402:"Can not find boundID",501:"Can not find content key"},ax5.info.errorMsg["single-uploader"]={460:"There are no files to be uploaded.",461:"There is no uploaded files."},ax5.info.errorMsg.ax5calendar={401:"Can not find target element"},ax5.info.errorMsg.ax5formatter={401:"Can not find target element",402:"Can not find boundID",501:"Can not find pattern"},ax5.info.errorMsg.ax5menu={501:"Can not find menu item"},ax5.info.errorMsg.ax5select={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},ax5.info.errorMsg.ax5combobox={401:"Can not find target element",402:"Can not find boundID",501:"Can not find option"},function(){"use strict";var e=this,t=/^\s*|\s*$/g;if(Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(o){if("object"!==("undefined"==typeof o?"undefined":_typeof(o))&&("function"!=typeof o||null===o))throw new TypeError("type err");var a,r,l=[];for(a in o)e.call(o,a)&&l.push(a);if(t)for(r=0;r<i;r++)e.call(o,n[r])&&l.push(n[r]);return l}}()),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(void 0===this||null===this)throw TypeError();var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw TypeError();var i,o=arguments[1];for(i=0;i<n;i++)i in t&&e.call(o,t[i],i,t)}),Function.prototype.bind||(Function.prototype.bind=function(e){function t(){}if("function"!=typeof this)throw TypeError("function");var n=[].slice,i=n.call(arguments,1),o=this,a=function(){return o.apply(this instanceof t?this:e,i.concat(n.call(arguments)))};return t.prototype=o.prototype,a.prototype=new t,a}),function(){if(!document.querySelectorAll&&!document.querySelector&&document.createStyleSheet){var e=document.createStyleSheet(),t=function(t,n){var i,o=document.all,a=o.length,r=[];for(e.addRule(t,"foo:bar"),i=0;i<a&&!("bar"===o[i].currentStyle.foo&&(r.push(o[i]),r.length>n));i+=1);return e.removeRule(0),r};document.querySelectorAll=function(e){return t(e,1/0)},document.querySelector=function(e){return t(e,1)[0]||null}}}(),String.prototype.trim||!function(){String.prototype.trim=function(){return this.replace(t,"")}}(),window.JSON||(window.JSON={parse:function(e){return new Function("","return "+e)()},stringify:function(){var e,t=/["]/g;return e=function(n){var i,o,a;switch(i="undefined"==typeof n?"undefined":_typeof(n)){case"string":return'"'+n.replace(t,'\\"')+'"';case"number":case"boolean":return n.toString();case"undefined":return"undefined";case"function":return'""';case"object":if(!n)return"null";if(i="",n.splice){for(o=0,a=n.length;o<a;o++)i+=","+e(n[o]);return"["+i.substr(1)+"]"}for(o in n)n.hasOwnProperty(o)&&void 0!==n[o]&&"function"!=typeof n[o]&&(i+=',"'+o+'":'+e(n[o]));return"{"+i.substr(1)+"}"}}}()}),function(){if(!document.documentMode||document.documentMode>=9)return!1;var e=Array.prototype.splice;Array.prototype.splice=function(){var t=Array.prototype.slice.call(arguments);return"undefined"==typeof t[1]&&(t[1]=this.length-t[0]),e.apply(this,t)}}(),function(){var e=Array.prototype.slice;try{e.call(document.documentElement)}catch(t){Array.prototype.slice=function(t,n){if(n="undefined"!=typeof n?n:this.length,"[object Array]"===Object.prototype.toString.call(this))return e.call(this,t,n);var i,o,a=[],r=this.length,l=t||0;l=l>=0?l:Math.max(0,r+l);var s="number"==typeof n?Math.min(n,r):r;if(n<0&&(s=r+n),o=s-l,o>0)if(a=new Array(o),this.charAt)for(i=0;i<o;i++)a[i]=this.charAt(l+i);else for(i=0;i<o;i++)a[i]=this[l+i];return a}}}(),function(e){for(var t,n,i={},o=function(){},a="memory".split(","),r="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=a.pop();)e[t]=e[t]||i;for(;n=r.pop();)e[n]=e[n]||o}(window.console||{}),!(window.webkitMatchMedia||window.mozMatchMedia||window.oMatchMedia||window.msMatchMedia||window.matchMedia)){var e=document.getElementsByTagName("html")[0];e.className+=" no-matchmedia"}window.matchMedia||(window.matchMedia=function(){var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null;t.type="text/css",t.id="matchmediajs-test",n.parentNode.insertBefore(t,n),i="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===i.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}()),function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var e=window.matchMedia,t=e("only all").matches,n=!1,i=0,o=[],a=function(t){clearTimeout(i),i=setTimeout(function(){for(var t=0,n=o.length;t<n;t++){var i=o[t].mql,a=o[t].listeners||[],r=e(i.media).matches;if(r!==i.matches){i.matches=r;for(var l=0,s=a.length;l<s;l++)a[l].call(window,i)}}},30)};window.matchMedia=function(i){var r=e(i),l=[],s=0;return r.addListener=function(e){t&&(n||(n=!0,window.addEventListener("resize",a,!0)),0===s&&(s=o.push({mql:r,listeners:l})),l.push(e))},r.removeListener=function(e){for(var t=0,n=l.length;t<n;t++)l[t]===e&&l.splice(t,1);
},r}}();document.getElementsByTagName("html")[0],document.getElementsByTagName("body")[0]}.call(window),ax5.ui=function(){function e(){this.config={},this.name="root",this.setConfig=function(e,t){return jQuery.extend(!0,this.config,e),"undefined"!=typeof t&&t!==!0||this.init(),this},this.init=function(){console.log(this.config)},this.bindWindowResize=function(e){setTimeout(function(){jQuery(window).resize(function(){this.bindWindowResize__&&clearTimeout(this.bindWindowResize__),this.bindWindowResize__=setTimeout(function(){e.call(this)}.bind(this),10)}.bind(this))}.bind(this),100)},this.stopEvent=function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,!1},this.toString=function(){return this.name+"@"+this.version},this.main=function(){}.apply(this,arguments)}function t(e,t){if(!e||!e.className)throw"invalid call";var n=e.classStore?e.classStore:ax5.ui;if(!n)throw"invalid classStore";ax5.def[e.className]={version:ax5.info.version};var i=function(e,t){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2])}},o=function(e,t,n){return n.name=e,n.version=t,n.instanceId=ax5.getGuid(),n},a=function(t){var n=e.superClass?e.superClass:ax5.ui.root;if(!ax5.util.isFunction(n))throw"invalid superClass";n.call(this),t.prototype=new n},r=function l(){if(!(this&&this instanceof l))throw"invalid call";var n=i(t,arguments);return o(e.className,e.version||"",n)};a.call(this,t),n[e.className]=r}return{root:e,addClass:t}}(),function(e,t){t(e.mustache={})}(window.ax5,function(e){function t(e){return"function"==typeof e}function n(e){return g(e)?"array":"undefined"==typeof e?"undefined":_typeof(e)}function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(e,t){return null!=e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))&&t in e}function a(e,t){return m.call(e,t)}function r(e){return!a(v,e)}function l(e){return String(e).replace(/[&<>"'\/]/g,function(e){return x[e]})}function s(t,n){function o(){if(v&&!x)for(;m.length;)delete f[m.pop()];else m=[];v=!1,x=!1}function a(e){if("string"==typeof e&&(e=e.split(b,2)),!g(e)||2!==e.length)throw new Error("Invalid tags: "+e);l=new RegExp(i(e[0])+"\\s*"),s=new RegExp("\\s*"+i(e[1])),h=new RegExp("\\s*"+i("}"+e[1]))}if(!t)return[];var l,s,h,p=[],f=[],m=[],v=!1,x=!1;a(n||e.tags);for(var k,I,T,N,E,S,$=new u(t);!$.eos();){if(k=$.pos,T=$.scanUntil(l))for(var D=0,P=T.length;D<P;++D)N=T.charAt(D),r(N)?m.push(f.length):x=!0,f.push(["text",N,k,k+1]),k+=1,"\n"===N&&o();if(!$.scan(l))break;if(v=!0,I=$.scan(_)||"name",$.scan(y),"="===I?(T=$.scanUntil(w),$.scan(w),$.scanUntil(s)):"{"===I?(T=$.scanUntil(h),$.scan(C),$.scanUntil(s),I="&"):T=$.scanUntil(s),!$.scan(s))throw new Error("Unclosed tag at "+$.pos);if(E=[I,T,k,$.pos],f.push(E),"#"===I||"^"===I)p.push(E);else if("/"===I){if(S=p.pop(),!S)throw new Error('Unopened section "'+T+'" at '+k);if(S[1]!==T)throw new Error('Unclosed section "'+S[1]+'" at '+k)}else"name"===I||"{"===I||"&"===I?x=!0:"="===I&&a(T)}if(S=p.pop())throw new Error('Unclosed section "'+S[1]+'" at '+$.pos);return c(d(f))}function d(e){for(var t,n,i=[],o=0,a=e.length;o<a;++o)t=e[o],t&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(i.push(t),n=t));return i}function c(e){for(var t,n,i=[],o=i,a=[],r=0,l=e.length;r<l;++r)switch(t=e[r],t[0]){case"#":case"^":o.push(t),a.push(t),o=t[4]=[];break;case"/":n=a.pop(),n[5]=t[2],o=a.length>0?a[a.length-1][4]:i;break;default:o.push(t)}return i}function u(e){this.string=e,this.tail=e,this.pos=0}function h(e,t){this.view=e,this.cache={".":this.view,"@each":function(){var e=[];for(var t in this)e.push({"@key":t,"@value":this[t]});return e}},this.parent=t}function p(){this.cache={}}var f=Object.prototype.toString,g=Array.isArray||function(e){return"[object Array]"===f.call(e)},m=RegExp.prototype.test,v=/\S/,x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},y=/\s*/,b=/\s+/,w=/\s*=/,C=/\s*\}/,_=/#|\^|\/|>|\{|&|=|!/;u.prototype.eos=function(){return""===this.tail},u.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},u.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},h.prototype.push=function(e){return new h(e,this)},h.prototype.lookup=function(e){var n,i=this.cache;if(i.hasOwnProperty(e))n=i[e];else{for(var a,r,l=this,s=!1;l;){if(e.indexOf(".")>0)for(n=l.view,a=e.split("."),r=0;null!=n&&r<a.length;)r===a.length-1&&(s=o(n,a[r])),n=n[a[r++]];else n=l.view[e],s=o(l.view,e);if(s)break;l=l.parent}i[e]=n}return t(n)&&(n=n.call(this.view)),n},p.prototype.clearCache=function(){this.cache={}},p.prototype.parse=function(e,t){var n=this.cache,i=n[e];return null==i&&(i=n[e]=s(e,t)),i},p.prototype.render=function(e,t,n){var i=this.parse(e),o=t instanceof h?t:new h(t);return this.renderTokens(i,o,n,e)},p.prototype.renderTokens=function(e,t,n,i){for(var o,a,r,l="",s=0,d=e.length;s<d;++s)r=void 0,o=e[s],a=o[0],"#"===a?r=this.renderSection(o,t,n,i):"^"===a?r=this.renderInverted(o,t,n,i):">"===a?r=this.renderPartial(o,t,n,i):"&"===a?r=this.unescapedValue(o,t):"name"===a?r=this.escapedValue(o,t):"text"===a&&(r=this.rawValue(o)),void 0!==r&&(l+=r);return l},p.prototype.renderSection=function(e,n,i,o){function a(e){return r.render(e,n,i)}var r=this,l="",s=n.lookup(e[1]);if(s){if(g(s))for(var d=0,c=s.length;d<c;++d)s[d]&&("object"===_typeof(s[d])&&(s[d]["@i"]=d,s[d]["@first"]=0===d),l+=this.renderTokens(e[4],n.push(s[d]),i,o));else if("object"===("undefined"==typeof s?"undefined":_typeof(s))||"string"==typeof s||"number"==typeof s)l+=this.renderTokens(e[4],n.push(s),i,o);else if(t(s)){if("string"!=typeof o)throw new Error("Cannot use higher-order sections without the original template");s=s.call(n.view,o.slice(e[3],e[5]),a),null!=s&&(l+=s)}else l+=this.renderTokens(e[4],n,i,o);return l}},p.prototype.renderInverted=function(e,t,n,i){var o=t.lookup(e[1]);if(!o||g(o)&&0===o.length)return this.renderTokens(e[4],t,n,i)},p.prototype.renderPartial=function(e,n,i){if(i){var o=t(i)?i(e[1]):i[e[1]];return null!=o?this.renderTokens(this.parse(o),n,i,o):void 0}},p.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},p.prototype.escapedValue=function(t,n){var i=n.lookup(t[1]);if(null!=i)return e.escape(i)},p.prototype.rawValue=function(e){return e[1]},e.name="mustache.js",e.version="2.1.3",e.tags=["{{","}}"];var k=new p;e.clearCache=function(){return k.clearCache()},e.parse=function(e,t){return k.parse(e,t)},e.render=function(e,t,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+n(e)+'" was given as the first argument for mustache#render(template, view, partials)');return k.render(e,t,i)},e.to_html=function(n,i,o,a){var r=e.render(n,i,o);return t(a)?void a(r):r},e.escape=l,e.Scanner=u,e.Context=h,e.Writer=p}),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"dialog"},function(){var i=function(){var i=this,o=void 0;this.instanceId=ax5.getGuid(),this.config={id:"ax5-dialog-"+this.instanceId,clickEventName:"click",theme:"default",width:300,title:"",msg:"",lang:{ok:"ok",cancel:"cancel"},animateTime:150,autoCloseTime:0},this.activeDialog=null,this.autoCloseTimer=null,this.queue=[],o=this.config;var a=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),t=null,!0},r=function(e,i){var a={dialogId:e,title:i.title||o.title||"",msg:(i.msg||o.msg||"").replace(/\n/g,"<br/>"),input:i.input,btns:i.btns,_crlf:function(){return this.replace(/\n/g,"<br/>")},additionalContent:function(e){return t.isFunction(e)?e.call(i):e}(i.additionalContent)};try{return n.tmpl.get.call(this,"dialogDisplay",a)}finally{a=null}},l=function(e,t){var n={},l=void 0;e.id=e.id||o.id,l={width:e.width},jQuery(document.body).append(r.call(this,e.id,e)),this.dialogConfig=e,this.activeDialog=jQuery("#"+e.id),this.activeDialog.css({width:l.width}),"undefined"==typeof t&&(t=e.callback),e.height=l.height=this.activeDialog.height(),"undefined"==typeof e.position||"center"===e.position?(n.top=jQuery(window).height()/2-l.height/2,n.left=jQuery(window).width()/2-l.width/2):(n.left=e.position.left||0,n.top=e.position.top||0),o.zIndex&&(n["z-index"]=o.zIndex),this.activeDialog.css(n),"prompt"===e.dialogType?this.activeDialog.find("[data-dialog-prompt]").get(0).focus():this.activeDialog.find("[data-dialog-btn]").get(0).focus(),this.activeDialog.find("[data-dialog-btn]").on(o.clickEventName,function(n){d.call(this,n||window.event,e,t)}.bind(this)),jQuery(window).bind("keydown.ax5dialog",function(n){c.call(this,n||window.event,e,t)}.bind(this)),jQuery(window).bind("resize.ax5dialog",function(e){s.call(this,e||window.event)}.bind(this)),a.call(this,e,{self:this,state:"open"}),e.autoCloseTime&&(this.autoCloseTimer=setTimeout(function(){i.close()},e.autoCloseTime)),n=null,l=null},s=function(e){if(!this.activeDialog)return this;var t=i.dialogConfig,n={width:t.width,height:t.height};return"undefined"==typeof t.position||"center"===t.position?(n.top=window.innerHeight/2-n.height/2,n.left=window.innerWidth/2-n.width/2):(n.left=t.position.left||0,n.top=t.position.top||0),n.left<0&&(n.left=0),n.top<0&&(n.top=0),this.activeDialog.css(n),t=null,n=null,this},d=function(e,n,i,o,a){var r=void 0,l=null;if(e.srcElement&&(e.target=e.srcElement),o=t.findParentNode(e.target,function(e){if(e.getAttribute("data-dialog-btn"))return!0})){if(a=o.getAttribute("data-dialog-btn"),r={self:this,key:a,value:n.btns[a],dialogId:n.id,btnTarget:o},"prompt"===n.dialogType){r.input={};for(var s in n.input)if(r.input[s]=this.activeDialog.find("[data-dialog-prompt="+s+"]").val(),n.input[s].required&&(""==r.input[s]||null==r.input[s])){l=s;break}}if(n.btns[a].onClick)n.btns[a].onClick.call(r,a);else if("alert"===n.dialogType)i&&i.call(r,a),this.close({doNotCallback:!0});else if("confirm"===n.dialogType)i&&i.call(r,a),this.close({doNotCallback:!0});else if("prompt"===n.dialogType){if("ok"===a&&l)return this.activeDialog.find('[data-dialog-prompt="'+l+'"]').get(0).focus(),!1;i&&i.call(r,a),this.close({doNotCallback:!0})}}r=null,n=null,i=null,o=null,a=null},c=function(e,t,n,i,o){var a=void 0,r=null;if(e.keyCode==ax5.info.eventKeys.ESC&&this.close(),"prompt"===t.dialogType&&e.keyCode==ax5.info.eventKeys.RETURN){a={self:this,key:o,value:t.btns[o],dialogId:t.id,btnTarget:i},a.input={};for(var l in t.input)if(a.input[l]=this.activeDialog.find("[data-dialog-prompt="+l+"]").val(),t.input[l].required&&(""==a.input[l]||null==a.input[l])){r=l;break}if(r)return a=null,r=null,!1;n&&n.call(a,o),this.close({doNotCallback:!0})}a=null,r=null,t=null,n=null,i=null,o=null};this.init=function(){this.onStateChanged=o.onStateChanged},this.alert=function(e,n,i){return t.isString(e)&&(e={title:o.title,msg:e}),e=jQuery.extend(!0,{},o,e),e.dialogType="alert",e.theme=e.theme||o.theme||"",e.callback=n,"undefined"==typeof e.btns&&(e.btns={ok:{label:o.lang.ok,theme:e.theme}}),this.activeDialog?this.queue.push(e):l.call(this,e,n),this},this.confirm=function(e,n,i){return t.isString(e)&&(e={title:o.title,msg:e}),e=jQuery.extend(!0,{},o,e),e.dialogType="confirm",e.theme=e.theme||o.theme||"",e.callback=n,"undefined"==typeof e.btns&&(e.btns={ok:{label:o.lang.ok,theme:e.theme},cancel:{label:o.lang.cancel}}),this.activeDialog?this.queue.push(e):l.call(this,e,n),this},this.prompt=function(e,n,i){return t.isString(e)&&(e={title:o.title,msg:e}),e=jQuery.extend(!0,{},o,e),e.dialogType="prompt",e.theme=e.theme||o.theme||"",e.callback=n,"undefined"==typeof e.input&&(e.input={value:{label:""}}),"undefined"==typeof e.btns&&(e.btns={ok:{label:o.lang.ok,theme:e.theme},cancel:{label:o.lang.cancel}}),this.activeDialog?this.queue.push(e):l.call(this,e,n),this},this.close=function(e){var t=void 0,n=void 0;return this.activeDialog&&(this.autoCloseTimer&&clearTimeout(this.autoCloseTimer),t=i.dialogConfig,this.activeDialog.addClass("destroy"),jQuery(window).unbind("keydown.ax5dialog"),jQuery(window).unbind("resize.ax5dialog"),setTimeout(function(){this.activeDialog&&(this.activeDialog.remove(),this.activeDialog=null),n={self:this,state:"close",dialogId:t.id},!t.callback||e&&e.doNotCallback||t.callback.call(n),t&&t.onStateChanged?t.onStateChanged.call(n,n):this.onStateChanged&&this.onStateChanged.call(n,n),this.queue&&this.queue.length&&l.call(this,this.queue.shift()),t=null,n=null}.bind(this),o.animateTime)),this},this.main=function(){e.dialog_instance=e.dialog_instance||[],e.dialog_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};return i}()),n=ax5.ui.dialog}(),function(){var e=ax5.ui.dialog,t=function(e){return' \n        <div id="{{dialogId}}" data-dialog-els="root" class="ax5-ui-dialog {{theme}}">\n            <div class="ax-dialog-header" data-dialog-els="header">\n                {{{title}}}\n            </div>\n            <div class="ax-dialog-body" data-dialog-els="body">\n                <div class="ax-dialog-msg">{{{msg}}}</div>\n                \n                {{#input}}\n                <div class="ax-dialog-prompt">\n                    {{#@each}}\n                    <div class="form-group">\n                    {{#@value.label}}\n                    <label>{{#_crlf}}{{{.}}}{{/_crlf}}</label>\n                    {{/@value.label}}\n                    <input type="{{@value.type}}" placeholder="{{@value.placeholder}}" class="form-control {{@value.theme}}" data-dialog-prompt="{{@key}}" style="width:100%;" value="{{@value.value}}" />\n                    {{#@value.help}}\n                    <p class="help-block">{{#_crlf}}{{.}}{{/_crlf}}</p>\n                    {{/@value.help}}\n                    </div>\n                    {{/@each}}\n                </div>\n                {{/input}}\n                \n                <div class="ax-dialog-buttons" data-dialog-els="buttons">\n                    <div class="ax-button-wrap">\n                    {{#btns}}\n                        {{#@each}}\n                        <button type="button" data-dialog-btn="{{@key}}" class="btn btn-{{@value.theme}}">{{@value.label}}</button>\n                        {{/@each}}\n                    {{/btns}}\n                    </div>\n                </div>\n                \n                {{#additionalContent}}\n                <div data-dialog-els="additional-content">{{{.}}}</div>\n                {{/additionalContent}}\n            </div>\n        </div>  \n        '};e.tmpl={dialogDisplay:t,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"mask"},function(){return function(){var i=this,o=void 0;this.instanceId=ax5.getGuid(),this.config={theme:"",target:jQuery(document.body).get(0),animateTime:250},this.maskContent="",this.status="off",o=this.config;var a=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),e=null,t=null,!0},r=function(e){return"undefined"==typeof e.templateName&&(e.templateName="defaultMask"),n.tmpl.get.call(this,e.templateName,e)},l=function(e){this.maskContent=e};this.init=function(){this.onStateChanged=o.onStateChanged,this.onClick=o.onClick,this.config.content&&l.call(this,this.config.content)},this.open=function(e){"on"===this.status&&this.close(),e&&e.content&&l.call(this,e.content),e&&"undefined"==typeof e.templateName&&(e.templateName="defaultMask"),i.maskConfig=jQuery.extend(!0,{},this.config,e);var t=i.maskConfig,n=t.target,o=jQuery(n),s="ax-mask-"+ax5.getGuid(),d=void 0,c={},u={},h=t.templateName,p=r({theme:t.theme,maskId:s,body:this.maskContent,templateName:h});return jQuery(document.body).append(p),n&&n!==jQuery(document.body).get(0)&&(c={position:t.position||"absolute",left:o.offset().left,top:o.offset().top,width:o.outerWidth(),height:o.outerHeight()},o.addClass("ax-masking"),jQuery(window).on("resize.ax5mask-"+this.instanceId,function(e){this.align()}.bind(this))),"undefined"!=typeof i.maskConfig.zIndex&&(c["z-index"]=i.maskConfig.zIndex),this.$mask=d=jQuery("#"+s),this.$target=o,this.status="on",d.css(c),t.onClick&&d.on("click",function(e){u={self:i,state:"open",type:"click"},i.maskConfig.onClick.call(u,u)}),a.call(this,null,{self:this,state:"open"}),e=null,t=null,n=null,o=null,s=null,d=null,c=null,u=null,h=null,p=null,this},this.close=function(e){if(this.$mask){var t=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};e?setTimeout(function(){t.call(this)}.bind(this),e):t.call(this)}return this},this.fadeOut=function(){if(this.$mask){var e=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};this.$mask.addClass("fade-out"),setTimeout(function(){e.call(this)}.bind(this),o.animateTime)}return this},this.align=function(){if(this.maskConfig&&this.maskConfig.target&&this.maskConfig.target!==jQuery(document.body).get(0))try{var e={position:this.maskConfig.position||"absolute",left:this.$target.offset().left,top:this.$target.offset().top,width:this.$target.outerWidth(),height:this.$target.outerHeight()};this.$mask.css(e)}catch(t){}return this},this.pullRequest=function(){console.log("test pullRequest01"),console.log("test pullRequest02")},this.main=function(){e.mask_instance=e.mask_instance||[],e.mask_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.mask}(),function(){var e=ax5.ui.mask,t=function(e){return'\n            <div class="ax-mask {{theme}}" id="{{maskId}}">\n                <div class="ax-mask-bg"></div>\n                <div class="ax-mask-content">\n                    <div class="ax-mask-body">\n                    {{{body}}}\n                    </div>\n                </div>\n            </div>\n        '};e.tmpl={defaultMask:t,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e,t=ax5.ui,n=ax5.util;t.addClass({className:"toast"},function(){var i=function(){var i,o=this,a=0,r=null;this.instanceId=ax5.getGuid(),this.config={clickEventName:"click",theme:"default",width:300,icon:"",closeIcon:"",msg:"",lang:{ok:"ok",cancel:"cancel"},displayTime:3e3,animateTime:250,containerPosition:"bottom-left"},this.toastContainer=null,this.queue=[],i=this.config;var l=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),e=null,t=null,!0},s=function(t,n){var i={toastId:t,theme:n.theme,icon:n.icon,msg:(n.msg||"").replace(/\n/g,"<br/>"),btns:n.btns,closeIcon:n.closeIcon};try{return e.tmpl.get.call(this,"toastDisplay",i)}finally{t=null,i=null}},d=function(e,t){r&&clearTimeout(r);var d,u={width:e.width};return e.id="ax5-toast-"+o.containerId+"-"+ ++a,jQuery("#"+e.id).get(0)?this:("bottom"==n.left(i.containerPosition,"-")?this.toastContainer.append(s(e.id,e)):this.toastContainer.prepend(s(e.id,e)),d=jQuery("#"+e.id),d.css({width:u.width}),e.toastBox=d,this.queue.push(e),l.call(this,e,{self:this,state:"open",toastId:e.id}),"push"===e.toastType?(setTimeout(function(){this.close(e,t)}.bind(this),i.displayTime),d.find("[data-ax-toast-btn]").on(i.clickEventName,function(n){c.call(this,n||window.event,e,d,t)}.bind(this))):"confirm"===e.toastType&&d.find("[data-ax-toast-btn]").on(i.clickEventName,function(n){c.call(this,n||window.event,e,d,t)}.bind(this)),void(u=null))},c=function(e,t,i,o,a,r){if(a=n.findParentNode(e.target,function(e){if(e.getAttribute("data-ax-toast-btn"))return!0})){r=a.getAttribute("data-ax-toast-btn");var l={key:r,value:t.btns?t.btns[r]:r,toastId:t.id,btn_target:a};t.btns&&t.btns[r].onClick?t.btns[r].onClick.call(l,r):"push"===t.toastType?(o&&o.call(l,r),this.close(t,o)):"confirm"===t.toastType&&(o&&o.call(l,r),this.close(t,o))}e=null,t=null,i=null,o=null,a=null,r=null};this.init=function(){this.onStateChanged=i.onStateChanged,o.containerId=ax5.getGuid();var e=[];i.zIndex&&e.push("z-index:"+i.zIndex),jQuery(document.body).append('<div class="ax5-ui-toast-container '+i.containerPosition+'" data-toast-container="'+o.containerId+'" style="'+e.join(";")+'"></div>'),this.toastContainer=jQuery('[data-toast-container="'+o.containerId+'"]')},this.push=function(e,t){return o.containerId||this.init(),n.isString(e)&&(e={title:i.title,msg:e}),e.toastType="push",o.dialogConfig={},jQuery.extend(!0,o.dialogConfig,i,e),e=o.dialogConfig,d.call(this,e,t),e=null,t=null,this},this.confirm=function(e,t){return o.containerId||this.init(),n.isString(e)&&(e={title:i.title,msg:e}),e.toastType="confirm",o.dialogConfig={},jQuery.extend(!0,o.dialogConfig,i,e),e=o.dialogConfig,"undefined"==typeof e.btns&&(e.btns={ok:{label:i.lang.ok,theme:e.theme}}),d.call(this,e,t),e=null,t=null,this},this.close=function(e,t){"undefined"==typeof e&&(e=n.last(this.queue));var o=e.toastBox;return o.addClass("push"==e.toastType?"removed":"destroy"),this.queue=n.filter(this.queue,function(){return e.id!=this.id}),setTimeout(function(){var n={toastId:e.id};o.remove(),t&&t.call(n),n={self:this,state:"close",toastId:e.id},l.call(this,e,n),0===this.queue.length&&(r&&clearTimeout(r),r=setTimeout(function(){0===this.queue.length&&(a=0)}.bind(this),3e3)),n=null,e=null,t=null,o=null}.bind(this),i.animateTime),this},this.main=function(){t.toast_instance=t.toast_instance||[],t.toast_instance.push(this),arguments&&n.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};return i}()),e=ax5.ui.toast}(),function(){var e=ax5.ui.toast,t=function(e){return'\n        <div id="{{toastId}}" data-ax5-ui="toast" class="ax5-ui-toast {{theme}}">\n            {{#icon}}\n            <div class="ax-toast-icon">{{{.}}}</div>\n            {{/icon}}\n            <div class="ax-toast-body">{{{msg}}}</div>\n            {{#btns}}\n            <div class="ax-toast-buttons">\n                <div class="ax-button-wrap">\n                    {{#@each}}\n                    <button type="button" data-ax-toast-btn="{{@key}}" class="btn btn-{{@value.theme}}">{{{@value.label}}}</button>\n                    {{/@each}}\n                </div>\n            </div>\n            {{/btns}}\n            {{^btns}}\n                <a class="ax-toast-close" data-ax-toast-btn="ok">{{{closeIcon}}}</a>\n            {{/btns}}\n            <div style="clear:both;"></div>\n        </div>'};e.tmpl={toastDisplay:t,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"modal"},function(){return function(){var i=this,o=void 0,a={mousedown:ax5.info.supportTouch?"touchstart":"mousedown",mousemove:ax5.info.supportTouch?"touchmove":"mousemove",mouseup:ax5.info.supportTouch?"touchend":"mouseup"},r=function(e){var t=e;return"changedTouches"in e&&e.changedTouches&&(t=e.changedTouches[0]),{clientX:t.clientX,clientY:t.clientY}};this.instanceId=ax5.getGuid(),this.config={id:"ax5-modal-"+this.instanceId,position:{left:"center",top:"middle",margin:10},minimizePosition:"bottom-right",clickEventName:"ontouchstart"in document.documentElement?"touchstart":"click",theme:"default",width:300,height:400,closeToEsc:!0,disableDrag:!1,disableResize:!1,animateTime:250,iframe:!1},this.activeModal=null,this.watingModal=!1,this.$={},o=this.config;var l=function(e,t){var n={resize:function(t){e&&e.onResize?e.onResize.call(t,t):this.onResize&&this.onResize.call(t,t)},move:function(){}};return t.state in n&&n[t.state].call(this,t),e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),!0},s=function(e,t){var i={modalId:e,theme:t.theme,header:t.header,fullScreen:t.fullScreen?"fullscreen":"",styles:"",iframe:t.iframe,iframeLoadingMsg:t.iframeLoadingMsg,disableResize:t.disableResize};return t.zIndex&&(i.styles+="z-index:"+t.zIndex+";"),t.absolute&&(i.styles+="position:absolute;"),i.iframe&&"string"==typeof i.iframe.param&&(i.iframe.param=ax5.util.param(i.iframe.param)),n.tmpl.get.call(this,"content",i,{})},d=function(e,n){var o=void 0;jQuery(document.body).append(s.call(this,e.id,e)),this.activeModal=jQuery("#"+e.id),this.$={root:this.activeModal,header:this.activeModal.find('[data-modal-els="header"]'),body:this.activeModal.find('[data-modal-els="body"]')},e.iframe?(this.$["iframe-wrap"]=this.activeModal.find('[data-modal-els="iframe-wrap"]'),this.$.iframe=this.activeModal.find('[data-modal-els="iframe"]'),this.$["iframe-form"]=this.activeModal.find('[data-modal-els="iframe-form"]'),this.$["iframe-loading"]=this.activeModal.find('[data-modal-els="iframe-loading"]')):this.$["body-frame"]=this.activeModal.find('[data-modal-els="body-frame"]'),this.align(),o={self:this,id:e.id,theme:e.theme,width:e.width,height:e.height,state:"open",$:this.$},e.iframe&&(this.$["iframe-wrap"].css({height:e.height}),this.$.iframe.css({height:e.height}),this.$["iframe-form"].attr({method:e.iframe.method}),this.$["iframe-form"].attr({target:e.id+"-frame"}),this.$["iframe-form"].attr({action:e.iframe.url}),this.$.iframe.on("load",function(){o.state="load",e.iframeLoadingMsg&&this.$["iframe-loading"].hide(),l.call(this,e,o)}.bind(this)),e.iframeLoadingMsg||this.$.iframe.show(),this.$["iframe-form"].submit()),n&&n.call(o,o),this.watingModal||l.call(this,e,o),e.closeToEsc&&jQuery(window).bind("keydown.ax-modal",function(e){u.call(this,e||window.event)}.bind(this)),jQuery(window).bind("resize.ax-modal",function(e){this.align(null,e||window.event)}.bind(this)),this.$.header.off(a.mousedown).off("dragstart").on(a.mousedown,function(n){var o=t.findParentNode(n.target,function(e){if(e.getAttribute("data-modal-header-btn"))return!0});e.isFullScreen||o||1==e.disableDrag||(i.mousePosition=r(n),p.on.call(i)),o&&c.call(i,n||window.event,e)}).on("dragstart",function(e){return t.stopEvent(e.originalEvent),!1}),this.activeModal.off(a.mousedown).off("dragstart").on(a.mousedown,"[data-ax5modal-resizer]",function(t){return!e.disableDrag&&!e.isFullScreen&&(i.mousePosition=r(t),void f.on.call(i,this.getAttribute("data-ax5modal-resizer")))}).on("dragstart",function(e){return t.stopEvent(e.originalEvent),!1})},c=function(e,n,i,o,a){var r=void 0;e.srcElement&&(e.target=e.srcElement),o=t.findParentNode(e.target,function(e){if(e.getAttribute("data-modal-header-btn"))return!0}),o&&(a=o.getAttribute("data-modal-header-btn"),r={self:this,key:a,value:n.header.btns[a],dialogId:n.id,btnTarget:o},n.header.btns[a].onClick&&n.header.btns[a].onClick.call(r,a)),r=null,n=null,i=null,o=null,a=null},u=function(e){e.keyCode==ax5.info.eventKeys.ESC&&this.close()},h={"top-left":function(){this.align({left:"left",top:"top"})},"top-right":function(){this.align({left:"right",top:"top"})},"bottom-left":function(){this.align({left:"left",top:"bottom"})},"bottom-right":function(){this.align({left:"right",top:"bottom"})},"center-middle":function(){this.align({left:"center",top:"middle"})}},p={on:function(){var e=this.activeModal.css("z-index"),t=this.activeModal.position(),n={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()},o={width:jQuery(window).width(),height:jQuery(window).height(),scrollLeft:i.modalConfig.absolute?0:jQuery(document).scrollLeft(),scrollTop:i.modalConfig.absolute?0:jQuery(document).scrollTop()},r=function(e){return i.__dx=e.clientX-i.mousePosition.clientX,i.__dy=e.clientY-i.mousePosition.clientY,l>t.left+i.__dx?i.__dx=-t.left:s<t.left+i.__dx&&(i.__dx=s-t.left),d>t.top+i.__dy?i.__dy=-t.top:c<t.top+i.__dy&&(i.__dy=c-t.top),{left:t.left+i.__dx+o.scrollLeft,top:t.top+i.__dy+o.scrollTop}},l=0,s=o.width-n.width,d=0,c=o.height-n.height;i.__dx=0,i.__dy=0,i.resizerBg=jQuery('<div class="ax5modal-resizer-background" ondragstart="return false;"></div>'),i.resizer=jQuery('<div class="ax5modal-resizer" ondragstart="return false;"></div>'),i.resizerBg.css({zIndex:e}),i.resizer.css({left:t.left+o.scrollLeft,top:t.top+o.scrollTop,width:n.width,height:n.height,zIndex:e+1}),jQuery(document.body).append(i.resizerBg).append(i.resizer),i.activeModal.addClass("draged"),jQuery(document.body).on(a.mousemove+".ax5modal-move-"+this.instanceId,function(e){i.resizer.css(r(e))}).on(a.mouseup+".ax5modal-move-"+this.instanceId,function(e){p.off.call(i)}).on("mouseleave.ax5modal-move-"+this.instanceId,function(e){p.off.call(i)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(){var e=function(){var e=this.resizer.offset();this.modalConfig.absolute||(e.left-=jQuery(document).scrollLeft(),e.top-=jQuery(document).scrollTop()),this.activeModal.css(e),this.modalConfig.left=e.left,this.modalConfig.top=e.top,e=null};this.activeModal.removeClass("draged"),e.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,jQuery(document.body).off(a.mousemove+".ax5modal-move-"+this.instanceId).off(a.mouseup+".ax5modal-move-"+this.instanceId).off("mouseleave.ax5modal-move-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart"),l.call(this,i.modalConfig,{self:this,state:"move"})}},f={on:function(e){var t=this.activeModal.css("z-index"),n=this.activeModal.position(),o={width:this.activeModal.outerWidth(),height:this.activeModal.outerHeight()},r={width:jQuery(window).width(),height:jQuery(window).height(),scrollLeft:this.modalConfig.absolute?0:jQuery(document).scrollLeft(),scrollTop:this.modalConfig.absolute?0:jQuery(document).scrollTop()},l={top:function(e){return c>o.height-i.__dy&&(i.__dy=o.height-c),e.shiftKey?(c>o.height-2*i.__dy&&(i.__dy=(o.height-c)/2),{left:n.left,top:n.top+i.__dy,width:o.width,height:o.height-2*i.__dy}):e.altKey?(c>o.height-2*i.__dy&&(i.__dy=(o.height-c)/2),{left:n.left+i.__dy,top:n.top+i.__dy,width:o.width-2*i.__dy,height:o.height-2*i.__dy}):{left:n.left,top:n.top+i.__dy,width:o.width,height:o.height-i.__dy}},bottom:function(e){return c>o.height+i.__dy&&(i.__dy=-o.height+c),e.shiftKey?(c>o.height+2*i.__dy&&(i.__dy=(-o.height+c)/2),{left:n.left,top:n.top-i.__dy,width:o.width,height:o.height+2*i.__dy}):e.altKey?(c>o.height+2*i.__dy&&(i.__dy=(-o.height+c)/2),{left:n.left-i.__dy,top:n.top-i.__dy,width:o.width+2*i.__dy,height:o.height+2*i.__dy}):{left:n.left,top:n.top,width:o.width,height:o.height+i.__dy}},left:function(e){return d>o.width-i.__dx&&(i.__dx=o.width-d),e.shiftKey?(d>o.width-2*i.__dx&&(i.__dx=(o.width-d)/2),{left:n.left+i.__dx,top:n.top,width:o.width-2*i.__dx,height:o.height}):e.altKey?(d>o.width-2*i.__dx&&(i.__dx=(o.width-d)/2),{left:n.left+i.__dx,top:n.top+i.__dx,width:o.width-2*i.__dx,height:o.height-2*i.__dx}):{left:n.left+i.__dx,top:n.top,width:o.width-i.__dx,height:o.height}},right:function(e){return d>o.width+i.__dx&&(i.__dx=-o.width+d),e.shiftKey?(d>o.width+2*i.__dx&&(i.__dx=(-o.width+d)/2),{left:n.left-i.__dx,top:n.top,width:o.width+2*i.__dx,height:o.height}):e.altKey?(d>o.width+2*i.__dx&&(i.__dx=(-o.width+d)/2),{left:n.left-i.__dx,top:n.top-i.__dx,width:o.width+2*i.__dx,height:o.height+2*i.__dx}):{left:n.left,top:n.top,width:o.width+i.__dx,height:o.height}},"top-left":function(e){return d>o.width-i.__dx&&(i.__dx=o.width-d),c>o.height-i.__dy&&(i.__dy=o.height-c),e.shiftKey||e.altKey?(c>o.height-2*i.__dy&&(i.__dy=(o.height-c)/2),d>o.width-2*i.__dx&&(i.__dx=(o.width-d)/2),{left:n.left+i.__dx,top:n.top+i.__dy,width:o.width-2*i.__dx,height:o.height-2*i.__dy}):(c>o.height-2*i.__dy&&(i.__dy=(o.height-c)/2),d>o.width-2*i.__dx&&(i.__dx=(o.width-d)/2),{left:n.left+i.__dx,top:n.top+i.__dy,width:o.width-i.__dx,height:o.height-i.__dy})},"top-right":function(e){return d>o.width+i.__dx&&(i.__dx=-o.width+d),c>o.height-i.__dy&&(i.__dy=o.height-c),e.shiftKey||e.altKey?(c>o.height-2*i.__dy&&(i.__dy=(o.height-c)/2),
d>o.width+2*i.__dx&&(i.__dx=(-o.width+d)/2),{left:n.left-i.__dx,top:n.top+i.__dy,width:o.width+2*i.__dx,height:o.height-2*i.__dy}):{left:n.left,top:n.top+i.__dy,width:o.width+i.__dx,height:o.height-i.__dy}},"bottom-left":function(e){return d>o.width-i.__dx&&(i.__dx=o.width-d),c>o.height+i.__dy&&(i.__dy=-o.height+c),e.shiftKey||e.altKey?(d>o.width-2*i.__dx&&(i.__dx=(o.width-d)/2),c>o.height+2*i.__dy&&(i.__dy=(-o.height+c)/2),{left:n.left+i.__dx,top:n.top-i.__dy,width:o.width-2*i.__dx,height:o.height+2*i.__dy}):{left:n.left+i.__dx,top:n.top,width:o.width-i.__dx,height:o.height+i.__dy}},"bottom-right":function(e){return d>o.width+i.__dx&&(i.__dx=-o.width+d),c>o.height+i.__dy&&(i.__dy=-o.height+c),e.shiftKey||e.altKey?(d>o.width+2*i.__dx&&(i.__dx=(-o.width+d)/2),c>o.height+2*i.__dy&&(i.__dy=(-o.height+c)/2),{left:n.left-i.__dx,top:n.top-i.__dy,width:o.width+2*i.__dx,height:o.height+2*i.__dy}):{left:n.left,top:n.top,width:o.width+i.__dx,height:o.height+i.__dy}}},s=function(t){return i.__dx=t.clientX-i.mousePosition.clientX,i.__dy=t.clientY-i.mousePosition.clientY,l[e](t)};this.modalConfig.absolute||(n.left+=r.scrollLeft,n.top+=r.scrollTop);var d=100,c=100,u={top:"row-resize",bottom:"row-resize",left:"col-resize",right:"col-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"};i.__dx=0,i.__dy=0,i.resizerBg=jQuery('<div class="ax5modal-resizer-background" ondragstart="return false;"></div>'),i.resizer=jQuery('<div class="ax5modal-resizer" ondragstart="return false;"></div>'),i.resizerBg.css({zIndex:t,cursor:u[e]}),i.resizer.css({left:n.left,top:n.top,width:o.width,height:o.height,zIndex:t+1,cursor:u[e]}),jQuery(document.body).append(i.resizerBg).append(i.resizer),i.activeModal.addClass("draged"),jQuery(document.body).bind(a.mousemove+".ax5modal-resize-"+this.instanceId,function(e){i.resizer.css(s(e))}).bind(a.mouseup+".ax5modal-resize-"+this.instanceId,function(e){f.off.call(i)}).bind("mouseleave.ax5modal-resize-"+this.instanceId,function(e){f.off.call(i)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").bind("selectstart",!1)},off:function(){var e=function(){var e=this.resizer.offset();jQuery.extend(e,{width:this.resizer.width(),height:this.resizer.height()}),this.modalConfig.absolute||(e.left-=jQuery(document).scrollLeft(),e.top-=jQuery(document).scrollTop()),this.activeModal.css(e),this.modalConfig.left=e.left,this.modalConfig.top=e.top,this.modalConfig.width=e.width,this.modalConfig.height=e.height,this.$.body.css({height:e.height-this.modalConfig.headerHeight}),this.modalConfig.iframe&&(this.$["iframe-wrap"].css({height:e.height-this.modalConfig.headerHeight}),this.$.iframe.css({height:e.height-this.modalConfig.headerHeight})),e=null};this.activeModal.removeClass("draged"),e.call(this),this.resizer.remove(),this.resizer=null,this.resizerBg.remove(),this.resizerBg=null,l.call(this,i.modalConfig,{self:this,state:"resize"}),jQuery(document.body).unbind(a.mousemove+".ax5modal-resize-"+this.instanceId).unbind(a.mouseup+".ax5modal-resize-"+this.instanceId).unbind("mouseleave.ax5modal-resize-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").unbind("selectstart")}};this.init=function(){this.onStateChanged=o.onStateChanged,this.onResize=o.onResize},this.open=function(e,t,n){return"undefined"==typeof n&&(n=0),this.activeModal?n<3?(this.watingModal=!0,setTimeout(function(){this.open(e,t,n+1)}.bind(this),o.animateTime)):this.watingModal=!1:(e=i.modalConfig=jQuery.extend(!0,{},o,e),d.call(this,e,t),this.watingModal=!1),this},this.close=function(e){var n=void 0,a=void 0;return this.activeModal&&(n=i.modalConfig,this.activeModal.addClass("destroy"),jQuery(window).unbind("keydown.ax-modal"),jQuery(window).unbind("resize.ax-modal"),setTimeout(function(){if(n.iframe){var i=this.$.iframe;if(i){var o=i.get(0),r=o.contentDocument?o.contentDocument:o.contentWindow.document;try{$(r.body).children().each(function(){$(this).remove()})}catch(s){}r.innerHTML="",i.attr("src","about:blank").remove(),window.CollectGarbage&&window.CollectGarbage()}}this.activeModal.remove(),this.activeModal=null,this.watingModal||l.call(this,n,{self:this,state:"close"}),e&&t.isFunction(e.callback)&&(a={self:this,id:n.id,theme:n.theme,width:n.width,height:n.height,state:"close",$:this.$},e.callback.call(a,a))}.bind(this),o.animateTime)),this.minimized=!1,this},this.minimize=function(){return function(e){if(this.minimized!==!0){var t=i.modalConfig;"undefined"==typeof e&&(e=o.minimizePosition),this.minimized=!0,this.$.body.hide(),i.modalConfig.originalHeight=t.height,i.modalConfig.height=0,h[e].call(this),l.call(this,t,{self:this,state:"minimize"})}return this}}(),this.restore=function(){var e=i.modalConfig;return this.minimized&&(this.minimized=!1,this.$.body.show(),i.modalConfig.height=i.modalConfig.originalHeight,i.modalConfig.originalHeight=void 0,this.align({left:"center",top:"middle"}),l.call(this,e,{self:this,state:"restore"})),this},this.css=function(e){return this.activeModal&&!i.fullScreen&&(this.activeModal.css(e),"undefined"!=typeof e.width&&(i.modalConfig.width=e.width),"undefined"!=typeof e.height&&(i.modalConfig.height=e.height),this.align()),this},this.setModalConfig=function(e){return i.modalConfig=jQuery.extend({},i.modalConfig,e),this.align(),this},this.align=function(){return function(e,n){if(!this.activeModal)return this;var o=i.modalConfig,a={width:o.width,height:o.height},r=o.isFullScreen=function(e){return"undefined"!=typeof e&&(t.isFunction(e)?e():void 0)}(o.fullScreen);return r?(o.header&&this.$.header.show(),o.header?(o.headerHeight=this.$.header.outerHeight(),a.height+=o.headerHeight):o.headerHeight=0,a.width=jQuery(window).width(),a.height=o.height,a.left=0,a.top=0):(o.header&&this.$.header.show(),e&&jQuery.extend(!0,o.position,e),o.header?(o.headerHeight=this.$.header.outerHeight(),a.height+=o.headerHeight):o.headerHeight=0,"left"==o.position.left?a.left=o.position.margin||0:"right"==o.position.left?a.left=jQuery(window).width()-a.width-(o.position.margin||0):"center"==o.position.left?a.left=jQuery(window).width()/2-a.width/2:a.left=o.position.left||0,"top"==o.position.top?a.top=o.position.margin||0:"bottom"==o.position.top?a.top=jQuery(window).height()-a.height-(o.position.margin||0):"middle"==o.position.top?a.top=jQuery(window).height()/2-a.height/2:a.top=o.position.top||0,a.left<0&&(a.left=0),a.top<0&&(a.top=0)),this.activeModal.css(a),this.$.body.css({height:a.height-(o.headerHeight||0)}),o.iframe&&(this.$["iframe-wrap"].css({height:a.height-o.headerHeight}),this.$.iframe.css({height:a.height-o.headerHeight})),this}}(),this.main=function(){e.modal_instance=e.modal_instance||[],e.modal_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.modal}(),function(){var e=ax5.ui.modal,t=function(){return' \n        <div id="{{modalId}}" data-modal-els="root" class="ax5modal {{theme}} {{fullscreen}}" style="{{styles}}">\n            {{#header}}\n            <div class="ax-modal-header" data-modal-els="header">\n                {{{title}}}\n                {{#btns}}\n                    <div class="ax-modal-header-addon">\n                    {{#@each}}\n                    <button tabindex="-1" data-modal-header-btn="{{@key}}" class="{{@value.theme}}">{{{@value.label}}}</button>\n                    {{/@each}}\n                    </div>\n                {{/btns}}\n            </div>\n            {{/header}}\n            <div class="ax-modal-body" data-modal-els="body">\n            {{#iframe}}\n                <div data-modal-els="iframe-wrap" style="-webkit-overflow-scrolling: touch; overflow: auto;position: relative;">\n                    <table data-modal-els="iframe-loading" style="width:100%;height:100%;"><tr><td style="text-align: center;vertical-align: middle">{{{iframeLoadingMsg}}}</td></tr></table>\n                    <iframe name="{{modalId}}-frame" src="" width="100%" height="100%" frameborder="0" data-modal-els="iframe" style="position: absolute;left:0;top:0;"></iframe>\n                </div>\n                <form name="{{modalId}}-form" data-modal-els="iframe-form">\n                <input type="hidden" name="modalId" value="{{modalId}}" />\n                {{#param}}\n                {{#@each}}\n                <input type="hidden" name="{{@key}}" value="{{@value}}" />\n                {{/@each}}\n                {{/param}}\n                </form>\n            {{/iframe}}\n            {{^iframe}}\n                <div data-modal-els="body-frame" style="position: absolute;left:0;top:0;width:100%;height:100%;"></div>\n            {{/iframe}}\n            </div>\n            {{^disableResize}}\n            <div data-ax5modal-resizer="top"></div>\n            <div data-ax5modal-resizer="right"></div>\n            <div data-ax5modal-resizer="bottom"></div>\n            <div data-ax5modal-resizer="left"></div>\n            <div data-ax5modal-resizer="top-left"></div>\n            <div data-ax5modal-resizer="top-right"></div>\n            <div data-ax5modal-resizer="bottom-left"></div>\n            <div data-ax5modal-resizer="bottom-right"></div>\n            {{/disableResize}}\n        </div>\n        '};e.tmpl={content:t,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"calendar"},function(){return function(){var i=this,o=void 0,a=1;this.instanceId=ax5.getGuid(),this.target=null,this.selection=[],this.selectionMap={},this.selectableMap={},this.markerMap={},this.printedDay={start:"",end:""},this.config={clickEventName:"click",theme:"default",startOfWeek:0,mode:"day",dateFormat:"yyyy-MM-dd",displayDate:new Date,animateTime:100,dimensions:{controlHeight:"40",controlButtonWidth:"40",colHeadHeight:"30",itemPadding:2},lang:{yearHeading:"Choose the year",monthHeading:"Choose the month",yearTmpl:"%s",months:ax5.info.months||["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],dayTmpl:"%s"},multipleSelect:!1,selectMode:"day",defaultMarkerTheme:"holiday",defaultPeriodTheme:"period"},o=this.config;var r=function(e,t){e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),t=null},l=function(){var e=jQuery.extend(!0,{},o,{controlCSS:{},controlButtonCSS:{}});e.controlButtonCSS.height=e.controlCSS.height=t.cssNumber(o.dimensions.controlHeight),e.controlButtonCSS["line-height"]=e.controlCSS["line-height"]=t.cssNumber(o.dimensions.controlHeight),e.controlButtonCSS.width=t.cssNumber(o.dimensions.controlHeight),e.controlCSS=t.css(e.controlCSS),e.controlButtonCSS=t.css(e.controlButtonCSS);try{return n.tmpl.get.call(this,"frameTmpl",e)}finally{e=null}},s=function(){var e,n,i=t.date(o.displayDate),a="",r="";return o.control&&("day"==o.mode||"d"==o.mode?(a=o.control.yearTmpl?o.control.yearTmpl.replace("%s",i.getFullYear()):i.getFullYear(),r=o.control.monthTmpl?o.control.monthTmpl.replace("%s",o.lang.months[i.getMonth()]):o.lang.months[i.getMonth()],this.$["control-display"].html(function(){return o.control.yearFirst?'<span data-calendar-display="year">'+a+'</span><span data-calendar-display="month">'+r+"</span>":'<span data-calendar-display="month">'+r+'</span><span data-calendar-display="year">'+a+"</span>"}())):"month"==o.mode||"m"==o.mode?(a=o.control.yearTmpl?o.control.yearTmpl.replace("%s",i.getFullYear()):i.getFullYear(),this.$["control-display"].html('<span data-calendar-display="year">'+a+"</span>")):"year"!=o.mode&&"y"!=o.mode||(e=o.control.yearTmpl?o.control.yearTmpl.replace("%s",i.getFullYear()-10):i.getFullYear()-10,n=o.control.yearTmpl?o.control.yearTmpl.replace("%s",Number(i.getFullYear())+9):Number(i.getFullYear())+9,this.$["control-display"].html(e+" ~ "+n)),this.$["control-display"].find("[data-calendar-display]").on(o.clickEventName,function(e){var n,i=t.findParentNode(e.target,function(e){if(e.getAttribute("data-calendar-display"))return!0});i&&(n=i.getAttribute("data-calendar-display"),this.changeMode(n)),i=null,n=null}.bind(this))),i=null,a=null,r=null,e=null,n=null,this},d=function(e){var a,l,d,c,u,p,f=t.date(e),g=new Date(f.getFullYear(),f.getMonth(),1,12),m=o.displayDate,v=function(){var e=g.getDay();0==e&&(e=7),e-=o.startOfWeek;try{return t.date(g,{add:{d:-e}})}finally{e=null}}(),x=f.getMonth(),y={},b=this.$.body.width(),w=Math.floor(b*(6/7));for(o.dimensions.height&&(w=t.number(o.dimensions.height)-t.number(o.dimensions.colHeadHeight)),y.height=Math.floor(w/6)-2*t.number(o.dimensions.itemPadding)+"px",y["line-height"]=y.height,y.padding=t.cssNumber(o.dimensions.itemPadding),u={weekNames:[].concat(ax5.info.weekNames),list:[]},o.startOfWeek&&(u.weekNames=u.weekNames.concat(u.weekNames.slice(0,o.startOfWeek)).splice(o.startOfWeek)),u.weekNames.forEach(function(e){e.colHeadHeight=t.cssNumber(o.dimensions.colHeadHeight)}),a=v,l=0;l<6;){for(d=0;d<7;){c=(7+(d-o.startOfWeek))%7;var C=""+t.date(a,{"return":o.dateFormat}),_={row:l,col:d,isStartOfWeek:0==d,thisDate:""+C,thisDataLabel:o.lang.dayTmpl.replace("%s",a.getDate()),itemStyles:t.css(y),addClass:function(){var e="";return o.selectable?e+=i.selectableMap[C]?a.getMonth()==x?" live":"":" disable":a.getMonth()==x&&(e+=C==t.date(m,{"return":"yyyyMMdd"})?" focus":" live",0==a.getDay()&&(e+=" sunday"),6==a.getDay()&&(e+=" saturday")),e}()+" "+function(){return i.markerMap[C]?i.markerMap[C].theme||o.defaultMarkerTheme:""}()+" "+function(){return i.selectionMap[C]?"selected-day":""}()};u.list.push(_),d++,a=t.date(a,{add:{d:1}}),C=null,_=null}l++}p=n.tmpl.get.call(this,"dayTmpl",u),this.$.body.html(p),this.$.body.find("[data-calendar-item-date]").on(o.clickEventName,function(e){e=e||window.event,h.call(i,e,"date"),t.stopEvent(e)}),this.printedDay={start:v,end:a},r.call(this,null,{self:this,action:"printDay",printedDay:this.printedDay}),s.call(this),f=null,g=null,m=null,v=null,a=null,x=null,y=null,l=null,d=null,b=null,w=null,u=null,p=null},c=function(e){var a,l,d,c,u,p,f=t.date(e),g=f.getMonth(),m={},v=this.$.body.width(),x=Math.floor(v*(6/7));for(o.dimensions.height&&(x=t.number(o.dimensions.height)-t.number(o.dimensions.colHeadHeight)),m.height=Math.floor(x/4)-2*t.number(o.dimensions.itemPadding)+"px",m["line-height"]=m.height,m.padding=t.cssNumber(o.dimensions.itemPadding),u={colHeadHeight:t.cssNumber(o.dimensions.colHeadHeight),colHeadLabel:o.lang.monthHeading,list:[]},c=0,d=0,a=0;a<4;){for(l=0;l<3;){var y={row:a,col:l,isStartOfRow:0==l,thisMonth:f.getFullYear()+"-"+t.setDigit(d+1,2)+"-"+t.setDigit(f.getDate(),2),thisMonthLabel:o.lang.months[d],itemStyles:t.css(m),addClass:function(){return o.selectable?i.selectableMap[d]?"live":"disable":"live"}()+" "+function(){return d==g?"focus":""}()+" "+function(){return i.markerMap[d]?i.markerMap[d].theme||o.defaultMarkerTheme:""}()};u.list.push(y),d++,l++,y=null}a++}p=n.tmpl.get.call(this,"monthTmpl",u),this.$.body.html(p),this.$.body.find("[data-calendar-item-month]").on(o.clickEventName,function(e){e=e||window.event,h.call(i,e,"month"),t.stopEvent(e)}),this.printedDay={start:f.getFullYear()+"-"+t.setDigit(c+1,2),end:f.getFullYear()+"-"+t.setDigit(d,2)},r.call(this,null,{self:this,action:"printMonth",printedDay:this.printedDay}),s.call(this),f=null,g=null,m=null,a=null,l=null,d=null,c=null,v=null,x=null,u=null,p=null},u=function(e){var a,l,d,c,u,p,f=t.date(e),g=f.getFullYear(),m={},v=this.$.body.width(),x=Math.floor(v*(6/7));for(o.dimensions.height&&(x=t.number(o.dimensions.height)-t.number(o.dimensions.colHeadHeight)),m.height=Math.floor(x/5)-2*t.number(o.dimensions.itemPadding)+"px",m["line-height"]=m.height,m.padding=t.cssNumber(o.dimensions.itemPadding),u={colHeadHeight:t.cssNumber(o.dimensions.colHeadHeight),colHeadLabel:o.lang.yearHeading,list:[]},c=g-10,d=g-10,a=0;a<5;){for(l=0;l<4;){var y={row:a,col:l,isStartOfRow:0==l,thisYear:d+"-"+t.setDigit(f.getMonth()+1,2)+"-"+t.setDigit(f.getDate(),2),thisYearLabel:o.lang.yearTmpl.replace("%s",d),itemStyles:t.css(m),addClass:function(){return o.selectable?i.selectableMap[d]?"live":"disable":"live"}()+" "+function(){return d==g?"focus":""}()+" "+function(){return i.selectableMap[d]?i.selectableMap[d].theme||o.defaultMarkerTheme:""}()};u.list.push(y),d++,l++,y=null}a++}p=n.tmpl.get.call(this,"yearTmpl",u),this.$.body.html(p),this.$.body.find("[data-calendar-item-year]").on(o.clickEventName,function(e){e=e||window.event,h.call(this,e,"year"),t.stopEvent(e)}),this.printedDay={start:c,end:d-1},r.call(this,null,{self:this,action:"printYear",printedDay:this.printedDay}),s.call(this),f=null,g=null,m=null,a=null,l=null,d=null,c=null,v=null,x=null,u=null,p=null},h=function(e,n,r,l){var s,d,c;n=n||"date",r=t.findParentNode(e.target,function(e){if(e.getAttribute("data-calendar-item-"+n))return!0}),r&&(l=r.getAttribute("data-calendar-item-"+n),d=t.date(l,{"return":o.dateFormat}),c=!0,a=o.multipleSelect?t.isNumber(o.multipleSelect)?o.multipleSelect:2:1,o.selectable&&(i.selectableMap[d]||(c=!1)),"date"==n?c&&(i.selection.length>=a&&(s=i.selection.splice(0,i.selection.length-(a-1)),s.forEach(function(e){i.$.body.find('[data-calendar-item-date="'+t.date(e,{"return":o.dateFormat})+'"]').removeClass("selected-day")})),jQuery(r).addClass("selected-day"),i.selection.push(l),i.onClick&&i.onClick.call({self:this,date:l,target:this.target,dateElement:r})):"month"==n?"month"==o.selectMode?c&&(i.selection.length>=a&&(s=i.selection.splice(0,i.selection.length-(a-1)),s.forEach(function(e){i.$.body.find('[data-calendar-item-month="'+t.date(e,{"return":"yyyy-MM-dd"})+'"]').removeClass("selected-month")})),jQuery(r).addClass("selected-month"),i.selection.push(l),i.onClick&&i.onClick.call({self:this,date:l,target:this.target,dateElement:r})):i.changeMode("day",l):"year"==n&&("year"==o.selectMode?c&&(i.selection.length>=a&&(s=i.selection.splice(0,i.selection.length-(a-1)),s.forEach(function(e){i.$.body.find('[data-calendar-item-year="'+t.date(e,{"return":"yyyy-MM-dd"})+'"]').removeClass("selected-year")})),jQuery(r).addClass("selected-year"),i.selection.push(l),i.onClick&&i.onClick.call({self:this,date:l,target:this.target,dateElement:r})):i.changeMode("month",l))),n=null,r=null,l=null,s=null,d=null,c=null},p=function(e,n,i){n=t.findParentNode(e.target,function(e){if(e.getAttribute("data-calendar-move"))return!0}),n&&(i=n.getAttribute("data-calendar-move"),"day"==o.mode||"d"==o.mode?("left"==i?o.displayDate=t.date(o.displayDate,{add:{m:-1}}):o.displayDate=t.date(o.displayDate,{add:{m:1}}),d.call(this,o.displayDate)):"month"==o.mode||"m"==o.mode?("left"==i?o.displayDate=t.date(o.displayDate,{add:{y:-1}}):o.displayDate=t.date(o.displayDate,{add:{y:1}}),c.call(this,o.displayDate)):"year"!=o.mode&&"y"!=o.mode||("left"==i?o.displayDate=t.date(o.displayDate,{add:{y:-10}}):o.displayDate=t.date(o.displayDate,{add:{y:10}}),u.call(this,o.displayDate))),n=null,i=null},f=function(){setTimeout(function(){if("day"===o.mode||"d"===o.mode)for(var e in this.markerMap)this.$.body.find('[data-calendar-item-date="'+e+'"]').addClass(this.markerMap[e].theme||o.defaultMarkerTheme)}.bind(this))},g=function(){setTimeout(function(){for(var e in this.selectionMap)this.$.body.find('[data-calendar-item-date="'+e+'"]').addClass("selected-day")}.bind(this))},m=function(){setTimeout(function(){if("day"===o.mode||"d"===o.mode)for(var e in this.periodMap)this.periodMap[e].label&&this.$.body.find('[data-calendar-item-date="'+e+'"]').find(".addon-footer").html(this.periodMap[e].label),this.$.body.find('[data-calendar-item-date="'+e+'"]').addClass(this.periodMap[e].theme)}.bind(this))},v=function(){if("day"===o.mode||"d"===o.mode)for(var e in this.periodMap)this.$.body.find('[data-calendar-item-date="'+e+'"]').find(".addon-footer").empty(),this.$.body.find('[data-calendar-item-date="'+e+'"]').removeClass(this.periodMap[e].theme)};this.init=function(){this.onStateChanged=o.onStateChanged,this.onClick=o.onClick,o.target||console.log(ax5.info.getError("ax5calendar","401","setConfig")),this.target=jQuery(o.target),o.displayDate=t.date(o.displayDate),this.target.html(l.call(this)),this.$={root:this.target.find('[data-calendar-els="root"]'),control:this.target.find('[data-calendar-els="control"]'),"control-display":this.target.find('[data-calendar-els="control-display"]'),body:this.target.find('[data-calendar-els="body"]')},o.control&&this.$.root.on(o.clickEventName,"[data-calendar-move]",function(e){p.call(this,e||window.event)}.bind(this)),o.selection&&this.setSelection(o.selection,!1),o.selectable&&this.setSelectable(o.selectable,!1),o.marker&&this.setMarker(o.marker,!1),setTimeout(function(){"day"===o.mode||"d"===o.mode?d.call(this,o.displayDate):"month"===o.mode||"m"===o.mode?c.call(this,o.displayDate):"year"!==o.mode&&"y"!==o.mode||u.call(this,o.displayDate)}.bind(this))},this.changeMode=function(e,t){return"undefined"!=typeof t&&(o.displayDate=t),e&&(o.mode=e),this.$.body.removeClass("fadein").addClass("fadeout"),setTimeout(function(){"day"==o.mode||"d"==o.mode?d.call(this,o.displayDate):"month"==o.mode||"m"==o.mode?c.call(this,o.displayDate):"year"!=o.mode&&"y"!=o.mode||u.call(this,o.displayDate),this.$.body.removeClass("fadeout").addClass("fadein")}.bind(this),o.animateTime),this},this.setSelection=function(){i.selectionMap={};var e={arr:function(e,n,a){return n={},t.isArray(e)?(i.selection=e=e.splice(0,a),e.forEach(function(e){t.isDate(e)&&(e=t.date(e,{"return":o.dateFormat})),n[e]=!0}),n):n}};return function(n,i){var r={};if(a=o.multipleSelect?t.isNumber(o.multipleSelect)?o.multipleSelect:2:1,o.selection=n){if(!t.isArray(n))return this;r=e.arr(n,{},a)}return this.selectionMap=jQuery.extend({},r),i!==!1&&g.call(this),r=null,this}}(),this.getSelection=function(){return this.selection},this.setSelectable=function(){i.selectableMap={};var e={arr:function(e,n){return n={},t.isArray(e)?(e.forEach(function(e){t.isDate(e)&&(e=t.date(e,{"return":o.dateFormat})),n[e]=!0}),n):n},obj:function(e,n){if(n={},t.isArray(e))return n;if(e.range)return n;for(var i in e)n[i]=e[i];return n},range:function(e,n){return n={},t.isArray(e)?n:e.range?(e.range.forEach(function(e){if(t.isDateFormat(e.from)&&t.isDateFormat(e.to))for(var i=t.date(e.from);i<=t.date(e.to);i.setDate(i.getDate()+1))n[t.date(i,{"return":o.dateFormat})]=!0;else for(var a=e.from;a<=e.to;a++)n[a]=!0}),n):n}};return function(n,i){var a,r={};if(o.selectable=n)if(t.isArray(n))r=e.arr(n);else{for(a in e)if(n[a]){r=e[a](n);break}0===Object.keys(r).length&&(r=e.obj(n))}return this.selectableMap=r,i!==!1&&this.changeMode(),this}}(),this.setMarker=function(){i.markerMap={};var e={obj:function(e,n){if(n={},t.isArray(e))return n;if(e.range)return n;for(var i in e)n[i]=e[i];return e=null,n},range:function(e,n){return n={},t.isArray(e)?n:e.range?(e.range.forEach(function(e){if(t.isDateFormat(e.from)&&t.isDateFormat(e.to))for(var i=t.date(e.from);i<=t.date(e.to);i.setDate(i.getDate()+1))n[t.date(i,{"return":o.dateFormat})]={theme:e.theme,label:e.label};else for(var a=e.from;a<=e.to;a++)n[a]={theme:e.theme,label:e.label}}),e=null,n):n}};return function(t,n){var i,a={};if(o.marker=t){for(i in e)if(t[i]){a=e[i](t);break}0===Object.keys(a).length&&(a=e.obj(t))}return this.markerMap=a,n!==!1&&f.call(this),this}}(),this.setPeriod=function(){i.periodMap={};var e={range:function(e,n){return n={},t.isArray(e)?n:e.range?(e.range.forEach(function(e){if(t.isDateFormat(e.from)&&t.isDateFormat(e.to))for(var i=new Date(t.date(e.from));i<=t.date(e.to);i.setDate(i.getDate()+1))i.getTime()==t.date(e.from).getTime()?n[t.date(i,{"return":o.dateFormat})]={theme:e.theme||o.defaultPeriodTheme,label:e.fromLabel}:i.getTime()==t.date(e.to).getTime()?n[t.date(i,{"return":o.dateFormat})]={theme:e.theme||o.defaultPeriodTheme,label:e.toLabel}:n[t.date(i,{"return":o.dateFormat})]={theme:e.theme||o.defaultPeriodTheme}}),e=null,n):n}};return function(t,n){var i={};return n!==!1&&v.call(this),(o.period=t)&&(i=e.range(t)),this.periodMap=i,n!==!1&&m.call(this),this}}(),this.main=function(){e.calendar_instance=e.calendar_instance||[],e.calendar_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.calendar}(),function(){var e=ax5.ui.calendar,t=function(e){return'\n                <div class="ax5-ui-calendar {{theme}}" data-calendar-els="root" onselectstart="return false;">\n                    {{#control}}\n                    <div class="calendar-control" data-calendar-els="control" style="{{controlCSS}}">\n                        <a class="date-move-left" data-calendar-move="left" style="{{controlButtonCSS}}">{{{left}}}</a>\n                        <div class="date-display" data-calendar-els="control-display" style="{{controlCSS}}"></div>\n                        <a class="date-move-right" data-calendar-move="right" style="{{controlButtonCSS}}">{{{right}}}</a>\n                    </div>\n                    {{/control}}\n                    <div class="calendar-body" data-calendar-els="body"></div>\n                </div>\n                '},n=function(e){return'\n                <table data-calendar-table="day" cellpadding="0" cellspacing="0" style="width:100%;">\n                    <thead>\n                        <tr>\n                        {{#weekNames}}\n                            <td class="calendar-col-{{col}}" style="height: {{colHeadHeight}}">\n                            {{label}}\n                            </td>\n                        {{/weekNames}}\n                        </tr>\n                    </thead>\n                    <tbody>\n                        <tr>\n                            {{#list}}    \n                            {{#isStartOfWeek}}\n                            {{^@first}}\n                        </tr>\n                        <tr>\n                            {{/@first}}\n                            {{/isStartOfWeek}}\n                            <td class="calendar-col-{{col}}" style="{{itemStyles}}">\n                                <a class="calendar-item-day {{addClass}}" data-calendar-item-date="{{thisDate}}">\n                                    <span class="addon addon-header"></span>\n                                    {{thisDataLabel}}\n                                    <span class="addon addon-footer"></span>\n                                </a>\n                            </td>\n                            {{/list}}\n                        </tr>\n                    </tbody>\n                </table>\n                '},i=function(e){return'\n                <table data-calendar-table="month" cellpadding="0" cellspacing="0" style="width:100%;">\n                    <thead>\n                        <tr>\n                            <td class="calendar-col-0" colspan="3" style="height: {{colHeadHeight}}">\n                            {{colHeadLabel}}\n                            </td>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        <tr>\n                            {{#list}}    \n                            {{#isStartOfRow}}\n                            {{^@first}}\n                        </tr>\n                        <tr>\n                            {{/@first}}\n                            {{/isStartOfRow}}\n                            <td class="calendar-col-{{col}}" style="{{itemStyles}}">\n                                <a class="calendar-item-month {{addClass}}" data-calendar-item-month="{{thisMonth}}">\n                                    <span class="addon"></span>\n                                    {{thisMonthLabel}}\n                                    <span class="lunar"></span>\n                                </a>\n                            </td>\n                            {{/list}}\n                        </tr>\n                    </tbody>\n                </table>\n                '},o=function(e){return'\n                <table data-calendar-table="year" cellpadding="0" cellspacing="0" style="width:100%;">\n                    <thead>\n                        <tr>\n                            <td class="calendar-col-0" colspan="4" style="height: {{colHeadHeight}}">\n                            {{colHeadLabel}}\n                            </td>\n                        </tr>\n                    </thead>\n                    <tbody>\n                        <tr>\n                            {{#list}}    \n                            {{#isStartOfRow}}\n                            {{^@first}}\n                        </tr>\n                        <tr>\n                            {{/@first}}\n                            {{/isStartOfRow}}\n                            <td class="calendar-col-{{col}}" style="{{itemStyles}}">\n                                <a class="calendar-item-year {{addClass}}" data-calendar-item-year="{{thisYear}}">\n                                    <span class="addon"></span>\n                                    {{thisYearLabel}}\n                                    <span class="lunar"></span>\n                                </a>\n                            </td>\n                            {{/list}}\n                        </tr>\n                    </tbody>\n                </table>\n                '};e.tmpl={frameTmpl:t,dayTmpl:n,monthTmpl:i,yearTmpl:o,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"picker"},function(){return function(){var e=this,i=void 0;this.instanceId=ax5.getGuid(),this.config={clickEventName:"click",theme:"default",title:"",lang:{ok:"ok",cancel:"cancel"},animateTime:100,calendar:{multipleSelect:!1,control:{left:ax5.def.picker.date_leftArrow||"&#x02190",yearTmpl:ax5.def.picker.date_yearTmpl||"%s",monthTmpl:ax5.def.picker.date_monthTmpl||"%s",right:ax5.def.picker.date_rightArrow||"&#x02192",yearFirst:!0}},palette:{}},this.queue=[],this.activePicker=null,this.activePickerQueueIndex=-1,this.openTimer=null,this.closeTimer=null,i=this.config;var o=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),!0},a=function(){var e={focus:function(e,t){this.open(e)},click:function(e,t){this.open(e)}},n={"@fn":function(e,t){var n=this.queue[e],o=t.length,a={inputLength:o||1};o>1&&(a.btns={ok:{label:i.lang.ok,theme:i.theme}}),this.queue[e]=jQuery.extend(!0,a,n),a=null,o=null},date:function(e,t){var n=this.queue[e],o=n.content?n.content.width||270:270,a=n.content?n.content.margin||5:5,r=t.length,l={contentWidth:o*r+(r-1)*a,content:{width:o,margin:a},inputLength:r||1};r>1&&!n.btns&&(l.btns={ok:{label:i.lang.ok,theme:i.theme}}),this.queue[e]=jQuery.extend(!0,l,n),o=null,a=null,l=null,r=null},"secure-num":function(e,t){var n=this.queue[e],i=t.length,o={inputLength:i||1};this.queue[e]=jQuery.extend(!0,o,n),o=null,i=null},keyboard:function(e,t){var n=this.queue[e],i=t.length,o={inputLength:i||1};this.queue[e]=jQuery.extend(!0,o,n),o=null,i=null},numpad:function(e,t){var n=this.queue[e],i=t.length,o={inputLength:i||1};this.queue[e]=jQuery.extend(!0,o,n),o=null,i=null},color:function(e,n){var o=this.queue[e],a=o.content?o.content.width||270:270,r=o.content?o.content.margin||5:5,l=n.length,s={contentWidth:a*l+(l-1)*r,content:{width:a,margin:r},inputLength:l||1},d=o.$target.find('[data-ax5picker-color="preview"]');d.get(0)&&(d.css({"background-color":"#"+t.color(n.val()||"#000000").getHexValue()}),n.on("change",function(){d.css({"background-color":"#"+t.color(this.value||"#000000").getHexValue()})})),l>1&&!o.btns&&(s.btns={ok:{label:i.lang.ok,theme:i.theme}}),this.queue[e]=jQuery.extend(!0,s,o),a=null,r=null,s=null,l=null}};return function(i){var o=this.queue[i],a=void 0;if(!o.content)return console.log(ax5.info.getError("ax5picker","501","bind")),this;if(a="INPUT"==o.$target.get(0).tagName.toUpperCase()?o.$target:o.$target.find("input[type]"),t.isFunction(o.content))n["@fn"].call(this,i,a);else for(var r in n)if(o.content.type==r){n[r].call(this,i,a);break}return a.unbind("focus.ax5picker").unbind("click.ax5picker").bind("focus.ax5picker",e.focus.bind(this,i)).bind("click.ax5picker",e.click.bind(this,i)),
o.$target.find(".input-group-addon").unbind("click.ax5picker").bind("click.ax5picker",e.click.bind(this,i)),o.content.formatter&&ax5.ui.formatter&&a.ax5formatter(o.content.formatter),a=null,o=null,i=null,this}}(),r=function(e){if(!this.activePicker)return this;var t=function(t){var n,i=jQuery(window),o=jQuery(document.body),a={},r=12,l={},s={};a=t.$target.offset(),l={width:t.$target.outerWidth(),height:t.$target.outerHeight()},s={winWidth:Math.max(i.width(),o.width()),winHeight:Math.max(i.height(),o.height()),width:this.activePicker.outerWidth(),height:this.activePicker.outerHeight()},t.direction&&""!==t.direction&&"auto"!==t.direction?n=t.direction:(n="top",a.top-s.height-r<0?n="top":a.top+l.height+s.height+r>s.winHeight&&(n="bottom")),e&&this.activePicker.addClass("direction-"+n);var d=function(){var e={left:0,top:0};switch(n){case"top":e.left=a.left+l.width/2-s.width/2,e.top=a.top+l.height+r;break;case"bottom":e.left=a.left+l.width/2-s.width/2,e.top=a.top-s.height-r;break;case"left":e.left=a.left+l.width+r,e.top=a.top-s.height/2+l.height/2;break;case"right":e.left=a.left-s.width-r,e.top=a.top-s.height/2+l.height/2}return e}();(function(){"top"!=n&&"bottom"!=n||(d.left<0?(d.left=r,this.activePickerArrow.css({left:a.left+l.width/2-d.left})):d.left+s.width>s.winWidth&&(d.left=s.winWidth-s.width-r,this.activePickerArrow.css({left:a.left+l.width/2-d.left})))}).call(this),this.activePicker.css(d)},n=this.queue[this.activePickerQueueIndex];e&&(this.activePicker.css({top:-999}),jQuery(document.body).append(this.activePicker)),setTimeout(function(){t.call(this,n)}.bind(this))},l=function(e,n){if(!this.activePicker)return this;var i=this.queue[this.activePickerQueueIndex];return n=t.findParentNode(e.target,function(e){return!!e.getAttribute("data-picker-els")||(i.$target.get(0)==e||void 0)}),n?this:(this.close(),this)},s=function(e,n){if(e.srcElement&&(e.target=e.srcElement),n=t.findParentNode(e.target,function(e){if(e.getAttribute("data-picker-btn"))return!0})){var i=this.queue[this.activePickerQueueIndex],o=n.getAttribute("data-picker-btn");if(i.btns&&i.btns[o].onClick){var a={key:o,value:i.btns[o],self:this,item:i};i.btns[o].onClick.call(a,o)}else this.close()}},d=function(e){e.keyCode==ax5.info.eventKeys.ESC&&this.close()},c=function(e){return t.isString(e)||(e=jQuery(e).data("data-axpicker-id")),t.isString(e)?t.search(this.queue,function(){return this.id==e}):void console.log(ax5.info.getError("ax5picker","402","getQueIdx"))};this.init=function(){this.onStateChanged=i.onStateChanged},this.bind=function(e){var n={},o=void 0;return e=jQuery.extend(!0,n,i,e),e.target?(e.$target=jQuery(e.target),e.$target.get(0)?(e.id||(e.id=e.$target.data("data-axpicker-id")),e.id||(e.id="ax5-picker-"+ax5.getGuid(),e.$target.data("data-axpicker-id",e.id)),o=t.search(this.queue,function(){return this.id==e.id}),o===-1?(this.queue.push(e),a.call(this,this.queue.length-1)):(this.queue[o]=jQuery.extend(!0,{},this.queue[o],e),a.call(this,o)),n=null,o=null,this):(console.log(ax5.info.getError("ax5picker","401","bind")),this)):(console.log(ax5.info.getError("ax5picker","401","bind")),this)},this.setContentValue=function(){var n={date:function(e,t,n){var i,o,a,r=[];return"INPUT"!==e.$target.get(0).tagName.toUpperCase()&&e.$target.find("input[type]").each(function(){r.push(this.value)}),0==t?(r.length>1&&""!==r[1]?(i=ax5.util.dday(r[1],{today:r[0]}),i<0&&(a=n)):a=n,a&&(e.pickerCalendar[1].ax5uiInstance.setSelection([a],!1).changeMode("d",a),this.setContentValue(e.id,1,a)),n):1==t?(r.length>1&&(i=ax5.util.dday(r[1],{today:r[0]}),i<0&&(o=r[1])),o&&(e.pickerCalendar[0].ax5uiInstance.setSelection([o],!1).changeMode("d",o),this.setContentValue(e.id,0,o)),n):void 0}};return function(i,a,r,l){var s=t.isNumber(i)?i:c.call(this,i),d=this.queue[s],u=void 0;if(l||(l={}),d){if(u="INPUT"==d.$target.get(0).tagName.toUpperCase()?d.$target:jQuery(d.$target.find("input[type]").get(a)),u.val(r),d.disableChangeTrigger){var h=d.$target.find('[data-ax5picker-color="preview"]');h.get(0)&&h.css({"background-color":r})}else u.trigger("change");d.inputLength>1&&n[d.content.type]&&(r=n[d.content.type].call(this,d,a,r));var p={self:e,state:"changeValue",item:d,inputIndex:a,value:r,values:[r]};"INPUT"!==d.$target.get(0).tagName.toUpperCase()&&(p.values=[],d.$target.find("input[type]").each(function(){p.values.push(this.value)})),o.call(this,d,p),1!=d.inputLength||l.doNotClose||this.close()}return d=null,i=null,a=null,r=null,this}}(),this.getContentValue=function(){return function(e,n){var i=t.isNumber(e)?e:c.call(this,e),o=this.queue[i],a=void 0;return o?(a="INPUT"==o.$target.get(0).tagName.toUpperCase()?o.$target:jQuery(o.$target.find("input[type]").get(n)),a.val()):(o=null,e=null,n=null,this)}}(),this.open=function(){var a={"@fn":function(e,t){var n=this.queue[e];return n.content.call(n,function(e){t(e)}),!0},date:function(n){for(var o=this.queue[n],a=[],r=jQuery.extend({},i.calendar,{displayDate:new Date}),l="INPUT"==o.$target.get(0).tagName.toUpperCase()?o.$target:o.$target.find("input[type]"),s=0;s<o.inputLength;s++)a.push('<div style="width:'+t.cssNumber(o.content.width)+';float:left;" class="ax-picker-content-box" data-calendar-target="'+s+'"></div>'),s<o.inputLength-1&&a.push('<div style="width:'+o.content.margin+'px;float:left;height: 5px;"></div>');a.push('<div style="clear:both;"></div>'),o.pickerContent.html(a.join("")),o.pickerCalendar=[],o.pickerContent.find("[data-calendar-target]").each(function(){var t=this.getAttribute("data-calendar-target"),n=l.get(t).value,i=ax5.util.date(n),a={year:function(e){return ax5.util.date(e,{"return":"yyyy"})},month:function(e){return ax5.util.date(e,{"return":"yyyy-MM"})},day:function(e){return e}};r.displayDate=i,n&&(r.selection=[i]),r=jQuery.extend(!0,r,o.content.config||{}),r.target=this,r.onClick=function(){e.setContentValue(o.id,t,a[r.selectMode||"day"](this.date))},o.pickerCalendar.push({itemId:o.id,inputIndex:t,ax5uiInstance:new ax5.ui.calendar(r)})})},"secure-num":function(n){for(var i=this.queue[n],a=[],r=0;r<i.inputLength;r++)a.push('<div style="width:'+t.cssNumber(i.content.width)+';float:left;" class="ax-picker-content-box" data-secure-num-target="'+r+'"></div>'),r<i.inputLength-1&&a.push('<div style="width:'+i.content.margin+'px;float:left;height: 5px;"></div>');a.push('<div style="clear:both;"></div>'),i.pickerContent.html(a.join("")),i.pickerContent.find("[data-secure-num-target]").each(function(){var t=this.getAttribute("data-secure-num-target"),n=[],a=function(e){var t,n,i;for(i=e.length;i;i-=1)t=Math.floor(Math.random()*i),n=e[i-1],e[i-1]=e[t],e[t]=n;return e}([0,1,2,3,4,5,6,7,8,9]),r=[{label:"&#x02190",fn:"back"},{label:"C",fn:"clear"}];a.forEach(function(e){n.push('<div style="float:left;'+i.content.config.btnWrapStyle+'">'),n.push('<button class="btn btn-default btn-'+i.content.config.btnTheme+'" style="'+i.content.config.btnStyle+'" data-secure-num-value="'+e+'">'+e+"</button>"),n.push("</div>")}),r.forEach(function(e){n.push('<div style="float:left;'+i.content.config.btnWrapStyle+'">'),n.push('<button class="btn btn-default btn-'+i.content.config.specialBtnTheme+'" style="'+i.content.config.btnStyle+'" data-secure-num-value="'+e.fn+'">'+e.label+"</button>"),n.push("</div>")}),n.push('<div style="clear:both;"></div>'),$(this).html(n.join("")).on("click","[data-secure-num-value]",function(){var n=this.getAttribute("data-secure-num-value"),a="INPUT"==i.$target.get(0).tagName.toUpperCase()?i.$target:jQuery(i.$target.find("input[type]").get(t)),r=a.val();"back"==n?a.val(r.substring(0,r.length-1)):"clear"==n?a.val(""):a.val(r+n),o.call(this,i,{self:e,state:"changeValue",item:i,value:a.val()})})})},keyboard:function(n){for(var i=this.queue[n],a=[],r=0;r<i.inputLength;r++)a.push('<div style="width:'+t.cssNumber(i.content.width)+';float:left;" class="ax-picker-content-box" data-keyboard-target="'+r+'"></div>'),r<i.inputLength-1&&a.push('<div style="width:'+i.content.margin+'px;float:left;height: 5px;"></div>');a.push('<div style="clear:both;"></div>'),i.pickerContent.html(a.join(""));var l=[[{value:"`",shiftValue:"~"},{value:"1",shiftValue:"!"},{value:"2",shiftValue:"@"},{value:"3",shiftValue:"#"},{value:"4",shiftValue:"$"},{value:"5",shiftValue:"%"},{value:"6",shiftValue:"^"},{value:"7",shiftValue:"&"},{value:"8",shiftValue:"*"},{value:"9",shiftValue:"("},{value:"0",shiftValue:")"},{value:"-",shiftValue:"_"},{value:"=",shiftValue:"+"},{label:"&#x02190",fn:"back"}],[{value:"q",shiftValue:"Q"},{value:"w",shiftValue:"W"},{value:"e",shiftValue:"E"},{value:"r",shiftValue:"R"},{value:"t",shiftValue:"T"},{value:"y",shiftValue:"Y"},{value:"u",shiftValue:"U"},{value:"i",shiftValue:"I"},{value:"o",shiftValue:"O"},{value:"p",shiftValue:"P"},{value:"[",shiftValue:"{"},{value:"]",shiftValue:"}"},{value:"\\",shiftValue:"|"}],[{label:"Clear",fn:"clear"},{value:"a",shiftValue:"A"},{value:"s",shiftValue:"S"},{value:"d",shiftValue:"D"},{value:"f",shiftValue:"F"},{value:"g",shiftValue:"G"},{value:"h",shiftValue:"H"},{value:"j",shiftValue:"J"},{value:"k",shiftValue:"K"},{value:"l",shiftValue:"L"},{value:";",shiftValue:":"},{value:"'",shiftValue:'"'}],[{label:"Shift",fn:"shift"},{value:"z",shiftValue:"Z"},{value:"x",shiftValue:"X"},{value:"c",shiftValue:"C"},{value:"v",shiftValue:"V"},{value:"b",shiftValue:"B"},{value:"n",shiftValue:"N"},{value:"m",shiftValue:"M"},{value:",",shiftValue:"<"},{value:".",shiftValue:">"},{value:"/",shiftValue:"?"},{label:"Close",fn:"close"}]],s=function(e){var t=[];return l.forEach(function(n){t.push('<div style="display: table;margin:0 auto;">'),n.forEach(function(n){var o,a,r,l,s;n.fn?(o=n.fn,a=n.label,r=i.content.config.specialBtnWrapStyle,l=i.content.config.specialBtnTheme,s=i.content.config.specialBtnStyle):(a=o=e?n.shiftValue:n.value,r=i.content.config.btnWrapStyle,l=i.content.config.btnTheme,s=i.content.config.btnStyle),t.push('<div style="display: table-cell;'+r+'">'),t.push('<button class="btn btn-default btn-'+l+'" style="'+s+'" data-keyboard-value="'+o+'">'+a+"</button>"),t.push("</div>")}),t.push("</div>")}),t.join("")};i.pickerContent.find("[data-keyboard-target]").each(function(){var t=this.getAttribute("data-keyboard-target"),n=$(this),a=!1,r=function(){a=!a,n.html(s(a))};n.html(s(a)).on("mousedown","[data-keyboard-value]",function(){var n=this.getAttribute("data-keyboard-value"),a="INPUT"==i.$target.get(0).tagName.toUpperCase()?i.$target:jQuery(i.$target.find("input[type]").get(t)),l=a.val();switch(n){case"back":a.val(l.substring(0,l.length-1));break;case"clear":a.val("");break;case"shift":return r(),!1;case"close":return e.close(),!1;default:a.val(l+n)}o.call(this,i,{self:e,state:"changeValue",item:i,value:a.val()})})})},numpad:function(n){for(var i=this.queue[n],a=[],r=0;r<i.inputLength;r++)a.push('<div style="width:'+t.cssNumber(i.content.width)+';float:left;" class="ax-picker-content-box" data-numpad-target="'+r+'"></div>'),r<i.inputLength-1&&a.push('<div style="width:'+i.content.margin+'px;float:left;height: 5px;"></div>');a.push('<div style="clear:both;"></div>'),i.pickerContent.html(a.join("")),i.pickerContent.find("[data-numpad-target]").each(function(){var t=this.getAttribute("data-numpad-target"),n=[],a=i.content.config.keyArray||[{value:"7"},{value:"8"},{value:"9"},{label:"BS",fn:"back"},{value:"4"},{value:"5"},{value:"6"},{label:"CLS",fn:"clear"},{value:"1"},{value:"2"},{value:"3"},{value:""},{value:"."},{value:"0"},{value:""},{label:"OK",fn:"enter"}];a.forEach(function(e){var t=void 0,o=void 0,a=void 0,r=void 0,l=void 0;e.fn?(t=e.fn,o=e.label,r=i.content.config.specialBtnTheme,a=i.content.config.specialBtnWrapStyle,l=i.content.config.specialBtnStyle):(o=t=e.value,r=t?i.content.config.btnTheme:"",a=i.content.config.btnWrapStyle,l=i.content.config.btnStyle),n.push('<div style="float:left;'+a+'">'),n.push('<button class="btn btn-default btn-'+r+'" style="'+l+'" data-numpad-value="'+t+'">'+(o||"&nbsp;")+"</button>"),n.push("</div>")}),n.push('<div style="clear:both;"></div>'),$(this).html(n.join("")).on("mousedown","[data-numpad-value]",function(){var n=this.getAttribute("data-numpad-value"),a="INPUT"==i.$target.get(0).tagName.toUpperCase()?i.$target:jQuery(i.$target.find("input[type]").get(t)),r=a.val(),l="";switch(n){case"back":l="changeValue",a.val(r.substring(0,r.length-1));break;case"clear":l="changeValue",a.val("");break;case"enter":return e.close(i,"enter"),!1;case"close":return e.close(),!1;default:l="changeValue",a.val(r+n)}o.call(this,i,{self:e,state:l,item:i,value:a.val()})})})},color:function(n){for(var o=this.queue[n],a=[],r=jQuery.extend({},i.palette),l="INPUT"==o.$target.get(0).tagName.toUpperCase()?o.$target:o.$target.find("input[type]"),s=0;s<o.inputLength;s++)a.push('<div style="padding: 5px;width:'+t.cssNumber(o.content.width)+';float:left;" class="ax-picker-content-box" data-palette-target="'+s+'" data-ax5palette="ax5picker-'+o.id+'"></div>'),s<o.inputLength-1&&a.push('<div style="width:'+o.content.margin+'px;float:left;height: 5px;"></div>');a.push('<div style="clear:both;"></div>'),o.pickerContent.html(a.join("")),o.pickerPalette=[],o.pickerContent.find("[data-palette-target]").each(function(){var t=this.getAttribute("data-palette-target"),n=l.get(t).value;r.selectedColor=n,r=jQuery.extend(!0,r,o.content.config||{}),r.target=this,r.onClick=function(n){e.setContentValue(o.id,t,n)},r.onUpdateColor=function(n){e.setContentValue(o.id,t,n,{doNotClose:!0})},o.pickerPalette.push({itemId:o.id,inputIndex:t,ax5uiInstance:new ax5.ui.palette(r)})})}};return function(e,u){var h=t.isNumber(e)?e:c.call(this,e),p=this.queue[h];return this.openTimer&&clearTimeout(this.openTimer),this.activePicker?this.activePickerQueueIndex==h?this:u>2?this:(this.close(),this.openTimer=setTimeout(function(){this.open(h,(u||0)+1)}.bind(this),i.animateTime),this):(this.activePicker=jQuery(n.tmpl.get.call(this,"pickerTmpl",p)),this.activePickerArrow=this.activePicker.find(".ax-picker-arrow"),this.activePickerQueueIndex=h,p.pickerContent=this.activePicker.find('[data-picker-els="content"]'),t.isFunction(p.content)?(p.pickerContent.html("Loading.."),a["@fn"].call(this,h,function(e){p.pickerContent.html(e)})):p.content.type in a&&a[p.content.type].call(this,h),this.activePicker.find("[data-picker-btn]").on(i.clickEventName,function(e){s.call(this,e||window.event,h)}.bind(this)),r.call(this,"append"),jQuery(window).bind("resize.ax5picker",function(){r.call(this)}.bind(this)),jQuery(window).bind("keyup.ax5picker",function(e){e=e||window.event,d.call(this,e),t.stopEvent(e)}.bind(this)),jQuery(window).bind("click.ax5picker",function(e){e=e||window.event,l.call(this,e),t.stopEvent(e)}.bind(this)),o.call(this,p,{self:this,state:"open",item:p}),this)}}(),this.close=function(e,t){return this.closeTimer&&clearTimeout(this.closeTimer),this.activePicker?(e=this.queue[this.activePickerQueueIndex],this.activePicker.addClass("destroy"),jQuery(window).unbind("resize.ax5picker"),jQuery(window).unbind("click.ax5picker"),jQuery(window).unbind("keyup.ax5picker"),this.closeTimer=setTimeout(function(){this.activePicker&&this.activePicker.remove(),this.activePicker=null,this.activePickerQueueIndex=-1,o.call(this,e,{self:this,state:t||"close"})}.bind(this),i.animateTime),this):this},this.main=function(){arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.picker}(),function(){var e=ax5.ui.picker,t=(ax5.util,function(){return'\n<div class="ax5-ui-picker {{theme}}" id="{{id}}" data-picker-els="root" {{#zIndex}}style="z-index:{{zIndex}};"{{/zIndex}}>\n    {{#title}}\n        <div class="ax-picker-heading">{{title}}</div>\n    {{/title}}\n    <div class="ax-picker-body">\n        <div class="ax-picker-content" data-picker-els="content" style="width:{{contentWidth}}px;"></div>\n        {{#btns}}\n            <div class="ax-picker-buttons">\n            {{#btns}}\n                {{#@each}}\n                <button data-picker-btn="{{@key}}" class="btn btn-default {{@value.theme}}">{{@value.label}}</button>\n                {{/@each}}\n            {{/btns}}\n            </div>\n        {{/btns}}\n    </div>\n    <div class="ax-picker-arrow"></div>\n</div>\n'});e.tmpl={pickerTmpl:t,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),ax5&&ax5.ui&&ax5.ui.picker&&(ax5.ui.picker_instance=new ax5.ui.picker,jQuery.fn.ax5picker=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"open":return ax5.ui.picker_instance.open(this);case"close":return ax5.ui.picker_instance.close(this);case"setValue":return ax5.ui.picker_instance.setContentValue(this,arguments[1],arguments[2]);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend(!0,e,t),ax5.ui.picker_instance.bind(e)});return this}}()),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"formatter"},function(){var e=(new Date,function(e,t){if("undefined"==typeof t&&(t=e.value.length),e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}else e.selectionStart&&(e.focus(),e.selectionStart=t,e.selectionEnd=t)});return function(){var i,o=this;this.instanceId=ax5.getGuid(),this.config={animateTime:250},this.queue=[],this.openTimer=null,this.closeTimer=null,i=this.config;var a={focus:function(e,t,n){e.$input.data("__originValue__")||e.$input.data("__originValue__",e.$input.val())},keydown:function(e,t,n){var i=!1;e.enterableKeyCodes&&(n.which&&e.enterableKeyCodes[n.which]||n.metaKey||n.ctrlKey||n.shiftKey||(i=!0)),i&&ax5.util.stopEvent(n)},keyup:function(t,i,o){var a,r,l,s,d,c=t.$input.get(0);"selectionStart"in c?a=c.selectionStart:document.selection&&(s=document.selection.createRange(),d=document.selection.createRange().text.length,s.moveStart("character",-c.value.length),a=s.text.length-d),r=c.value,l=t.pattern in n.formatter?n.formatter[t.pattern].getPatternValue.call(this,t,i,o,c.value):r,l!=r&&(t.$input.val(l).trigger("change"),e(c,a+l.length-r.length))},blur:function(e,t,i,o){var a,r,l=e.$input.get(0);e.$input.removeData("__originValue__"),a=l.value,r=e.pattern in n.formatter?n.formatter[e.pattern].getPatternValue.call(this,e,t,i,l.value,"blur"):a,o?e.$input.val(r):r!=a&&e.$input.val(r).trigger("change")}},r=function(e,t){if(!e.pattern&&("INPUT"==e.$target.get(0).tagName?e.pattern=e.$target.attr("data-ax5formatter"):e.pattern=e.$target.find('input[type="text"]').attr("data-ax5formatter"),!e.pattern))return console.log(ax5.info.getError("ax5formatter","501","bind")),console.log(e.target),this;var i=/[^\(^\))]+/gi,o=e.pattern.match(i);return e.pattern=o[0],e.patternArgument=o[1]||"",e.pattern in n.formatter&&(e.enterableKeyCodes=n.formatter[e.pattern].getEnterableKeyCodes.call(this,e,t)),e.$input.unbind("focus.ax5formatter").bind("focus.ax5formatter",a.focus.bind(this,this.queue[t],t)),e.$input.unbind("keydown.ax5formatter").bind("keydown.ax5formatter",a.keydown.bind(this,this.queue[t],t)),e.$input.unbind("keyup.ax5formatter").bind("keyup.ax5formatter",a.keyup.bind(this,this.queue[t],t)),e.$input.unbind("blur.ax5formatter").bind("blur.ax5formatter",a.blur.bind(this,this.queue[t],t)),a.blur.call(this,this.queue[t],t),this},l=function(e){return t.isString(e)||(e=jQuery(e).data("data-formatter")),t.search(this.queue,function(){return this.id==e})};this.init=function(){},this.bind=function(e){var n={},a=void 0;if(jQuery.extend(!0,n,i),e&&jQuery.extend(!0,n,e),e=n,!e.target)return console.log(ax5.info.getError("ax5formatter","401","bind")),this;if(e.$target=jQuery(e.target),"INPUT"==e.$target.get(0).tagName)e.$input=e.$target;else if(e.$input=e.$target.find('input[type="text"]'),e.$input.length>1)return e.$input.each(function(){e.target=this,o.bind(e)}),this;return e.$input="INPUT"==e.$target.get(0).tagName?e.$target:e.$target.find('input[type="text"]'),e.id||(e.id=e.$input.data("ax5-formatter")),e.id||(e.id="ax5-formatter-"+ax5.getGuid(),e.$input.data("ax5-formatter",e.id)),a=t.search(this.queue,function(){return this.id==e.id}),a===-1?(this.queue.push(e),r.call(this,this.queue[this.queue.length-1],this.queue.length-1)):(this.queue[a]=e,r.call(this,this.queue[a],a)),this},this.formatting=function(e){var n=t.isNumber(e)?e:l.call(this,e);if(n===-1)for(var i=this.queue.length;i--;)a.blur.call(this,this.queue[i],i,null,!0);else a.blur.call(this,this.queue[n],n,null,!0);return this},this.unbind=function(){},this.main=function(){arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.formatter}(),function(){var e=ax5.ui.formatter,t=ax5.util,n=new Date,i={18:"KEY_ALT",8:"KEY_BACKSPACE",17:"KEY_CONTROL",46:"KEY_DELETE",40:"KEY_DOWN",35:"KEY_END",187:"KEY_EQUAL",27:"KEY_ESC",36:"KEY_HOME",45:"KEY_INSERT",37:"KEY_LEFT",189:"KEY_MINUS",34:"KEY_PAGEDOWN",33:"KEY_PAGEUP",13:"KEY_RETURN",39:"KEY_RIGHT",16:"KEY_SHIFT",9:"KEY_TAB",38:"KEY_UP",91:"KEY_WINDOW"},o={48:1,49:1,50:1,51:1,52:1,53:1,54:1,55:1,56:1,57:1,96:1,97:1,98:1,99:1,100:1,101:1,102:1,103:1,104:1,105:1},a={getEnterableKeyCodes:function(t){var n={188:","};return"int"==t.patternArgument||(n[190]="."),jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,n,i,o,a){o=o.replace(/[^0-9^\.^\-]/g,"");var r,l=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),s=o.split(".");s[0]+=".";do s[0]=s[0].replace(l,"$1,$2");while(l.test(s[0]));return r=s.length>1?t.isNumber(e.maxRound)?s[0]+t.left(s[1],e.maxRound):s.join(""):s[0].split(".")[0]}},r={getEnterableKeyCodes:function(t){var n={190:".",110:"."};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,n,i,o,a){o=o.replace(/[^0-9^\.^\-]/g,"");var r,l=o.split(".");return l[0]+=".",r=l.length>1?t.isNumber(e.maxRound)?l[0]+t.left(l[1],e.maxRound):l.join(""):l[0].split(".")[0]}},l={getEnterableKeyCodes:function(t){var n={189:"-",191:"/"};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,i,o,a,r){if(a=a.replace(/\D/g,""),""==a)return a;var l=/^([0-9]{4})\-?([0-9]{1,2})?\-?([0-9]{1,2})?.*$/;"time"==e.patternArgument?l=/^([0-9]{4})\-?([0-9]{1,2})?\-?([0-9]{1,2})? ?([0-9]{1,2})?:?([0-9]{1,2})?:?([0-9]{1,2})?.*$/:"year"==e.patternArgument?l=/^([0-9]{0,4})?.*$/:"month"==e.patternArgument&&(l=/^([0-9]{4})\-?([0-9]{1,2})?.*$/);var s=a.match(l),d="",c=function(e,i,o,a){var r={Y:function(e){return"undefined"==typeof e&&(e=n.getFullYear()),""!=e&&"0000"!=e||(e=n.getFullYear()),e.length<4?t.setDigit(e,4):e},M:function(e){return"undefined"==typeof e&&(e=n.getMonth()+1),e>12?12:0==e?"01":t.setDigit(e,2)},D:function(e){"undefined"==typeof e&&(e=n.getDate()+1);var i=t.daysOfMonth(a[1],a[2]-1);return e>i?i:0==e?"01":t.setDigit(e,2)},h:function(e){return e||(e=0),e>23?23:t.setDigit(e,2)},m:function(e){return e||(e=0),e>59?59:t.setDigit(e,2)},s:function(e){return e||(e=0),e>59?59:t.setDigit(e,2)}};return o?r[i](e):e};return d=a.replace(l,function(t,n){var i=[];return"year"==e.patternArgument?i.push(c(arguments[1],"Y",r)):"month"==e.patternArgument?(i.push(c(arguments[1],"Y",r)),(arguments[2]||r)&&i.push("-"+c(arguments[2],"M",r))):"time"==e.patternArgument?(i.push(c(arguments[1],"Y",r)),(arguments[2]||r)&&i.push("-"+c(arguments[2],"M",r)),(arguments[3]||r)&&i.push("-"+c(arguments[3],"D",r,arguments)),(arguments[4]||r)&&i.push(" "+c(arguments[4],"h",r)),(arguments[5]||r)&&i.push(":"+c(arguments[5],"m",r)),(arguments[6]||r)&&i.push(":"+c(arguments[6],"s",r))):(i.push(c(arguments[1],"Y",r)),(arguments[2]||r)&&i.push("-"+c(arguments[2],"M",r)),(arguments[3]||r)&&i.push("-"+c(arguments[3],"D",r,arguments))),i.join("")}),"blur"!=r||s?s||(d=d.length>4?t.left(d,4):d):d=function(){var t=[];return"year"==e.patternArgument?t.push(c(0,"Y",r)):"month"==e.patternArgument?(t.push(c(0,"Y",r)),t.push("-"+c(0,"M",r))):"time"==e.patternArgument?(t.push(c(0,"Y",r)),t.push("-"+c(0,"M",r)),t.push("-"+c(0,"D",r,arguments)),t.push(" "+c(0,"h",r)),t.push(":"+c(0,"m",r)),t.push(":"+c(0,"s",r))):(t.push(c(0,"Y",r)),t.push("-"+c(0,"M",r)),t.push("-"+c(0,"D",r,arguments))),t.join("")}(),d}},s={getEnterableKeyCodes:function(t){var n={186:":"};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,n,i,o,a){o=o.replace(/\D/g,"");var r=/^([0-9]{1,2})?:?([0-9]{1,2})?:?([0-9]{1,2})?.*$/,l=o.match(r),s=o.replace(r,function(e,t){var n=[arguments[1]];return arguments[2]&&n.push(":"+arguments[2]),arguments[3]&&n.push(":"+arguments[3]),n.join("")});return l||(s=s.length>2?t.left(s,2):s),s}},d={getEnterableKeyCodes:function(t){var n={189:"-"};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,t,n,i,o){i=i.replace(/\D/g,"");var a=/^([0-9]{3})\-?([0-9]{1,2})?\-?([0-9]{1,5})?.*$/,r=i.replace(a,function(e,t){var n=[arguments[1]];return arguments[2]&&n.push(arguments[2]),arguments[3]&&n.push(arguments[3]),n.join("-")});return r}},c={getEnterableKeyCodes:function(t){var n={189:"-",188:","};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,t,n,i,o){i=i.replace(/\D/g,"");var a=/^([0-9]{3})\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?/;"02"==i.substr(0,2)&&(a=/^([0-9]{2})\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?/);var r=i.replace(a,function(e,t){var n=[arguments[1]];return arguments[2]&&n.push(arguments[2]),arguments[3]&&n.push(arguments[3]),arguments[4]&&n.push(arguments[4]),arguments[5]&&n.push(arguments[5]),n.join("-")});return r}},u={getEnterableKeyCodes:function(t){var n={189:"-"};return jQuery.extend(n,e.formatter.ctrlKeys,e.formatter.numKeys)},getPatternValue:function(e,t,n,i,o){i=i.replace(/\D/g,"").substring(0,16);var a=/^([0-9]{4})\-?([0-9]{4})?\-?([0-9]{4})?\-?([0-9]{4})?/,r=i.replace(a,function(e,t){var n=[arguments[1]];return arguments[2]&&n.push(arguments[2]),arguments[3]&&n.push(arguments[3]),arguments[4]&&n.push(arguments[4]),n.join("-")});return r}},h={getEnterableKeyCodes:function(e){return e.getEnterableKeyCodes?e.getEnterableKeyCodes.call(e,{$input:e.$input}):null},getPatternValue:function(e,t,n,i,o){if(e.getPatternValue)return e.getPatternValue.call(e,{event:n,$input:e.$input,value:i})}};e.formatter={ctrlKeys:i,numKeys:o,money:a,number:r,date:l,time:s,bizno:d,phone:c,credit:u,custom:h}}(),ax5.ui.formatter_instance=new ax5.ui.formatter,jQuery.fn.ax5formatter=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"formatting":return ax5.ui.formatter_instance.formatting(this);case"unbind":return ax5.ui.formatter_instance.unbind(this);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend({},e,t),ax5.ui.formatter_instance.bind(e)});return this}}(),function(){var e,t=ax5.ui,n=ax5.util;t.addClass({className:"menu"},function(){return function(){var i=this,o=void 0;this.instanceId=ax5.getGuid(),this.config={theme:"default",iconWidth:22,acceleratorWidth:100,menuBodyPadding:5,offset:{left:0,top:0},position:"fixed",animateTime:250,items:[],itemClickAndClose:!0,columnKeys:{label:"label",items:"items"}},this.openTimer=null,this.closeTimer=null,this.queue=[],this.menuBar={},this.state=void 0,o=this.config;var a=function(e,t){e?(jQuery(document.body).off("click.ax5menu-"+this.instanceId).on("click.ax5menu-"+this.instanceId,d.bind(this,t)),jQuery(window).off("keydown.ax5menu-"+this.instanceId).on("keydown.ax5menu-"+this.instanceId,function(e){e.which==ax5.info.eventKeys.ESC&&i.close()}),jQuery(window).on("resize.ax5menu-"+this.instanceId).on("resize.ax5menu-"+this.instanceId,function(e){i.close()})):(jQuery(document.body).off("click.ax5menu-"+this.instanceId),jQuery(window).off("keydown.ax5menu-"+this.instanceId),jQuery(window).off("resize.ax5menu-"+this.instanceId))},r=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),i.state=t.state,e=null,t=null,!0},l=function(e){return this.onLoad&&this.onLoad.call(e,e),e=null,!0},s=function u(t,n,a,s){var d=t,h=void 0,p=void 0;return d.theme=t.theme||o.theme,d.cfg={icons:jQuery.extend({},o.icons),iconWidth:t.iconWidth||o.iconWidth,acceleratorWidth:t.acceleratorWidth||o.acceleratorWidth},n.forEach(function(e){e.html||e.divide?(e["@isMenu"]=!1,e.html&&(e["@html"]=e.html.call({item:e,config:o,opt:t}))):e["@isMenu"]=!0}),d[o.columnKeys.items]=n,d["@depth"]=a,d["@path"]=s||"root",d["@hasChild"]=function(){return this[o.columnKeys.items]&&this[o.columnKeys.items].length>0},h=jQuery(e.tmpl.get.call(this,"tmpl",d,o.columnKeys)),jQuery(document.body).append(h),p=this.queue.splice(a),p.forEach(function(e){e.$target.remove()}),this.queue.push({$target:h,data:jQuery.extend({},d)}),h.find("[data-menu-item-index]").bind("mouseover",function(){var e=this.getAttribute("data-menu-item-depth"),n=this.getAttribute("data-menu-item-index"),a=this.getAttribute("data-menu-item-path"),r=void 0,l=void 0,s=void 0,d=void 0,c=void 0,h=void 0;null!=e&&"undefined"!=typeof e&&(c=i.queue[e].data[o.columnKeys.items][n][o.columnKeys.items],h=i.queue[e].$target,h.find("[data-menu-item-index]").removeClass("hover"),jQuery(this).addClass("hover"),h.attr("data-selected-menu-item-index")!=n&&(h.attr("data-selected-menu-item-index",n),c&&c.length>0?(r=jQuery(this),l=r.offset(),s="fixed"==o.position?jQuery(document).scrollTop():0,d={"@parent":{left:l.left,top:l.top,width:r.outerWidth(),height:r.outerHeight()},left:l.left+r.outerWidth()-o.menuBodyPadding,top:l.top-o.menuBodyPadding-1-s},d=jQuery.extend(!0,t,d),u.call(i,d,c,Number(e)+1,a)):i.queue.splice(Number(e)+1).forEach(function(e){e.$target.remove()}))),e=null,n=null,a=null,r=null,l=null,s=null,d=null,c=null,h=null}),h.find("[data-menu-item-index]").bind("mouseout",function(){var e=this.getAttribute("data-menu-item-depth"),t=this.getAttribute("data-menu-item-index"),n=this.getAttribute("data-menu-item-path"),a=void 0;n&&(a=i.queue[e].data[o.columnKeys.items][t][o.columnKeys.items]),a&&a.length>0||jQuery(this).removeClass("hover")}),0==a&&(d.direction&&h.addClass("direction-"+d.direction),r.call(this,null,{self:this,items:n,parent:function(e){if(!e)return!1;var t=null;try{t=Function("","return this.config.items["+e.substring(5).replace(/\./g,"].items[")+"];").call(i)}catch(n){}return t}(d["@path"]),state:"popup"})),c.call(this,h,d),l.call(this,{self:this,items:n,element:h.get(0)}),d=null,h=null,p=null,t=null,n=null,a=null,s=null,this},d=function(e,t){var a=void 0,r=void 0;if(a=n.findParentNode(t.target,function(e){if(e.getAttribute("data-menu-item-index"))return!0})){if("undefined"==typeof e&&(e={}),r=function(t){if(!t)return!1;var n=void 0;try{n=Function("","return this["+t.substring(5).replace(/\./g,"]."+o.columnKeys.items+"[")+"];").call(e.items||o.items)}catch(i){console.log(ax5.info.getError("ax5menu","501","menuItemClick"))}try{return n}finally{n=null}}(a.getAttribute("data-menu-item-path")),!r)return this;r.check&&(function(e){var t={checkbox:function(e){this.checked=!e},radio:function(t){var n=this.name;e.forEach(function(e){e.check&&"radio"===e.check.type&&e.check.name==n&&(e.check.checked=!1)}),this.checked=!t}};t[this.type]&&t[this.type].call(this,this.checked),t=null}.call(r.check,o.items),o.itemClickAndClose||i.queue.forEach(function(e){e.$target.find("[data-menu-item-index]").each(function(){var t=e.data[o.columnKeys.items][this.getAttribute("data-menu-item-index")];t.check&&jQuery(this).find(".item-checkbox-wrap").attr("data-item-checked",t.check.checked)})})),i.onClick&&i.onClick.call(r,r,e.param)&&i.close(),r[o.columnKeys.items]&&0!=r[o.columnKeys.items].length||!o.itemClickAndClose||i.close()}else i.close();return a=null,r=null,this},c=function(e,t){var n=jQuery(window),i=jQuery(document),a="fixed"==o.position?n.height():i.height(),r=n.width(),l=e.outerHeight(),s=e.outerWidth(),d=t.left,c=t.top,u=o.position||"fixed";return d+s>r&&(d=t["@parent"]?t["@parent"].left-s+o.menuBodyPadding:r-s),c+l>a&&(c=a-l),e.css({left:d,top:c,position:u}),e=null,t=null,n=null,i=null,
a=null,r=null,l=null,s=null,d=null,c=null,u=null,this};this.init=function(){this.onStateChanged=o.onStateChanged,this.onClick=o.onClick,this.onLoad=o.onLoad,r.call(this,null,{self:this,state:"init"})},this.popup=function(){var e={event:function(e,t){e={left:e.clientX,top:"fixed"==o.position?e.clientY:e.pageY,width:o.width,theme:o.theme},e.left-=5,e.top-=5,o.offset&&(o.offset.left&&(e.left+=o.offset.left),o.offset.top&&(e.top+=o.offset.top)),t=jQuery.extend(!0,e,t);try{return t}finally{e=null}},object:function(e,t){e={left:e.left,top:e.top,width:e.width||o.width,theme:e.theme||o.theme},o.offset&&(o.offset.left&&(e.left+=o.offset.left),o.offset.top&&(e.top+=o.offset.top)),t=jQuery.extend(!0,e,t);try{return t}finally{e=null}}},t=function(e){e&&(o.theme=e)};return function(n,i){if(!n)return this;i=e["undefined"==typeof n.clientX?"object":"event"].call(this,n,i),t(i.theme);var r=[].concat(o.items),l=void 0;return i.items=r,i.filter&&(l=function(e){var t=[];return e.forEach(function(e){e.items&&e.items.length>0&&(e.items=l(e.items)),i.filter.call(e)&&t.push(e)}),t},i.items=r=l(r)),r.length&&(a.call(this,!1),s.call(this,i,r,0),this.popupEventAttachTimer&&clearTimeout(this.popupEventAttachTimer),this.popupEventAttachTimer=setTimeout(function(){a.call(this,!0,i)}.bind(this),500)),n=null,this}}(),this.attach=function(){var t={object:function(e,t){e={left:e.left,top:e.top,width:e.width||o.width,theme:e.theme||o.theme,direction:e.direction||o.direction},t=jQuery.extend(!0,t,e);try{return t}finally{e=null,t=null}}},r=function(e,n,r){var l=jQuery(e),d=l.offset(),c=l.outerHeight(),u=Number(e.getAttribute("data-menu-item-index")),h="fixed"==o.position?jQuery(document).scrollTop():0;if(o.items&&o.items[u][o.columnKeys.items]&&o.items[u][o.columnKeys.items].length){if(i.menuBar.openedIndex==u)return"click"==r&&i.close(),!1;i.menuBar.target.find("[data-menu-item-index]").removeClass("hover"),i.menuBar.opened=!0,i.menuBar.openedIndex=u,l.attr("data-menu-item-opened","true"),l.addClass("hover"),o.offset&&(o.offset.left&&(d.left+=o.offset.left),o.offset.top&&(d.top+=o.offset.top)),n=t.object.call(this,{left:d.left,top:d.top+c-h},n),s.call(i,n,o.items[u][o.columnKeys.items],0,"root."+e.getAttribute("data-menu-item-index")),a.call(i,!0,{})}e=null,n=null,l=null,d=null,c=null,u=null,h=null},l=function(e,t,n){var a=jQuery(e),r=(a.offset(),a.outerHeight(),Number(e.getAttribute("data-menu-item-index")));"fixed"==o.position?jQuery(document).scrollTop():0;!o.items||o.items[r][o.columnKeys.items]&&0!=o.items[r][o.columnKeys.items].length||i.onClick&&i.onClick.call(o.items[r],o.items[r])};return function(t,a){var s,d={},c=o.items;return"undefined"==typeof a&&(a={}),d.theme=a.theme||o.theme,d.cfg={icons:jQuery.extend({},o.icons),iconWidth:a.iconWidth||o.iconWidth,acceleratorWidth:a.acceleratorWidth||o.acceleratorWidth},c.forEach(function(e){e.html||e.divide?(e["@isMenu"]=!1,e.html&&(e["@html"]=e.html.call({item:e,config:o,opt:a}))):e["@isMenu"]=!0}),d[o.columnKeys.items]=c,s=jQuery(e.tmpl.get.call(this,"tmplMenubar",d,o.columnKeys)),i.menuBar={target:jQuery(t),opened:!1},i.menuBar.target.html(s),i.menuBar.target.bind("click",function(e){if(!e)return this;var t=n.findParentNode(e.target,function(e){if(e.getAttribute("data-menu-item-index"))return!0});t&&(l(t,a,"click"),r(t,a,"click")),t=null}),i.menuBar.target.bind("mouseover",function(e){if(!i.menuBar.opened)return!1;var t=n.findParentNode(e.target,function(e){if(e.getAttribute("data-menu-item-index"))return!0});t&&r(t,a,"mouseover"),t=null}),t=null,a=null,d=null,c=null,s=null,this}}(),this.close=function(){return i.menuBar&&i.menuBar.target&&(i.menuBar.target.find("[data-menu-item-index]").removeClass("hover"),i.menuBar.opened=!1,i.menuBar.openedIndex=null),a.call(this,!1),this.queue.forEach(function(e){e.$target.remove()}),this.queue=[],r.call(this,null,{self:this,state:"close"}),this},this.getCheckValue=function(){var e={},t=function(i){for(var o=i.length;o--;)i[o].check&&i[o].check.checked&&(e[i[o].check.name]?(n.isString(e[i[o].check.name])&&(e[i[o].check.name]=[e[i[o].check.name]]),e[i[o].check.name].push(i[o].check.value)):e[i[o].check.name]=i[o].check.value),i[o].items&&i[o].items.length>0&&t(i[o].items)};t(o.items);try{return e}finally{e=null,t=null}},this.main=function(){t.menu_instance=t.menu_instance||[],t.menu_instance.push(this),arguments&&n.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),e=ax5.ui.menu}(),function(){var e=ax5.ui.menu,t=function(e){return'\n        <div class="ax5-ui-menu {{theme}}" {{#width}}style="width:{{width}}px;"{{/width}}>\n            <div class="ax-menu-body">\n                {{#'+e.items+'}}\n                    {{^@isMenu}}\n                        {{#divide}}\n                        <div class="ax-menu-item-divide" data-menu-item-index="{{@i}}"></div>\n                        {{/divide}}\n                        {{#html}}\n                        <div class="ax-menu-item-html" data-menu-item-index="{{@i}}">{{{@html}}}</div>\n                        {{/html}}\n                    {{/@isMenu}}\n                    {{#@isMenu}}\n                    <div class="ax-menu-item" data-menu-item-depth="{{@depth}}" data-menu-item-index="{{@i}}" data-menu-item-path="{{@path}}.{{@i}}">\n                        <span class="ax-menu-item-cell ax-menu-item-checkbox">\n                            {{#check}}\n                            <span class="item-checkbox-wrap useCheckBox" {{#checked}}data-item-checked="true"{{/checked}}></span>\n                            {{/check}}\n                            {{^check}}\n                            <span class="item-checkbox-wrap"></span>\n                            {{/check}}\n                        </span>\n                        {{#icon}}\n                        <span class="ax-menu-item-cell ax-menu-item-icon" style="width:{{cfg.iconWidth}}px;">{{{.}}}</span>\n                        {{/icon}}\n                        <span class="ax-menu-item-cell ax-menu-item-label">{{{'+e.label+'}}}</span>\n                        {{#accelerator}}\n                        <span class="ax-menu-item-cell ax-menu-item-accelerator" style="width:{{cfg.acceleratorWidth}}px;"><span class="item-wrap">{{.}}</span></span>\n                        {{/accelerator}}\n                        {{#@hasChild}}\n                        <span class="ax-menu-item-cell ax-menu-item-handle">{{{cfg.icons.arrow}}}</span>\n                        {{/@hasChild}}\n                    </div>\n                    {{/@isMenu}}\n\n                {{/'+e.items+'}}\n            </div>\n            <div class="ax-menu-arrow"></div>\n        </div>\n        '},n=function(e){return'\n        <div class="ax5-ui-menubar {{theme}}">\n            <div class="ax-menu-body">\n                {{#'+e.items+'}}\n                    {{^@isMenu}}\n                        {{#divide}}\n                        <div class="ax-menu-item-divide" data-menu-item-index="{{@i}}"></div>\n                        {{/divide}}\n                        {{#html}}\n                        <div class="ax-menu-item-html" data-menu-item-index="{{@i}}">{{{@html}}}</div>\n                        {{/html}}\n                    {{/@isMenu}}\n                    {{#@isMenu}}\n                    <div class="ax-menu-item" data-menu-item-index="{{@i}}">\n                        {{#icon}}\n                        <span class="ax-menu-item-cell ax-menu-item-icon" style="width:{{cfg.iconWidth}}px;">{{{.}}}</span>\n                        {{/icon}}\n                        <span class="ax-menu-item-cell ax-menu-item-label">{{{'+e.label+"}}}</span>\n                    </div>\n                    {{/@isMenu}}\n                {{/"+e.items+"}}\n            </div>\n        </div>\n        "};e.tmpl={tmpl:t,tmplMenubar:n,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"select"},function(){var e=function(){var e=this,i=void 0;this.instanceId=ax5.getGuid(),this.config={theme:"default",animateTime:100,lang:{noSelected:"",noOptions:"no options",loading:"now loading..",multipleLabel:'"{{label}}"외 {{length}}건'},columnKeys:{optionValue:"value",optionText:"text",optionSelected:"selected"}},this.queue=[],this.activeSelectOptionGroup=null,this.activeSelectQueueIndex=-1,this.openTimer=null,this.closeTimer=null,this.waitOptionsCallback=null,this.keyUpTimer=null,this.xvar={},i=this.config;var o=jQuery(window),a={18:"KEY_ALT",8:"KEY_BACKSPACE",17:"KEY_CONTROL",46:"KEY_DELETE",40:"KEY_DOWN",35:"KEY_END",187:"KEY_EQUAL",27:"KEY_ESC",36:"KEY_HOME",45:"KEY_INSERT",37:"KEY_LEFT",189:"KEY_MINUS",34:"KEY_PAGEDOWN",33:"KEY_PAGEUP",13:"KEY_RETURN",39:"KEY_RIGHT",16:"KEY_SHIFT",9:"KEY_TAB",38:"KEY_UP",91:"KEY_WINDOW"},r=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),"changeValue"==t.state&&(e&&e.onChange?e.onChange.call(t,t):this.onChange&&this.onChange.call(t,t)),e=null,t=null,!0},l=function(){for(var e=this.queue.length,n=void 0;e--;)this.queue[e].$display&&(n=Math.max(this.queue[e].$select.outerWidth(),t.number(this.queue[e].minWidth)),this.queue[e].$display.css({"min-width":n}),this.queue[e].reset&&this.queue[e].$display.find(".addon-icon-reset").css({"line-height":this.queue[e].$display.height()+"px"}));return e=null,n=null,this},s=function(e){if(!this.activeSelectOptionGroup)return this;var t=this.queue[this.activeSelectQueueIndex],n={},i=0,a={},r={},l=void 0;e&&jQuery(document.body).append(this.activeSelectOptionGroup),n=t.$target.offset(),a={width:t.$target.outerWidth(),height:t.$target.outerHeight()},r={winWidth:Math.max(o.width(),jQuery(document.body).width()),winHeight:Math.max(o.height(),jQuery(document.body).height()),width:this.activeSelectOptionGroup.outerWidth(),height:this.activeSelectOptionGroup.outerHeight()},t.direction&&""!==t.direction&&"auto"!==t.direction?l=t.direction:(l="top",n.top-r.height-i<0?l="top":n.top+a.height+r.height+i>r.winHeight&&(l="bottom")),e&&this.activeSelectOptionGroup.addClass("direction-"+l),this.activeSelectOptionGroup.css(function(){if("top"==l){if(n.top+a.height+r.height+i>r.winHeight){var e=n.top+a.height/2-r.height/2;return e+r.height+i>r.winHeight&&(e=0),e<0&&(e=0),{left:n.left,top:e,width:a.width}}return{left:n.left,top:n.top+a.height+1,width:a.width}}if("bottom"==l)return{left:n.left,top:n.top-r.height-1,width:a.width}}.call(this))},d=function(e,n){if(!this.activeSelectOptionGroup)return this;var i=this.queue[this.activeSelectQueueIndex],o="display";return(n=t.findParentNode(e.target,function(e){return e.getAttribute("data-option-value")||""==e.getAttribute("data-option-value")?(o="optionItem",!0):i.$target.get(0)==e?(o="display",!0):void 0}))?("optionItem"===o&&(this.val(i.id,{index:{gindex:n.getAttribute("data-option-group-index"),index:n.getAttribute("data-option-index")}},void 0,"internal"),i.$select.trigger("change"),i.$display.focus(),i.multiple||this.close()),this):(this.close(),this)},c=function(e){if(e.keyCode==ax5.info.eventKeys.ESC)this.close();else if(e.which==ax5.info.eventKeys.RETURN)if(this.queue[this.activeSelectQueueIndex].optionFocusIndex>-1){var t=this.activeSelectOptionGroup.find('[data-option-focus-index="'+this.queue[this.activeSelectQueueIndex].optionFocusIndex+'"]');this.val(this.queue[this.activeSelectQueueIndex].id,{index:{gindex:t.attr("data-option-group-index"),index:t.attr("data-option-index")}},void 0,"internal"),this.queue[this.activeSelectQueueIndex].$select.trigger("change"),this.queue[this.activeSelectQueueIndex].multiple||this.close()}else this.close()},u=function(e){var n=this.queue[e],i=[];return t.isArray(n.selected)&&n.selected.length>0?n.selected.forEach(function(e){e.selected&&i.push(e[n.columnKeys.optionText])}):!n.multiple&&n.options&&n.options[0]?n.options[0].optgroup?i[0]=n.options[0].options[0][n.columnKeys.optionText]:i[0]=n.options[0][n.columnKeys.optionText]:i[0]=n.lang.noSelected,function(){if(n.multiple&&i.length>1){var e={label:i[0],length:i.length-1};return ax5.mustache.render(n.lang.multipleLabel,e)}return i[0]}()},h=function(e){this.queue[e].$displayLabel.html(u.call(this,e))},p=function(e,t){var n=[],i=-1,o=this.queue[e].indexedOptions.length-1,a=void 0;if(t){for(;o-i++;){if(a=this.queue[e].indexedOptions[i],(""+a.value).toLowerCase()==t.toLowerCase()){n=[{"@findex":a["@findex"],optionsSort:0}];break}var r=(""+a.value).toLowerCase().search(t.toLowerCase());if(r>-1&&(n.push({"@findex":a["@findex"],optionsSort:r}),n.length>2))break;r=null}n.sort(function(e,t){return e.optionsSort-t.optionsSort})}n&&n.length>0&&f.call(this,e,void 0,n[0]["@findex"]);try{return n}finally{n=null,i=null,o=null,a=null}},f=function(e,t,n){var i=void 0,o=void 0,a=void 0,r=void 0;if(this.activeSelectOptionGroup&&this.queue[e].options&&this.queue[e].options.length>0){"undefined"!=typeof n?i=n:(o=this.queue[e].optionFocusIndex==-1?this.queue[e].optionSelectedIndex||-1:this.queue[e].optionFocusIndex,o==-1?i=t>0?0:this.queue[e].optionItemLength-1:(i=o+t,i<0?i=0:i>this.queue[e].optionItemLength-1&&(i=this.queue[e].optionItemLength-1))),this.queue[e].optionFocusIndex=i,this.activeSelectOptionGroup.find("[data-option-focus-index]").removeClass("hover"),a=this.activeSelectOptionGroup.find('[data-option-focus-index="'+i+'"]').addClass("hover"),r=this.activeSelectOptionGroup.find('[data-els="content"]');var l=a.outerHeight(),s=r.innerHeight(),d=r.scrollTop(),c=a.position().top+r.scrollTop();s+d<c+l?r.scrollTop(c+l-s):d>c&&r.scrollTop(c)}},g=function(){var o=t.debounce(function(t,n){p.call(e,n,t),e.queue[n].$displayInput.val("")},300),r={click:function(n,i){var o=t.findParentNode(i.target,function(e){if(e.getAttribute("data-selected-clear"))return!0});o?this.val(n,{clear:!0}):e.activeSelectQueueIndex==n?this.queue[n].optionFocusIndex==-1&&e.close():(e.open(n),t.stopEvent(i))},keyUp:function(e,t){t.which==ax5.info.eventKeys.SPACE?r.click.call(this,e,t):a[t.which]||o(this.queue[e].$displayInput.val(),e)},keyDown:function(e,n){n.which==ax5.info.eventKeys.DOWN?(f.call(this,e,1),t.stopEvent(n)):n.which==ax5.info.eventKeys.UP&&(f.call(this,e,-1),t.stopEvent(n))},blur:function(e,t){},selectChange:function(e,t){this.val(e,this.queue[e].$select.val(),!0)}};return function(e){var t=this.queue[e],o={};return t.selected=[],t.options||(t.options=[]),t.options.forEach(function(e){e[i.columnKeys.optionSelected]&&t.selected.push(jQuery.extend({},e))}),t.$display?(t.$displayLabel.html(u.call(this,e)),t.options=m.call(this,e,t.options),l.call(this)):(o.instanceId=this.instanceId,o.id=t.id,o.name=t.name,o.theme=t.theme,o.tabIndex=t.tabIndex,o.multiple=t.multiple,o.reset=t.reset,o.label=u.call(this,e),o.formSize=function(){return t.size?"input-"+t.size:""}(),t.$display=n.tmpl.get.call(this,"tmpl",o),t.$displayLabel=t.$display.find('[data-ax5select-display="label"]'),t.$target.find("select").get(0)?(t.$select=t.$target.find("select"),t.$select.attr("tabindex","-1").attr("class","form-control "+o.formSize),o.name&&t.$select.attr("name","name"),o.multiple&&t.$select.attr("multiple","multiple")):(t.$select=n.tmpl.get.call(this,"selectTmpl",o),t.$target.append(t.$select)),t.$target.append(t.$display),t.$displayInput=t.$display.find('[data-ax5select-display="input"]'),t.options=m.call(this,e,t.options),l.call(this),t.$displayInput.unbind("blur.ax5select").bind("blur.ax5select",r.blur.bind(this,e)).unbind("keyup.ax5select").bind("keyup.ax5select",r.keyUp.bind(this,e)).unbind("keydown.ax5select").bind("keydown.ax5select",r.keyDown.bind(this,e))),t.$display.unbind("click.ax5select").bind("click.ax5select",r.click.bind(this,e)).unbind("keyup.ax5select").bind("keyup.ax5select",r.keyUp.bind(this,e)),t.$select.unbind("change.ax5select").bind("change.ax5select",r.selectChange.bind(this,e)),o=null,t=null,e=null,this}}(),m=function(){var n=function(e,t){t?this.queue[e].multiple?this.queue[e].selected.push(jQuery.extend({},t)):this.queue[e].selected[0]=jQuery.extend({},t):this.queue[e].selected=[]};return function(i,o){var a=this.queue[i],r=void 0,l=void 0,s=void 0,d=0;return n.call(this,i,!1),o?(a.options=o,a.indexedOptions=[],r=[],a.options.forEach(function(t,o){t.optgroup?(t["@gindex"]=o,t.options.forEach(function(t,o){t["@index"]=o,t["@findex"]=d,r.push('<option value="'+t[a.columnKeys.optionValue]+'" '+(t[a.columnKeys.optionSelected]?' selected="selected"':"")+">"+t[a.columnKeys.optionText]+"</option>"),t[a.columnKeys.optionSelected]&&n.call(e,i,t),a.indexedOptions.push({"@findex":d,value:t[a.columnKeys.optionValue],text:t[a.columnKeys.optionText]}),d++})):(t["@index"]=o,t["@findex"]=d,r.push('<option value="'+t[a.columnKeys.optionValue]+'" '+(t[a.columnKeys.optionSelected]?' selected="selected"':"")+">"+t[a.columnKeys.optionText]+"</option>"),t[a.columnKeys.optionSelected]&&n.call(e,i,t),a.indexedOptions.push({"@findex":d,value:t[a.columnKeys.optionValue],text:t[a.columnKeys.optionText]}),d++)}),a.optionItemLength=d,a.$select.html(r.join(""))):(l=t.toArray(a.$select.get(0).options),s=[],l.forEach(function(t,o){var r={};r[a.columnKeys.optionValue]=t.value,r[a.columnKeys.optionText]=t.text,r[a.columnKeys.optionSelected]=t.selected,r["@index"]=o,r["@findex"]=o,t.selected&&n.call(e,i,r),s.push(r),r=null}),a.options=s,a.indexedOptions=s),!a.multiple&&0==a.selected.length&&a.options&&a.options[0]&&(a.options[0].optgroup?(a.options[0].options[0][a.columnKeys.optionSelected]=!0,a.selected.push(jQuery.extend({},a.options[0].options[0]))):(a.options[0][a.columnKeys.optionSelected]=!0,a.selected.push(jQuery.extend({},a.options[0])))),r=null,l=null,s=null,a.options}}(),v=function(e){return t.isString(e)||(e=jQuery(e).data("data-ax5select-id")),t.isString(e)?t.search(this.queue,function(){return this.id==e}):void console.log(ax5.info.getError("ax5select","402","getQueIdx"))};this.init=function(){this.onStateChanged=i.onStateChanged,this.onChange=i.onChange,jQuery(window).bind("resize.ax5select-display-"+this.instanceId,function(){l.call(this)}.bind(this))},this.bind=function(e){var n={},o=void 0;return e=jQuery.extend(!0,n,i,e),e.target?(e.$target=jQuery(e.target),e.id||(e.id=e.$target.data("data-ax5select-id")),e.id||(e.id="ax5select-"+ax5.getGuid(),e.$target.data("data-ax5select-id",e.id)),e.name=e.$target.attr("data-ax5select"),e.options&&(e.options=JSON.parse(JSON.stringify(e.options))),function(n){t.isObject(n)&&!n.error&&(e=jQuery.extend(!0,e,n))}(t.parseJson(e.$target.attr("data-ax5select-config"),!0)),o=t.search(this.queue,function(){return this.id==e.id}),o===-1?(this.queue.push(e),g.call(this,this.queue.length-1)):(this.queue[o].selected=[],this.queue[o].options=e.options,this.queue[o]=jQuery.extend(!0,{},this.queue[o],e),g.call(this,o)),n=null,o=null,this):(console.log(ax5.info.getError("ax5select","401","bind")),this)},this.open=function(){var e=function(e){e.onExpand.call({self:this,item:e},function(e){if(this.waitOptionsCallback){var i={},o=this.queue[this.activeSelectQueueIndex];!function(e,n){var i={};n.options.forEach(function(t,n){t["@index"]=n,i[t[e.columnKeys.optionValue]]=t}),t.isArray(e.selected)&&e.selected.forEach(function(t){i[t[e.columnKeys.optionValue]]&&(n.options[i[t[e.columnKeys.optionValue]]["@index"]][e.columnKeys.optionSelected]=!0)})}(o,e),o.$displayLabel.html(u.call(this,this.activeSelectQueueIndex)),o.options=m.call(this,this.activeSelectQueueIndex,e.options),l.call(this),i.id=o.id,i.theme=o.theme,i.size="ax5select-option-group-"+o.size,i.multiple=o.multiple,i.lang=o.lang,i.options=o.options,this.activeSelectOptionGroup.find('[data-els="content"]').html(n.tmpl.get.call(this,"optionsTmpl",i,o.columnKeys))}}.bind(this))};return function(o,a){this.waitOptionsCallback=null;var l=t.isNumber(o)?o:v.call(this,o),u=this.queue[l],h={},p=void 0,f=void 0;return u.$display.attr("disabled")?this:(this.openTimer&&clearTimeout(this.openTimer),this.activeSelectOptionGroup?this.activeSelectQueueIndex==l?this:a>2?this:(this.close(),this.openTimer=setTimeout(function(){this.open(l,(a||0)+1)}.bind(this),i.animateTime),this):(u.optionFocusIndex=-1,u.selected&&u.selected.length>0&&(u.optionSelectedIndex=u.selected[0]["@findex"]),h.id=u.id,h.theme=u.theme,h.size="ax5select-option-group-"+u.size,h.multiple=u.multiple,h.lang=u.lang,u.$display.attr("data-select-option-group-opened","true"),u.onExpand&&(h.waitOptions=!0),h.options=u.options,this.activeSelectOptionGroup=n.tmpl.get.call(this,"optionGroupTmpl",h),this.activeSelectOptionGroup.find('[data-els="content"]').html(n.tmpl.get.call(this,"optionsTmpl",h,u.columnKeys)),this.activeSelectQueueIndex=l,s.call(this,"append"),jQuery(window).bind("resize.ax5select-"+this.instanceId,function(){s.call(this)}.bind(this)),u.selected&&u.selected.length>0&&(f=this.activeSelectOptionGroup.find('[data-option-index="'+u.selected[0]["@index"]+'"]'),f.get(0)&&(p=f.position().top-this.activeSelectOptionGroup.height()/3,this.activeSelectOptionGroup.find('[data-els="content"]').stop().animate({scrollTop:p},u.animateTime,"swing",function(){}))),u.$displayInput.val(""),setTimeout(function(){u.$displayInput.trigger("focus"),jQuery(window).bind("keyup.ax5select-"+this.instanceId,function(e){e=e||window.event,c.call(this,e),t.stopEvent(e)}.bind(this)),jQuery(window).bind("click.ax5select-"+this.instanceId,function(e){e=e||window.event,d.call(this,e),t.stopEvent(e)}.bind(this))}.bind(this),300),r.call(this,u,{self:this,state:"open",item:u}),u.onExpand&&(this.waitOptionsCallback=!0,e.call(this,u)),h=null,p=null,f=null,this))}}(),this.update=function(e){return this.bind(e),this},this.setOptions=function(e,t){var n=v.call(this,e);return this.queue[n].selected=[],this.queue[n].options=t,g.call(this,n),this},this.val=function(){var n=function(e,t,n){return"undefined"==typeof n?!e.multiple||!t:n},i=function(e){this.queue[e].options.forEach(function(e){e.optgroup?e.options.forEach(function(e){e.selected=!1}):e.selected=!1})},o={index:function(i,o,a){var r=this.queue[i];t.isString(o.index.gindex)?(r.options[o.index.gindex].options[o.index.index][r.columnKeys.optionSelected]=n(r,r.options[o.index.gindex].options[o.index.index][r.columnKeys.optionSelected],a),e.activeSelectOptionGroup.find('[data-option-group-index="'+o.index.gindex+'"][data-option-index="'+o.index.index+'"]').attr("data-option-selected",r.options[o.index.gindex].options[o.index.index][r.columnKeys.optionSelected].toString())):(r.options[o.index.index][r.columnKeys.optionSelected]=n(r,r.options[o.index.index][r.columnKeys.optionSelected],a),e.activeSelectOptionGroup.find('[data-option-index="'+o.index.index+'"]').attr("data-option-selected",r.options[o.index.index][r.columnKeys.optionSelected].toString())),m.call(this,i,r.options),h.call(this,i),s.call(this)},arr:function(n,i,a){i.forEach(function(i){if(t.isString(i)||t.isNumber(i))o.value.call(e,n,i,a);else for(var r in o)if(i[r]){o[r].call(e,n,i,a);break}})},value:function(e,i,o){var a=this.queue[e],r=t.search(a.options,function(){return this[a.columnKeys.optionValue]==i});return r>-1?(a.options[r][a.columnKeys.optionSelected]=n(a,a.options[r][a.columnKeys.optionSelected],o),m.call(this,e,a.options),void h.call(this,e)):void console.log(ax5.info.getError("ax5select","501","val"))},text:function(e,i,o){var a=this.queue[e],r=t.search(a.options,function(){return this[a.columnKeys.optionText]==i});return r>-1?(a.options[r][a.columnKeys.optionSelected]=n(a,a.options[r][a.columnKeys.optionSelected],o),m.call(this,e,a.options),void h.call(this,e)):void console.log(ax5.info.getError("ax5select","501","val"))},clear:function(e){i.call(this,e),m.call(this,e,this.queue[e].options),h.call(this,e),this.activeSelectOptionGroup&&this.activeSelectOptionGroup.find("[data-option-index]").attr("data-option-selected","false")}};return function(e,n,a,l){var s=t.isNumber(e)?e:v.call(this,e);if(!this.queue[s])return this;if("undefined"==typeof n||this.queue[s].multiple||i.call(this,s),"undefined"==typeof n)return this.queue[s].selected;if(t.isArray(n))o.arr.call(this,s,n,a);else if(t.isString(n)||t.isNumber(n))o.value.call(this,s,n,a);else if(null===n)o.clear.call(this,s);else for(var d in o)if(n[d]){o[d].call(this,s,n,a);break}return"undefined"!=typeof n&&r.call(this,this.queue[s],{self:this,item:this.queue[s],state:l?"changeValue":"setValue",value:this.queue[s].selected,internal:l}),e=null,this}}(),this.close=function(e){return this.closeTimer&&clearTimeout(this.closeTimer),this.activeSelectOptionGroup?(e=this.queue[this.activeSelectQueueIndex],e.optionFocusIndex=-1,e.$displayInput.val("").trigger("blur"),e.$display.removeAttr("data-select-option-group-opened").trigger("focus"),this.activeSelectOptionGroup.addClass("destroy"),jQuery(window).unbind("resize.ax5select-"+this.instanceId).unbind("click.ax5select-"+this.instanceId).unbind("keyup.ax5select-"+this.instanceId),this.closeTimer=setTimeout(function(){this.activeSelectOptionGroup&&this.activeSelectOptionGroup.remove(),this.activeSelectOptionGroup=null,this.activeSelectQueueIndex=-1;var t={self:this,item:e,value:e.selected,state:"close"};r.call(this,e,t),e.onClose&&e.onClose.call(t)}.bind(this),i.animateTime),this.waitOptionsCallback=null,this):this},this.enable=function(e){var t=v.call(this,e);return this.queue[t].$display.removeAttr("disabled"),this.queue[t].$select.removeAttr("disabled"),r.call(this,this.queue[t],{self:this,state:"enable"}),this},this.disable=function(e){var t=v.call(this,e);return this.queue[t].$display.attr("disabled","disabled"),this.queue[t].$select.attr("disabled","disabled"),r.call(this,this.queue[t],{self:this,state:"disable"}),this},this.main=function(){arguments&&t.isObject(arguments[0])?this.setConfig(arguments[0]):this.init()}.apply(this,arguments)};return e}()),n=ax5.ui.select}(),ax5.ui.select_instance=new ax5.ui.select,jQuery.fn.ax5select=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"open":return ax5.ui.select_instance.open(this);case"close":return ax5.ui.select_instance.close(this);case"setValue":return ax5.ui.select_instance.val(this,arguments[1],arguments[2]);case"getValue":return ax5.ui.select_instance.val(this);case"enable":return ax5.ui.select_instance.enable(this);case"disable":return ax5.ui.select_instance.disable(this);case"setOptions":return ax5.ui.select_instance.setOptions(this,arguments[1]);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend({},e,t),ax5.ui.select_instance.bind(e)});return this}}(),function(){var e=ax5.ui.select,t=function(e){return'\n<div class="ax5select-option-group {{theme}} {{size}}" data-ax5select-option-group="{{id}}">\n    <div class="ax-select-body">\n        <div class="ax-select-option-group-content" data-els="content"></div>\n    </div>\n    <div class="ax-select-arrow"></div> \n</div>\n'},n=function(e){return'\n<a {{^tabIndex}}href="#ax5select-{{id}}" {{/tabIndex}}{{#tabIndex}}tabindex="{{tabIndex}}" {{/tabIndex}}class="form-control {{formSize}} ax5select-display {{theme}}" \ndata-ax5select-display="{{id}}" data-ax5select-instance="{{instanceId}}">\n    <div class="ax5select-display-table" data-els="display-table">\n        <div data-ax5select-display="label">{{label}}</div>\n        <div data-ax5select-display="addon"> \n            {{#multiple}}{{#reset}}\n            <span class="addon-icon-reset" data-selected-clear="true">{{{.}}}</span>\n            {{/reset}}{{/multiple}}\n            {{#icons}}\n            <span class="addon-icon-closed">{{clesed}}</span>\n            <span class="addon-icon-opened">{{opened}}</span>\n            {{/icons}}\n            {{^icons}}\n            <span class="addon-icon-closed"><span class="addon-icon-arrow"></span></span>\n            <span class="addon-icon-opened"><span class="addon-icon-arrow"></span></span>\n            {{/icons}}\n        </div>\n    </div>\n    <input type="text" tabindex="-1" data-ax5select-display="input" \n    style="position:absolute;z-index:0;left:0px;top:0px;font-size:1px;opacity: 0;width:1px;border: 0px none;color : transparent;text-indent: -9999em;" />\n</a>\n'},i=function(e){return'\n<select tabindex="-1" class="form-control {{formSize}}" name="{{name}}" {{#multiple}}multiple="multiple"{{/multiple}}></select>\n'},o=function(e){return'\n{{#waitOptions}}\n    <div class="ax-select-option-item">\n            <div class="ax-select-option-item-holder">\n                <span class="ax-select-option-item-cell ax-select-option-item-label">\n                    {{{lang.loading}}}\n                </span>\n            </div>\n        </div>\n{{/waitOptions}}\n{{^waitOptions}}\n    {{#options}}\n        {{#optgroup}}\n            <div class="ax-select-option-group">\n                <div class="ax-select-option-item-holder">\n                    <span class="ax-select-option-group-label">\n                        {{{.}}}\n                    </span>\n                </div>\n                {{#options}}\n                <div class="ax-select-option-item" data-option-focus-index="{{@findex}}" data-option-group-index="{{@gindex}}" data-option-index="{{@index}}" \n                data-option-value="{{'+e.optionValue+'}}" \n                {{#'+e.optionSelected+'}}data-option-selected="true"{{/'+e.optionSelected+'}}>\n                    <div class="ax-select-option-item-holder">\n                        {{#multiple}}\n                        <span class="ax-select-option-item-cell ax-select-option-item-checkbox">\n                            <span class="item-checkbox-wrap useCheckBox" data-option-checkbox-index="{{@i}}"></span>\n                        </span>\n                        {{/multiple}}\n                        <span class="ax-select-option-item-cell ax-select-option-item-label">{{{'+e.optionText+'}}}</span>\n                    </div>\n                </div>\n                {{/options}}\n            </div>                            \n        {{/optgroup}}\n        {{^optgroup}}\n        <div class="ax-select-option-item" data-option-focus-index="{{@findex}}" data-option-index="{{@index}}" data-option-value="{{'+e.optionValue+'}}" {{#'+e.optionSelected+'}}data-option-selected="true"{{/'+e.optionSelected+'}}>\n            <div class="ax-select-option-item-holder">\n                {{#multiple}}\n                <span class="ax-select-option-item-cell ax-select-option-item-checkbox">\n                    <span class="item-checkbox-wrap useCheckBox" data-option-checkbox-index="{{@i}}"></span>\n                </span>\n                {{/multiple}}\n                <span class="ax-select-option-item-cell ax-select-option-item-label">{{{'+e.optionText+'}}}</span>\n            </div>\n        </div>\n        {{/optgroup}}\n    {{/options}}\n    {{^options}}\n        <div class="ax-select-option-item">\n            <div class="ax-select-option-item-holder">\n                <span class="ax-select-option-item-cell ax-select-option-item-label">\n                    {{{lang.noOptions}}}\n                </span>\n            </div>\n        </div>\n    {{/options}}\n{{/waitOptions}}\n'};e.tmpl={optionGroupTmpl:t,tmpl:n,selectTmpl:i,optionsTmpl:o,get:function(t,n,i){return jQuery(ax5.mustache.render(e.tmpl[t].call(this,i),n))}}}();var _typeof="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};!function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"grid"},function(){return function(){var i=this,o=void 0,a={33:"KEY_PAGEUP",34:"KEY_PAGEDOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_LEFT",38:"KEY_UP",39:"KEY_RIGHT",40:"KEY_DOWN"};this.instanceId=ax5.getGuid(),this.config={theme:"default",animateTime:250,debounceTime:250,appendDebouncer:null,appendDebounceTimes:0,appendProgressIcon:"...",appendProgress:!1,frozenColumnIndex:0,frozenRowIndex:0,showLineNumber:!1,showRowSelector:!1,multipleSelect:!0,virtualScrollY:!0,virtualScrollX:!0,headerSelect:!0,virtualScrollYCountMargin:0,virtualScrollAccelerated:!0,
virtualScrollAcceleratedDelayTime:10,height:0,columnMinWidth:100,lineNumberColumnWidth:30,rowSelectorColumnWidth:26,sortable:void 0,remoteSort:!1,header:{display:!0,align:!1,columnHeight:26,columnPadding:3,columnBorderWidth:1,selector:!0},body:{align:!1,columnHeight:26,columnPadding:3,columnBorderWidth:1,grouping:!1,mergeCells:!1},rightSum:!1,footSum:!1,page:{height:25,display:!0,statusDisplay:!0,navigationItemCount:5},scroller:{size:15,barMinSize:15,trackPadding:4},columnKeys:{selected:"__selected__",modified:"__modified__",deleted:"__deleted__",disableSelection:"__disable_selection__"},tree:{use:!1,hashDigit:8,indentWidth:10,arrowWidth:15,iconWidth:18,icons:{openedArrow:"▾",collapsedArrow:"▸",groupIcon:"⊚",collapsedGroupIcon:"⊚",itemIcon:"⊙"},columnKeys:{parentKey:"pid",selfKey:"id",collapse:"collapse",hidden:"hidden",parentHash:"__hp__",selfHash:"__hs__",children:"__children__",depth:"__depth__"}}},this.xvar={bodyTrHeight:0,scrollContentWidth:0,scrollContentHeight:0,scrollTimer:null},this.columns=[],this.colGroup=[],this.footSumColumns=[],this.bodyGrouping={},this.list=[],this.proxyList=null,this.page=null,this.selectedDataIndexs=[],this.deletedList=[],this.sortInfo={},this.focusedColumn={},this.selectedColumn={},this.isInlineEditing=!1,this.inlineEditing={},this.listIndexMap={},this.contextMenu=null,this.headerTable={},this.leftHeaderData={},this.headerData={},this.rightHeaderData={},this.bodyRowTable={},this.leftBodyRowData={},this.bodyRowData={},this.rightBodyRowData={},this.bodyRowMap={},this.bodyGroupingTable={},this.leftBodyGroupingData={},this.bodyGroupingData={},this.rightBodyGroupingData={},this.bodyGroupingMap={},this.footSumTable={},this.leftFootSumData={},this.footSumData={},this.needToPaintSum=!0,o=this.config;var r=function(){var e={instanceId:this.id};return this.$target.html(n.tmpl.get("main",e)),this.$={container:{hidden:this.$target.find('[data-ax5grid-container="hidden"]'),root:this.$target.find('[data-ax5grid-container="root"]'),header:this.$target.find('[data-ax5grid-container="header"]'),body:this.$target.find('[data-ax5grid-container="body"]'),page:this.$target.find('[data-ax5grid-container="page"]'),scroller:this.$target.find('[data-ax5grid-container="scroller"]')},panel:{"aside-header":this.$target.find('[data-ax5grid-panel="aside-header"]'),"left-header":this.$target.find('[data-ax5grid-panel="left-header"]'),header:this.$target.find('[data-ax5grid-panel="header"]'),"header-scroll":this.$target.find('[data-ax5grid-panel-scroll="header"]'),"right-header":this.$target.find('[data-ax5grid-panel="right-header"]'),"top-aside-body":this.$target.find('[data-ax5grid-panel="top-aside-body"]'),"top-left-body":this.$target.find('[data-ax5grid-panel="top-left-body"]'),"top-body":this.$target.find('[data-ax5grid-panel="top-body"]'),"top-body-scroll":this.$target.find('[data-ax5grid-panel-scroll="top-body"]'),"top-right-body":this.$target.find('[data-ax5grid-panel="top-right-body"]'),"aside-body":this.$target.find('[data-ax5grid-panel="aside-body"]'),"aside-body-scroll":this.$target.find('[data-ax5grid-panel-scroll="aside-body"]'),"left-body":this.$target.find('[data-ax5grid-panel="left-body"]'),"left-body-scroll":this.$target.find('[data-ax5grid-panel-scroll="left-body"]'),body:this.$target.find('[data-ax5grid-panel="body"]'),"body-scroll":this.$target.find('[data-ax5grid-panel-scroll="body"]'),"right-body":this.$target.find('[data-ax5grid-panel="right-body"]'),"right-body-scroll":this.$target.find('[data-ax5grid-panel-scroll="right-body"]'),"bottom-aside-body":this.$target.find('[data-ax5grid-panel="bottom-aside-body"]'),"bottom-left-body":this.$target.find('[data-ax5grid-panel="bottom-left-body"]'),"bottom-body":this.$target.find('[data-ax5grid-panel="bottom-body"]'),"bottom-body-scroll":this.$target.find('[data-ax5grid-panel-scroll="bottom-body"]'),"bottom-right-body":this.$target.find('[data-ax5grid-panel="bottom-right-body"]')},livePanelKeys:[],scroller:{vertical:this.$target.find('[data-ax5grid-scroller="vertical"]'),"vertical-bar":this.$target.find('[data-ax5grid-scroller="vertical-bar"]'),horizontal:this.$target.find('[data-ax5grid-scroller="horizontal"]'),"horizontal-bar":this.$target.find('[data-ax5grid-scroller="horizontal-bar"]'),corner:this.$target.find('[data-ax5grid-scroller="corner"]')},page:{navigation:this.$target.find('[data-ax5grid-page="navigation"]'),status:this.$target.find('[data-ax5grid-page="status"]')},form:{clipboard:this.$target.find('[data-ax5grid-form="clipboard"]')},resizer:{vertical:this.$target.find('[data-ax5grid-resizer="vertical"]'),horizontal:this.$target.find('[data-ax5grid-resizer="horizontal"]')}},this.$.container.root.css({height:this.config.height||this.config._height}),this},l=function(e){t.isArray(e)||(e=[]),this.columns=t.deepCopy(e),this.headerTable=n.util.makeHeaderTable.call(this,this.columns),this.xvar.frozenColumnIndex=o.frozenColumnIndex||0,this.bodyRowTable=n.util.makeBodyRowTable.call(this,this.columns),this.bodyRowMap=n.util.makeBodyRowMap.call(this,this.bodyRowTable),this.xvar.bodyTrHeight=this.bodyRowTable.rows.length*this.config.body.columnHeight;for(var i={},a=0,r=this.headerTable.rows.length;a<r;a++)for(var l=this.headerTable.rows[a],s=0,d=l.cols.length;s<d;s++)i[l.cols[s].colIndex]=jQuery.extend({},l.cols[s]);this.colGroup=[];for(var c in i)this.colGroup.push(i[c]);return this},s=function(){l.call(this,this.config.columns),d.call(this),this.config.footSum&&(c.call(this,this.config.footSum),this.needToPaintSum=!0),this.config.body.grouping&&u.call(this,this.config.body.grouping),h.call(this,!0),n.header.repaint.call(this,!0),n.body.repaint.call(this,!0),n.scroller.resize.call(this)},d=function(){var e=this.$.container.root.width()-function(){var e=0;return o.showLineNumber&&(e+=o.lineNumberColumnWidth),o.showRowSelector&&(e+=o.rowSelectorColumnWidth),e+=o.scroller.size}(),n=0,i=void 0,a=[],r=this.colGroup,l=void 0,s=void 0;for(l=0,s=r.length;l<s;l++)t.isNumber(r[l].width)?n+=r[l]._width=r[l].width:"*"===r[l].width?a.push(l):"%"===t.right(r[l].width,1)&&(n+=r[l]._width=e*t.left(r[l].width,"%")/100);if(a.length>0)for(i=(e-n)/a.length,l=0,s=a.length;l<s;l++)r[a[l]]._width=i},c=function(e){t.isArray(e)?this.footSumTable=n.util.makeFootSumTable.call(this,this.footSumColumns=e):(this.footSumColumns=[],this.footSumTable={})},u=function(e){var t=jQuery.extend({},e);"by"in t&&"columns"in t?(this.bodyGrouping={by:t.by,columns:t.columns},this.bodyGroupingTable=n.util.makeBodyGroupingTable.call(this,this.bodyGrouping.columns),this.sortInfo=function(){for(var e={},t=0,n=this.bodyGrouping.by.length;t<n;t++){e[this.bodyGrouping.by[t]]={orderBy:"asc",seq:t,fixed:!0};for(var i=0,o=this.colGroup.length;i<o;i++)this.colGroup[i].key===this.bodyGrouping.by[t]&&(this.colGroup[i].sort="asc",this.colGroup[i].sortFixed=!0)}return e}.call(this)):o.body.grouping=!1},h=function(e){var t=this.proxyList?this.proxyList:this.list;if(Math.min(this.$target.innerWidth(),this.$target.innerHeight())<5)return!1;this.config.height||this.$.container.root.css({height:this.config._height=this.$target.height()});var n=this.$.container.root.width(),i=this.$.container.root.height(),a=n,r=i,l=o.asidePanelWidth=function(){var e=0;return o.showLineNumber&&(e+=o.lineNumberColumnWidth),o.showRowSelector&&(e+=o.rowSelectorColumnWidth),e}(),s=o.frozenPanelWidth=function(e,t){for(var n=0,i=0,o=t;i<o;i++)n+=e[i]._width;return n}(this.colGroup,o.frozenColumnIndex),d=void 0,c=void 0,u=void 0,h=0,p=function(e){return o.frozenRowIndex*e}(this.xvar.bodyTrHeight),f=function(e){return this.footSumColumns.length*e}.call(this,this.xvar.bodyTrHeight),g=o.header.display?this.headerTable.rows.length*o.header.columnHeight:0,m=o.page.display?o.page.height:0;(function(){d=i-g-m-f<t.length*this.xvar.bodyTrHeight?this.config.scroller.size:0,c=function(){for(var e=0,t=n-l-d,i=0,o=this.colGroup.length;i<o;i++)e+=this.colGroup[i]._width;return e>t?this.config.scroller.size:0}.call(this),c>0&&(d=i-g-m-f-c<t.length*this.xvar.bodyTrHeight?this.config.scroller.size:0)}).call(this),a=n-d,r=i-m-c,u=r-g;var v=function(e,t,n,i){var r={},d=!1;switch(n){case"aside":0===l?d=!0:(r.left=0,r.width=l);break;case"left":0===o.frozenColumnIndex?d=!0:(r.left=l,r.width=s);break;case"right":o.rightSum||(d=!0);break;default:"page"!==i&&(0===o.frozenColumnIndex?r.left=l:r.left=s+l,r.width=a-l-s-h)}if(d)return e.hide(),this;if("body"===i)switch(t){case"top":0==o.frozenRowIndex?d=!0:(r.top=0,r.height=p);break;case"bottom":o.footSum?(r.top=u-f,r.height=f):d=!0;break;default:r.top=p,r.height=u-p-f}else"header"===i?r.height=g:"page"===i&&(0==m?d=!0:r.height=m);return d?(e.hide(),this):(e.show().css(r),this)},x=function(e,t,n,i){var o={},l=!1;switch(i){case"vertical":t>0?(o.width=t,o.height=r,o.bottom=n+m):l=!0;break;case"horizontal":n>0?(o.width=a,o.height=n,o.right=t,o.bottom=m):l=!0;break;case"corner":t>0&&n>0?(o.width=t,o.height=n,o.bottom=m):l=!0}return l?(e.hide(),this):void e.show().css(o)};return this.$.container.header.css({height:g}),this.$.container.body.css({height:u}),v.call(this,this.$.panel["aside-header"],"","aside","header"),v.call(this,this.$.panel["left-header"],"","left","header"),v.call(this,this.$.panel.header,"","","header"),v.call(this,this.$.panel["right-header"],"","right","header"),v.call(this,this.$.panel["top-aside-body"],"top","aside","body"),v.call(this,this.$.panel["top-left-body"],"top","left","body"),v.call(this,this.$.panel["top-body"],"top","","body"),v.call(this,this.$.panel["top-right-body"],"top","right","body"),v.call(this,this.$.panel["aside-body"],"","aside","body"),v.call(this,this.$.panel["left-body"],"","left","body"),v.call(this,this.$.panel.body,"","","body"),v.call(this,this.$.panel["right-body"],"","right","body"),v.call(this,this.$.panel["bottom-aside-body"],"bottom","aside","body"),v.call(this,this.$.panel["bottom-left-body"],"bottom","left","body"),v.call(this,this.$.panel["bottom-body"],"bottom","","body"),v.call(this,this.$.panel["bottom-right-body"],"bottom","right","body"),x.call(this,this.$.scroller.vertical,d,c,"vertical"),x.call(this,this.$.scroller.horizontal,d,c,"horizontal"),x.call(this,this.$.scroller.corner,d,c,"corner"),v.call(this,this.$.container.page,"","","page"),this.xvar.bodyHeight=this.$.panel.body.height(),this.xvar.bodyWidth=this.$.panel.body.width(),!0},p=function(e){if(n.header.repaint.call(this),t.isFunction(this.config.remoteSort)){var i={sortInfo:[]};for(var o in e)i.sortInfo.push({key:o,orderBy:e[o].orderBy,seq:e[o].seq});i.sortInfo.sort(function(e,t){return e.seq>t.seq}),this.config.remoteSort.call(i,i)}else this.config.body.grouping?this.list=n.data.initData.call(this,n.data.sort.call(this,e,n.data.clearGroupingData.call(this,this.list))):this.list=n.data.sort.call(this,e,n.data.clearGroupingData.call(this,this.list),{resetLineNumber:!0}),n.body.repaint.call(this,!0),n.scroller.resize.call(this)};this.init=function(e){if(o=jQuery.extend(!0,{},o,e),!o.target)return console.log(ax5.info.getError("ax5grid","401","init")),this;this.onStateChanged=o.onStateChanged,this.onClick=o.onClick,this.onLoad=o.onLoad,this.onDataChanged=o.body.onDataChanged,this.$target=jQuery(o.target),function(e){t.isObject(e)&&!e.error&&(o=jQuery.extend(!0,o,e))}.call(this,t.parseJson(this.$target.attr("data-ax5grid-config"),!0));var s=this.config=o;return this.config.height||(this.config._height=this.$target.height()),this.id||(this.id=this.$target.data("data-ax5grid-id")),this.id||(this.id="ax5grid-"+this.instanceId,this.$target.data("data-ax5grid-id",s.id)),n.data.init.call(this),this.config.tree.use&&(this.sortInfo={},this.sortInfo[this.config.tree.columnKeys.selfHash]={orderBy:"asc",seq:0,fixed:!0}),r.call(this),l.call(this,s.columns),d.call(this),s.footSum&&c.call(this,s.footSum),s.body.grouping&&u.call(this,s.body.grouping),h.call(this,!0),n.header.init.call(this),n.header.repaint.call(this),n.body.init.call(this),n.body.repaint.call(this),n.scroller.init.call(this),n.scroller.resize.call(this),jQuery(window).bind("resize.ax5grid-"+this.id,function(){h.call(i),n.scroller.resize.call(i),n.body.repaint.call(i)}),jQuery(document.body).on("click.ax5grid-"+this.id,function(e){var o=!1,a=t.findParentNode(e.target,function(e){return!!(o=e.getAttribute("data-ax5grid-inline-edit-picker"))||"root"===e.getAttribute("data-ax5grid-container")});a&&a.getAttribute("data-ax5grid-instance")===this.id?i.focused=!0:(i.focused=!1,n.body.blur.call(this))}.bind(this)),jQuery(window).on("keydown.ax5grid-"+this.instanceId,function(e){i.focused&&(i.isInlineEditing?e.which==ax5.info.eventKeys.ESC?i.keyDown("ESC",e.originalEvent):e.which==ax5.info.eventKeys.RETURN?i.keyDown("RETURN",e.originalEvent):e.which==ax5.info.eventKeys.TAB?(i.keyDown("TAB",e.originalEvent),t.stopEvent(e)):e.which==ax5.info.eventKeys.UP?i.keyDown("RETURN",{shiftKey:!0}):e.which==ax5.info.eventKeys.DOWN&&i.keyDown("RETURN",{}):e.metaKey||e.ctrlKey?67==e.which&&i.copySelect():a[e.which]?(i.keyDown(a[e.which],e.originalEvent),t.stopEvent(e)):e.which==ax5.info.eventKeys.ESC?i.focused&&n.body.blur.call(i):e.which==ax5.info.eventKeys.RETURN||e.which==ax5.info.eventKeys.SPACE?i.keyDown("RETURN",e.originalEvent):e.which==ax5.info.eventKeys.TAB?t.stopEvent(e):Object.keys(i.focusedColumn).length)}),jQuery(window).on("keyup.ax5grid-"+this.instanceId,function(e){i.focused&&(i.isInlineEditing||e.metaKey||e.ctrlKey||a[e.which]||e.which==ax5.info.eventKeys.ESC||e.which==ax5.info.eventKeys.RETURN||e.which==ax5.info.eventKeys.SPACE||e.which==ax5.info.eventKeys.TAB||Object.keys(i.focusedColumn).length&&i.keyDown("INLINE_EDIT",e.originalEvent))}),setTimeout(function(){this.onLoad&&this.onLoad.call({self:this})}.bind(this)),this},this.align=function(){return h.call(this)&&(n.body.repaint.call(this),n.scroller.resize.call(this)),this},this.repaint=function(){return n.header.repaint.call(this),n.body.repaint.call(this,!0),n.scroller.resize.call(this),this},this.keyDown=function(){var e={KEY_UP:function(){n.body.moveFocus.call(this,"UP")},KEY_DOWN:function(){n.body.moveFocus.call(this,"DOWN")},KEY_LEFT:function(){n.body.moveFocus.call(this,"LEFT")},KEY_RIGHT:function(){n.body.moveFocus.call(this,"RIGHT")},KEY_HOME:function(){n.body.moveFocus.call(this,"HOME")},KEY_END:function(){n.body.moveFocus.call(this,"END")},INLINE_EDIT:function(e){n.body.inlineEdit.active.call(this,this.focusedColumn,e),/[0-9a-zA-Z]/.test(e.key)||t.stopEvent(e)},ESC:function(e){n.body.inlineEdit.keydown.call(this,"ESC")},RETURN:function(e){var i=0;for(var o in this.inlineEditing){if(i++,!n.body.inlineEdit.keydown.call(this,"RETURN",o))return!1;1==i&&n.body.moveFocus.call(this,e.shiftKey?"UP":"DOWN")&&n.body.inlineEdit.keydown.call(this,"RETURN")}0==i&&(n.body.inlineEdit.keydown.call(this,"RETURN"),t.stopEvent(e))},TAB:function(e){var t=0;for(var i in this.inlineEditing)t++,n.body.inlineEdit.keydown.call(this,"RETURN",i,{moveFocus:!0}),1==t&&n.body.moveFocus.call(this,e.shiftKey?"LEFT":"RIGHT")&&n.body.inlineEdit.keydown.call(this,"RETURN",void 0,{moveFocus:!0})}};return function(t,n){return t in e&&e[t].call(this,n),this}}(),this.copySelect=function(){var e=void 0,t=this.$.form.clipboard,n=[],i="",o=void 0,a=void 0,r=void 0,l=0;for(var s in this.selectedColumn){var d=this.selectedColumn[s];if(d){"undefined"==typeof r&&(r=d.dindex,o=d.rowIndex,a=d.rowIndex),r==d.dindex&&o==d.rowIndex||l++,n[l]||(n[l]=[]);var c=this.bodyRowMap[d.rowIndex+"_"+d.colIndex];c?this.list[d.dindex].__isGrouping?n[l].push(this.list[d.dindex][d.colIndex]):n[l].push(this.list[d.dindex][c.key]):n[l].push(""),r=d.dindex,o=d.rowIndex}}n.forEach(function(e){i+=e.join("\t")+"\n"}),t.get(0).innerText=i,t.select();try{e=document.execCommand("copy")}catch(u){e=!1}return e},this.setData=function(e){var t="undefined"==typeof this.xvar.paintStartRowIndex;return n.data.set.call(this,e),n.body.repaint.call(this),t||n.body.scrollTo.call(this,{top:0}),h.call(this),n.scroller.resize.call(this),n.page.navigationUpdate.call(this),t=null,this},this.getList=function(e){return n.data.getList.call(this,e)},this.setHeight=function(e){return"100%"==e&&(e=this.$target.offsetParent().innerHeight()),this.$target.css({height:e}),this.$.container.root.css({height:e}),h.call(this),n.body.repaint.call(this,"reset"),n.scroller.resize.call(this),this},this.addRow=function(e,t,i){var o=this;return n.data.add.call(this,e,t,i),h.call(this),n.body.repaint.call(this,"reset"),i&&i.focus?setTimeout(function(){n.body.moveFocus.call(o,i.focus)},1):n.scroller.resize.call(this),this},this.appendToList=function(e){return n.data.append.call(this,e,function(){h.call(this),n.body.repaint.call(this),n.scroller.resize.call(this)}.bind(this)),this},this.removeRow=function(e){return n.data.remove.call(this,e),h.call(this),n.body.repaint.call(this,"reset"),n.body.moveFocus.call(this,this.config.body.grouping?"START":"END"),n.scroller.resize.call(this),this},this.updateRow=function(e,t){return n.data.update.call(this,e,t),n.body.repaintRow.call(this,t),this},this.updateChildRows=function(e,t,i){return n.data.updateChild.call(this,e,t,i),this.xvar.paintStartRowIndex=void 0,this.xvar.paintStartColumnIndex=void 0,n.body.repaint.call(this),this},this.deleteRow=function(e){return n.data.deleteRow.call(this,e),h.call(this),n.body.repaint.call(this,"reset"),n.scroller.resize.call(this),this},this.setValue=function(e,t,i){var o=void 0;if(n.data.setValue.call(this,e,o,t,i)){var a=function(e,t,i,o,a,r){for(var l=0,s=t.length;l<s;l++)for(var d=0,c=t[l].cols.length;d<c;d++)t[l].cols[d].key==a&&(this.xvar.frozenRowIndex>i?n.body.repaintCell.call(this,"top-"+e,i,o,l,d,r):n.body.repaintCell.call(this,e+"-scroll",i,o,l,d,r))};a.call(this,"left-body",this.leftBodyRowData.rows,e,o,t,i),a.call(this,"body",this.bodyRowData.rows,e,o,t,i)}return this},this.addColumn=function(){var e={first:function(e){this.config.columns=[].concat(e).concat(this.config.columns)},last:function(e){this.config.columns=this.config.columns.concat([].concat(e))}};return function(n,i){if("undefined"==typeof n)throw"_column must not be null";if("undefined"==typeof i&&(i="last"),i in e)e[i].call(this,n);else{if(!t.isNumber(i))throw"invalid argument _cindex";if(t.isArray(n))for(var o=0,a=n.length;o<a;o++)this.config.columns.splice(i+o,0,n[o]);else this.config.columns.splice(i,0,n)}return s.call(this),this}}(),this.removeColumn=function(){var e={first:function(e){this.config.columns.splice(e,1)},last:function(){this.config.columns.splice(this.config.columns.length-1,1)}};return function(n){if("undefined"==typeof n&&(n="last"),n in e)e[n].call(this,n);else{if(!t.isNumber(n))throw"invalid argument _cindex";this.config.columns.splice(n,1)}return s.call(this),this}}(),this.updateColumn=function(e,n){if(!t.isNumber(n))throw"invalid argument _cindex";return this.config.columns.splice(n,1,e),s.call(this),this},this.setColumnWidth=function(e,t){return this.colGroup[this.xvar.columnResizerIndex]._width=e,this.needToPaintSum=!0,n.header.repaint.call(this),n.body.repaint.call(this,!0),n.scroller.resize.call(this),h.call(this),this},this.getColumnSortInfo=function(){var e={sortInfo:[]};for(var t in this.sortInfo)e.sortInfo.push({key:t,orderBy:this.sortInfo[t].orderBy,seq:this.sortInfo[t].seq});return e.sortInfo.sort(function(e,t){return e.seq>t.seq}),e.sortInfo},this.setColumnSort=function(e){return"undefined"!=typeof e&&(this.sortInfo=e,n.header.applySortStatus.call(this,e)),p.call(this,e||this.sortInfo),this},this.select=function(e,i){if(t.isNumber(e)){var o=e;this.config.multipleSelect?i&&i.selectedClear&&this.clearSelect():this.clearSelect(),n.data.select.call(this,o,void 0,i&&i.selected),n.body.updateRowState.call(this,["selected"],o,void 0)}return this},this.clickBody=function(e){return n.body.click.call(this,e),this},this.DBLClickBody=function(e){return n.body.dblClick.call(this,e),this},this.clearSelect=function(){return n.body.updateRowState.call(this,["selectedClear"]),n.data.clearSelect.call(this),this},this.selectAll=function(e){return n.data.selectAll.call(this,e&&e.selected,e),n.body.updateRowStateAll.call(this,["selected"]),this},this.exportExcel=function(e){var t=[];return t.push('<table border="1">'),t.push(n.header.getExcelString.call(this)),t.push(n.body.getExcelString.call(this)),t.push("</table>"),"undefined"==typeof e?t.join(""):(n.excel["export"].call(this,[t.join("")],e),this)},this.focus=function(e){if(n.body.moveFocus.call(this,e)){var t=void 0;for(var i in this.focusedColumn){t=jQuery.extend({},this.focusedColumn[i],!0);break}t&&this.select(t.dindex,{selectedClear:!0})}else if("undefined"==typeof this.selectedDataIndexs[0])this.select(0);else{var o=this.selectedDataIndexs[0],a={UP:function(){o>0&&(this.select(o-1,{selectedClear:!0}),n.body.moveFocus.call(this,o-1))},DOWN:function(){o<this.list.length-1&&(this.select(o+1,{selectedClear:!0}),n.body.moveFocus.call(this,o+1))},HOME:function(){this.select(0,{selectedClear:!0}),n.body.moveFocus.call(this,0)},END:function(){this.select(this.list.length-1,{selectedClear:!0}),n.body.moveFocus.call(this,this.list.length-1)}};e in a&&a[e].call(this)}return this},this.destroy=function(){var t=this.instanceId;return this.$target.empty(),this.list=[],e.grid_instance=ax5.util.filter(e.grid_instance,function(){return this.instanceId!=t}),null},this.main=function(){e.grid_instance=e.grid_instance||[],e.grid_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),n=ax5.ui.grid}(),function(){var e=ax5.ui.grid,t=ax5.util,n={focusClear:function(){var e=this,t=void 0;for(var n in e.focusedColumn)t=e.focusedColumn[n],t&&e.$.panel[t.panelName].find('[data-ax5grid-tr-data-index="'+t.dindex+'"]').find('[data-ax5grid-column-rowindex="'+t.rowIndex+'"][data-ax5grid-column-colindex="'+t.colIndex+'"]').removeAttr("data-ax5grid-column-focused");e.focusedColumn={}},clear:function(){var e=this,t=void 0;for(var n in e.selectedColumn)t=e.selectedColumn[n],t&&e.$.panel[t.panelName].find('[data-ax5grid-tr-data-index="'+t.dindex+'"]').find('[data-ax5grid-column-rowindex="'+t.rowIndex+'"][data-ax5grid-column-colindex="'+t.colIndex+'"]').removeAttr("data-ax5grid-column-selected");e.selectedColumn={}},init:function(t){var i=this;if(this.isInlineEditing)for(var o in this.inlineEditing)if(o==t.dindex+"_"+t.colIndex+"_"+t.rowIndex)return this;n.focusClear.call(i),i.focusedColumn[t.dindex+"_"+t.colIndex+"_"+t.rowIndex]={panelName:t.panelName,dindex:t.dindex,doindex:t.doindex,rowIndex:t.rowIndex,colIndex:t.colIndex,colspan:t.colspan},n.clear.call(i),i.xvar.selectedRange={start:[t.dindex,t.rowIndex,t.colIndex,t.colspan-1],end:null},i.selectedColumn[t.dindex+"_"+t.colIndex+"_"+t.rowIndex]=function(e){return!e&&{panelName:t.panelName,dindex:t.dindex,doindex:t.doindex,rowIndex:t.rowIndex,colIndex:t.colIndex,colspan:t.colspan}}(i.selectedColumn[t.dindex+"_"+t.colIndex+"_"+t.rowIndex]),this.$.panel[t.panelName].find('[data-ax5grid-tr-data-index="'+t.dindex+'"]').find('[data-ax5grid-column-rowindex="'+t.rowIndex+'"][data-ax5grid-column-colindex="'+t.colIndex+'"]').attr("data-ax5grid-column-focused","true").attr("data-ax5grid-column-selected","true"),this.isInlineEditing&&e.body.inlineEdit.deActive.call(this,"RETURN")},update:function(e){var t=this,i=void 0,o=void 0,a=void 0,r=void 0,l=void 0;t.xvar.selectedRange.end=[e.dindex,e.rowIndex,e.colIndex,e.colspan-1],n.clear.call(t);var s={r:{s:Math.min(t.xvar.selectedRange.start[0],t.xvar.selectedRange.end[0]),e:Math.max(t.xvar.selectedRange.start[0],t.xvar.selectedRange.end[0])},c:{s:Math.min(t.xvar.selectedRange.start[2],t.xvar.selectedRange.end[2]),e:Math.max(t.xvar.selectedRange.start[2]+t.xvar.selectedRange.start[3],t.xvar.selectedRange.end[2]+t.xvar.selectedRange.end[3])}};for(i=s.r.s;i<=s.r.e;i++)for(l=this.bodyRowTable.rows.length,r=0;r<l;r++)for(a=s.c.s;a<=s.c.e;a++){var d=[],c="";t.xvar.frozenRowIndex>i&&d.push("top"),t.xvar.frozenColumnIndex>a&&d.push("left"),d.push("body"),"top"!==d[0]&&d.push("scroll"),c=d.join("-"),t.selectedColumn[i+"_"+a+"_"+r]={panelName:c,dindex:i,rowIndex:r,colIndex:a,colspan:e.colspan},d=null,c=null}i=null,o=null,a=null,r=null;for(var u in t.selectedColumn){var h=t.selectedColumn[u];h&&t.$.panel[h.panelName].find('[data-ax5grid-tr-data-index="'+h.dindex+'"]').find('[data-ax5grid-column-rowindex="'+h.rowIndex+'"][data-ax5grid-column-colindex="'+h.colIndex+'"]').attr("data-ax5grid-column-selected","true")}}},i={on:function(e){var o=this;this.inlineEditing[e.dindex+"_"+e.colIndex+"_"+e.rowIndex]||(n.init.call(o,e),this.$.container.body.on("mousemove.ax5grid-"+this.instanceId,'[data-ax5grid-column-attr="default"]',function(e){this.getAttribute("data-ax5grid-column-rowIndex")&&(n.update.call(o,{panelName:this.getAttribute("data-ax5grid-panel-name"),dindex:Number(this.getAttribute("data-ax5grid-data-index")),doindex:Number(this.getAttribute("data-ax5grid-data-o-index")),rowIndex:Number(this.getAttribute("data-ax5grid-column-rowIndex")),colIndex:Number(this.getAttribute("data-ax5grid-column-colIndex")),colspan:Number(this.getAttribute("colspan"))}),t.stopEvent(e))}).on("mouseup.ax5grid-"+this.instanceId,function(){i.off.call(o)}).on("mouseleave.ax5grid-"+this.instanceId,function(){i.off.call(o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1))},off:function(){this.$.container.body.off("mousemove.ax5grid-"+this.instanceId).off("mouseup.ax5grid-"+this.instanceId).off("mouseleave.ax5grid-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart")}},o=function(e,t,n,i){var o=this,a=this.config,r={selected:function(e,t){if(this.list[t])for(var n=this.$.livePanelKeys.length;n--;)this.$.panel[this.$.livePanelKeys[n]].find('[data-ax5grid-tr-data-index="'+e+'"]').attr("data-ax5grid-selected",this.list[t][a.columnKeys.selected])},selectedClear:function(){var e=this.list.length,t=void 0;if(this.proxyList){for(;e--;)this.list[e][a.columnKeys.selected]=!1;for(e=this.proxyList.length;e--;){if(this.list[n][a.columnKeys.selected])for(t=this.$.livePanelKeys.length;t--;)this.$.panel[this.$.livePanelKeys[t]].find('[data-ax5grid-tr-data-index="'+e+'"]').attr("data-ax5grid-selected",!1);this.proxyList[e][a.columnKeys.selected]=!1;var n=this.proxyList[e].__original_index__}}else for(;e--;){if(this.list[e][a.columnKeys.selected])for(t=this.$.livePanelKeys.length;t--;)this.$.panel[this.$.livePanelKeys[t]].find('[data-ax5grid-tr-data-index="'+e+'"]').attr("data-ax5grid-selected",!1);this.list[e][a.columnKeys.selected]=!1}},cellChecked:function(e,t,n){var i=(n.key,n.rowIndex),o=n.colIndex,a=function(){var t=[];return this.xvar.frozenRowIndex>e&&t.push("top"),this.xvar.frozenColumnIndex>o&&t.push("left"),t.push("body"),"top"!==t[0]&&t.push("scroll"),t.join("-")}.call(this);this.$.panel[a].find('[data-ax5grid-tr-data-index="'+e+'"]').find('[data-ax5grid-column-rowIndex="'+i+'"][data-ax5grid-column-colIndex="'+o+'"]').find('[data-ax5grid-editor="checkbox"]').attr("data-ax5grid-checked",""+n.checked)}};"undefined"==typeof n&&(n=t),e.forEach(function(e){if(!r[e])throw"invaild state name";r[e].call(o,t,n,i)})},a=function(t,n){var i=this,o=(this.config,{selected:function(t){e.body.repaint.call(this,!0)}});t.forEach(function(e){if(!o[e])throw"invaild state name";o[e].call(i,n)})},r=function(){var n=this;this.$.container.body.on("click","[data-ax5grid-column-attr]",function(t){var i=void 0,a=void 0,r=void 0,l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,h={"default":function(t){var i=n.bodyRowMap[t.rowIndex+"_"+t.colIndex],a={self:n,page:n.page,list:n.list,item:n.list[t.doindex],dindex:t.dindex,doindex:t.doindex,rowIndex:t.rowIndex,colIndex:t.colIndex,column:i,value:n.list[t.dindex][i.key]};if(i.editor&&"checkbox"==i.editor.type){var r=e.data.getValue.call(n,t.dindex,t.doindex,i.key),l=void 0,s=void 0;s=i.editor.config&&i.editor.config.trueValue?(l=!(r==i.editor.config.trueValue))?i.editor.config.trueValue:i.editor.config.falseValue:l=0==r||"false"==r||r<"1"?"true":"false",e.data.setValue.call(n,t.dindex,t.doindex,i.key,s),o.call(n,["cellChecked"],t.dindex,t.doindex,{key:i.key,rowIndex:t.rowIndex,colIndex:t.colIndex,editorConfig:i.editor.config,checked:l})}else n.config.body.onClick&&n.config.body.onClick.call(a)},rowSelector:function(t){var i=n.list[t.doindex];return!i[n.config.columnKeys.disableSelection]&&(n.config.multipleSelect||n.selectedDataIndexs[0]===t.doindex||(o.call(n,["selectedClear"]),e.data.clearSelect.call(n)),e.data.select.call(n,t.dindex,t.doindex,void 0,{internalCall:!0}),void o.call(n,["selected"],t.dindex,t.doindex))},lineNumber:function(e){},"tree-control":function(e,t){y.call(n,e.dindex,e.doindex)}};i=this.getAttribute("data-ax5grid-panel-name"),a=this.getAttribute("data-ax5grid-column-attr"),r=Number(this.getAttribute("data-ax5grid-column-row")),l=Number(this.getAttribute("data-ax5grid-column-col")),c=Number(this.getAttribute("data-ax5grid-column-rowIndex")),u=Number(this.getAttribute("data-ax5grid-column-colIndex")),s=Number(this.getAttribute("data-ax5grid-data-index")),d=Number(this.getAttribute("data-ax5grid-data-o-index")),a in h&&h[a]({panelName:i,attr:a,row:r,col:l,dindex:s,doindex:d,rowIndex:c,colIndex:u},this)}),this.$.container.body.on("dblclick","[data-ax5grid-column-attr]",function(i){var o=void 0,a=void 0,r=void 0,l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,h={"default":function(o){if(n.isInlineEditing)for(var a in n.inlineEditing)if(a==o.dindex+"_"+o.colIndex+"_"+o.rowIndex)return this;var r=n.bodyRowMap[o.rowIndex+"_"+o.colIndex],l="";r&&(n.list[s].__isGrouping||(l=e.data.getValue.call(n,s,d,r.key)));var c=n.colGroup[o.colIndex].editor;if(t.isObject(c))e.body.inlineEdit.active.call(n,n.focusedColumn,i,l);else if(n.config.body.onDBLClick){var u={self:n,page:n.page,list:n.list,item:n.list[o.dindex],dindex:o.dindex,doindex:o.doindex,rowIndex:o.rowIndex,colIndex:o.colIndex,column:r,value:n.list[o.dindex][r.key]};n.config.body.onDBLClick.call(u)}},rowSelector:function(e){},lineNumber:function(e){}};o=this.getAttribute("data-ax5grid-panel-name"),a=this.getAttribute("data-ax5grid-column-attr"),r=Number(this.getAttribute("data-ax5grid-column-row")),l=Number(this.getAttribute("data-ax5grid-column-col")),c=Number(this.getAttribute("data-ax5grid-column-rowIndex")),u=Number(this.getAttribute("data-ax5grid-column-colIndex")),s=Number(this.getAttribute("data-ax5grid-data-index")),d=Number(this.getAttribute("data-ax5grid-data-o-index")),a in h&&h[a]({panelName:o,attr:a,row:r,col:l,dindex:s,doindex:d,rowIndex:c,colIndex:u})}),this.config.contextMenu&&this.$.container.body.on("contextmenu",function(e){var i=void 0,o=void 0,a=void 0,r=void 0,l=void 0,s=void 0,d=void 0,c={};i=t.findParentNode(e.target,function(e){if(e.getAttribute("data-ax5grid-column-attr"))return!0}),i&&(r=Number(i.getAttribute("data-ax5grid-column-rowIndex")),l=Number(i.getAttribute("data-ax5grid-column-colIndex")),o=Number(i.getAttribute("data-ax5grid-data-index")),a=Number(i.getAttribute("data-ax5grid-data-o-index")),d=n.bodyRowMap[r+"_"+l],s=n.list[o]),n.contextMenu||(n.contextMenu=new ax5.ui.menu),n.contextMenu.setConfig(n.config.contextMenu),c={element:i,dindex:o,doindex:a,rowIndex:r,colIndex:l,item:s,column:d,gridSelf:n},n.contextMenu.popup(e,{filter:function(){return n.config.contextMenu.popupFilter.call(this,this,c)},param:c}),t.stopEvent(e.originalEvent),i=null,o=null,a=null,r=null,l=null,s=null,d=null,c=null}),this.$.container.body.on("mousedown",'[data-ax5grid-column-attr="default"]',function(e){return!n.xvar.touchmoved&&void(this.getAttribute("data-ax5grid-column-rowIndex")&&i.on.call(n,{panelName:this.getAttribute("data-ax5grid-panel-name"),dindex:Number(this.getAttribute("data-ax5grid-data-index")),doindex:Number(this.getAttribute("data-ax5grid-data-o-index")),rowIndex:Number(this.getAttribute("data-ax5grid-column-rowIndex")),colIndex:Number(this.getAttribute("data-ax5grid-column-colIndex")),colspan:Number(this.getAttribute("colspan"))}))}).on("dragstart",function(e){return t.stopEvent(e),!1}),l.call(this),this.xvar.paintRowCountMargin=this.config.virtualScrollYCountMargin,
this.xvar.paintRowCountTopMargin=this.config.virtualScrollYCountMargin-Math.floor(this.config.virtualScrollYCountMargin/2),this.config.virtualScrollAccelerated?this.__throttledScroll=t.throttle(function(e,t){this.config.virtualScrollY&&!t.noRepaint&&"top"in e?u.call(this):this.config.virtualScrollX&&!t.noRepaint&&"left"in e&&u.call(this),t.callback&&t.callback()},this.config.virtualScrollAcceleratedDelayTime):this.__throttledScroll=!1},l=function(){var t=this.config,n=e.util.divideTableByFrozenColumnIndex(this.bodyRowTable,this.xvar.frozenColumnIndex);if(this.asideBodyRowData=function(e){for(var n={rows:[]},i=0,o=e.rows.length;i<o;i++)if(n.rows[i]={cols:[]},0===i){var a={label:"",colspan:1,rowspan:e.rows.length,colIndex:null},r={};t.showLineNumber&&(r=jQuery.extend({},a,{width:t.lineNumberColumnWidth,_width:t.lineNumberColumnWidth,columnAttr:"lineNumber",label:"&nbsp;",key:"__d-index__"}),n.rows[i].cols.push(r)),t.showRowSelector&&(r=jQuery.extend({},a,{width:t.rowSelectorColumnWidth,_width:t.rowSelectorColumnWidth,columnAttr:"rowSelector",label:"",key:"__d-checkbox__"}),n.rows[i].cols.push(r))}return n}.call(this,this.bodyRowTable),this.leftBodyRowData=n.leftData,this.bodyRowData=n.rightData,t.body.grouping){var i=e.util.divideTableByFrozenColumnIndex(this.bodyGroupingTable,this.xvar.frozenColumnIndex);this.asideBodyGroupingData=function(e){for(var n={rows:[]},i=0,o=e.rows.length;i<o;i++)if(n.rows[i]={cols:[]},0===i){var a={label:"",colspan:1,rowspan:e.rows.length,colIndex:null},r={};t.showLineNumber&&(r=jQuery.extend({},a,{width:t.lineNumberColumnWidth,_width:t.lineNumberColumnWidth,columnAttr:"lineNumber",label:"&nbsp;",key:"__d-index__"}),n.rows[i].cols.push(r)),t.showRowSelector&&(r=jQuery.extend({},a,{width:t.rowSelectorColumnWidth,_width:t.rowSelectorColumnWidth,columnAttr:"rowSelector",label:"",key:"__d-checkbox__"}),n.rows[i].cols.push(r))}return n}.call(this,this.bodyGroupingTable),this.leftBodyGroupingData=i.leftData,this.bodyGroupingData=i.rightData,this.bodyGroupingMap=e.util.makeBodyRowMap.call(this,this.bodyGroupingTable)}if(this.leftFootSumData={},this.footSumData={},this.config.footSum){var o=e.util.divideTableByFrozenColumnIndex(this.footSumTable,this.xvar.frozenColumnIndex);this.leftFootSumData=o.leftData,this.footSumData=o.rightData}},s=function(n,i,o,a,r,l){var s=a.key,d={"<":"&lt;",">":"&gt;"};if("__d-index__"===s)return"undefined"!=typeof i.__index?i.__index+1:"";if("__d-checkbox__"===s)return'<div class="checkBox" style="max-height: '+(a.width-10)+"px;min-height: "+(a.width-10)+'px;"></div>';if(a.editor&&function(t){return t.type in e.inlineEditor&&"inline"==e.inlineEditor[t.type].editMode}(a.editor))return r=r||e.data.getValue.call(this,o,i.__origin_index__,s),t.isFunction(a.editor.disabled)&&a.editor.disabled.call({list:n,dindex:o,item:n[o],key:s,value:r})?r:l?r:e.inlineEditor[a.editor.type].getHtml(this,a.editor,r);var c={formatter:function(){var l={key:s,value:r||e.data.getValue.call(this,o,i.__origin_index__,s),dindex:o,item:i,list:n};return t.isFunction(a.formatter)?a.formatter.call(l):e.formatter[a.formatter].call(l)},"default":function(){var t="";return"undefined"!=typeof r?t=r:(r=/[\.\[\]]/.test(s)?e.data.getValue.call(this,o,i.__origin_index__,s):i[s],null!==r&&"undefined"!=typeof r&&(t=r)),"string"!=typeof t?t:t.replace(/[<>]/g,function(e){return d[e]||e})},treeControl:function(e){var t=this.config,n=this.config.tree.columnKeys,a="";return i[n.children].length?(a+='<a data-ax5grid-data-index="'+o+'" data-ax5grid-column-attr="tree-control" data-ax5grid-tnode-arrow="" style="width: '+t.tree.arrowWidth+"px;padding-left:"+i[n.depth]*t.tree.indentWidth+'px;">',a+=i[n.collapse]?t.tree.icons.collapsedArrow:t.tree.icons.openedArrow,a+="</a>"):a+='<span data-ax5grid-tnode-arrow="" style="width: '+t.tree.arrowWidth+"px;padding-left:"+i[n.depth]*t.tree.indentWidth+'px;">&nbsp;</span>',a+='<span data-ax5grid-tnode-item="'+(i[n.children].length?"group":"item")+'" style="width: '+t.tree.iconWidth+'px;">',a+=i[n.children].length?i[n.collapse]?t.tree.icons.collapsedGroupIcon:t.tree.icons.groupIcon:t.tree.icons.itemIcon,a+="</span>",a+e}},u=a.formatter?c.formatter.call(this):c["default"].call(this);return this.config.tree.use&&a.treeControl&&(u=c.treeControl.call(this,u)),u},d=function(n,i,o){var a=void 0,r=void 0,l=o.key,s=o.label;return"undefined"==typeof l?(r={key:l,list:n.__groupingList,groupBy:n.__groupingBy},a=t.isFunction(s)?s.call(r):s,n[o.colIndex]=a,a):"__d-index__"===l?"":"__d-checkbox__"===l?"":o.collector?(r={key:l,list:n.__groupingList},a=t.isFunction(o.collector)?o.collector.call(r):e.collector[o.collector].call(r),n[o.colIndex]=a,o.formatter?(r.value=a,t.isFunction(o.formatter)?o.formatter.call(r):e.formatter[o.formatter].call(r)):a):"&nbsp;"},c=function(n,i){var o=i.key,a=i.label;if("undefined"==typeof o)return a;if("__d-index__"===o||"__d-checkbox__"===o)return"&nbsp;";if(i.collector){var r={key:o,list:n},l=void 0;return l=t.isFunction(i.collector)?i.collector.call(r):e.collector[i.collector].call(r),i.formatter?(r.value=l,t.isFunction(i.formatter)?i.formatter.call(r):e.formatter[i.formatter].call(r)):l}return"&nbsp;"},u=function(n){var i=this.config,o=this.proxyList?this.proxyList:this.list;n&&(l.call(this),this.xvar.paintStartRowIndex=void 0,this.xvar.paintStartColumnIndex=void 0);var a=void 0,r=void 0;if(this.config.virtualScrollY?(r=a=Math.floor(-this.$.panel["body-scroll"].position().top/this.xvar.bodyTrHeight)+this.xvar.frozenRowIndex,this.xvar.paintRowCountTopMargin<a&&(a-=this.xvar.paintRowCountTopMargin)):a=this.xvar.frozenRowIndex,isNaN(a))return this;var u=0,h=0,p=null,f=null,g=-this.$.panel["body-scroll"].position().left;if(this.config.virtualScrollX){for(var m=this.xvar.frozenColumnIndex;m<this.colGroup.length;m++)this.colGroup[m]._sx=m==this.xvar.frozenColumnIndex?0:this.colGroup[m-1]._ex,this.colGroup[m]._ex=this.colGroup[m]._sx+this.colGroup[m]._width,this.colGroup[m]._sx<=g&&this.colGroup[m]._ex>=g&&(u=m),this.colGroup[m]._sx<=g+this.xvar.bodyWidth&&this.colGroup[m]._ex>=g+this.xvar.bodyWidth&&(h=m,null===p&&(p=this.colGroup[u]._sx),null===f&&(f=this.xvar.scrollContentWidth-this.colGroup[m]._ex));null===p&&(p=0),null===f&&(f=0),this.$.panel["top-body-scroll"].css({"padding-left":p,"padding-right":f}),this.$.panel["body-scroll"].css({"padding-left":p,"padding-right":f}),this.$.panel["bottom-body-scroll"].css({"padding-left":p,"padding-right":f})}var v="undefined"==typeof this.xvar.paintStartRowIndex,x=this.headerColGroup,y=this.asideBodyRowData,b=this.leftBodyRowData,w=this.bodyRowData,C=this.leftFootSumData,_=this.footSumData,k=this.asideBodyGroupingData,I=this.leftBodyGroupingData,T=this.bodyGroupingData,N=i.body.align,E=void 0,S=void 0;if(this.config.virtualScrollY?(S=Math.ceil(this.xvar.bodyHeight/this.xvar.bodyTrHeight),E=S+(this.xvar.paintRowCountMargin||1)):S=E=o.length,this.xvar.paintRowCountTopMargin<a&&Math.abs(this.xvar.paintStartRowIndex-a)<=this.xvar.paintRowCountTopMargin&&(a=this.xvar.paintStartRowIndex),this.xvar.dataRowCount===o.length&&this.xvar.paintStartRowIndex===a&&this.xvar.paintRowCount===E&&this.xvar.paintStartColumnIndex===u&&this.xvar.paintEndColumnIndex===h)return this;(p||f)&&(x=[].concat(x).splice(u-this.xvar.frozenColumnIndex,h-u+1+this.xvar.frozenColumnIndex),w=e.util.getTableByStartEndColumnIndex(w,u,h),i.body.grouping&&(T=e.util.getTableByStartEndColumnIndex(T,u,h)),i.footSum&&(_=e.util.getTableByStartEndColumnIndex(_,u,h)),this.xvar.paintStartColumnIndex===u&&this.xvar.paintEndColumnIndex===h||(this.needToPaintSum=!0)),this.xvar.scrollContentHeight=this.xvar.bodyTrHeight*(o.length-this.xvar.frozenRowIndex),this.xvar.scrollContentHeight<0&&(this.xvar.scrollContentHeight=0),this.$.livePanelKeys=[];var $=function(e,n,o,a,r,l){var c=this.$.panel[e];if(!v&&!l)return this.$.livePanelKeys.push(e),!1;var u=[],h=void 0,p=void 0,f=void 0,g=void 0,m=void 0,x=void 0,y=void 0,b=void 0,w=void 0,C=void 0,_=void 0,k=function(){return"undefined"!=typeof l&&"undefined"!=typeof l.paintStartRowIndex||(l={paintStartRowIndex:0,paintRowCount:r.length},!1)}(),I="#fff 0px, #fff "+(i.body.columnHeight-i.body.columnBorderWidth)+"px, #eee "+(i.body.columnHeight-i.body.columnBorderWidth)+"px, #eee "+i.body.columnHeight+"px";for(k&&u.push('<div style="background:repeating-linear-gradient(to top, '+I+");font-size:0;line-height:0;height: "+(l.paintStartRowIndex-this.xvar.frozenRowIndex)*l.bodyTrHeight+'px;"></div>'),u.push('<table border="0" cellpadding="0" cellspacing="0">'),u.push("<colgroup>"),h=0,p=n.length;h<p;h++)u.push('<col style="width:'+n[h]._width+'px;"  />');for(u.push("<col  />"),u.push("</colgroup>"),f=l.paintStartRowIndex,g=function(){var e=void 0;return e=r.length,l.paintRowCount+l.paintStartRowIndex<e&&(e=l.paintRowCount+l.paintStartRowIndex),e}();f<g;f++)if(r[f]){var T=!1,E=void 0,S="undefined"!=typeof r[f].__origin_index__?r[f].__origin_index__:f;a&&"__isGrouping"in r[f]?(E=a,T=!0):E=o;for(m=0,x=E.rows.length;m<x;m++){for(u.push('<tr class="tr-'+f%4,i.body.trStyleClass?t.isFunction(i.body.trStyleClass)?" "+i.body.trStyleClass.call({item:r[f],index:f},r[f],f):" "+i.body.trStyleClass:"",'"',T?' data-ax5grid-grouping-tr="true"':"",' data-ax5grid-tr-data-index="'+f+'"',' data-ax5grid-tr-data-o-index="'+S+'"',' data-ax5grid-selected="'+(r[f][i.columnKeys.selected]||"false")+'"',' data-ax5grid-disable-selection="'+(r[f][i.columnKeys.disableSelection]||"false")+'"',">"),y=0,b=E.rows[m].cols.length;y<b;y++)w=E.rows[m].cols[y],C=i.body.columnHeight*w.rowspan-i.body.columnBorderWidth,_=w.align||N,u.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-data-index="'+f+'" ','data-ax5grid-data-o-index="'+S+'" ','data-ax5grid-column-row="'+m+'" ','data-ax5grid-column-col="'+y+'" ','data-ax5grid-column-rowIndex="'+w.rowIndex+'" ','data-ax5grid-column-colIndex="'+w.colIndex+'" ','data-ax5grid-column-attr="'+(w.columnAttr||"default")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn[f+"_"+w.colIndex+"_"+w.rowIndex],this.selectedColumn[f+"_"+w.colIndex+"_"+w.rowIndex]),'colspan="'+w.colspan+'" ','rowspan="'+w.rowspan+'" ','class="'+function(e){var n="";return e.styleClass&&(n+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,item:r[f],index:f})+" ":e.styleClass+" "),i.body.columnBorderWidth&&(n+="hasBorder "),y==b-1&&(n+="isLastColumn "),n}.call(this,w)+'" ','style="height: '+C+'px;min-height: 1px;">'),u.push(function(e){var t=i.body.columnHeight-2*i.body.columnPadding-i.body.columnBorderWidth;return w.multiLine||(e=i.body.columnHeight-i.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(w.multiLine?"multiLine":"")+'" '+(_?'data-ax5grid-text-align="'+_+'"':"")+'" style="height:'+e+"px;"+(w.multiLine?"":"line-height: "+t+"px;")+'">'}(C),T?d.call(this,r[f],f,w):s.call(this,r,r[f],f,w),"</span>"),u.push("</td>");u.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-data-index="'+f+'" ','data-ax5grid-data-o-index="'+S+'" ','data-ax5grid-column-attr="default" ','style="height: '+i.body.columnHeight+'px;min-height: 1px;" ',"></td>"),u.push("</tr>")}}return u.push("</table>"),k&&r.length&&u.push('<div style="background:repeating-linear-gradient(to bottom, '+I+");font-size:0;line-height:0;height: "+(r.length-f)*l.bodyTrHeight+'px;"></div>'),c.empty(),u=u.join(""),c.get(0).innerHTML=u,this.$.livePanelKeys.push(e),!0},D=function(e,n,o,a,r){var l=this.$.panel[e];if(!v&&!r)return this.$.livePanelKeys.push(e),!1;var s=[],d=void 0,u=void 0,h=void 0,p=void 0,f=void 0,g=void 0,m=void 0,x=void 0,y=void 0;for(s.push('<table border="0" cellpadding="0" cellspacing="0">'),s.push("<colgroup>"),d=0,u=n.length;d<u;d++)s.push('<col style="width:'+n[d]._width+'px;"  />');for(s.push("<col  />"),s.push("</colgroup>"),h=0,p=o.rows.length;h<p;h++){for(s.push('<tr class="tr-sum">'),f=0,g=o.rows[h].cols.length;f<g;f++)m=o.rows[h].cols[f],x=i.body.columnHeight*m.rowspan-i.body.columnBorderWidth,y=m.align||N,s.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-column-row="'+h+'" ','data-ax5grid-column-col="'+f+'" ','data-ax5grid-column-rowIndex="'+h+'" ','data-ax5grid-column-colIndex="'+m.colIndex+'" ','data-ax5grid-column-attr="'+(m.columnAttr||"sum")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn["sum_"+m.colIndex+"_"+h],this.selectedColumn["sum_"+m.colIndex+"_"+h]),'colspan="'+m.colspan+'" ','rowspan="'+m.rowspan+'" ','class="'+function(e){var n="";return e.styleClass&&(n+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,isFootSum:!0})+" ":e.styleClass+" "),i.body.columnBorderWidth&&(n+="hasBorder "),f==g-1&&(n+="isLastColumn "),n}.call(this,m)+'" ','style="height: '+x+'px;min-height: 1px;">'),s.push(function(e){var t=i.body.columnHeight-2*i.body.columnPadding-i.body.columnBorderWidth;return m.multiLine||(e=i.body.columnHeight-i.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(m.multiLine?"multiLine":"")+'" '+(y?'data-ax5grid-text-align="'+y+'"':"")+'" style="height:'+e+"px;"+(m.multiLine?"":"line-height: "+t+"px;")+'">'}(x),c.call(this,a,m),"</span>"),s.push("</td>");s.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-column-attr="sum" ','style="height: '+i.body.columnHeight+'px;min-height: 1px;" ',"></td>"),s.push("</tr>")}return s.push("</table>"),l.empty(),s=s.join(""),l.get(0).innerHTML=s,this.$.livePanelKeys.push(e),!0},P=function(e,n,o,a,r){for(var l=[],s=this.$.panel[e],d={},c=void 0,u=s.find("tr"),h=0,p=u.length;h<p;h++){var f=void 0,g=void 0;f=u[h].childNodes,g=[];for(var m=0,v=f.length;m<v;m++){var x={$:jQuery(f[m])};"null"!=x.$.attr("data-ax5grid-column-col")&&(x.dindex=x.$.attr("data-ax5grid-data-index"),x.tri=x.$.attr("data-ax5grid-column-row"),x.ci=x.$.attr("data-ax5grid-column-col"),x.rowIndex=x.$.attr("data-ax5grid-column-rowIndex"),x.colIndex=x.$.attr("data-ax5grid-column-colIndex"),x.rowspan=x.$.attr("rowspan"),x.text=x.$.text(),g.push(x)),x=null}l.push(g)}if(l.length>1){c=!1;for(var y=function(e,o){for(var a=[],r=function(o,r){!n[o].editor&&function(){return!t.isArray(i.body.mergeCells)||ax5.util.search(i.body.mergeCells,n[o].key)>-1}()&&(d[o]&&function(){if(a.length>0){var t=!0;return a.forEach(function(n){l[e-1][n].text!=l[e][n].text&&(t=!1)}),t}return!0}()&&d[o].text==l[e][o].text?(l[e][o].rowspan=0,l[d[o].ri][o].rowspan++,c=!0):d[o]={ri:e,ci:o,text:l[e][o].text},a.push(o))},s=0,u=l[e].length;s<u;s++)r(s,u)},b=0,w=l.length;b<w;b++)y(b,w);if(c)for(var C=0,_=l.length;C<_;C++)for(var k=0,I=l[C].length;k<I;k++)0==l[C][k].rowspan?l[C][k].$.remove():l[C][k].rowspan>1&&l[C][k].$.attr("rowspan",l[C][k].rowspan).addClass("merged")}},R={paintStartRowIndex:a,paintRowCount:E,paintStartColumnIndex:u,paintEndColumnIndex:h,nopaintLeftColumnsWidth:p,nopaintRightColumnsWidth:f,bodyTrHeight:this.xvar.bodyTrHeight,virtualScrollX:this.config.virtualScrollX,virtualScrollY:this.config.virtualScrollY},j=jQuery.extend({},R,{paintStartRowIndex:0,paintRowCount:this.xvar.frozenRowIndex});i.asidePanelWidth>0&&(this.xvar.frozenRowIndex>0&&$.call(this,"top-aside-body",this.asideColGroup,y,k,o.slice(0,this.xvar.frozenRowIndex),j),$.call(this,"aside-body-scroll",this.asideColGroup,y,k,o,R),i.footSum&&D.call(this,"bottom-aside-body",this.asideColGroup,y,null,this.list)),this.xvar.frozenColumnIndex>0&&(this.xvar.frozenRowIndex>0&&$.call(this,"top-left-body",this.leftHeaderColGroup,b,I,o.slice(0,this.xvar.frozenRowIndex),j),$.call(this,"left-body-scroll",this.leftHeaderColGroup,b,I,o,R),i.footSum&&this.needToPaintSum&&D.call(this,"bottom-left-body",this.leftHeaderColGroup,C,this.list)),this.xvar.frozenRowIndex>0&&$.call(this,"top-body-scroll",x,w,T,o.slice(0,this.xvar.frozenRowIndex),j),$.call(this,"body-scroll",x,w,T,o,R),i.footSum&&this.needToPaintSum&&D.call(this,"bottom-body-scroll",x,_,this.list,R),i.rightSum,i.body.mergeCells&&o.length&&(this.xvar.frozenColumnIndex>0&&(this.xvar.frozenRowIndex>0&&P.call(this,"top-left-body",this.leftHeaderColGroup,b,o.slice(0,this.xvar.frozenRowIndex)),P.call(this,"left-body-scroll",this.leftHeaderColGroup,b,o,R)),this.xvar.frozenRowIndex>0&&P.call(this,"top-body-scroll",this.headerColGroup,w,o.slice(0,this.xvar.frozenRowIndex)),P.call(this,"body-scroll",this.headerColGroup,w,o,R)),this.xvar.virtualPaintStartRowIndex=r,this.xvar.paintStartRowIndex=a,this.xvar.paintRowCount=E,this.xvar.virtualPaintRowCount=S,this.xvar.paintStartColumnIndex=u,this.xvar.paintEndColumnIndex=h,this.xvar.nopaintLeftColumnsWidth=p,this.xvar.nopaintRightColumnsWidth=f,this.xvar.dataRowCount=o.length,this.needToPaintSum=!1,e.page.statusUpdate.call(this)},h=function(n,i,o,a,r,l){var u=this,h=this.config,p=this.list,f=this.$.panel[n].find('[data-ax5grid-tr-data-index="'+i+'"]').find('[data-ax5grid-column-rowindex="'+a+'"][data-ax5grid-column-colindex="'+r+'"]').find("[data-ax5grid-cellholder]"),g=this.colGroup,m=g[r];f.html(s.call(this,p,p[i],i,m)),m.editor&&m.editor.updateWith&&m.editor.updateWith.forEach(function(t){g.forEach(function(n){if(n.key==t){var o=n.rowIndex,a=n.colIndex,r=e.util.findPanelByColumnIndex.call(u,i,a,o).panelName,l=u.$.panel[r].find('[data-ax5grid-tr-data-index="'+i+'"]').find('[data-ax5grid-column-rowindex="'+o+'"][data-ax5grid-column-colindex="'+a+'"]').find("[data-ax5grid-cellholder]");l.html(s.call(u,p,p[i],i,n))}})});var v=Math.floor(Math.abs(this.$.panel["body-scroll"].position().top)/this.xvar.bodyTrHeight)+this.xvar.frozenRowIndex,x=this.headerColGroup,y=this.leftFootSumData,b=this.footSumData,w=this.leftBodyGroupingData,C=this.bodyGroupingData,_=h.body.align,k=Math.ceil(this.$.panel.body.height()/this.xvar.bodyTrHeight)+1,I={paintStartRowIndex:v,paintRowCount:k,bodyTrHeight:this.xvar.bodyTrHeight};(this.xvar.nopaintLeftColumnsWidth||this.xvar.nopaintRightColumnsWidth)&&(x=[].concat(x).splice(this.xvar.paintStartColumnIndex,this.xvar.paintEndColumnIndex-this.xvar.paintStartColumnIndex+1),h.body.grouping&&(C=e.util.getTableByStartEndColumnIndex(C,this.xvar.paintStartColumnIndex,this.xvar.paintEndColumnIndex)),h.footSum&&(b=e.util.getTableByStartEndColumnIndex(b,this.xvar.paintStartColumnIndex,this.xvar.paintEndColumnIndex)));var T=function(e,n,i,o,a){var r=this.$.panel[e],l=[],s=void 0,d=void 0,u=void 0,p=void 0,f=void 0,g=void 0,m=void 0,v=void 0,x=void 0;for(l.push('<table border="0" cellpadding="0" cellspacing="0">'),l.push("<colgroup>"),s=0,d=n.length;s<d;s++)l.push('<col style="width:'+n[s]._width+'px;"  />');for(l.push("<col  />"),l.push("</colgroup>"),u=0,p=i.rows.length;u<p;u++){for(l.push('<tr class="tr-sum">'),f=0,g=i.rows[u].cols.length;f<g;f++)m=i.rows[u].cols[f],v=h.body.columnHeight*m.rowspan-h.body.columnBorderWidth,x=m.align||_,l.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-column-row="'+u+'" ','data-ax5grid-column-col="'+f+'" ','data-ax5grid-column-rowIndex="'+u+'" ','data-ax5grid-column-colIndex="'+m.colIndex+'" ','data-ax5grid-column-attr="'+(m.columnAttr||"sum")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn["sum_"+m.colIndex+"_"+u],this.selectedColumn["sum_"+m.colIndex+"_"+u]),'colspan="'+m.colspan+'" ','rowspan="'+m.rowspan+'" ','class="'+function(e){var n="";return e.styleClass&&(n+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,isFootSum:!0})+" ":e.styleClass+" "),h.body.columnBorderWidth&&(n+="hasBorder "),f==g-1&&(n+="isLastColumn "),n}.call(this,m)+'" ','style="height: '+v+'px;min-height: 1px;">'),l.push(function(e){var t=h.body.columnHeight-2*h.body.columnPadding-h.body.columnBorderWidth;return m.multiLine||(e=h.body.columnHeight-h.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(m.multiLine?"multiLine":"")+'" '+(x?'data-ax5grid-text-align="'+x+'"':"")+'" style="height:'+e+"px;"+(m.multiLine?"":"line-height: "+t+"px;")+'">'}(v),c.call(this,o,m),"</span>"),l.push("</td>");l.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-column-attr="sum" ','style="height: '+h.body.columnHeight+'px;min-height: 1px;" ',"></td>"),l.push("</tr>")}return l.push("</table>"),r.empty().get(0).innerHTML=l.join(""),!0},N=function(e,n,i,o,a){var r=this.$.panel[e],l=[],s=void 0,c=void 0,u=void 0,p=void 0,f=void 0,g=void 0,m=void 0,v=void 0,x=void 0;for(s=a.paintStartRowIndex,c=function(){var e=void 0;return e=o.length,a.paintRowCount+a.paintStartRowIndex<e&&(e=a.paintRowCount+a.paintStartRowIndex),e}();s<c;s++)if(o[s]&&i&&"__isGrouping"in o[s]){var y=i;for(l=[],u=0,p=y.rows.length;u<p;u++){for(f=0,g=y.rows[u].cols.length;f<g;f++)m=y.rows[u].cols[f],v=h.body.columnHeight*m.rowspan-h.body.columnBorderWidth,x=m.align||_,l.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-data-index="'+s+'" ','data-ax5grid-column-row="'+u+'" ','data-ax5grid-column-col="'+f+'" ','data-ax5grid-column-rowIndex="'+m.rowIndex+'" ','data-ax5grid-column-colIndex="'+m.colIndex+'" ','data-ax5grid-column-attr="'+(m.columnAttr||"default")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn[s+"_"+m.colIndex+"_"+m.rowIndex],this.selectedColumn[s+"_"+m.colIndex+"_"+m.rowIndex]),'colspan="'+m.colspan+'" ','rowspan="'+m.rowspan+'" ','class="'+function(e){var n="";return e.styleClass&&(n+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,item:o[s],index:s})+" ":e.styleClass+" "),h.body.columnBorderWidth&&(n+="hasBorder "),f==g-1&&(n+="isLastColumn "),n}.call(this,m)+'" ','style="height: '+v+'px;min-height: 1px;">'),l.push(function(e){var t=h.body.columnHeight-2*h.body.columnPadding-h.body.columnBorderWidth;return m.multiLine||(e=h.body.columnHeight-h.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(m.multiLine?"multiLine":"")+'" '+(x?'data-ax5grid-text-align="'+x+'"':"")+'" style="height:'+e+"px;"+(m.multiLine?"":"line-height: "+t+"px;")+'">'}(v),d.call(this,o[s],s,m),"</span>"),l.push("</td>");l.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-data-index="'+s+'" ','data-ax5grid-column-attr="default" ','style="height: '+h.body.columnHeight+'px;min-height: 1px;" ',"></td>")}r.find('tr[data-ax5grid-tr-data-index="'+s+'"]').empty().get(0).innerHTML=l.join("")}};h.body.grouping&&(this.xvar.frozenColumnIndex>0&&(this.xvar.frozenRowIndex>0&&N.call(this,"top-left-body",x,w,p.slice(0,this.xvar.frozenRowIndex),{paintStartRowIndex:0,paintRowCount:this.xvar.frozenRowIndex,bodyTrHeight:this.xvar.bodyTrHeight}),N.call(this,"left-body-scroll",x,w,p,I)),this.xvar.frozenRowIndex>0&&N.call(this,"top-body-scroll",x,C,p.slice(0,this.xvar.frozenRowIndex),{paintStartRowIndex:0,paintRowCount:this.xvar.frozenRowIndex,bodyTrHeight:this.xvar.bodyTrHeight}),N.call(this,"body-scroll",x,C,p,I)),this.xvar.frozenColumnIndex>0&&h.footSum&&this.needToPaintSum&&T.call(this,"bottom-left-body",x,y,p),h.footSum&&this.needToPaintSum&&T.call(this,"bottom-body-scroll",x,b,p,I)},p=function(e){var n=this.config,i=this.list,o=Math.floor(Math.abs(this.$.panel["body-scroll"].position().top)/this.xvar.bodyTrHeight)+this.xvar.frozenRowIndex,a=(this.asideBodyRowData,this.leftBodyRowData),r=this.bodyRowData,l=this.leftFootSumData,u=this.footSumData,h=(this.asideBodyGroupingData,this.leftBodyGroupingData),p=this.bodyGroupingData,f=n.body.align,g=Math.ceil(this.$.panel.body.height()/this.xvar.bodyTrHeight)+1,m={paintStartRowIndex:o,paintRowCount:g,bodyTrHeight:this.xvar.bodyTrHeight},v=function(e,i,o,a){var r=this.$.panel[e],l=[],s=void 0,d=void 0,u=void 0,h=void 0,p=void 0,g=void 0,m=void 0,v=void 0,x=void 0;for(l.push('<table border="0" cellpadding="0" cellspacing="0">'),l.push("<colgroup>"),s=0,d=i.length;s<d;s++)l.push('<col style="width:'+i[s]._width+'px;"  />');for(l.push("<col  />"),l.push("</colgroup>"),u=0,h=o.rows.length;u<h;u++){for(l.push('<tr class="tr-sum">'),p=0,g=o.rows[u].cols.length;p<g;p++)m=o.rows[u].cols[p],v=n.body.columnHeight*m.rowspan-n.body.columnBorderWidth,x=m.align||f,l.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-column-row="'+u+'" ','data-ax5grid-column-col="'+p+'" ','data-ax5grid-column-rowIndex="'+u+'" ','data-ax5grid-column-colIndex="'+m.colIndex+'" ','data-ax5grid-column-attr="'+(m.columnAttr||"sum")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn["sum_"+m.colIndex+"_"+u],this.selectedColumn["sum_"+m.colIndex+"_"+u]),'colspan="'+m.colspan+'" ','rowspan="'+m.rowspan+'" ','class="'+function(e){var i="";return e.styleClass&&(i+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,isFootSum:!0})+" ":e.styleClass+" "),n.body.columnBorderWidth&&(i+="hasBorder "),p==g-1&&(i+="isLastColumn "),i}.call(this,m)+'" ','style="height: '+v+'px;min-height: 1px;">'),l.push(function(e){var t=n.body.columnHeight-2*n.body.columnPadding-n.body.columnBorderWidth;return m.multiLine||(e=n.body.columnHeight-n.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(m.multiLine?"multiLine":"")+'" '+(x?'data-ax5grid-text-align="'+x+'"':"")+'" style="height:'+e+"px;line-height: "+t+'px;">'}(v),c.call(this,a,m),"</span>"),l.push("</td>");l.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-column-attr="sum" ','style="height: '+n.body.columnHeight+'px;min-height: 1px;" ',"></td>"),l.push("</tr>")}return l.push("</table>"),r.empty().get(0).innerHTML=l.join(""),!0},x=function(e,i,o,a,r){var l=this.$.panel[e],s=[],c=void 0,u=void 0,h=void 0,p=void 0,g=void 0,m=void 0,v=void 0,x=void 0,y=void 0;for("undefined"!=typeof r&&"undefined"!=typeof r.paintStartRowIndex||(r={paintStartRowIndex:0,paintRowCount:a.length}),c=r.paintStartRowIndex,u=function(){var e=void 0;return e=a.length,r.paintRowCount+r.paintStartRowIndex<e&&(e=r.paintRowCount+r.paintStartRowIndex),e}();c<u;c++)if(a[c]&&o&&"__isGrouping"in a[c]){var b=o;for(s=[],h=0,p=b.rows.length;h<p;h++){for(g=0,m=b.rows[h].cols.length;g<m;g++)v=b.rows[h].cols[g],x=n.body.columnHeight*v.rowspan-n.body.columnBorderWidth,y=v.align||f,s.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-data-index="'+c+'" ','data-ax5grid-column-row="'+h+'" ','data-ax5grid-column-col="'+g+'" ','data-ax5grid-column-rowIndex="'+v.rowIndex+'" ','data-ax5grid-column-colIndex="'+v.colIndex+'" ','data-ax5grid-column-attr="'+(v.columnAttr||"default")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn[c+"_"+v.colIndex+"_"+v.rowIndex],this.selectedColumn[c+"_"+v.colIndex+"_"+v.rowIndex]),'colspan="'+v.colspan+'" ','rowspan="'+v.rowspan+'" ','class="'+function(e){var i="";return e.styleClass&&(i+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,item:a[c],index:c})+" ":e.styleClass+" "),n.body.columnBorderWidth&&(i+="hasBorder "),g==m-1&&(i+="isLastColumn "),i}.call(this,v)+'" ','style="height: '+x+'px;min-height: 1px;">'),s.push(function(e){var t=n.body.columnHeight-2*n.body.columnPadding-n.body.columnBorderWidth;return v.multiLine||(e=n.body.columnHeight-n.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(v.multiLine?"multiLine":"")+'" '+(y?'data-ax5grid-text-align="'+y+'"':"")+'" style="height:'+e+"px;line-height: "+t+'px;">'}(x),d.call(this,a[c],c,v),"</span>"),s.push("</td>");s.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-data-index="'+c+'" ','data-ax5grid-column-attr="default" ','style="height: '+n.body.columnHeight+'px;min-height: 1px;" ',"></td>")}l.find('tr[data-ax5grid-tr-data-index="'+c+'"]').empty().get(0).innerHTML=s.join("")}},y=function(e,i,o,a,r){var l=this.$.panel[e],d=[],c=void 0,u=void 0,h=void 0,p=void 0,g=void 0,m=void 0,v=void 0,x=o,y="undefined"!=typeof a[r].__origin_index__?a[r].__origin_index__:r,b=l.find('tr[data-ax5grid-tr-data-index="'+r+'"]').empty().get(0);if(b){for(c=0,u=x.rows.length;c<u;c++){for(h=0,p=x.rows[c].cols.length;h<p;h++)g=x.rows[c].cols[h],m=n.body.columnHeight*g.rowspan-n.body.columnBorderWidth,v=g.align||f,d.push("<td ",'data-ax5grid-panel-name="'+e+'" ','data-ax5grid-data-index="'+r+'" ','data-ax5grid-data-o-index="'+y+'" ','data-ax5grid-column-row="'+c+'" ','data-ax5grid-column-col="'+h+'" ','data-ax5grid-column-rowIndex="'+g.rowIndex+'" ','data-ax5grid-column-colIndex="'+g.colIndex+'" ','data-ax5grid-column-attr="'+(g.columnAttr||"default")+'" ',function(e,t){var n="";return e&&(n+='data-ax5grid-column-focused="true" '),t&&(n+='data-ax5grid-column-selected="true" '),n}(this.focusedColumn[r+"_"+g.colIndex+"_"+g.rowIndex],this.selectedColumn[r+"_"+g.colIndex+"_"+g.rowIndex]),'colspan="'+g.colspan+'" ','rowspan="'+g.rowspan+'" ','class="'+function(e){var i="";return e.styleClass&&(i+=t.isFunction(e.styleClass)?e.styleClass.call({column:e,key:e.key,item:a[r],index:r})+" ":e.styleClass+" "),n.body.columnBorderWidth&&(i+="hasBorder "),h==p-1&&(i+="isLastColumn "),i}.call(this,g)+'" ','style="height: '+m+'px;min-height: 1px;">'),d.push(function(e){var t=n.body.columnHeight-2*n.body.columnPadding-n.body.columnBorderWidth;return g.multiLine||(e=n.body.columnHeight-n.body.columnBorderWidth),'<span data-ax5grid-cellHolder="'+(g.multiLine?"multiLine":"")+'" '+(v?'data-ax5grid-text-align="'+v+'"':"")+'" style="height:'+e+"px;"+(g.multiLine?"":"line-height: "+t+"px;")+'">'}(m),s.call(this,a,a[r],r,g),"</span>"),d.push("</td>");d.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','data-ax5grid-data-index="'+r+'" ','data-ax5grid-column-attr="default" ','style="height: '+n.body.columnHeight+'px;min-height: 1px;" ',"></td>")}b.innerHTML=d.join("")}};this.xvar.frozenColumnIndex>0&&(this.xvar.frozenRowIndex>e?y.call(this,"top-left-body",this.leftHeaderColGroup,a,i.slice(0,this.xvar.frozenRowIndex),e):y.call(this,"left-body-scroll",this.leftHeaderColGroup,a,i,e)),this.xvar.frozenRowIndex>e?y.call(this,"top-body-scroll",this.headerColGroup,r,i.slice(0,this.xvar.frozenRowIndex),e):y.call(this,"body-scroll",this.headerColGroup,r,i,e),n.body.grouping&&(this.xvar.frozenColumnIndex>0&&(this.xvar.frozenRowIndex>e?x.call(this,"top-left-body",this.leftHeaderColGroup,h,i.slice(0,this.xvar.frozenRowIndex)):x.call(this,"left-body-scroll",this.leftHeaderColGroup,h,i,m)),this.xvar.frozenRowIndex>e?x.call(this,"top-body-scroll",this.headerColGroup,p,i.slice(0,this.xvar.frozenRowIndex)):x.call(this,"body-scroll",this.headerColGroup,p,i,m)),this.xvar.frozenColumnIndex>0&&n.footSum&&this.needToPaintSum&&v.call(this,"bottom-left-body",this.leftHeaderColGroup,l,i),n.footSum&&this.needToPaintSum&&v.call(this,"bottom-body-scroll",this.headerColGroup,u,i,m)},f=function(t,n){if("undefined"==typeof n&&(n={timeoutUnUse:!1}),this.isInlineEditing)for(var i in this.inlineEditing)e.body.inlineEdit.deActive.call(this,"ESC",i);this.config.asidePanelWidth>0&&"top"in t&&this.$.panel["aside-body-scroll"].css({top:t.top}),this.xvar.frozenColumnIndex>0&&"top"in t&&this.$.panel["left-body-scroll"].css({top:t.top}),this.xvar.frozenRowIndex>0&&"left"in t&&this.$.panel["top-body-scroll"].css({left:t.left}),this.$.panel["body-scroll"].css(t),this.config.footSum&&"left"in t&&this.$.panel["bottom-body-scroll"].css({left:t.left}),this.__throttledScroll?this.__throttledScroll(t,n):(this.config.virtualScrollY&&!n.noRepaint&&"top"in t?u.call(this):this.config.virtualScrollX&&!n.noRepaint&&"left"in t&&u.call(this),n.callback&&n.callback())},g=function(){n.focusClear.call(this),n.clear.call(this),this.isInlineEditing&&v.deActive.call(this)},m=function(t){var i={UD:function(t){var i=!0,o=void 0,a=void 0,r=void 0,l=void 0;for(var s in this.focusedColumn){o=jQuery.extend({},this.focusedColumn[s],!0);break}if(!o)return!1;for(a=this.bodyRowMap[o.rowIndex+"_"+o.colIndex],n.focusClear.call(this),n.clear.call(this),t>0?o.rowIndex+(a.rowspan-1)+t>this.bodyRowTable.rows.length-1?(o.dindex=o.dindex+t,
o.doindex=o.doindex+t,o.rowIndex=0,o.dindex>this.list.length-1&&(o.dindex=o.doindex=this.list.length-1,i=!1)):o.rowIndex=o.rowIndex+t:o.rowIndex+t<0?(o.dindex=o.dindex+t,o.doindex=o.doindex+t,o.rowIndex=this.bodyRowTable.rows.length-1,o.dindex<0&&(o.dindex=o.doindex=0,i=!1)):o.rowIndex=o.rowIndex+t,r=0;"undefined"==typeof this.bodyRowMap[o.rowIndex+"_"+o.colIndex];){if(0==o.rowIndex||r%2==(t>0?0:1)?o.colIndex--:o.rowIndex--,o.rowIndex<=0&&o.colIndex<=0){i=!1;break}r++}if(l=e.util.findPanelByColumnIndex.call(this,o.dindex,o.colIndex),this.config.body.mergeCells&&this.list.length){for(;!(this.$.panel[l.panelName].find('[data-ax5grid-tr-data-index="'+o.dindex+'"]').find('[data-ax5grid-column-rowindex="'+o.rowIndex+'"][data-ax5grid-column-colindex="'+o.colIndex+'"]').get(0)||(t>0?o.dindex++:o.dindex--,o.dindex<0||o.dindex>this.list.length-1)););l=e.util.findPanelByColumnIndex.call(this,o.dindex,o.colIndex)}if(o.panelName=l.panelName,o.dindex+1>this.xvar.frozenRowIndex)if(o.dindex<=this.xvar.virtualPaintStartRowIndex){var d=(o.dindex-this.xvar.frozenRowIndex-1)*this.xvar.bodyTrHeight;d<0&&(d=0),f.call(this,{top:-d,timeoutUnUse:!1}),e.scroller.resize.call(this)}else o.dindex+1>this.xvar.virtualPaintStartRowIndex+(this.xvar.virtualPaintRowCount-2)&&(f.call(this,{top:(this.xvar.virtualPaintRowCount-2-o.dindex)*this.xvar.bodyTrHeight,timeoutUnUse:!1}),e.scroller.resize.call(this));return this.focusedColumn[o.dindex+"_"+o.colIndex+"_"+o.rowIndex]=o,this.$.panel[o.panelName].find('[data-ax5grid-tr-data-index="'+o.dindex+'"]').find('[data-ax5grid-column-rowindex="'+o.rowIndex+'"][data-ax5grid-column-colindex="'+o.colIndex+'"]').attr("data-ax5grid-column-focused","true"),i},LR:function(t){var i=!0,o=void 0,a=void 0,r=!1,l="",s=void 0;for(var d in this.focusedColumn){o=jQuery.extend({},this.focusedColumn[d],!0);break}if(!o)return!1;if(a=this.bodyRowMap[o.rowIndex+"_"+o.colIndex],n.focusClear.call(this),n.clear.call(this),t<0?(o.colIndex=o.colIndex+t,o.colIndex<0&&(o.colIndex=0,i=!1)):(o.colIndex=o.colIndex+t,o.colIndex>this.colGroup.length-1&&(o.colIndex=this.colGroup.length-1,i=!1)),"undefined"==typeof this.bodyRowMap[o.rowIndex+"_"+o.colIndex]&&(o.rowIndex=0),this.list[o.dindex]&&this.list[o.dindex].__isGrouping){if(t<0){for(;"undefined"==typeof this.bodyGroupingMap[o.rowIndex+"_"+o.colIndex];)if(o.colIndex--,o.colIndex<=0){i=!1;break}}else for(;"undefined"==typeof this.bodyGroupingMap[o.rowIndex+"_"+o.colIndex];)if(o.colIndex++,o.colIndex>=this.colGroup.length){i=!1;break}}else if(t<0){for(;"undefined"==typeof this.bodyRowMap[o.rowIndex+"_"+o.colIndex];)if(o.colIndex--,o.colIndex<=0){i=!1;break}}else for(;"undefined"==typeof this.bodyRowMap[o.rowIndex+"_"+o.colIndex];)if(o.colIndex++,o.colIndex>=this.colGroup.length){i=!1;break}if(s=e.util.findPanelByColumnIndex.call(this,o.dindex,o.colIndex),this.config.body.mergeCells&&this.list.length&&o.dindex>1){for(;!(this.$.panel[s.panelName].find('[data-ax5grid-tr-data-index="'+o.dindex+'"]').find('[data-ax5grid-column-rowindex="'+o.rowIndex+'"][data-ax5grid-column-colindex="'+o.colIndex+'"]').get(0)||(o.dindex--,o.dindex<0||o.dindex>this.list.length-1)););s=e.util.findPanelByColumnIndex.call(this,o.dindex,o.colIndex)}o.panelName=s.panelName;var c=function(){if(!this.config.virtualScrollX)return!1;var t=0;if(o.colIndex+1>this.xvar.frozenColumnIndex){if(o.colIndex<=this.xvar.paintStartColumnIndex&&this.colGroup[o.colIndex])return t=-this.colGroup[Number(o.colIndex)]._sx,f.call(this,{left:t}),e.header.scrollTo.call(this,{left:t}),e.scroller.resize.call(this),!0;if(o.colIndex>=this.xvar.paintEndColumnIndex&&this.colGroup[Number(o.colIndex)])return this.colGroup[Number(o.colIndex)]._ex>this.xvar.bodyWidth&&(t=this.colGroup[Number(o.colIndex)]._ex-this.xvar.bodyWidth,f.call(this,{left:-t}),e.header.scrollTo.call(this,{left:-t}),e.scroller.resize.call(this)),!0}return t=null,!1}.call(this);l=s.containerPanelName,r=s.isScrollPanel,this.focusedColumn[o.dindex+"_"+o.colIndex+"_"+o.rowIndex]=o;var u=this.$.panel[o.panelName].find('[data-ax5grid-tr-data-index="'+o.dindex+'"]').find('[data-ax5grid-column-rowindex="'+o.rowIndex+'"][data-ax5grid-column-colindex="'+o.colIndex+'"]').attr("data-ax5grid-column-focused","true");if(!c&&u&&r){var h=function(){return u.position().left+u.outerWidth()>Math.abs(this.$.panel[o.panelName].position().left)+this.$.panel[l].width()?u.position().left+u.outerWidth()-this.$.panel[l].width():Math.abs(this.$.panel[o.panelName].position().left)>u.position().left?u.position().left:void 0}.call(this);"undefined"!=typeof h&&(e.header.scrollTo.call(this,{left:-h}),f.call(this,{left:-h}),e.scroller.resize.call(this))}return i},INDEX:function(t){var i=!0,o=void 0,a=void 0,r=void 0;for(var l in this.focusedColumn){o=jQuery.extend({},this.focusedColumn[l],!0);break}for(o||(o={rowIndex:0,colIndex:0}),a=this.bodyRowMap[o.rowIndex+"_"+o.colIndex],n.focusClear.call(this),n.clear.call(this),"end"==t&&(t=this.list.length-1),o.dindex=t,o.rowIndex=0,r=0;"undefined"==typeof this.bodyRowMap[o.rowIndex+"_"+o.colIndex]&&(0==o.rowIndex||r%2==(_dy>0?0:1)?o.colIndex--:o.rowIndex--,!(o.rowIndex<=0&&o.colIndex<=0));)r++;var s=e.util.findPanelByColumnIndex.call(this,o.dindex,o.colIndex);if(o.panelName=s.panelName,o.dindex+1>this.xvar.frozenRowIndex){var d=this.xvar.virtualPaintStartRowIndex||0;if(o.dindex<d)f.call(this,{top:-(o.dindex-this.xvar.frozenRowIndex)*this.xvar.bodyTrHeight}),e.scroller.resize.call(this);else if(o.dindex+1>d+(this.xvar.virtualPaintRowCount-2)){var c=this.config.virtualScrollY?o.dindex-this.xvar.frozenRowIndex-this.xvar.virtualPaintRowCount+3:o.dindex-this.xvar.frozenRowIndex;f.call(this,{top:-c*this.xvar.bodyTrHeight}),e.scroller.resize.call(this)}}return this.focusedColumn[o.dindex+"_"+o.colIndex+"_"+o.rowIndex]=o,this.$.panel[o.panelName].find('[data-ax5grid-tr-data-index="'+o.dindex+'"]').find('[data-ax5grid-column-rowindex="'+o.rowIndex+'"][data-ax5grid-column-colindex="'+o.colIndex+'"]').attr("data-ax5grid-column-focused","true"),i}},o={UP:function(){return i.UD.call(this,-1)},DOWN:function(){return i.UD.call(this,1)},LEFT:function(){return i.LR.call(this,-1)},RIGHT:function(){return i.LR.call(this,1)},HOME:function(){return i.INDEX.call(this,0)},END:function(){return i.INDEX.call(this,"end")},position:function(e){return i.INDEX.call(this,e)}};return t in o?o[t].call(this):o.position.call(this,t)},v={active:function(n,i,a){var r=this,l=void 0,s=void 0,d=void 0,c=void 0,u=void 0,h=void 0,p=void 0,f=void 0;for(var g in n){if(u=n[g].panelName,l=n[g].dindex,s=n[g].doindex,d=n[g].colIndex,c=n[g].rowIndex,h=n[g].colspan,p=this.colGroup[d],!(f=p.editor))return this;if(t.isFunction(f.disabled)&&f.disabled.call({list:this.list,dindex:l,item:this.list[l],key:p.key,value:a}))return this;if(!function(t,n){if(t.type in e.inlineEditor)return"popup"==e.inlineEditor[t.type].editMode}(f)){if("checkbox"==f.type){var m=void 0,v=void 0;v=f.config&&f.config.trueValue?(m=!(a==f.config.trueValue))?f.config.trueValue:f.config.falseValue:m=0==a||"false"==a||a<"1"?"true":"false",e.data.setValue.call(r,l,s,p.key,v),o.call(r,["cellChecked"],l,s,{key:p.key,rowIndex:c,colIndex:d,editorConfig:p.editor.config,checked:m})}return this}if(this.list[l].__isGrouping)return!1;if(g in this.inlineEditing)return!1;this.inlineEditing[g]={editor:f,panelName:u,columnKey:g,column:n[g],useReturnToSave:e.inlineEditor[f.type].useReturnToSave},this.isInlineEditing=!0}if(this.isInlineEditing){var x=e.data.getValue.call(r,l,s,p.key),y=function(e,n){return t.isNothing(e)&&(e=t.isNothing(x)?"":x),"money"==n.type?t.number(e,{money:!0}):e}.call(this,a,f);return this.inlineEditing[g].$inlineEditorCell=this.$.panel[u].find('[data-ax5grid-tr-data-index="'+l+'"]').find('[data-ax5grid-column-rowindex="'+c+'"][data-ax5grid-column-colindex="'+d+'"]').find("[data-ax5grid-cellholder]"),this.inlineEditing[g].$inlineEditor=e.inlineEditor[f.type].init(this,g,f,this.inlineEditing[g].$inlineEditorCell,y),!0}},deActive:function(n,i,o){if(!this.inlineEditing[i])return this;var a=this.inlineEditing[i].panelName,r=this.inlineEditing[i].column.dindex,l=this.inlineEditing[i].column.doindex,s=this.inlineEditing[i].column.rowIndex,d=this.inlineEditing[i].column.colIndex,c=this.bodyRowMap[this.inlineEditing[i].column.rowIndex+"_"+this.inlineEditing[i].column.colIndex],u=function(e){return"undefined"==typeof o?"SELECT"==e.get(0).tagName||"INPUT"==e.get(0).tagName||"TEXTAREA"==e.get(0).tagName?e.val():(n="CANCEL",!1):o}(this.inlineEditing[i].$inlineEditor),h=function(e,n){return"money"==n.type?t.number(e):e}.call(this,u,c.editor),p={CANCEL:function(e,t,n){p.__clear.call(this)},RETURN:function(t,n,i,o){e.data.setValue.call(this,t,n,i.key,o)?(p.__clear.call(this),e.body.repaintCell.call(this,a,t,n,s,d,o)):p.__clear.call(this)},__clear:function(){if(this.isInlineEditing=!1,this.inlineEditing[i]&&this.inlineEditing[i].$inlineEditor){var e=this.inlineEditing[i].$inlineEditor.data("binded-ax5ui");"ax5picker"==e?this.inlineEditing[i].$inlineEditor.ax5picker("close"):"ax5select"==e&&this.inlineEditing[i].$inlineEditor.ax5select("close"),this.inlineEditing[i].$inlineEditor.remove(),this.inlineEditing[i].$inlineEditor=null,this.inlineEditing[i].$inlineEditorCell=null}this.inlineEditing[i]=void 0,delete this.inlineEditing[i]}};n in p?p[n||"RETURN"].call(this,r,l,c,h):p.__clear.call(this)},keydown:function(t,n,i){var a={ESC:function(){for(var e in this.inlineEditing)v.deActive.call(this,"CANCEL",e)},RETURN:function(){if(this.isInlineEditing){if(!this.inlineEditing[n]||!this.inlineEditing[n].useReturnToSave)return!1;v.deActive.call(this,"RETURN",n)}else for(var t in this.focusedColumn){var a=this.focusedColumn[t],r=this.bodyRowMap[a.rowIndex+"_"+a.colIndex],l=a.dindex,s=a.doindex,d="",c=this.colGroup[a.colIndex];if(r&&(this.list[l].__isGrouping||(d=e.data.getValue.call(this,l,s,r.key))),c.editor&&"inline"===e.inlineEditor[c.editor.type].editMode){if(i&&i.moveFocus);else if(r.editor&&"checkbox"==r.editor.type){d=e.data.getValue.call(this,l,s,r.key);var u=void 0,h=void 0;r.editor.config&&r.editor.config.trueValue?d!=r.editor.config.trueValue?(h=r.editor.config.trueValue,u=!0):(h=r.editor.config.falseValue,u=!1):h=u=0==d||"false"==d||d<"1"?"true":"false",e.data.setValue.call(this,l,s,r.key,h),o.call(this,["cellChecked"],l,s,{key:r.key,rowIndex:a.rowIndex,colIndex:a.colIndex,editorConfig:r.editor.config,checked:u})}}else e.body.inlineEdit.active.call(this,this.focusedColumn,null,d)}return!0}};t in a&&a[t].call(this,t,n,i)}},x=function(){var e=this.config,t=this.list,n=this.bodyRowTable,i=this.footSumTable,o=this.bodyGroupingTable,a=function(e,t,n,i){var o=[],a=void 0,r=void 0,l=void 0,c=void 0,u=void 0,h=void 0,p=void 0,f=void 0;for(a=0,r=i.length;a<r;a++){var g=!1,m=void 0;n&&"__isGrouping"in i[a]?(m=n,g=!0):m=t;for(l=0,c=m.rows.length;l<c;l++){for(o.push("\n<tr>"),u=0,h=m.rows[l].cols.length;u<h;u++)p=m.rows[l].cols[u],o.push("<td ",'colspan="'+p.colspan+'" ','rowspan="'+p.rowspan+'" ',">",(g?d.call(this,i[a],a,p):s.call(this,i,i[a],a,p,f,"text"))||"&nbsp;","</td>");o.push("\n</tr>")}}return o.join("")},r=function(e,t,n){var i=[],o=void 0,a=void 0,r=void 0,l=void 0,s=void 0;for(o=0,a=t.rows.length;o<a;o++){for(i.push("\n<tr>"),r=0,l=t.rows[o].cols.length;r<l;r++)s=t.rows[o].cols[r],i.push("<td ",'colspan="'+s.colspan+'" ','rowspan="'+s.rowspan+'" ',">",c.call(this,n,s),"</td>");i.push("\n</tr>")}return i.join("")},l=[];return l.push(a.call(this,this.headerColGroup,n,o,t)),e.footSum&&l.push(r.call(this,this.headerColGroup,i,t)),e.rightSum,l.join("")},y=function(t,n,i){e.data.toggleCollapse.call(this,t,n,i)&&(this.proxyList=e.data.getProxyList.call(this,this.list),this.align())},b=function(e,t){var n={self:this,page:this.page,list:this.list,item:this.list[e],dindex:e};m.call(this,e),this.config.body.onClick&&this.config.body.onClick.call(n),n=null},w=function(e,t){var n={self:this,page:this.page,list:this.list,item:this.list[e],dindex:e};m.call(this,e),this.config.body.onDBLClick&&this.config.body.onDBLClick.call(n),n=null};e.body={init:r,repaint:u,repaintCell:h,repaintRow:p,updateRowState:o,updateRowStateAll:a,scrollTo:f,blur:g,moveFocus:m,inlineEdit:v,getExcelString:x,toggleCollapse:y,click:b,dblClick:w}}(),function(){var e=ax5.ui.grid,t=ax5.util,n=function(){for(var e=0,n=this.list.length;n--;)"__groupingList"in this.list[n]||(e+=t.number(this.list[n][this.key]));return e},i=function(){for(var e=0,n=this.list.length,i=0;n--;)"__groupingList"in this.list[n]||(e+=t.number(this.list[n][this.key]),i++);return t.number(e/(i||1),{round:2})};e.collector={sum:n,avg:i}}(),function(){var e=ax5.ui.grid,t=ax5.util,n=function(){},i=function(e){for(var t=0,n=e.length,i=[];t<n;t++)e[t]&&!e[t].__isGrouping&&(e[t][this.config.columnKeys.selected]&&this.selectedDataIndexs.push(t),i.push(jQuery.extend({},e[t])));return i},o=function(e){this.selectedDataIndexs=[];var n=0,i=e.length,o=[],a=0,r=0,l=0;if(this.config.body.grouping)for(var s=t.map(this.bodyGrouping.by,function(){return{key:this,compareString:"",grouping:!1,list:[]}}),d=0,c=s.length,u=void 0,h=[],p=void 0;n<i+1;n++)if(d=0,e[n]&&e[n][this.config.columnKeys.deleted])this.deletedList.push(e[n]);else{for(u="",h=[];d<c;d++){if(e[n]&&(u+="$|$"+e[n][s[d].key]),a>0&&u!=s[d].compareString){for(var f={keys:[],labels:[],list:s[d].list},g=0;g<d+1;g++)f.keys.push(s[g].key),f.labels.push(e[n-1][s[g].key]);h.push(f),s[d].list=[]}s[d].list.push(e[n]),s[d].compareString=u}for(p=h.length;p--;)o.push({__isGrouping:!0,__groupingList:h[p].list,__groupingBy:{keys:h[p].keys,labels:h[p].labels}});e[n]&&(e[n][this.config.columnKeys.selected]&&this.selectedDataIndexs.push(n),e[n].__original_index=e[n].__index=l,o.push(e[n]),r++,a++,l++)}else for(;n<i;n++)e[n]&&(e[n][this.config.columnKeys.deleted]?this.deletedList.push(e[n]):(e[n][this.config.columnKeys.selected]&&this.selectedDataIndexs.push(n),"undefined"==typeof e[n].__original_index&&(e[n].__original_index=l),e[n].__index=l,r++,l++,o.push(e[n])));return this.xvar.dataRealRowCount=r,o},a=function(e){this.selectedDataIndexs=[],this.deletedList=[];for(var n=0,i=0,o=0,a=0,r=e.length,l=this.config.tree.columnKeys,s=this.config.tree.hashDigit,d={};r--;)delete e[r][l.parentHash],delete e[r][l.selfHash];for(n=0,i=0,r=e.length;n<r;n++)e[n]&&(d[e[n][l.selfKey]]=n,(t.isNothing(e[n][l.parentKey])||"top"===e[n][l.parentKey])&&(e[n][l.parentKey]="top",e[n][l.children]=[],e[n][l.parentHash]=t.setDigit("0",s),e[n][l.selfHash]=t.setDigit("0",s)+"."+t.setDigit(i,s),e[n][l.depth]=0,e[n][l.hidden]=!1,i++));for(n=0,a=0;n<r;n++){var c=void 0,u=void 0;e[n]&&"top"!==e[n][l.parentKey]&&"undefined"==typeof e[n][l.parentHash]&&((c=e[d[e[n][l.parentKey]]])?(u=c[l.selfHash],e[n][l.children]=[],e[n][l.parentHash]=u,e[n][l.selfHash]=u+"."+t.setDigit(c[l.children].length,s),e[n][l.depth]=c[l.depth]+1,(c[l.collapse]||c[l.hidden])&&(e[n][l.hidden]=!0),c[l.children].push(e[n][l.selfKey])):(e[n][l.parentKey]="top",e[n][l.children]=[],e[n][l.parentHash]=t.setDigit("0",s),e[n][l.selfHash]=t.setDigit("0",s)+"."+t.setDigit(i,s),e[n][l.hidden]=!1,i++)),e[n]&&(e[n][this.config.columnKeys.deleted]?(this.deletedList.push(e[n]),e[n][l.hidden]=!0):e[n][this.config.columnKeys.selected]&&this.selectedDataIndexs.push(n),e[n].__index=a,o++,a++)}return this.listIndexMap=d,this.xvar.dataRealRowCount=o,e},r=function(e){for(var t=0,n=e.length,i=[];t<n;t++)e[t]&&!e[t][this.config.tree.columnKeys.hidden]&&(e[t].__origin_index__=t,i.push(e[t]));return i},l=function(n){var i=void 0;return t.isArray(n)?(this.page=null,i=n):"page"in n&&(this.page=jQuery.extend({},n.page),i=n.list),this.config.tree.use?(this.list=a.call(this,i),this.proxyList=r.call(this,b.call(this,this.sortInfo,this.list))):(this.proxyList=null,this.list=o.call(this,!this.config.remoteSort&&Object.keys(this.sortInfo).length?b.call(this,this.sortInfo,i):i)),this.selectedDataIndexs=[],this.deletedList=[],this.needToPaintSum=!0,this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this),this.config.body.grouping,this},s=function(e){return{list:this.list,page:this.page}},d=function(t){var n=[],i=this.list,o=0,a=i.length;switch(t){case"modified":for(;o<a;o++)i[o]&&!i[o].__isGrouping&&i[o][this.config.columnKeys.modified]&&n.push(jQuery.extend({},i[o]));break;case"selected":for(;o<a;o++)i[o]&&!i[o].__isGrouping&&i[o][this.config.columnKeys.selected]&&n.push(jQuery.extend({},i[o]));break;case"deleted":n=[].concat(this.deletedList);break;default:n=e.data.clearGroupingData.call(this,i)}return n},c=function(n,l,s){var d=this.config.body.grouping?i.call(this,this.list):this.list,c={first:function(){d=[].concat(n).concat(d)},last:function(){d=d.concat([].concat(n))}};if(this.config.tree.use){var u=this.list.concat([].concat(n));this.list=a.call(this,u),this.proxyList=r.call(this,b.call(this,this.sortInfo,this.list))}else{if("undefined"==typeof l&&(l="last"),l in c)n[this.config.columnKeys.modified]=!0,c[l].call(this,n);else{if(!t.isNumber(l))throw"invalid argument _dindex";if(t.isArray(n))for(var h=0,p=n.length;h<p;h++)d.splice(l+h,0,n[h]);else d.splice(l,0,n)}d=this.config.body.grouping?o.call(this,b.call(this,this.sortInfo,d)):s&&s.sort&&Object.keys(this.sortInfo).length?o.call(this,b.call(this,this.sortInfo,d)):o.call(this,d),this.list=d}return this.needToPaintSum=!0,this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this),this},u=function(n){var l=this.config.body.grouping?i.call(this,this.list):this.list,s={first:function(){this.config.tree.use?s.tree.call(this,0):l.splice(0,1)},last:function(){this.config.tree.use?s.tree.call(this,l.length-1):l.splice(l.length-1,1)},index:function(e){this.config.tree.use?s.tree.call(this,e):l.splice(e,1)},selected:function(){if(this.config.tree.use)s.tree.call(this,"selected");else{var e=[],t=void 0,n=void 0;for(t=0,n=l.length;t<n;t++)l[t][this.config.columnKeys.selected]||e.push(l[t]);l=e,e=null,t=null}},tree:function(e){var n=this.config.tree.columnKeys,i=l[e][this.config.tree.columnKeys.selfHash];l=t.filter(l,function(){return this[n.selfHash].substr(0,i.length)!=i}),n=null,i=null}};if("undefined"==typeof n&&(n="last"),n in s)s[n].call(this,n);else{if(!t.isNumber(n))throw"invalid argument _dindex";s.index.call(this,n)}return this.config.tree.use?(this.list=a.call(this,l),this.proxyList=r.call(this,b.call(this,this.sortInfo,this.list))):(l=this.config.body.grouping?o.call(this,b.call(this,this.sortInfo,l)):Object.keys(this.sortInfo).length?o.call(this,b.call(this,this.sortInfo,l)):o.call(this,l),this.list=l),this.needToPaintSum=!0,this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this),this},h=function(n){var l=this.config.body.grouping?i.call(this,this.list):this.list,s={first:function(){this.config.tree.use?s.tree.call(this,0):l[0][this.config.columnKeys.deleted]=!0},last:function(){this.config.tree.use?s.tree.call(this,l.length-1):l[l.length-1][this.config.columnKeys.deleted]=!0},selected:function(){if(this.config.tree.use)s.tree.call(this,"selected");else{for(var e=l.length;e--;)l[e][this.config.columnKeys.selected]&&(l[e][this.config.columnKeys.deleted]=!0);e=null}},tree:function(e){var t=this.config.columnKeys,n=this.config.tree.columnKeys;if("selected"===e){for(var i=l.length;i--;)if(l[i][this.config.columnKeys.selected]){l[i][this.config.columnKeys.deleted]=!0;for(var o=l[i][n.selfHash],a=l.length;a--;)l[a][n.selfHash].substr(0,o.length)===o&&(l[a][t.deleted]=!0);o=null,a=null}i=null}else{for(var r=l[e][n.selfHash],s=l.length;s--;)l[s][n.selfHash].substr(0,r.length)!==r&&(l[s][t.deleted]=!0);r=null,s=null}t=null,n=null}};if("undefined"==typeof n&&(n="last"),n in s)s[n].call(this,n);else{if(!t.isNumber(n))throw"invalid argument _dindex";l[n][this.config.columnKeys.deleted]=!0}return this.config.tree.use?(this.list=a.call(this,l),this.proxyList=r.call(this,b.call(this,this.sortInfo,this.list))):(l=this.config.body.grouping?o.call(this,b.call(this,this.sortInfo,l)):Object.keys(this.sortInfo).length?o.call(this,b.call(this,this.sortInfo,l)):o.call(this,l),this.list=l),this.needToPaintSum=!0,this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this),this},p=function(e,n){if(!t.isNumber(n))throw"invalid argument _dindex";this.needToPaintSum=!0,this.list.splice(n,1,e),this.config.body.grouping&&(this.list=o.call(this,i.call(this,this.list)))},f=function(e,t,n){var i=this.config.tree.columnKeys,o=void 0,a=void 0;if("undefined"==typeof e)return!1;if(a=this.proxyList[e].__origin_index__,this.list[a][i.children]){if(this.proxyList=[],n&&n.filter){if(n.filter.call({item:this.list[a],dindex:a},this.list[a]))for(var r in t)this.list[a][r]=t[r]}else for(var l in t)this.list[a][l]=t[l];o=this.list[a][i.selfHash];for(var s=0,d=this.list.length;s<d;s++)if(this.list[s]){if(this.list[s][i.parentHash].substr(0,o.length)===o)if(n&&n.filter){if(n.filter.call({item:this.list[s],dindex:s},this.list[s]))for(var c in t)this.list[s][c]=t[c]}else for(var u in t)this.list[s][u]=t[u];this.list[s][i.hidden]||this.proxyList.push(this.list[s])}return!0}return!1},g=function(t,n,i,o){var a=m.call(this,t,n,i),r=this.list,l="undefined"==typeof n?t:n;if(this.needToPaintSum=!0,a!==o){if(/[\.\[\]]/.test(i))try{r[l][this.config.columnKeys.modified]=!0,Function("val","this"+e.util.getRealPathForDataItem(i)+" = val;").call(r[l],o)}catch(s){}else r[l][this.config.columnKeys.modified]=!0,r[l][i]=o;this.onDataChanged&&this.onDataChanged.call({self:this,list:this.list,dindex:t,doindex:n,item:this.list[t],key:i,value:o})}return!0},m=function(t,n,i,o){var a=this.list,r="undefined"==typeof n?t:n;if(/[\.\[\]]/.test(i))try{o=Function("","return this"+e.util.getRealPathForDataItem(i)+";").call(a[r])}catch(l){}else o=a[r][i];return o},v=function(){this.selectedDataIndexs=[]},x=function(e,n,i,o){var a=this.config;return"undefined"==typeof n&&(n=e),!!this.list[n]&&(!this.list[n].__isGrouping&&(!this.list[n][a.columnKeys.disableSelection]&&("undefined"==typeof i?(this.list[n][a.columnKeys.selected]=!this.list[n][a.columnKeys.selected])?this.selectedDataIndexs.push(n):this.selectedDataIndexs.splice(t.search(this.selectedDataIndexs,function(){return this==n}),1):(this.list[n][a.columnKeys.selected]=i)?this.selectedDataIndexs.push(n):this.selectedDataIndexs.splice(t.search(this.selectedDataIndexs,function(){return this==n}),1),this.onDataChanged&&o&&o.internalCall&&this.onDataChanged.call({self:this,list:this.list,dindex:e,doindex:n,item:this.list[n],key:a.columnKeys.selected,value:this.list[n][a.columnKeys.selected]}),this.list[n][a.columnKeys.selected])))},y=function(e,t){var n=this.config,i=this.list.length;if(this.selectedDataIndexs=[],"undefined"==typeof e)for(;i--;)this.list[i].__isGrouping||t&&t.filter&&t.filter.call(this.list[i])!==!0||this.list[i][n.columnKeys.disableSelection]||(this.list[i][n.columnKeys.selected]=!this.list[i][n.columnKeys.selected])&&this.selectedDataIndexs.push(i);else for(;i--;)this.list[i].__isGrouping||t&&t.filter&&t.filter.call(this.list[i])!==!0||this.list[i][n.columnKeys.disableSelection]||(this.list[i][n.columnKeys.selected]=e)&&this.selectedDataIndexs.push(i);return this.onDataChanged&&t&&t.internalCall&&this.onDataChanged.call({self:this,list:this.list}),this.list},b=function(n,i,o){var a=i||this.list,r=[],l=0,s=function(t,n,i){if(/[\.\[\]]/.test(n))try{i=Function("","return this"+e.util.getRealPathForDataItem(n)+";").call(t)}catch(o){}else i=t[n];return i};for(var d in n)r[n[d].seq]={key:d,order:n[d].orderBy};r=t.filter(r,function(){return"undefined"!=typeof this}),o&&o.resetLineNumber&&0===r.length&&(r[0]={key:"__original_index",order:"asc"});var c=0,u=r.length,h=void 0,p=void 0;if(a.sort(function(e,t){for(c=0;c<u;c++){if(h=s(e,r[c].key),p=s(t,r[c].key),("undefined"==typeof h?"undefined":_typeof(h))!==("undefined"==typeof p?"undefined":_typeof(p))&&(h=""+h,p=""+p),h<p)return"asc"===r[c].order?-1:1;if(h>p)return"asc"===r[c].order?1:-1}}),o&&o.resetLineNumber)for(c=0,u=a.length,l=0;c<u;c++)i[c]&&!i[c].__isGrouping&&(i[c].__index=l++);return i?a:(this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this),this)},w=function(t,n){var i=this;if(this.config.tree.use){var o=this.list.concat([].concat(t));this.list=a.call(this,o),this.proxyList=r.call(this,b.call(this,this.sortInfo,this.list)),o=null}else this.list=this.list.concat([].concat(t));if(this.appendProgress=!0,e.page.statusUpdate.call(this),this.appendDebouncer){if(!(i.appendDebounceTimes<this.config.debounceTime/10))return i.appendDebounceTimes=0,C.call(i),n(),!1;clearTimeout(this.appendDebouncer),i.appendDebounceTimes++}this.appendDebouncer=setTimeout(function(){i.appendDebounceTimes=0,C.call(i),n()},this.config.debounceTime)},C=function(){this.appendProgress=!1,this.config.body.grouping?this.list=o.call(this,b.call(this,this.sortInfo,this.list)):this.list=o.call(this,this.list),this.needToPaintSum=!0,this.xvar.frozenRowIndex=this.config.frozenRowIndex>this.list.length?this.list.length:this.config.frozenRowIndex,this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0,e.page.navigationUpdate.call(this)},_=function(e,t,n){var i=this.config.tree.columnKeys,o=void 0,a=void 0;if("undefined"==typeof e)return!1;if(a=this.proxyList[e].__origin_index__,this.list[a][i.children]){this.proxyList=[],"undefined"==typeof n&&(n=!this.list[a][i.collapse]),this.list[a][i.collapse]=n,o=this.list[a][i.selfHash];for(var r=this.list.length;r--;)this.list[r]&&(this.list[r][i.parentHash].substr(0,o.length)===o&&(this.list[r][i.hidden]=n),this.list[r][i.hidden]||this.proxyList.push(this.list[r]));return!0}return!1};e.data={init:n,set:l,get:s,getList:d,getProxyList:r,setValue:g,getValue:m,clearSelect:v,select:x,selectAll:y,add:c,remove:u,deleteRow:h,update:p,updateChild:f,sort:b,initData:o,clearGroupingData:i,append:w,toggleCollapse:_}}(),function(){var e=ax5.ui.grid,t=(ax5.util,function(){return"\ufeff\n{{#tables}}{{{body}}}{{/tables}}\n"}),n=function(e,n){var i=void 0,o=[].concat(e);i=ax5.mustache.render(t(),{worksheet:function(){var e=[];return o.forEach(function(t,n){e.push({name:"Sheet"+(n+1)})}),e}(),tables:function(){var e=[];return o.forEach(function(t,n){e.push({body:t})}),e}()});var a=navigator.userAgent.indexOf("Chrome")>-1,r=!a&&navigator.userAgent.indexOf("Safari")>-1,l=!!document.documentMode,s=void 0,d=void 0,c=void 0,u=void 0,h=void 0;return navigator.msSaveOrOpenBlob?(s=new Blob([i],{type:"text/html"}),window.navigator.msSaveOrOpenBlob(s,n)):r?(d=window.open("about:blank",this.id+"-excel-export","width=600,height=400"),d.document.write(i),d=null):l&&"undefined"==typeof Blob?(c=jQuery('<iframe id="'+this.id+'-excel-export" style="display:none"></iframe>'),jQuery(document.body).append(c),u=window[this.id+"-excel-export"],u.document.open("text/html","replace"),u.document.write(i),u.document.close(),u.focus(),u.document.execCommand("SaveAs",!0,n),c.remove()):(h=document.body.appendChild(document.createElement("a")),"download"in h&&(h.download=n,h.href=URL.createObjectURL(new Blob([i],{type:"text/csv"})),h.click(),document.body.removeChild(h))),!0};e.excel={"export":n}}(),function(){var e=ax5.ui.grid,t=ax5.util,n=function(){if("undefined"!=typeof this.value){var e=(""+this.value).replace(/[^0-9^\.^\-]/g,""),n=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),i=e.split(".");i[0]+=".";do i[0]=i[0].replace(n,"$1,$2");while(n.test(i[0]));return i.length>1?i[0]+t.left(i[1],2):i[0].split(".")[0]}return""};e.formatter={money:n}}(),function(){var e=ax5.ui.grid,t=ax5.util,n={on:function(i,o){var a=this,r=$(i),l=r.offset().left,s=a.$.container.root.offset().left;a.xvar.columnResizerIndex=o;var d={min:-a.colGroup[o]._width+2,max:a.$.container.root.width()-a.colGroup[o]._width};jQuery(document.body).bind(e.util.ENM.mousemove+".ax5grid-"+this.instanceId,function(t){var n=e.util.getMousePosition(t);a.xvar.__da=n.clientX-a.xvar.mousePosition.clientX,d.min>a.xvar.__da?a.xvar.__da=d.min:d.max<a.xvar.__da&&(a.xvar.__da=d.max),a.xvar.columnResizerLived||a.$.resizer.horizontal.addClass("live"),a.xvar.columnResizerLived=!0,a.$.resizer.horizontal.css({left:l+a.xvar.__da-s})}).bind(e.util.ENM.mouseup+".ax5grid-"+this.instanceId,function(e){n.off.call(a),t.stopEvent(e)}).bind("mouseleave.ax5grid-"+this.instanceId,function(e){n.off.call(a),t.stopEvent(e)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(){this.$.resizer.horizontal.removeClass("live"),this.xvar.columnResizerLived=!1,"undefined"==typeof this.xvar.__da||this.setColumnWidth(this.colGroup[this.xvar.columnResizerIndex]._width+this.xvar.__da,this.xvar.columnResizerIndex),jQuery(document.body).unbind(e.util.ENM.mousemove+".ax5grid-"+this.instanceId).unbind(e.util.ENM.mouseup+".ax5grid-"+this.instanceId).unbind("mouseleave.ax5grid-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart")}},i=function(){var i=this;this.$.container.header.on("click","[data-ax5grid-column-attr]",function(n){var o=this.getAttribute("data-ax5grid-column-key"),a=this.getAttribute("data-ax5grid-column-colindex"),r=i.colGroup[a];if("__checkbox_header__"===o&&i.config.header.selector){var l=this.getAttribute("data-ax5grid-selected");l=!!t.isNothing(l)||"true"!==l,$(this).attr("data-ax5grid-selected",l),i.selectAll({selected:l}),l=null}else o&&r&&r.sortable!==!1&&!r.sortFixed&&(r.sortable!==!0&&i.config.sortable!==!0||s.call(i,r.key));e.body.blur.call(i),o=null,a=null,r=null}),this.$.container.header.on("mousedown","[data-ax5grid-column-resizer]",function(o){var a=this.getAttribute("data-ax5grid-column-resizer");i.xvar.mousePosition=e.util.getMousePosition(o),n.on.call(i,this,Number(a)),t.stopEvent(o),a=null}).on("dragstart",function(e){return t.stopEvent(e),!1}),o.call(this)},o=function(){var t=this.config,n=e.util.divideTableByFrozenColumnIndex(this.headerTable,this.xvar.frozenColumnIndex);this.asideHeaderData=function(e){for(var n=[],i={rows:[]},o=0,a=e.rows.length;o<a;o++)if(i.rows[o]={cols:[]},0===o){var r={label:"",colspan:1,rowspan:e.rows.length,colIndex:null},l={};t.showLineNumber&&(l=jQuery.extend({},r,{width:t.lineNumberColumnWidth,_width:t.lineNumberColumnWidth,columnAttr:"lineNumber",key:"__index_header__",label:"&nbsp;"}),n.push(l),i.rows[o].cols.push(l)),t.showRowSelector&&(l=jQuery.extend({},r,{width:t.rowSelectorColumnWidth,_width:t.rowSelectorColumnWidth,columnAttr:"rowSelector",key:"__checkbox_header__",label:""}),n.push(l),i.rows[o].cols.push(l)),r=null}return this.asideColGroup=n,i}.call(this,this.headerTable),this.leftHeaderData=n.leftData,this.headerData=n.rightData},a=function(e){return"__checkbox_header__"===e.key?this.config.header.selector?'<div class="checkBox" style="max-height: '+(e.width-10)+"px;min-height: "+(e.width-10)+'px;"></div>':"&nbsp;":e.label||"&nbsp;"},r=function(e){var n=this.config,i=this.colGroup;e&&(o.call(this),this.xvar.paintStartRowIndex=void 0,this.xvar.virtualPaintStartRowIndex=void 0);var r=this.asideHeaderData,l=this.leftHeaderData,s=this.headerData,d=n.header.align;this.leftHeaderColGroup=i.slice(0,this.config.frozenColumnIndex),this.headerColGroup=i.slice(this.config.frozenColumnIndex);var c=function(e,o,r){var l=0,s=[];s.push('<table border="0" cellpadding="0" cellspacing="0">'),s.push("<colgroup>");for(var c=0,u=o.length;c<u;c++)s.push('<col style="width:'+o[c]._width+'px;"  />'),
l+=o[c]._width;s.push("<col  />"),s.push("</colgroup>");for(var h=0,p=r.rows.length;h<p;h++){var f="";s.push('<tr class="'+f+'">');for(var g=0,m=r.rows[h].cols.length;g<m;g++){var v=r.rows[h].cols[g],x=n.header.columnHeight*v.rowspan-n.header.columnBorderWidth,y=d||v.align;s.push("<td ",'data-ax5grid-column-attr="'+(v.columnAttr||"default")+'" ','data-ax5grid-column-row="'+h+'" ','data-ax5grid-column-col="'+g+'" ',function(){return"undefined"!=typeof v.key?'data-ax5grid-column-key="'+v.key+'" ':""}(),'data-ax5grid-column-colindex="'+v.colIndex+'" ','data-ax5grid-column-rowindex="'+v.rowIndex+'" ','colspan="'+v.colspan+'" ','rowspan="'+v.rowspan+'" ','class="'+function(e){var i="";return e.headerStyleClass&&(i+=t.isFunction(e.headerStyleClass)?e.headerStyleClass.call({column:e,key:e.key})+" ":e.headerStyleClass+" "),n.header.columnBorderWidth&&(i+="hasBorder "),g==m-1&&(i+="isLastColumn "),i}.call(this,v)+'" ','style="height: '+x+'px;min-height: 1px;">'),s.push(function(){var e=n.header.columnHeight-2*n.header.columnPadding-n.header.columnBorderWidth;return'<span data-ax5grid-cellHolder="" '+(y?'data-ax5grid-text-align="'+y+'"':"")+' style="height: '+(n.header.columnHeight-n.header.columnBorderWidth)+"px;line-height: "+e+'px;">'}(),function(){var e="";return t.isNothing(v.key)||t.isNothing(v.colIndex)||n.sortable!==!0&&v.sortable!==!0||v.sortable===!1||(e+='<span data-ax5grid-column-sort="'+v.colIndex+'" data-ax5grid-column-sort-order="'+(i[v.colIndex].sort||"")+'" />'),e}(),a.call(this,v),"</span>"),t.isNothing(v.colIndex)||n.enableFilter&&s.push('<span data-ax5grid-column-filter="'+v.colIndex+'" data-ax5grid-column-filter-value=""  />'),s.push("</td>")}s.push("<td ",'data-ax5grid-column-row="null" ','data-ax5grid-column-col="null" ','style="height: '+n.header.columnHeight+'px;min-height: 1px;" ',"></td>"),s.push("</tr>")}return s.push("</table>"),e.html(s.join("")),function(){for(var i=n.header.columnHeight*r.rows.length-n.header.columnBorderWidth,a=0,l=[],s=0,d=o.length;s<d;s++){var c=o[s];t.isNothing(c.colIndex)||(a+=c._width,l.push('<div data-ax5grid-column-resizer="'+c.colIndex+'" style="height:'+i+"px;left: "+(a-4)+'px;"  />'))}e.append(l)}.call(this),l};n.asidePanelWidth>0&&c.call(this,this.$.panel["aside-header"],this.asideColGroup,r),n.frozenColumnIndex>0&&c.call(this,this.$.panel["left-header"],this.leftHeaderColGroup,l),this.xvar.scrollContentWidth=c.call(this,this.$.panel["header-scroll"],this.headerColGroup,s),n.rightSum},l=function(e){return this.$.panel["header-scroll"].css(e),this},s=function(e){var t="",n={},i=0;for(var o in this.sortInfo)this.sortInfo[o].fixed&&(n[o]=this.sortInfo[o],i++);for(var a=0,r=this.colGroup.length;a<r;a++)this.colGroup[a].key==e?(""==t&&(t="undefined"==typeof this.colGroup[a].sort?"desc":"desc"===this.colGroup[a].sort?"asc":void 0),this.colGroup[a].sort=t):this.config.multiSort||(this.colGroup[a].sort=void 0),"undefined"!=typeof this.colGroup[a].sort&&(n[this.colGroup[a].key]||(n[this.colGroup[a].key]={seq:i++,orderBy:this.colGroup[a].sort}));return this.setColumnSort(n),this},d=function(e){for(var t=0,n=this.colGroup.length;t<n;t++)for(var i in e)this.colGroup[t].key==i&&(this.colGroup[t].sort=e[i].orderBy);return this},c=function(){var e=(this.config,this.colGroup),t=this.headerTable,n=function(e,t){for(var n=[],i=0,o=t.rows.length;i<o;i++){n.push("<tr>");for(var r=0,l=t.rows[i].cols.length;r<l;r++){var s=t.rows[i].cols[r];n.push("<td ",'colspan="'+s.colspan+'" ','rowspan="'+s.rowspan+'" ',">",a.call(this,s),"</td>")}n.push("</tr>")}return n.join("")};return n.call(this,e,t)};e.header={init:i,repaint:r,scrollTo:l,toggleSort:s,applySortStatus:d,getExcelString:c}}(),function(){var e=ax5.ui.grid,t={useReturnToSave:!0,editMode:"popup",getHtml:function(e,t,n,i){if("undefined"!=typeof n.attributes){var o="";for(var a in n.attributes)o+=" "+a+"='"+n.attributes[a]+"'"}return'<input type="text" data-ax5grid-editor="text" value="'+i+'" '+o+">"},init:function(t,n,i,o,a){var r;return o.append(r=jQuery(this.getHtml(t,n,i,a))),this.bindUI(t,n,r,i,o,a),r.on("blur",function(){e.body.inlineEdit.deActive.call(t,"RETURN",n)}),r},bindUI:function(e,t,n,i,o,a){n.focus().select()}},n={useReturnToSave:!0,editMode:"popup",getHtml:function(e,t,n,i){var o="";if("undefined"!=typeof n.attributes)for(var a in n.attributes)o+=" "+a+"='"+n.attributes[a]+"'";return'<input type="text" data-ax5grid-editor="money" value="'+i+'" '+o+'" />'},init:function(t,n,i,o,a){var r=void 0;return o.append(r=jQuery(this.getHtml(t,n,i,a))),this.bindUI(t,n,r,i,o,a),r.on("blur",function(){e.body.inlineEdit.deActive.call(t,"RETURN",n)}),r},bindUI:function(e,t,n,i,o,a){n.data("binded-ax5ui","ax5formater"),n.ax5formatter($.extend(!0,{pattern:"money"},i.config)),n.focus().select()}},i={useReturnToSave:!0,editMode:"popup",getHtml:function(e,t,n,i){var o="";if("undefined"!=typeof n.attributes)for(var a in n.attributes)o+=" "+a+"='"+n.attributes[a]+"'";return'<input type="text" data-ax5grid-editor="number" value="'+i+'" '+o+'" />'},init:function(t,n,i,o,a){var r;return o.append(r=jQuery(this.getHtml(t,n,i,a))),this.bindUI(t,n,r,i,o,a),r.on("blur",function(){e.body.inlineEdit.deActive.call(t,"RETURN",n)}),r},bindUI:function(e,t,n,i,o,a){n.data("binded-ax5ui","ax5formater"),n.ax5formatter($.extend(!0,{pattern:"number"},i.config)),n.focus().select()}},o={useReturnToSave:!0,editMode:"popup",getHtml:function(e,t,n,i){return'<input type="text" data-ax5grid-editor="calendar" value="'+i+'" >'},init:function(e,t,n,i,o){var a;return i.append(a=jQuery(this.getHtml(e,t,n,o))),this.bindUI(e,t,a,n,i,o),a},bindUI:function(t,n,i,o,a,r){var l=t;i.data("binded-ax5ui","ax5picker"),i.ax5picker($.extend(!0,{direction:"auto",content:{type:"date",formatter:{pattern:"date"}},onStateChanged:function(){"open"==this.state?this.self.activePicker.attr("data-ax5grid-inline-edit-picker","date"):"close"==this.state&&e.body.inlineEdit.deActive.call(l,"RETURN",n)}},o.config)),i.focus().select()}},a={useReturnToSave:!1,editMode:"popup",getHtml:function(e,t,n,i){var o=[];return o.push('<div data-ax5select="ax5grid-editor" data-ax5select-config="{}">'),o.push("</div>"),o.join("")},init:function(e,t,n,i,o){var a;return i.append(a=jQuery(this.getHtml(e,t,n,o))),this.bindUI(e,t,a,n,i,o),a},bindUI:function(t,n,i,o,a,r){var l={columnKeys:{optionValue:"value",optionText:"text",optionSelected:"selected"}};jQuery.extend(!0,l,o.config),l.options.forEach(function(e){e[l.columnKeys.optionValue]==r&&(e[l.columnKeys.optionSelected]=!0)});var s=t;i.data("binded-ax5ui","ax5select"),i.ax5select($.extend(!0,{tabIndex:1,direction:"auto",columnKeys:l.columnKeys,options:l.options,onStateChanged:function(){"open"==this.state?this.self.activeSelectOptionGroup.attr("data-ax5grid-inline-edit-picker","select"):"changeValue"==this.state?e.body.inlineEdit.deActive.call(s,"RETURN",n,this.value[0][l.columnKeys.optionValue]):"close"==this.state&&e.body.inlineEdit.deActive.call(s,"ESC",n)}},o.config)),i.ax5select("open"),i.ax5select("setValue",r),i.find("a").focus()}},r={editMode:"inline",getHtml:function(e,t,n){var i,o=e.config.body.columnHeight-2*e.config.body.columnPadding-e.config.body.columnBorderWidth;i=t.config&&t.config.trueValue?n==t.config.trueValue?"true":"false":0==n||"false"==n||n<"1"?"false":"true";var a={marginTop:2,height:o-4};return jQuery.extend(!0,a,t.config),a.marginTop=(o-a.height)/2,'<div data-ax5grid-editor="checkbox" data-ax5grid-checked="'+i+'" style="height:'+a.height+"px;width:"+a.height+"px;margin-top:"+a.marginTop+'px;"></div>'}},l={useReturnToSave:!1,editMode:"popup",_getHtml:function(e,t,n,i){return'<div data-ax5grid-editor="textarea"></div>'},_bindUI:function(t,n,i,o,a,r){var l=i.offset(),s={width:i.width()},d=150,c=30,u=jQuery('<div data-ax5grid-popup="textarea" style="z-index: 9999;">\n    <textarea style="width:100%;height:'+(d-c)+'px;" class="form-control">'+r+'</textarea>\n    <div style="height:'+c+'px;padding:5px;text-align: right;">\n        <button class="btn btn-default">OK</button>\n    </div>\n</div>'),h=u.find("textarea");u.css({position:"absolute",left:l.left,top:l.top,width:s.width,height:d}),u.find("textarea"),jQuery(document.body).append(u),h.focus().select(),h.on("blur",function(i){e.body.inlineEdit.deActive.call(t,"RETURN",n,this.value),u.remove(),ax5.util.stopEvent(i.originalEvent)}),h.on("keydown",function(i){i.which==ax5.info.eventKeys.ESC&&(e.body.inlineEdit.deActive.call(t,"ESC",n),u.remove(),ax5.util.stopEvent(i.originalEvent))})},init:function(e,t,n,i,o){var a=void 0;return i.append(a=jQuery(this._getHtml(e,t,n,o))),this._bindUI(e,t,a,n,i,o),a}};e.inlineEditor={text:t,money:n,number:i,date:o,select:a,checkbox:r,textarea:l}}(),function(){var e=ax5.ui.grid,t=ax5.util,n=function(e){var t=function(e){this.page.currentPage!=e&&(this.page.selectPage=e,this.config.page.onChange&&this.config.page.onChange.call({self:this,page:this.page,data:this.data}))},n={first:function(){t.call(this,0)},prev:function(){var e=this.page.currentPage-1;e<0&&(e=0),t.call(this,e)},next:function(){var e=this.page.currentPage+1;e>this.page.totalPages-1&&(e=this.page.totalPages-1),t.call(this,e)},last:function(){t.call(this,this.page.totalPages-1)}};e in n?n[e].call(this):t.call(this,e-1)},i=function(){var t=this;if(this.page){var i={hasPage:!1,currentPage:this.page.currentPage,pageSize:this.page.pageSize,totalElements:this.page.totalElements,totalPages:this.page.totalPages,firstIcon:this.config.page.firstIcon,prevIcon:this.config.page.prevIcon||"«",nextIcon:this.config.page.nextIcon||"»",lastIcon:this.config.page.lastIcon},o=this.config.page.navigationItemCount;i["@paging"]=function(){var e=[],t=void 0,n=void 0;t=i.currentPage-Math.floor(o/2),t<0&&(t=0),n=i.currentPage+o,n>i.totalPages&&(n=i.totalPages),n-t>o&&(n=t+o),n-t<o&&(t=n-o),t<0&&(t=0);for(var a=t,r=n;a<r;a++)e.push({pageNo:a+1,selected:i.currentPage==a});return e}(),i["@paging"].length>0&&(i.hasPage=!0),this.$.page.navigation.html(e.tmpl.get("page_navigation",i)),this.$.page.navigation.find("[data-ax5grid-page-move]").on("click",function(){n.call(t,this.getAttribute("data-ax5grid-page-move"))})}else this.$.page.navigation.empty()},o=function(){if(this.config.page.statusDisplay){var n=void 0,i=Math.min(this.xvar.dataRowCount,this.xvar.virtualPaintRowCount),o={};n=this.xvar.virtualPaintStartRowIndex+i,n>this.xvar.dataRowCount&&(n=this.xvar.dataRowCount),o.fromRowIndex=t.number(this.xvar.virtualPaintStartRowIndex+1,{money:!0}),o.toRowIndex=t.number(n,{money:!0}),o.totalElements=!1,o.dataRealRowCount=this.xvar.dataRowCount!==this.xvar.dataRealRowCount&&t.number(this.xvar.dataRealRowCount,{money:!0}),o.dataRowCount=t.number(this.xvar.dataRowCount,{money:!0}),o.progress=this.appendProgress?this.config.appendProgressIcon:"",this.page&&(o.fromRowIndex_page=t.number(this.xvar.virtualPaintStartRowIndex+this.page.currentPage*this.page.pageSize+1,{money:!0}),o.toRowIndex_page=t.number(this.xvar.virtualPaintStartRowIndex+i+this.page.currentPage*this.page.pageSize,{money:!0}),o.totalElements=t.number(this.page.totalElements,{money:!0}),o.toRowIndex_page>this.page.totalElements&&(o.toRowIndex_page=this.page.totalElements)),this.$.page.status.html(e.tmpl.get("page_status",o))}};e.page={navigationUpdate:i,statusUpdate:o}}(),function(){var e=ax5.ui.grid,t=ax5.util,n={vertical:function(e,t){var n=t._content_height-t._panel_height,i=t._vertical_scroller_height-t.verticalScrollBarHeight,o=n*e.top/i;return o<0?o=0:n<o&&(o=n),{top:-o}},horizontal:function(e,t){var n=t._content_width-t._panel_width,i=t._horizontal_scroller_width-t.horizontalScrollBarWidth,o=n*e.left/i;return o<0?o=0:n<o&&(o=n),{left:-o}}},i={vertical:function(t,i){var o=this,a="vertical",r=i._content_height-i._panel_height,l=i._vertical_scroller_height-i.verticalScrollBarHeight,s=l*t/r,d=void 0;return-s>l&&(s=-l,d=n[a].call(this,{top:-s},{_content_width:i._content_width,_content_height:i._content_height,_panel_width:i._panel_width,_panel_height:i._panel_height,_horizontal_scroller_width:i._horizontal_scroller_width,_vertical_scroller_height:i._vertical_scroller_height,verticalScrollBarHeight:i.verticalScrollBarHeight,horizontalScrollBarWidth:i.horizontalScrollBarWidth}),e.body.scrollTo.call(o,d)),-s},horizontal:function(t,i){var o=this,a="horizontal",r=i._content_width-i._panel_width,l=i._horizontal_scroller_width-i.horizontalScrollBarWidth,s=l*t/r,d=void 0;return-s>l&&(s=-l,d=n[a].call(this,{left:-s},{_content_width:i._content_width,_content_height:i._content_height,_panel_width:i._panel_width,_panel_height:i._panel_height,_horizontal_scroller_width:i._horizontal_scroller_width,_vertical_scroller_height:i._vertical_scroller_height,verticalScrollBarHeight:i.verticalScrollBarHeight,horizontalScrollBarWidth:i.horizontalScrollBarWidth}),e.header.scrollTo.call(o,d),e.body.scrollTo.call(o,d)),-s}},o={click:function(t,i,o,a){if((new Date).getTime()-e.scroller.moveout_timer<20)return!1;var r=this,l=t.offset(),s={width:i.outerWidth(),height:i.outerHeight()},d={width:t.innerWidth(),height:t.innerHeight()},c=r.$.scroller.vertical.innerHeight(),u=r.$.panel.body.height(),h=r.$.scroller.horizontal.innerWidth(),p=r.$.panel.body.width(),f=r.xvar.scrollContentHeight,g=r.xvar.scrollContentWidth,m=r.$.scroller["vertical-bar"].outerHeight(),v=r.$.scroller["horizontal-bar"].outerWidth(),x={vertical:function(t){var n=e.util.getMousePosition(t),i=n.clientY-l.top;return i<0?i=0:i+s.height>d.height&&(i=d.height-s.height),{top:i}},horizontal:function(t){var n=e.util.getMousePosition(t),i=n.clientX-l.left;return i<0?i=0:i+s.width>d.width&&(i=d.width-s.width),{left:i}}},y=x[o](a);i.css(y);var b=n[o].call(r,y,{_content_width:g,_content_height:f,_panel_width:p,_panel_height:u,_horizontal_scroller_width:h,_vertical_scroller_height:c,verticalScrollBarHeight:m,horizontalScrollBarWidth:v});"horizontal"===o&&e.header.scrollTo.call(r,b),e.body.scrollTo.call(r,b),b=null},on:function(t,i,a,r){var l=this,s=i.position(),d={width:i.outerWidth(),height:i.outerHeight()},c={width:t.innerWidth(),height:t.innerHeight()},u=l.$.scroller.vertical.innerHeight(),h=l.$.panel.body.height(),p=l.$.scroller.horizontal.innerWidth(),f=l.$.panel.body.width(),g=l.xvar.scrollContentHeight,m=l.xvar.scrollContentWidth,v=l.$.scroller["vertical-bar"].outerHeight(),x=l.$.scroller["horizontal-bar"].outerWidth(),y={vertical:function(t){var n=e.util.getMousePosition(t);l.xvar.__da=n.clientY-l.xvar.mousePosition.clientY;var i=s.top+l.xvar.__da;return i<0?i=0:i+d.height>c.height&&(i=c.height-d.height),{top:i}},horizontal:function(t){var n=e.util.getMousePosition(t);l.xvar.__da=n.clientX-l.xvar.mousePosition.clientX;var i=s.left+l.xvar.__da;return i<0?i=0:i+d.width>c.width&&(i=c.width-d.width),{left:i}}};l.xvar.__da=0,jQuery(document.body).bind(e.util.ENM.mousemove+".ax5grid-"+this.instanceId,function(t){var o=y[a](t);i.css(o);var r=n[a].call(l,o,{_content_width:m,_content_height:g,_panel_width:f,_panel_height:h,_horizontal_scroller_width:p,_vertical_scroller_height:u,verticalScrollBarHeight:v,horizontalScrollBarWidth:x});"horizontal"===a&&e.header.scrollTo.call(l,r),e.body.scrollTo.call(l,r)}).bind(e.util.ENM.mouseup+".ax5grid-"+this.instanceId,function(e){o.off.call(l,e)}).bind("mouseleave.ax5grid-"+this.instanceId,function(e){o.off.call(l,e)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(t){ax5.util.stopEvent(t.originalEvent),e.scroller.moveout_timer=(new Date).getTime(),jQuery(document.body).unbind(e.util.ENM.mousemove+".ax5grid-"+this.instanceId).unbind(e.util.ENM.mouseup+".ax5grid-"+this.instanceId).unbind("mouseleave.ax5grid-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart")}},a={wheel:function(t){var n=this,i=n.$.panel["body-scroll"].position(),o=n.xvar.body_panel_height,a=n.xvar.body_panel_width,r=n.xvar.scrollContentHeight,s=n.xvar.scrollContentWidth;if(isNaN(r)||isNaN(s))return!1;var d=void 0,c=void 0,u=!1,h=!1;return d=i.left-t.x,c=i.top-t.y,c>=0?(c=0,u=!0):c<=o-r?(c=o-r,c>=0&&(c=0),u=!0):0==t.y&&(u=!0),d>=0?(d=0,h=!0):d<=a-s?(d=a-s,d>=0&&(d=0),h=!0):0==t.x&&(h=!0),e.header.scrollTo.call(n,{left:d}),e.body.scrollTo.call(n,{left:d,top:c},{callback:function(){l.call(n)}}),!u||!h},on:function(){var n=this,i=n.$.panel["body-scroll"].position(),o=n.xvar.body_panel_height,r=n.xvar.body_panel_width,s=n.xvar.scrollContentHeight,d=n.xvar.scrollContentWidth,c=function(t){var a=e.util.getMousePosition(t),l=void 0,c=void 0;return n.xvar.__x_da=a.clientX-n.xvar.mousePosition.clientX,n.xvar.__y_da=a.clientY-n.xvar.mousePosition.clientY,l=i.left+n.xvar.__x_da,c=i.top+n.xvar.__y_da,c>=0?c=0:c<=o-s&&(c=o-s,c>=0&&(c=0)),l>=0?l=0:l<=r-d&&(l=r-d,l>=0&&(l=0)),{left:l,top:c}};this.xvar.__x_da=0,this.xvar.__y_da=0,this.xvar.touchmoved=!1,jQuery(document.body).on("touchmove.ax5grid-"+this.instanceId,function(i){var o=c(i);l.call(n),e.header.scrollTo.call(n,{left:o.left}),e.body.scrollTo.call(n,o,{noRepaint:"noRepaint"}),t.stopEvent(i.originalEvent),n.xvar.touchmoved=!0}).on("touchend.ax5grid-"+this.instanceId,function(i){if(n.xvar.touchmoved){var o=c(i);l.call(n),e.header.scrollTo.call(n,{left:o.left}),e.body.scrollTo.call(n,o),t.stopEvent(i.originalEvent),a.off.call(n)}}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(){jQuery(document.body).off("touchmove.ax5grid-"+this.instanceId).off("touchend.ax5grid-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart")}},r=function(){var n=this,i=this.config.scroller.trackPadding;0==i?(this.$.scroller["vertical-bar"].css({width:this.config.scroller.size,left:-1}),this.$.scroller["horizontal-bar"].css({height:this.config.scroller.size,top:-1})):(this.$.scroller["vertical-bar"].css({width:this.config.scroller.size-(i+1),left:i/2}),this.$.scroller["horizontal-bar"].css({height:this.config.scroller.size-(i+1),top:i/2})),this.$.scroller["vertical-bar"].on(e.util.ENM.mousedown,function(t){this.xvar.mousePosition=e.util.getMousePosition(t),o.on.call(this,this.$.scroller.vertical,this.$.scroller["vertical-bar"],"vertical",t)}.bind(this)).on("dragstart",function(e){return t.stopEvent(e),!1}),this.$.scroller.vertical.on("click",function(e){"vertical"==e.target.getAttribute("data-ax5grid-scroller")&&o.click.call(this,this.$.scroller.vertical,this.$.scroller["vertical-bar"],"vertical",e)}.bind(this)),this.$.scroller["horizontal-bar"].on(e.util.ENM.mousedown,function(t){this.xvar.mousePosition=e.util.getMousePosition(t),o.on.call(this,this.$.scroller.horizontal,this.$.scroller["horizontal-bar"],"horizontal",t)}.bind(this)).on("dragstart",function(e){return t.stopEvent(e),!1}),this.$.scroller.horizontal.on("click",function(e){"horizontal"==e.target.getAttribute("data-ax5grid-scroller")&&o.click.call(this,this.$.scroller.horizontal,this.$.scroller["horizontal-bar"],"horizontal",e)}.bind(this)),this.$.container.body.on("mousewheel DOMMouseScroll",function(e){var n=e.originalEvent,i={x:0,y:0};n.detail?i.y=10*n.detail:"undefined"==typeof n.deltaY?(i.y=-n.wheelDelta,i.x=0):(i.y=n.deltaY,i.x=n.deltaX),a.wheel.call(this,i)&&t.stopEvent(e)}.bind(this)),ax5.info.supportTouch&&this.$.container.body.on("touchstart","[data-ax5grid-panel]",function(t){n.xvar.mousePosition=e.util.getMousePosition(t),a.on.call(n)}),this.xvar.body_panel_height=this.$.panel.body.height(),this.xvar.body_panel_width=this.$.panel.body.width()},l=function(){var e=this.$.scroller.vertical.height(),t=this.$.scroller.horizontal.width(),n=this.$.panel.body.height(),o=this.$.panel.body.width(),a=this.xvar.scrollContentHeight,r=this.xvar.scrollContentWidth,l=n*e/a,s=o*t/r;l<this.config.scroller.barMinSize&&(l=this.config.scroller.barMinSize),s<this.config.scroller.barMinSize&&(s=this.config.scroller.barMinSize),this.$.scroller["vertical-bar"].css({top:i.vertical.call(this,this.$.panel["body-scroll"].position().top,{_content_width:r,_content_height:a,_panel_width:o,_panel_height:n,_horizontal_scroller_width:t,_vertical_scroller_height:e,verticalScrollBarHeight:l,horizontalScrollBarWidth:s}),height:l}),this.$.scroller["horizontal-bar"].css({left:i.horizontal.call(this,this.$.panel["body-scroll"].position().left,{_content_width:r,_content_height:a,_panel_width:o,_panel_height:n,_horizontal_scroller_width:t,_vertical_scroller_height:e,verticalScrollBarHeight:l,horizontalScrollBarWidth:s}),width:s}),this.xvar.body_panel_height=n,this.xvar.body_panel_width=o,e=null,t=null,n=null,o=null,a=null,r=null,l=null,s=null};e.scroller={moveout_timer:(new Date).getTime(),init:r,resize:l}}(),function(){var e=ax5.ui.grid,t=function(){return'<div data-ax5grid-container="root" data-ax5grid-instance="{{instanceId}}">\n            <div data-ax5grid-container="hidden">\n                <textarea data-ax5grid-form="clipboard"></textarea>\n            </div>\n            <div data-ax5grid-container="header">\n                <div data-ax5grid-panel="aside-header"></div>\n                <div data-ax5grid-panel="left-header"></div>\n                <div data-ax5grid-panel="header">\n                    <div data-ax5grid-panel-scroll="header"></div>\n                </div>\n                <div data-ax5grid-panel="right-header"></div>\n            </div>\n            <div data-ax5grid-container="body">\n                <div data-ax5grid-panel="top-aside-body"></div>\n                <div data-ax5grid-panel="top-left-body"></div>\n                <div data-ax5grid-panel="top-body">\n                    <div data-ax5grid-panel-scroll="top-body"></div>\n                </div>\n                <div data-ax5grid-panel="top-right-body"></div>\n                <div data-ax5grid-panel="aside-body">\n                    <div data-ax5grid-panel-scroll="aside-body"></div>\n                </div>\n                <div data-ax5grid-panel="left-body">\n                    <div data-ax5grid-panel-scroll="left-body"></div>\n                </div>\n                <div data-ax5grid-panel="body">\n                    <div data-ax5grid-panel-scroll="body"></div>\n                </div>\n                <div data-ax5grid-panel="right-body">\n                  <div data-ax5grid-panel-scroll="right-body"></div>\n                </div>\n                <div data-ax5grid-panel="bottom-aside-body"></div>\n                <div data-ax5grid-panel="bottom-left-body"></div>\n                <div data-ax5grid-panel="bottom-body">\n                    <div data-ax5grid-panel-scroll="bottom-body"></div>\n                </div>\n                <div data-ax5grid-panel="bottom-right-body"></div>\n            </div>\n            <div data-ax5grid-container="page">\n                <div data-ax5grid-page="holder">\n                    <div data-ax5grid-page="navigation"></div>\n                    <div data-ax5grid-page="status"></div>\n                </div>\n            </div>\n            <div data-ax5grid-container="scroller">\n                <div data-ax5grid-scroller="vertical">\n                    <div data-ax5grid-scroller="vertical-bar"></div>    \n                </div>\n                <div data-ax5grid-scroller="horizontal">\n                    <div data-ax5grid-scroller="horizontal-bar"></div>\n                </div>\n                <div data-ax5grid-scroller="corner"></div>\n            </div>\n            <div data-ax5grid-resizer="vertical"></div>\n            <div data-ax5grid-resizer="horizontal"></div>\n        </div>'},n=function(){return'<div data-ax5grid-page-navigation="holder">\n            {{#hasPage}}\n            <div data-ax5grid-page-navigation="cell">    \n                {{#firstIcon}}<button type="button" data-ax5grid-page-move="first">{{{firstIcon}}}</button>{{/firstIcon}}\n                <button type="button" data-ax5grid-page-move="prev">{{{prevIcon}}}</button>\n            </div>\n            <div data-ax5grid-page-navigation="cell-paging">\n                {{#@paging}}\n                <button type="button" data-ax5grid-page-move="{{pageNo}}" data-ax5grid-page-selected="{{selected}}">{{pageNo}}</button>\n                {{/@paging}}\n            </div>\n            <div data-ax5grid-page-navigation="cell">\n                <button type="button" data-ax5grid-page-move="next">{{{nextIcon}}}</button>\n                {{#lastIcon}}<button type="button" data-ax5grid-page-move="last">{{{lastIcon}}}</button>{{/lastIcon}}\n            </div>\n            {{/hasPage}}\n        </div>'},i=function(){return"<span>{{{progress}}} {{fromRowIndex}} - {{toRowIndex}} of {{dataRowCount}} {{#totalElements}}&nbsp; Total {{.}}{{/totalElements}}</span>"};e.tmpl={main:t,page_navigation:n,page_status:i,get:function(t,n,i){var o=e.tmpl[t].call(this,i);return ax5.mustache.parse(o),ax5.mustache.render(o,n)}}}(),function(){var e=ax5.ui.grid,t=(ax5.util,function(e,t){for(var n={rows:[]},i={rows:[]},o=0,a=e.rows.length;o<a;o++){var r=e.rows[o];n.rows[o]={cols:[]},i.rows[o]={cols:[]};for(var l=0,s=r.cols.length;l<s;l++){var d=jQuery.extend({},r.cols[l]),c=d.colIndex,u=d.colIndex+d.colspan;if(c<t)if(u<=t)n.rows[o].cols.push(d);else{var h=jQuery.extend({},d),p=jQuery.extend({},h);h.colspan=t-h.colIndex,p.colIndex=t,p.colspan=d.colspan-h.colspan,n.rows[o].cols.push(h),p.colspan&&i.rows[o].cols.push(p)}else i.rows[o].cols.push(d);d=null,c=null,u=null}r=null}return{leftData:n,rightData:i}}),n=function(e,t,n){for(var i={rows:[]},o=0,a=e.rows.length;o<a;o++){var r=e.rows[o];i.rows[o]={cols:[]};for(var l=0,s=r.cols.length;l<s;l++){var d=jQuery.extend({},r.cols[l]),c=d.colIndex,u=d.colIndex+d.colspan;(t<=c||u<=n)&&(t<=c&&u<=n?i.rows[o].cols.push(d):t>c&&u>t?(d.colspan=u-t,i.rows[o].cols.push(d)):u>n&&c<=n&&i.rows[o].cols.push(d))}}return i},i=function(e){var t=void 0,n=e.originalEvent?e.originalEvent:e;return t="changedTouches"in n&&n.changedTouches?n.changedTouches[0]:n,{clientX:t.pageX,clientY:t.pageY}},o={mousedown:ax5.info.supportTouch?"touchstart":"mousedown",mousemove:ax5.info.supportTouch?"touchmove":"mousemove",mouseup:ax5.info.supportTouch?"touchend":"mouseup"},a=function(e){var t=e,n=this.config,i={rows:[]},o=0,a=function c(e,t,a){for(var r={cols:[]},l=0,s=e.length,d=1;l<s;l++){var u=jQuery.extend({},e[l]);d=1,u.hidden||(u.colspan=1,u.rowspan=1,u.rowIndex=t,u.colIndex=function(){return a?(o=a.colIndex+l+1,a.colIndex+l):o++}(),r.cols.push(u),"columns"in u?d=c(u.columns,t+1,u):u.width="width"in u?u.width:n.columnMinWidth,u.colspan=d)}return r.cols.length>0?(i.rows[t]||(i.rows[t]={cols:[]}),i.rows[t].cols=i.rows[t].cols.concat(r.cols),r.cols.length-1+d):d};a(t,0);for(var r=0,l=i.rows.length;r<l;r++)for(var s=0,d=i.rows[r].cols.length;s<d;s++)"columns"in i.rows[r].cols[s]||(i.rows[r].cols[s].rowspan=l-r);return i},r=function(e){var t=e,n={rows:[]},i=0,o=function a(e,t,o){for(var r={cols:[]},l=0,s=e.length,d=1,c=(function h(e){for(var n=0,l=e.length;n<l;n++){var s=jQuery.extend({},e[n]),d=1;s.hidden||("key"in s?(s.colspan=1,s.rowspan=1,s.rowIndex=t,s.colIndex=function(){return o?(i=o.colIndex+n+1,o.colIndex+n):i++}(),r.cols.push(s),"columns"in s&&(d=a(s.columns,t+1,s)),s.colspan=d):"columns"in s&&h(s.columns,t))}});l<s;l++){var u=jQuery.extend({},e[l]);d=1,u.hidden||("key"in u?(u.colspan=1,u.rowspan=1,u.rowIndex=t,u.colIndex=function(){return o?(i=o.colIndex+l+1,o.colIndex+l):i++}(),r.cols.push(u),"columns"in u&&(d=a(u.columns,t+1,u)),u.colspan=d):"columns"in u&&c(u.columns,t)),u=null}return r.cols.length>0?(n.rows[t]||(n.rows[t]={cols:[]}),n.rows[t].cols=n.rows[t].cols.concat(r.cols),r.cols.length-1+d):d};return o(t,0),function(e){for(var t=0,n=e.rows.length;t<n;t++){for(var i=e.rows[t],o=0,a=i.cols.length;o<a;o++){var r=i.cols[o];"columns"in r||(r.rowspan=n-t),r=null}i=null}}(n),n},l=function(e){var t={};return e.rows.forEach(function(e){e.cols.forEach(function(e){t[e.rowIndex+"_"+e.colIndex]=jQuery.extend({},e)})}),t},s=function(e){for(var t={rows:[]},n=0,i=e.length;n<i;n++){var o=e[n],a=0;t.rows[n]={cols:[]};for(var r=0,l=o.length;r<l&&!(a>this.colGroup.length);r++){var s=o[r].colspan||1;o[r].label||o[r].key?t.rows[n].cols.push({colspan:s,rowspan:1,colIndex:a,columnAttr:"sum",align:o[r].align,label:o[r].label,key:o[r].key,collector:o[r].collector,formatter:o[r].formatter}):t.rows[n].cols.push({colIndex:a,colspan:s,rowspan:1,label:"&nbsp;"}),a+=s,s=null}if(a<this.colGroup.length)for(var d=a;d<this.colGroup.length;d++)t.rows[n].cols.push({colIndex:d,colspan:1,rowspan:1,label:"&nbsp;"});o=null,a=null}return t},d=function(e){var t={rows:[]},n=0,i=0;t.rows[n]={cols:[]};for(var o=0,a=e.length;o<a&&!(i>this.columns.length);o++){var r=e[o].colspan||1;e[o].label||e[o].key?t.rows[n].cols.push({colspan:r,rowspan:1,rowIndex:0,colIndex:i,columnAttr:"default",align:e[o].align,label:e[o].label,key:e[o].key,collector:e[o].collector,formatter:e[o].formatter}):t.rows[n].cols.push({rowIndex:0,colIndex:i,colspan:r,rowspan:1,label:"&nbsp;"}),i+=r}if(i<this.colGroup.length)for(var l=i;l<this.colGroup.length;l++)t.rows[n].cols.push({rowIndex:0,colIndex:l,colspan:1,rowspan:1,label:"&nbsp;"});return t},c=function(e,t,n){var i=void 0,o=!1,a=[];return this.xvar.frozenRowIndex>e&&a.push("top"),this.xvar.frozenColumnIndex>t&&a.push("left"),a.push("body"),(this.xvar.frozenColumnIndex<=t||this.xvar.frozenRowIndex<=e)&&(i=a.join("-"),a.push("scroll"),o=!0),{panelName:a.join("-"),containerPanelName:i,isScrollPanel:o}},u=function(e){var t=[],n=[].concat(e.split(/[\.\[\]]/g));return n.forEach(function(e){""!==e&&t.push('["'+e.replace(/['\"]/g,"")+'"]')}),n=null,t.join("")};e.util={divideTableByFrozenColumnIndex:t,getTableByStartEndColumnIndex:n,getMousePosition:i,ENM:o,makeHeaderTable:a,makeBodyRowTable:r,makeBodyRowMap:l,makeFootSumTable:s,makeBodyGroupingTable:d,findPanelByColumnIndex:c,getRealPathForDataItem:u}}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"combobox"},function(){return function(){var e,i=this;this.instanceId=ax5.getGuid(),this.config={theme:"default",animateTime:250,removeIcon:"X",lang:{noSelected:"",noOptions:"no options",loading:"now loading.."},columnKeys:{optionValue:"value",optionText:"text",optionSelected:"selected"}},this.queue=[],this.activecomboboxOptionGroup=null,this.activecomboboxQueueIndex=-1,this.openTimer=null,this.closeTimer=null,this.waitOptionsCallback=null,this.keyUpTimer=null,e=this.config;var o=jQuery(window),a=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),"changeValue"==t.state&&(e&&e.onChange?e.onChange.call(t,t):this.onChange&&this.onChange.call(t,t)),e=null,t=null,!0},r=function(){for(var e,n=this.queue.length;n--;){var i=this.queue[n];if(i.$display&&(e=Math.max(i.$select.outerWidth(),t.number(i.minWidth)),i.$display.css({"min-width":e}),i.reset&&i.$display.find(".addon-icon-reset").css({"line-height":this.queue[n].$display.height()+"px"}),i.multiple)){var o=function(){return t.number(i.$display.css("border-top-width"))+t.number(i.$display.css("border-bottom-width"))}.call(this);i.$target.height(""),i.$display.height("");var a=i.$displayTable.outerHeight();Math.abs(a-i.$target.height())>o&&(i.$target.css({height:a+o+4}),i.$display.css({height:a+o+4}))}}return n=null,e=null,this},l=function(e){if(!this.activecomboboxOptionGroup)return this;var t,n=this.queue[this.activecomboboxQueueIndex],i={},a=0,r={},l={};e&&jQuery(document.body).append(this.activecomboboxOptionGroup),i=n.$target.offset(),r={width:n.$target.outerWidth(),height:n.$target.outerHeight()},l={winWidth:Math.max(o.width(),jQuery(document.body).width()),winHeight:Math.max(o.height(),jQuery(document.body).height()),width:this.activecomboboxOptionGroup.outerWidth(),height:this.activecomboboxOptionGroup.outerHeight()},n.direction&&""!==n.direction&&"auto"!==n.direction?t=n.direction:(t="top",i.top-l.height-a<0?t="top":i.top+r.height+l.height+a>l.winHeight&&(t="bottom")),e&&this.activecomboboxOptionGroup.addClass("direction-"+t),this.activecomboboxOptionGroup.css(function(){if("top"==t){if(i.top+r.height+l.height+a>l.winHeight){var e=i.top+r.height/2-l.height/2;return e+l.height+a>l.winHeight&&(e=0),
e<0&&(e=0),{left:i.left,top:e,width:r.width}}return{left:i.left,top:i.top+r.height+1,width:r.width}}if("bottom"==t)return{left:i.left,top:i.top-l.height-1,width:r.width}}.call(this))},s=function(e,n){if(!this.activecomboboxOptionGroup)return this;var i=this.queue[this.activecomboboxQueueIndex],o="display";return(n=t.findParentNode(e.target,function(e){return e.getAttribute("data-option-value")?(o="optionItem",!0):i.$target.get(0)==e?(o="display",!0):void 0}))?("optionItem"===o&&(C.call(this,i.id,{index:{gindex:n.getAttribute("data-option-group-index"),index:n.getAttribute("data-option-index")}},void 0,!0),r.call(this),l.call(this),i.multiple||this.close()),this):(this.close(),this)},d=function(e){var t=this.queue[e],i={};return i.id=t.id,i.theme=t.theme,i.size="ax5combobox-option-group-"+t.size,i.multiple=t.multiple,i.lang=t.lang,i.options=t.options,i.selected=t.selected,i.hasSelected=i.selected&&i.selected.length>0,i.removeIcon=t.removeIcon,n.tmpl.get.call(this,"label",i,t.columnKeys)},c=function(e){var t=this.queue[e];t.$displayLabel.find("[data-ax5combobox-selected-label]").remove(),t.$displayLabelInput.before(d.call(this,e))},u=function(e){return this.queue[e].disabled?this:(this.queue[e].$displayLabel.trigger("focus"),void this.queue[e].$displayLabelInput.focus())},h=function(e){this.queue[e].$displayLabelInput.val("")},p=function(e){this.queue[e].$displayLabel.trigger("blur"),this.queue[e].$displayLabelInput.trigger("blur")},f=function(e,i){this.queue[e].waitOptions=!0,this.activecomboboxOptionGroup.find('[data-els="content"]').html(jQuery(n.tmpl.get.call(this,"option",this.queue[e],this.queue[e].columnKeys))),this.queue[e].onSearch.call({self:this,item:this.queue[e],searchWord:i},function(e){var i={},o=this.queue[this.activecomboboxQueueIndex];return!!o&&(function(e,n){var i={};n.options.forEach(function(t,n){t["@index"]=n,i[t[e.columnKeys.optionValue]]=t}),t.isArray(e.selected)&&e.selected.forEach(function(t){i[t[e.columnKeys.optionValue]]&&(n.options[i[t[e.columnKeys.optionValue]]["@index"]][e.columnKeys.optionSelected]=!0)})}(o,e),o.options=x.call(this,this.activecomboboxQueueIndex,e.options),r.call(this),i.id=o.id,i.theme=o.theme,i.size="ax5combobox-option-group-"+o.size,i.multiple=o.multiple,i.lang=o.lang,i.options=o.options,void this.activecomboboxOptionGroup.find('[data-els="content"]').html(jQuery(n.tmpl.get.call(this,"options",i,o.columnKeys))))}.bind(this))},g=function(e,t){if(this.activecomboboxQueueIndex==-1)return this;var n,i=[],o=-1,a=this.queue[e].indexedOptions.length-1;if(""!=t){var r=/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi;if(t=t.replace(r,""),this.queue[e].onSearch){f.call(this,e,t);try{return i}finally{i=null,o=null,a=null,n=null}}for(;a-o++;){if(n=this.queue[e].indexedOptions[o],(""+n.text).toLowerCase()==t.toLowerCase()){i=[{"@findex":n["@findex"],optionsSort:0}];break}var l=(""+n.text).toLowerCase().search(t.toLowerCase());if(l>-1&&(i.push({"@findex":n["@findex"],optionsSort:l}),i.length>2))break;l=null}i.sort(function(e,t){return e.optionsSort-t.optionsSort})}i&&i.length>0?v.call(this,e,void 0,i[0]["@findex"]):m.call(this,e);try{return i}finally{i=null,o=null,a=null,n=null}},m=function(e){this.activecomboboxOptionGroup&&this.activecomboboxOptionGroup.find("[data-option-focus-index]").removeClass("hover").removeAttr("data-option-selected"),this.queue[e].optionFocusIndex=-1},v=function(e,t,n){var i,o,a,r,l=this.queue[e];if(this.activecomboboxOptionGroup&&l.options&&l.options.length>0){if("undefined"!=typeof n?i=n:(o=l.optionFocusIndex==-1?l.optionSelectedIndex||-1:l.optionFocusIndex,o==-1?i=0:(i=o+t,i<0?i=0:i>l.optionItemLength-1&&(i=l.optionItemLength-1))),l.optionFocusIndex=i,l.options[i]&&l.options[i].hide){if("undefined"==typeof t)return this;for(;l.options[i].hide;){if(i+=t,i<0){i=0;break}if(i>l.optionItemLength-1){i=l.optionItemLength-1;break}}}if("undefined"!=typeof i&&(this.activecomboboxOptionGroup.find("[data-option-focus-index]").removeClass("hover"),a=this.activecomboboxOptionGroup.find('[data-option-focus-index="'+i+'"]').addClass("hover"),r=this.activecomboboxOptionGroup.find('[data-els="content"]'),a.get(0))){var s=a.outerHeight(),d=r.innerHeight(),c=r.scrollTop(),u=a.position().top+r.scrollTop();d+c<u+s?r.scrollTop(u+s-d):c>u&&r.scrollTop(u),"undefined"!=typeof t&&l.$displayLabelInput.val(l.options[i].text)}}},x=function(){var e=function(e,t){t?this.queue[e].selected.push(jQuery.extend({},t)):this.queue[e].selected=[]};return function(n,o){var a,r,l,s=this.queue[n],d=0;return e.call(this,n,!1),o?(s.options=o,s.indexedOptions=[],a=[],a.push('<option value=""></option>'),s.options.forEach(function(t,o){t.optgroup?(t["@gindex"]=o,t.options.forEach(function(t,r){t["@index"]=r,t["@findex"]=d,a.push('<option value="'+t[s.columnKeys.optionValue]+'" '+(t[s.columnKeys.optionSelected]?' selected="selected"':"")+">"+t[s.columnKeys.optionText]+"</option>"),t[s.columnKeys.optionSelected]&&e.call(i,n,t),s.indexedOptions.push({"@gindex":o,"@index":r,"@findex":d,value:t[s.columnKeys.optionValue],text:t[s.columnKeys.optionText]}),d++})):(t["@index"]=o,t["@findex"]=d,a.push('<option value="'+t[s.columnKeys.optionValue]+'" '+(t[s.columnKeys.optionSelected]?' selected="selected"':"")+">"+t[s.columnKeys.optionText]+"</option>"),t[s.columnKeys.optionSelected]&&e.call(i,n,t),s.indexedOptions.push({"@index":o,"@findex":d,value:t[s.columnKeys.optionValue],text:t[s.columnKeys.optionText]}),d++)}),s.optionItemLength=d,s.$select.html(a.join(""))):(s.$select.get(0).options&&s.$select.get(0).options.length&&(s.$select.get(0).options[0].selected=!1),r=t.toArray(s.$select.get(0).options),l=[],r.forEach(function(t,o){var a={};a[s.columnKeys.optionValue]=t.value,a[s.columnKeys.optionText]=t.text,a[s.columnKeys.optionSelected]=t.selected,a["@index"]=o,a["@findex"]=d,t.selected&&e.call(i,n,a),l.push(a),d++,a=null}),s.options=l,s.indexedOptions=l,s.$select.prepend('<option value=""></option>'),s.$select.get(0).options[0].selected=!0),a=null,r=null,l=null,s.options}}(),y=function(e){return e instanceof jQuery?e=e.data("data-ax5combobox-id"):t.isString(e)||(e=jQuery(e).data("data-ax5combobox-id")),t.isString(e)?t.search(this.queue,function(){return this.id==e}):void console.log(ax5.info.getError("ax5combobox","402","getQueIdx"))},b=function(e,t,n){return"undefined"==typeof n?!e.multiple||!t:n},w=function(e){this.queue[e].options.forEach(function(e){e.optgroup?e.options.forEach(function(e){e.selected=!1}):e.selected=!1})},C=function(){var e={index:function(e,n,o,a){var r=this.queue[e];t.isString(n.index.gindex)?"undefined"!=typeof r.options[n.index.gindex]&&(r.options[n.index.gindex].options[n.index.index][r.columnKeys.optionSelected]=b(r,r.options[n.index.gindex].options[n.index.index][r.columnKeys.optionSelected],o),i.activecomboboxOptionGroup&&i.activecomboboxOptionGroup.find('[data-option-group-index="'+n.index.gindex+'"][data-option-index="'+n.index.index+'"]').attr("data-option-Selected",r.options[n.index.gindex].options[n.index.index][r.columnKeys.optionSelected].toString())):"undefined"!=typeof r.options[n.index.index]&&(r.options[n.index.index][r.columnKeys.optionSelected]=b(r,r.options[n.index.index][r.columnKeys.optionSelected],o),i.activecomboboxOptionGroup&&i.activecomboboxOptionGroup.find('[data-option-index="'+n.index.index+'"]').attr("data-option-Selected",r.options[n.index.index][r.columnKeys.optionSelected].toString())),"undefined"!=typeof a&&"justSetValue"===a||(x.call(this,e,r.options),l.call(this))},arr:function(n,o,a,r){o.forEach(function(o){if(t.isString(o)||t.isNumber(o))e.text.call(i,n,o,a,"justSetValue");else for(var r in e)if(o[r]){e[r].call(i,n,o,a,"justSetValue");break}}),x.call(this,n,this.queue[n].options),l.call(this)},value:function(e,n,i,o){var a,r=this.queue[e],s=t.search(r.options,function(){return this[r.columnKeys.optionValue]==n[r.columnKeys.optionValue]});s>-1?r.options[s][r.columnKeys.optionSelected]=b(r,r.options[s][r.columnKeys.optionSelected],i):(s=r.options.length,a={"@index":s,hide:!0,addedOption:!0},a[r.columnKeys.optionValue]=n,a[r.columnKeys.optionText]=n,r.options.push(a),r.options[s][r.columnKeys.optionSelected]=b(r,r.options[s][r.columnKeys.optionSelected],i)),"undefined"!=typeof o&&"justSetValue"===o||(x.call(this,e,this.queue[e].options),l.call(this))},text:function(e,n,i,o){var a,r=this.queue[e],s=t.search(r.options,function(){return this[r.columnKeys.optionText]==n});s>-1?r.options[s][r.columnKeys.optionSelected]=b(r,r.options[s][r.columnKeys.optionSelected],i):(s=r.options.length,a={"@index":s,hide:!0,addedOption:!0},a[r.columnKeys.optionValue]=n,a[r.columnKeys.optionText]=n,r.options.push(a),r.options[s][r.columnKeys.optionSelected]=b(r,r.options[s][r.columnKeys.optionSelected],i)),"undefined"!=typeof o&&"justSetValue"===o||(x.call(this,e,this.queue[e].options),l.call(this))},clear:function(e){w.call(this,e),x.call(this,e,this.queue[e].options),m.call(this,e),this.activecomboboxOptionGroup&&this.activecomboboxOptionGroup.find("[data-option-index]").attr("data-option-Selected","false"),this.queue[e].optionSelectedIndex=-1}};return function(n,i,o,r){var l=t.isNumber(n)?n:y.call(this,n);if(l===-1)return void console.log(ax5.info.getError("ax5combobox","402","val"));if("undefined"==typeof i)throw"error not found value";if(t.isArray(i))e.clear.call(this,l),e.arr.call(this,l,this.queue[l].multiple||0==i.length?i:[i[i.length-1]],o);else if(t.isString(i)||t.isNumber(i))"undefined"==typeof i||null===i||this.queue[l].multiple||w.call(this,l),e.text.call(this,l,i,o,"justSetValue");else if(null===i)e.clear.call(this,l);else{this.queue[l].multiple||w.call(this,l);for(var s in e)if(i[s]){e[s].call(this,l,i,o,"justSetValue");break}}return x.call(this,l,this.queue[l].options),c.call(this,l),u.call(this,l),"undefined"!=typeof i&&r&&!r.noStateChange&&a.call(this,this.queue[l],{self:this,item:this.queue[l],state:"changeValue",value:this.queue[l].selected}),n=null,this}}();this.init=function(){this.onStateChanged=e.onStateChanged,this.onChange=e.onChange,jQuery(window).on("resize.ax5combobox-display-"+this.instanceId,function(){r.call(this)}.bind(this))},this.bind=function(o){var a,s=function(){var e=t.debounce(function(e){return this.activecomboboxQueueIndex==-1?this:void g.call(i,e,this.queue[e].$displayLabelInput.val())},150),a=function(e){h.call(this,e)},s={click:function(e,n){var o,a=t.findParentNode(n.target,function(e){return e.getAttribute("data-ax5combobox-remove")?(o="optionItemRemove",!0):e.getAttribute("data-selected-clear")?(o="clear",!0):void 0});if(a){if("optionItemRemove"===o){var s=a.getAttribute("data-ax5combobox-remove-index"),d=this.queue[e].selected[s];return C.call(this,e,{index:{gindex:d["@gindex"],index:d["@index"]}},!1,!0),r.call(this),l.call(this),u.call(this,e),t.stopEvent(n),this}"clear"===o&&(C.call(this,e,{clear:!0}),r.call(this),l.call(this),u.call(this,e))}else i.activecomboboxQueueIndex==e?this.queue[e].optionFocusIndex==-1&&i.close():(i.open(e),u.call(this,e))},keyUp:function(n,o){if(o.which==ax5.info.eventKeys.ESC&&i.activecomboboxQueueIndex===-1)return t.stopEvent(o),this;i.activecomboboxQueueIndex!=n&&(i.open(n),t.stopEvent(o));var a={40:"KEY_DOWN",38:"KEY_UP"};if(!a[o.which])if(o.which==ax5.info.eventKeys.BACKSPACE&&""==this.queue[n].$displayLabelInput.val()){if(this.queue[n].selected.length>0){var s=this.queue[n].selected[this.queue[n].selected.length-1];C.call(this,n,{index:{gindex:s["@gindex"],index:s["@index"]}},!1,!0)}r.call(this),l.call(this),t.stopEvent(o)}else e.call(this,n)},keyDown:function(e,n){n.which==ax5.info.eventKeys.ESC?(h.call(this,e),this.close(),t.stopEvent(n)):n.which==ax5.info.eventKeys.RETURN?(C.call(this,o.id,{index:{gindex:o.indexedOptions[o.optionFocusIndex]["@gindex"],index:o.indexedOptions[o.optionFocusIndex]["@index"]}},void 0,!0),h.call(this,e),r.call(this),this.close(),t.stopEvent(n)):n.which==ax5.info.eventKeys.DOWN?(v.call(this,e,1),t.stopEvent(n)):n.which==ax5.info.eventKeys.UP&&(v.call(this,e,-1),t.stopEvent(n))},focus:function(e,t){},blur:function(e,n){a.call(this,e),t.stopEvent(n)},selectChange:function(e,t){C.call(this,e,{value:this.queue[e].$select.val()},!0)}};return function(e){var t=this.queue[e],i={};return t.selected=[],t.$display?(t.$displayLabel.html(d.call(this,e)),t.options=x.call(this,e,t.options)):(i.instanceId=this.instanceId,i.id=t.id,i.name=t.name,i.theme=t.theme,i.tabIndex=t.tabIndex,i.multiple=t.multiple,i.reset=t.reset,i.label=d.call(this,e),i.formSize=function(){return t.size?"input-"+t.size:""}(),t.$display=jQuery(n.tmpl.get.call(this,"comboboxDisplay",i,t.columnKeys)),t.$displayTable=t.$display.find('[data-els="display-table"]'),t.$displayLabel=t.$display.find('[data-ax5combobox-display="label"]'),t.$displayLabelInput=t.$display.find('[data-ax5combobox-display="input"]'),t.$target.find("select").get(0)?(t.$select=t.$target.find("select"),t.$select.attr("tabindex","-1").attr("class","form-control "+i.formSize),i.name&&t.$select.attr("name","name"),i.multiple&&t.$select.attr("multiple","multiple")):(t.$select=jQuery(n.tmpl.get.call(this,"formSelect",i,t.columnKeys)),t.$target.append(t.$select)),t.$target.append(t.$display),t.options=x.call(this,e,t.options)),r.call(this),t.$display.off("click.ax5combobox").on("click.ax5combobox",s.click.bind(this,e)),t.$displayLabelInput.off("focus.ax5combobox").on("focus.ax5combobox",s.focus.bind(this,e)).off("blur.ax5combobox").on("blur.ax5combobox",s.blur.bind(this,e)).off("keyup.ax5combobox").on("keyup.ax5combobox",s.keyUp.bind(this,e)).off("keydown.ax5combobox").on("keydown.ax5combobox",s.keyDown.bind(this,e)),t.$select.off("change.ax5combobox").on("change.ax5combobox",s.selectChange.bind(this,e)),i=null,t=null,e=null,this}}(),c={};return o=jQuery.extend(!0,c,e,o),o.target?(o.$target=jQuery(o.target),o.id||(o.id=o.$target.data("data-ax5combobox-id")),o.id||(o.id="ax5combobox-"+ax5.getGuid(),o.$target.data("data-ax5combobox-id",o.id)),o.name=o.$target.attr("data-ax5combobox"),o.options&&(o.options=JSON.parse(JSON.stringify(o.options))),function(e){t.isObject(e)&&!e.error&&(o=jQuery.extend(!0,o,e))}(t.parseJson(o.$target.attr("data-ax5combobox-config"),!0)),a=t.search(this.queue,function(){return this.id==o.id}),a===-1?(this.queue.push(o),s.call(this,this.queue.length-1)):(this.queue[a]=jQuery.extend(!0,{},this.queue[a],o),s.call(this,a)),c=null,a=null,this):(console.log(ax5.info.getError("ax5combobox","401","bind")),this)},this.open=function(){var i=function(e){e.onExpand.call({self:this,item:e},function(e){if(this.waitOptionsCallback){var i={},o=this.queue[this.activecomboboxQueueIndex];!function(e,n){var i={};n.options.forEach(function(t,n){t["@index"]=n,i[t[e.columnKeys.optionValue]]=t}),t.isArray(e.selected)&&e.selected.forEach(function(t){i[t[e.columnKeys.optionValue]]&&(n.options[i[t[e.columnKeys.optionValue]]["@index"]][e.columnKeys.optionSelected]=!0)})}(o,e),o.options=x.call(this,this.activecomboboxQueueIndex,e.options),c.call(this,this.activecomboboxQueueIndex),r.call(this),i.id=o.id,i.theme=o.theme,i.size="ax5combobox-option-group-"+o.size,i.multiple=o.multiple,i.lang=o.lang,i.options=o.options,this.activecomboboxOptionGroup.find('[data-els="content"]').html(jQuery(n.tmpl.get.call(this,"options",i,o.columnKeys)))}}.bind(this))};return function(o,r){this.waitOptionsCallback=null;var d,c,u=t.isNumber(o)?o:y.call(this,o),h=this.queue[u],p={};return h.$display.attr("disabled")?this:(this.openTimer&&clearTimeout(this.openTimer),this.activecomboboxOptionGroup?this.activecomboboxQueueIndex==u?this:r>2?this:(this.close(),this.openTimer=setTimeout(function(){this.open(u,(r||0)+1)}.bind(this),e.animateTime),this):(h.optionFocusIndex=-1,h.selected&&h.selected.length>0&&(h.optionSelectedIndex=h.selected[0]["@findex"]),p.id=h.id,p.theme=h.theme,p.size="ax5combobox-option-group-"+h.size,p.multiple=h.multiple,p.lang=h.lang,h.$display.attr("data-combobox-option-group-opened","true"),h.onExpand&&(p.waitOptions=!0),p.options=t.filter(h.options,function(){return!this.hide}),this.activecomboboxOptionGroup=jQuery(n.tmpl.get.call(this,"optionGroup",p,h.columnKeys)),this.activecomboboxOptionGroup.find('[data-els="content"]').html(jQuery(n.tmpl.get.call(this,"options",p,h.columnKeys))),this.activecomboboxQueueIndex=u,l.call(this,"append"),jQuery(window).on("resize.ax5combobox-"+this.instanceId,function(){l.call(this)}.bind(this)),h.selected&&h.selected.length>0&&(c=this.activecomboboxOptionGroup.find('[data-option-index="'+h.selected[0]["@index"]+'"]'),c.get(0)&&(d=c.position().top-this.activecomboboxOptionGroup.height()/3,this.activecomboboxOptionGroup.find('[data-els="content"]').stop().animate({scrollTop:d},h.animateTime,"swing",function(){}))),jQuery(window).on("click.ax5combobox-"+this.instanceId,function(e){e=e||window.event,s.call(this,e),t.stopEvent(e)}.bind(this)),a.call(this,h,{self:this,state:"open",item:h}),h.onExpand&&(this.waitOptionsCallback=!0,i.call(this,h)),p=null,d=null,c=null,this))}}(),this.update=function(e){return this.bind(e),this},this.setValue=function(e,n,i){var o=t.isNumber(e)?e:y.call(this,e);if(o===-1)return void console.log(ax5.info.getError("ax5combobox","402","val"));if(w.call(this,o),t.isArray(n)){var a=t.map(n,function(){return{value:this}});C.call(this,o,a,i||!0,{noStateChange:!0})}else t.isString(n)||t.isNumber(n)?C.call(this,o,{value:n},i||!0,{noStateChange:!0}):c.call(this,o);return p.call(this,o),r.call(this),this},this.setText=function(e,n,i){var o=t.isNumber(e)?e:y.call(this,e);return o===-1?void console.log(ax5.info.getError("ax5combobox","402","val")):(w.call(this,o),C.call(this,o,n,!0,{noStateChange:!0}),p.call(this,o),r.call(this),this)},this.getSelectedOption=function(e){var n=t.isNumber(e)?e:y.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5combobox","402","val")):t.deepCopy(this.queue[n].selected)},this.close=function(t){return this.closeTimer&&clearTimeout(this.closeTimer),this.activecomboboxOptionGroup?(t=this.queue[this.activecomboboxQueueIndex],t.optionFocusIndex=-1,t.$display.removeAttr("data-combobox-option-group-opened").trigger("focus"),t.$displayLabel.attr("contentEditable","false"),this.activecomboboxOptionGroup.addClass("destroy"),jQuery(window).off("resize.ax5combobox-"+this.instanceId).off("click.ax5combobox-"+this.instanceId).off("keyup.ax5combobox-"+this.instanceId),this.closeTimer=setTimeout(function(){this.activecomboboxOptionGroup&&this.activecomboboxOptionGroup.remove(),this.activecomboboxOptionGroup=null,this.activecomboboxQueueIndex=-1,a.call(this,t,{self:this,state:"close"})}.bind(this),e.animateTime),this.waitOptionsCallback=null,this):this},this.blur=function(e){var n=t.isNumber(e)?e:y.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5combobox","402","val")):(p.call(this,n),this)},this.enable=function(e){var t=y.call(this,e);return"undefined"!=typeof t&&(this.queue[t].disabled=!1,this.queue[t].$display[0]&&(this.queue[t].$display.removeAttr("disabled"),this.queue[t].$displayLabelInput.removeAttr("disabled")),this.queue[t].$select[0]&&this.queue[t].$select.removeAttr("disabled"),a.call(this,this.queue[t],{self:this,state:"enable"})),this},this.disable=function(e){var t=y.call(this,e);return"undefined"!=typeof t&&(this.queue[t].disabled=!0,this.queue[t].$display[0]&&(this.queue[t].$display.attr("disabled","disabled"),this.queue[t].$displayLabelInput.attr("disabled","disabled")),this.queue[t].$select[0]&&this.queue[t].$select.attr("disabled","disabled"),a.call(this,this.queue[t],{self:this,state:"disable"})),this},this.align=function(){return r.call(this),this},this.clear=function(e){var n=t.isNumber(e)?e:y.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5combobox","402","clear")):(w.call(this,n),C.call(this,n,[],!1,{noStateChange:!1}),c.call(this,n),p.call(this,n),r.call(this),this)},this.main=function(){arguments&&t.isObject(arguments[0])?this.setConfig(arguments[0]):this.init()}.apply(this,arguments)}}()),n=ax5.ui.combobox}(),function(){var e=ax5.ui.combobox,t=(ax5.util,function(e){return'\n            <div class="ax5combobox-option-group {{theme}} {{size}}" data-ax5combobox-option-group="{{id}}">\n                <div class="ax-combobox-body">\n                    <div class="ax-combobox-option-group-content" data-els="content"></div>\n                </div>\n                <div class="ax-combobox-arrow"></div> \n            </div>\n        '}),n=function(e){return'\n<div class="form-control {{formSize}} ax5combobox-display {{theme}}" \ndata-ax5combobox-display="{{id}}" data-ax5combobox-instance="{{instanceId}}">\n    <div class="ax5combobox-display-table" data-els="display-table">\n        <div data-ax5combobox-display="label-holder"> \n            <a {{^tabIndex}}{{/tabIndex}}{{#tabIndex}}tabindex="{{tabIndex}}" {{/tabIndex}}\n            data-ax5combobox-display="label"\n            spellcheck="false"><input type="text"data-ax5combobox-display="input" style="border:0 none;" /></a>\n        </div>\n        <div data-ax5combobox-display="addon"> \n            {{#multiple}}{{#reset}}\n            <span class="addon-icon-reset" data-selected-clear="true">{{{.}}}</span>\n            {{/reset}}{{/multiple}}\n            {{#icons}}\n            <span class="addon-icon-closed">{{clesed}}</span>\n            <span class="addon-icon-opened">{{opened}}</span>\n            {{/icons}}\n            {{^icons}}\n            <span class="addon-icon-closed"><span class="addon-icon-arrow"></span></span>\n            <span class="addon-icon-opened"><span class="addon-icon-arrow"></span></span>\n            {{/icons}}\n        </div>\n    </div>\n</div>\n        '},i=function(e){return'\n            <select tabindex="-1" class="form-control {{formSize}}" name="{{name}}" {{#multiple}}multiple="multiple"{{/multiple}}></select>\n        '},o=function(e){return'\n{{#selected}}\n<option value="{{'+e.optionValue+'}}" selected="true">{{'+e.optionText+"}}</option>\n{{/selected}}\n"},a=function(e){return'\n            {{#waitOptions}}\n                <div class="ax-combobox-option-item">\n                        <div class="ax-combobox-option-item-holder">\n                            <span class="ax-combobox-option-item-cell ax-combobox-option-item-label">\n                                {{{lang.loading}}}\n                            </span>\n                        </div>\n                    </div>\n            {{/waitOptions}}\n            {{^waitOptions}}\n                {{#options}}\n                    {{#optgroup}}\n                        <div class="ax-combobox-option-group">\n                            <div class="ax-combobox-option-item-holder">\n                                <span class="ax-combobox-option-group-label">\n                                    {{{.}}}\n                                </span>\n                            </div>\n                            {{#options}}\n                            {{^hide}}\n                            <div class="ax-combobox-option-item" data-option-focus-index="{{@findex}}" data-option-group-index="{{@gindex}}" data-option-index="{{@index}}" \n                            data-option-value="{{'+e.optionValue+'}}" \n                            {{#'+e.optionSelected+'}}data-option-selected="true"{{/'+e.optionSelected+'}}>\n                                <div class="ax-combobox-option-item-holder">\n                                    {{#multiple}}\n                                    <span class="ax-combobox-option-item-cell ax-combobox-option-item-checkbox">\n                                        <span class="item-checkbox-wrap useCheckBox" data-option-checkbox-index="{{@i}}"></span>\n                                    </span>\n                                    {{/multiple}}\n                                    <span class="ax-combobox-option-item-cell ax-combobox-option-item-label">{{'+e.optionText+'}}</span>\n                                </div>\n                            </div>\n                            {{/hide}}\n                            {{/options}}\n                        </div>                            \n                    {{/optgroup}}\n                    {{^optgroup}}\n                    {{^hide}}\n                    <div class="ax-combobox-option-item" data-option-focus-index="{{@findex}}" data-option-index="{{@index}}" data-option-value="{{'+e.optionValue+'}}" {{#'+e.optionSelected+'}}data-option-selected="true"{{/'+e.optionSelected+'}}>\n                        <div class="ax-combobox-option-item-holder">\n                            {{#multiple}}\n                            <span class="ax-combobox-option-item-cell ax-combobox-option-item-checkbox">\n                                <span class="item-checkbox-wrap useCheckBox" data-option-checkbox-index="{{@i}}"></span>\n                            </span>\n                            {{/multiple}}\n                            <span class="ax-combobox-option-item-cell ax-combobox-option-item-label">{{'+e.optionText+'}}</span>\n                        </div>\n                    </div>\n                    {{/hide}}\n                    {{/optgroup}}\n                {{/options}}\n                {{^options}}\n                    <div class="ax-combobox-option-item">\n                        <div class="ax-combobox-option-item-holder">\n                            <span class="ax-combobox-option-item-cell ax-combobox-option-item-label">\n                                {{{lang.noOptions}}}\n                            </span>\n                        </div>\n                    </div>\n                {{/options}}\n            {{/waitOptions}}\n        '},r=function(e){return'{{#selected}}<div tabindex="-1" data-ax5combobox-selected-label="{{@i}}" data-ax5combobox-selected-text="{{text}}"><div data-ax5combobox-remove="true" \ndata-ax5combobox-remove-index="{{@i}}">{{{removeIcon}}}</div><span>{{'+e.optionText+"}}</span></div>{{/selected}}"};e.tmpl={comboboxDisplay:n,formSelect:i,formSelectOptions:o,optionGroup:t,options:a,label:r,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),function(){var e=ax5.ui.combobox,t=(ax5.util,{1:function(e,t,n){var i=this.config,o=t;$(t).find("span").get(0)&&(o=$(t).find("span").get(0));var a,r,l=(o.textContent||o.innerText).replace(/^[\s\r\n\t]*|[\s\r\n\t]*$/g,""),s=this.queue[e];if(s.selected&&s.selected.length>0&&t.getAttribute("data-ax5combobox-selected-text")==l)return a=t.getAttribute("data-ax5combobox-selected-label"),r=s.selected[a],{index:{gindex:r["@gindex"],index:r["@index"],value:r[i.columnKeys.optionValue]}};if(t.getAttribute("data-ax5combobox-selected-text"))return l;if(""!=l){if(n)return l;var d;return s.optionFocusIndex>-1&&(d=this.activecomboboxOptionGroup.find('[data-option-focus-index="'+s.optionFocusIndex+'"]')),s.optionFocusIndex>-1&&d.get(0)&&d.attr("data-option-value")?{index:{gindex:d.attr("data-option-group-index"),index:d.attr("data-option-index")}}:s.editable?l:void 0}},3:function(e,t,n){var i=(this.config,(t.textContent||t.innerText).replace(/^[\s\r\n\t]*|[\s\r\n\t]*$/g,"")),o=this.queue[e];if(""!=i){if(n)return i;var a;return o.optionFocusIndex>-1&&(a=this.activecomboboxOptionGroup.find('[data-option-focus-index="'+o.optionFocusIndex+'"]')),o.optionFocusIndex>-1&&a.get(0)&&a.attr("data-option-value")?{index:{gindex:a.attr("data-option-group-index"),index:a.attr("data-option-index")}}:o.editable?i:void 0}}});e.util={nodeTypeProcessor:t}}(),ax5.ui.combobox_instance=new ax5.ui.combobox,jQuery.fn.ax5combobox=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"open":return ax5.ui.combobox_instance.open(this);case"close":return ax5.ui.combobox_instance.close(this);case"setValue":return ax5.ui.combobox_instance.setValue(this,arguments[1],arguments[2],arguments[3],arguments[4]||"justSetValue");case"setText":return ax5.ui.combobox_instance.setText(this,arguments[1],arguments[2],arguments[3],arguments[4]||"justSetValue");case"getSelectedOption":return ax5.ui.combobox_instance.getSelectedOption(this);case"enable":return ax5.ui.combobox_instance.enable(this);case"disable":return ax5.ui.combobox_instance.disable(this);case"blur":return ax5.ui.combobox_instance.blur(this);case"clear":return ax5.ui.combobox_instance.clear(this);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend({},e,t),ax5.ui.combobox_instance.bind(e)});return this}}(),function(){var e=ax5.ui,t=ax5.util;e.addClass({className:"layout"},function(){var e=function(){var e,n=this,i={mousedown:ax5.info.supportTouch?"touchstart":"mousedown",mousemove:ax5.info.supportTouch?"touchmove":"mousemove",mouseup:ax5.info.supportTouch?"touchend":"mouseup"},o=function(e){var t="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;return{clientX:t.clientX,clientY:t.clientY}};this.instanceId=ax5.getGuid(),this.config={theme:"default",animateTime:250,splitter:{size:1},autoResize:!0},this.queue=[],this.openTimer=null,this.closeTimer=null,this.resizer=null,e=this.config;var a=function(){for(var e=this.queue.length;e--;)"undefined"==typeof this.queue[e].parentQueIdx&&this.queue[e].autoResize&&s.call(this,e,null,"windowResize")},r={width:function(e,t){return t?t.__width+(t.split?e.splitter.size:0):0},height:function(e,t){return t?t.__height+(t.split?e.splitter.size:0):0}},l=function(e,n){return"*"==e?void 0:"%"==t.right(e,1)?n*t.number(e)/100:Number(e)},s=function(){var e={split:{horizontal:function(e,t,n){t.splitter?t.__height=e.splitter.size:n==e.splitPanel.length-1&&0==e.splitPanel.asteriskLength?(t.height="*",t.__height=void 0,e.splitPanel.asteriskLength++):"*"==t.height&&e.splitPanel.asteriskLength++},vertical:function(e,t,n){t.splitter?t.__width=e.splitter.size:n==e.splitPanel.length-1&&0==e.splitPanel.asteriskLength?(t.width="*",t.__width=void 0,e.splitPanel.asteriskLength++):"*"==t.width&&e.splitPanel.asteriskLength++}}},n={top:function(e,t){t.$target.css({height:t.__height||0}),t.split&&t.$splitter.css({height:e.splitter.size,top:t.__height||0})},bottom:function(e,t){t.$target.css({height:t.__height||0}),t.split&&t.$splitter.css({height:e.splitter.size,bottom:t.__height||0})},left:function(e,t){var n={width:t.__width||0,height:e.targetDimension.height};e.dockPanel.top&&(n.height-=e.dockPanel.top.__height,n.top=e.dockPanel.top.__height,e.dockPanel.top.split&&(n.height-=e.splitter.size,n.top+=e.splitter.size)),e.dockPanel.bottom&&(n.height-=e.dockPanel.bottom.__height,e.dockPanel.bottom.split&&(n.height-=e.splitter.size)),t.$target.css(n),t.split&&t.$splitter.css({width:e.splitter.size,height:n.height,top:n.top,left:n.width})},right:function(e,t){var n={width:t.__width||0,height:e.targetDimension.height};e.dockPanel.top&&(n.height-=e.dockPanel.top.__height,n.top=e.dockPanel.top.__height,e.dockPanel.top.split&&(n.height-=e.splitter.size,n.top+=e.splitter.size)),e.dockPanel.bottom&&(n.height-=e.dockPanel.bottom.__height,e.dockPanel.bottom.split&&(n.height-=e.splitter.size)),t.$target.css(n),t.split&&t.$splitter.css({width:e.splitter.size,height:n.height,top:n.top,right:n.width})},center:function(e,t){var n={width:e.targetDimension.width,height:e.targetDimension.height};e.dockPanel.top&&(n.height-=e.dockPanel.top.__height||0,n.top=e.dockPanel.top.__height||0,e.dockPanel.top.split&&(n.height-=e.splitter.size,n.top+=e.splitter.size)),e.dockPanel.bottom&&(n.height-=e.dockPanel.bottom.__height||0,e.dockPanel.bottom.split&&(n.height-=e.splitter.size)),e.dockPanel.left&&(n.width-=e.dockPanel.left.__width||0,n.left=e.dockPanel.left.__width||0,e.dockPanel.left.split&&(n.width-=e.splitter.size,n.left+=e.splitter.size)),e.dockPanel.right&&(n.width-=e.dockPanel.right.__width||0,e.dockPanel.right.split&&(n.width-=e.splitter.size));var i=t.minWidth||0,o=t.minHeight||0;n.width<i&&(n.width=i,e.$target.css({minWidth:i+r.width(e.dockPanel.left,e.splitter.size)+r.width(e.dockPanel.right,e.splitter.size)})),n.height<o&&(n.height=o,e.$target.css({minHeight:o+r.height(e.dockPanel.top,e.splitter.size)+r.height(e.dockPanel.bottom,e.splitter.size)
})),t.$target.css(n)},split:{horizontal:function(e,t,n,i,o){var a={display:"block"},r=n?Number(e.splitPanel[n-1].offsetEnd):0;t.splitter?a.height=e.splitter.size:"*"!=t.height||"undefined"!=typeof t.__height&&!o?a.height=t.__height||0:a.height=t.__height=(e.targetDimension.height-i)/e.splitPanel.asteriskLength,a.top=r,t.offsetStart=r,t.offsetEnd=Number(r)+Number(a.height),t.$target.css(a)},vertical:function(e,t,n,i,o){var a={display:"block"},r=n?Number(e.splitPanel[n-1].offsetEnd):0;t.splitter?a.width=e.splitter.size:"*"!=t.width||"undefined"!=typeof t.__width&&!o?a.width=t.__width||0:a.width=t.__width=(e.targetDimension.width-i)/e.splitPanel.asteriskLength,a.left=r,t.offsetStart=r,t.offsetEnd=Number(r)+Number(a.width),t.$target.css(a)}}},i={"dock-panel":function(e){for(var t in e.dockPanel)e.dockPanel[t].$target&&e.dockPanel[t].$target.get(0)&&t in n&&n[t].call(this,e,e.dockPanel[t])},"split-panel":function(i,o){var a;i.splitPanel.asteriskLength=0,i.splitPanel.forEach(function(t,n){e.split[i.orientation].call(this,i,t,n)}),a="horizontal"==i.orientation?t.sum(i.splitPanel,function(e){if("*"!=e.height)return t.number(e.__height)}):t.sum(i.splitPanel,function(e){if("*"!=e.width)return t.number(e.__width)}),i.splitPanel.forEach(function(e,t){n.split[i.orientation].call(this,i,e,t,a,o)})}},o=function(e){for(var t=e.childQueIdxs.length;t--;)s.call(this,e.childQueIdxs[t])};return function(e,t,n){var a=this.queue[e];a.targetDimension={height:a.$target.innerHeight(),width:a.$target.innerWidth()},a.layout in i&&i[a.layout].call(this,a,n),a.childQueIdxs&&o.call(this,a,n),a.onResize&&setTimeout(function(){this.onResize.call(this,this)}.bind(a),1),t&&t.call(a,a)}}(),d={on:function(e,t,o){var a=this.queue[e],l=o.position(),s={width:o.width(),height:o.height()},c={left:function(e){var n="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;t.__da=n.clientX-t.mousePosition.clientX;var i=t.minWidth||0,o=t.maxWidth||a.targetDimension.width-r.width(a,a.dockPanel.left)-r.width(a,a.dockPanel.right);return t.__width+t.__da<i?t.__da=-t.__width+i:o<t.__width+t.__da&&(t.__da=o-t.__width),{left:t.$splitter.position().left+t.__da}},right:function(e){var n="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;t.__da=n.clientX-t.mousePosition.clientX;var i=t.minWidth||0,o=t.maxWidth||a.targetDimension.width-r.width(a,a.dockPanel.left)-r.width(a,a.dockPanel.right);return t.__width-t.__da<i?t.__da=t.__width-i:o<t.__width-t.__da&&(t.__da=-o+t.__width),{left:t.$splitter.position().left+t.__da}},top:function(e){var n="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;t.__da=n.clientY-t.mousePosition.clientY;var i=t.minHeight||0,o=t.maxHeight||a.targetDimension.height-r.height(a,a.dockPanel.top)-r.height(a,a.dockPanel.bottom);return t.__height+t.__da<i?t.__da=-t.__height+i:o<t.__height+t.__da&&(t.__da=o-t.__height),{top:t.$splitter.position().top+t.__da}},bottom:function(e){var n="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;t.__da=n.clientY-t.mousePosition.clientY;var i=t.minHeight||0,o=t.maxHeight||a.targetDimension.height-r.height(a,a.dockPanel.top)-r.height(a,a.dockPanel.bottom);return t.__height-t.__da<i?t.__da=t.__height-i:o<t.__height-t.__da&&(t.__da=-o+t.__height),{top:t.$splitter.position().top+t.__da}},split:function(e){var n="changedTouches"in e.originalEvent&&e.changedTouches?e.originalEvent.changedTouches[0]:e;if("horizontal"==a.orientation){t.__da=n.clientY-t.mousePosition.clientY;var i=a.splitPanel[t.panelIndex-1],o=a.splitPanel[t.panelIndex+1],r=i.minHeight||0,l=o.minHeight||0;return t.offsetStart+t.__da<i.offsetStart+r?t.__da=i.offsetStart-t.offsetStart+r:t.offsetStart+t.__da>o.offsetEnd-l&&(t.__da=o.offsetEnd-t.offsetEnd-l),{top:t.$target.position().top+t.__da}}t.__da=n.clientX-t.mousePosition.clientX;var i=a.splitPanel[t.panelIndex-1],o=a.splitPanel[t.panelIndex+1],s=i.minWidth||0,d=o.minWidth||0;return t.offsetStart+t.__da<i.offsetStart+s?t.__da=i.offsetStart-t.offsetStart+s:t.offsetStart+t.__da>o.offsetEnd-d&&(t.__da=o.offsetEnd-t.offsetEnd-d),{left:Number(t.$target.position().left)+Number(t.__da)}}};t.__da=0,jQuery(document.body).bind(i.mousemove+".ax5layout-"+this.instanceId,function(e){n.resizer||(n.resizer=jQuery('<div class="ax5layout-resizer panel-'+t.resizerType+'" ondragstart="return false;"></div>'),n.resizer.css({left:l.left,top:l.top,width:s.width,height:s.height}),a.$target.append(n.resizer)),n.resizer.css(c[t.resizerType](e))}).bind(i.mouseup+".ax5layout-"+this.instanceId,function(i){d.off.call(n,e,t,o)}).bind("mouseleave.ax5layout-"+this.instanceId,function(i){d.off.call(n,e,t,o)}),jQuery(document.body).attr("unselectable","on").css("user-select","none").on("selectstart",!1)},off:function(e,t,o){var a=this.queue[e],r={"dock-panel":{left:function(e,t){t.__width+=t.__da},right:function(){t.__width-=t.__da},top:function(){t.__height+=t.__da},bottom:function(){t.__height-=t.__da}},"split-panel":{split:function(){"horizontal"==a.orientation?(a.splitPanel[t.panelIndex-1].__height+=t.__da,a.splitPanel[t.panelIndex+1].__height-=t.__da):(a.splitPanel[t.panelIndex-1].__width+=t.__da,a.splitPanel[t.panelIndex+1].__width-=t.__da)}},"tab-panel":{}};n.resizer&&(n.resizer.remove(),n.resizer=null,r[this.queue[e].layout][t.resizerType].call(this,e,t),s.call(this,e)),jQuery(document.body).unbind(i.mousemove+".ax5layout-"+this.instanceId).unbind(i.mouseup+".ax5layout-"+this.instanceId).unbind("mouseleave.ax5layout-"+this.instanceId),jQuery(document.body).removeAttr("unselectable").css("user-select","auto").off("selectstart")}},c={open:function(e,t,n){if(t.activePanelIndex!=n&&(t.tabPanel[n].active=!0,t.tabPanel[t.activePanelIndex].active=!1,t.$target.find('[data-tab-panel-label="'+n+'"]').attr("data-tab-active","true"),t.$target.find('[data-tab-panel-label="'+t.activePanelIndex+'"]').removeAttr("data-tab-active"),t.tabPanel[n].$target.attr("data-tab-active","true"),t.tabPanel[t.activePanelIndex].$target.removeAttr("data-tab-active"),t.activePanelIndex=n,t.onOpenTab)){var i={$target:t.$target,name:t.name,id:t.id,layout:t.layout,activePanelIndex:t.activePanelIndex,activePanel:t.tabPanel[t.activePanelIndex],tabPanel:t.tabPanel};t.onOpenTab.call(i)}}},u=function(){return'\n<div data-tab-panel-label-holder="{{id}}">\n    <div data-tab-panel-label-border="{{id}}"></div>\n    <div data-tab-panel-label-table="{{id}}">\n        <div data-tab-panel-aside="left"></div>\n    {{#tabPanel}}\n        <div data-tab-panel-label="{{panelIndex}}" data-tab-active="{{active}}">\n            <div data-tab-label="{{panelIndex}}">{{{label}}}</div>\n        </div>\n    {{/tabPanel}}\n        <div data-tab-panel-aside="right"></div>\n    </div>\n</div>\n'},h=function(){var e={"dock-panel":function(e){var a=this.queue[e];a.dockPanel={},a.$target.find(">[data-dock-panel]").each(function(){var r={};!function(e){t.isObject(e)&&!e.error&&(r=jQuery.extend(!0,r,e))}(t.parseJson(this.getAttribute("data-dock-panel"),!0)),"dock"in r&&(r.$target=jQuery(this),r.$target.addClass("dock-panel-"+r.dock),(r.split=r.split&&"true"==r.split.toString())&&(r.$splitter=jQuery('<div data-splitter="" class="dock-panel-'+r.dock+'"></div>'),r.$splitter.bind(i.mousedown,function(t){r.mousePosition=o(t),d.on.call(n,e,r,r.$splitter)}).bind("dragstart",function(e){return t.stopEvent(e),!1}),a.$target.append(r.$splitter)),"top"==r.dock||"bottom"==r.dock?r.__height=l(r.height,a.targetDimension.height):r.__width=l(r.width,a.targetDimension.width),r.resizerType=r.dock,a.dockPanel[r.dock]=r)})},"split-panel":function(e){var a=this.queue[e];a.splitPanel=[],a.$target.find(">[data-split-panel], >[data-splitter]").each(function(r){var s={};!function(e){t.isObject(e)&&!e.error&&(s=jQuery.extend(!0,s,e))}(t.parseJson(this.getAttribute("data-split-panel")||this.getAttribute("data-splitter"),!0)),s.$target=jQuery(this),s.$target.addClass("split-panel-"+a.orientation),s.panelIndex=r,this.getAttribute("data-splitter")?(s.splitter=!0,s.$target.bind(i.mousedown,function(t){s.panelIndex>0&&s.panelIndex<a.splitPanel.length-1&&(s.mousePosition=o(t),d.on.call(n,e,s,s.$target))}).bind("dragstart",function(e){return t.stopEvent(e),!1}),s.resizerType="split"):"horizontal"==a.orientation?s.__height=l(s.height,a.targetDimension.height):(a.orientation="vertical",s.__width=l(s.width,a.targetDimension.width)),a.splitPanel.push(s)})},"tab-panel":function(e){var i=this.queue[e],o=!1;i.tabPanel=[],i.$target.find(">[data-tab-panel]").each(function(e){var n={};!function(e){t.isObject(e)&&!e.error&&(n=jQuery.extend(!0,n,e))}(t.parseJson(this.getAttribute("data-tab-panel"),!0)),o&&(n.active=!1),n.$target=jQuery(this),n.active&&"false"!=n.active&&(o=!0,i.activePanelIndex=e,n.$target.attr("data-tab-active","true")),n.panelIndex=e,i.tabPanel.push(n)}),o||(i.tabPanel[0].active=!0,i.tabPanel[0].$target.attr("data-tab-active","true"),i.activePanelIndex=0),i.$target.append(jQuery(ax5.mustache.render(u.call(this,e),i))),i.$target.on("click","[data-tab-panel-label]",function(t){var o=this.getAttribute("data-tab-panel-label");c.open.call(n,e,i,o)})}};return function(t){var n=this.queue[t];n.targetDimension={height:n.$target.innerHeight(),width:n.$target.innerWidth()},n.$target.parents("[data-ax5layout]").get(0)&&f.call(this,n.$target.parents("[data-ax5layout]").get(0),t),n.layout in e&&e[n.layout].call(this,t),s.call(this,t)}}(),p=function(e){return t.isString(e)||(e=jQuery(e).data("data-ax5layout-id")),t.isString(e)?t.search(this.queue,function(){return this.id==e}):-1},f=function(e,n){var i=t.isNumber(e)?e:p.call(this,e);this.queue[i].childQueIdxs||(this.queue[i].childQueIdxs=[]),this.queue[i].childQueIdxs.push(n),this.queue[n].parentQueIdx=i};this.init=function(){this.onStateChanged=e.onStateChanged,this.onClick=e.onClick,jQuery(window).bind("resize.ax5layout-"+this.instanceId,function(){a.call(this)}.bind(this))},this.bind=function(n){var i,o={};return n=jQuery.extend(!0,o,e,n),n.target?(n.$target=jQuery(n.target),n.id||(n.id=n.$target.data("data-ax5layout-id")),n.id||(n.id="ax5layout-"+ax5.getGuid(),n.$target.data("data-ax5layout-id",n.id)),n.name=n.$target.attr("data-ax5layout"),n.options&&(n.options=JSON.parse(JSON.stringify(n.options))),function(e){t.isObject(e)&&!e.error&&(n=jQuery.extend(!0,n,e))}(t.parseJson(n.$target.attr("data-config"),!0)),i=t.search(this.queue,function(){return this.id==n.id}),i===-1?(this.queue.push(n),h.call(this,this.queue.length-1)):(this.queue[i]=jQuery.extend(!0,{},this.queue[i],n),h.call(this,i)),o=null,i=null,this):(console.log(ax5.info.getError("ax5layout","401","bind")),this)},this.align=function(e,n){var i=t.isNumber(e)?e:p.call(this,e);if(i===-1)for(var o=this.queue.length;o--;)s.call(this,o,null,n);else s.call(this,i,null,n);return this},this.onResize=function(e,n){var i=t.isNumber(e)?e:p.call(this,e);return i===-1?void console.log(ax5.info.getError("ax5layout","402","onResize")):(this.queue[i].onResize=n,this)},this.resize=function(){var e={"dock-panel":function(e,n){["top","bottom","left","right"].forEach(function(i){n[i]&&e.dockPanel[i]&&("top"==i||"bottom"==i?e.dockPanel[i].__height=t.isObject(n[i])?n[i].height:n[i]:"left"!=i&&"right"!=i||(e.dockPanel[i].__width=t.isObject(n[i])?n[i].width:n[i]))})},"split-panel":function(){},"tab-panel":function(){}};return function(n,i,o){var a=t.isNumber(n)?n:p.call(this,n);if(a===-1)for(var r=this.queue.length;r--;)e[this.queue[r].layout].call(this,this.queue[r],i),s.call(this,r,o);else this.queue[a]&&(e[this.queue[a].layout].call(this,this.queue[a],i),s.call(this,a,o));return this}}(),this.reset=function(){var e={"dock-panel":function(e){["top","bottom","left","right"].forEach(function(t){e.dockPanel[t]&&("top"==t||"bottom"==t?e.dockPanel[t].__height=e.dockPanel[t].height:"left"!=t&&"right"!=t||(e.dockPanel[t].__width=e.dockPanel[t].width))})},"split-panel":function(e){e.splitPanel.forEach(function(t){"vertical"==e.orientation?t.__width=l(t.width,e.targetDimension.width):"horizontal"==e.orientation&&(t.__height=l(t.height,e.targetDimension.height))})},"tab-panel":function(){}};return function(n,i){var o=t.isNumber(n)?n:p.call(this,n);return o===-1||(e[this.queue[o].layout].call(this,this.queue[o]),s.call(this,o,i)),this}}(),this.hide=function(){},this.tabOpen=function(){return function(e,n){var i=t.isNumber(e)?e:p.call(this,e);return i===-1?void console.log(ax5.info.getError("ax5layout","402","tabOpen")):(c.open.call(this,i,this.queue[i],n),this)}}(),this.getActiveTab=function(e){var n=t.isNumber(e)?e:p.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5layout","402","tabOpen")):"undefined"!=typeof this.queue[n].activePanelIndex?this.queue[n].tabPanel[this.queue[n].activePanelIndex]:void 0},this.main=function(){arguments&&t.isObject(arguments[0])?this.setConfig(arguments[0]):this.init()}.apply(this,arguments)};return e}())}(),ax5.ui.layout_instance=new ax5.ui.layout,jQuery.fn.ax5layout=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"align":return ax5.ui.layout_instance.align(this,arguments[1]);case"resize":return ax5.ui.layout_instance.resize(this,arguments[1],arguments[2]);case"reset":return ax5.ui.layout_instance.reset(this,arguments[1]);case"hide":return ax5.ui.layout_instance.hide(this,arguments[1]);case"onResize":return ax5.ui.layout_instance.onResize(this,arguments[1]);case"tabOpen":return ax5.ui.layout_instance.tabOpen(this,arguments[1]);case"getActiveTab":return ax5.ui.layout_instance.getActiveTab(this,arguments[1]);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend({},e,t),ax5.ui.layout_instance.bind(e)});return this}}(),function(){var e=ax5.ui,t=ax5.util;e.addClass({className:"binder"},function(){return function(){var e;this.instanceId=ax5.getGuid(),this.config={},e=this.config,this.model={},this.tmpl={},this.view_target=null,this.change_trigger={},this.click_trigger={},this.update_trigger={},this.onerror=null;var n=Object.prototype.toString,i=function(e){var t;return null!=e&&e==e.window?t="window":e&&1==e.nodeType?t="element":e&&11==e.nodeType?t="fragment":"undefined"==typeof e?t="undefined":"[object Object]"==n.call(e)?t="object":"[object Array]"==n.call(e)?t="array":"[object String]"==n.call(e)?t="string":"[object Number]"==n.call(e)?t="number":"[object NodeList]"==n.call(e)?t="nodelist":"function"==typeof e&&(t="function"),t},o=function(e,t,n){return e+"["+t+"]"+("."==n?"":"."+n)},a=function(e){var t=[],n=[].concat(e.split(/[\.\[\]]/g));return n.forEach(function(e){""!==e&&t.push('["'+e.replace(/['\"]/g,"")+'"]')}),n=null,t.join("")};this.setModel=function(e,t){return this.model=e,!this.view_target&&t?(this.view_target=t,this._binding()):this._binding("update"),this},this.set=function(e,t){var n,o,r,l=this;if(Function("val","this"+a(e)+" = val;").call(this.model,t),n=i(t),"object"==n)for(var s in t)this.set(e+"."+s,t[s]);else if("array"==n)for(this.view_target.find('[data-ax-path="'+e+'"]').each(function(){r=(this.type||"").toLowerCase(),"checkbox"!=r&&"radio"!=r||l.set_els_value(this,this.tagName.toLowerCase(),r,t,e,"change")}),o=t.length;o--;)this.set(e+"["+o+"]",t[o]);else this.view_target.find('[data-ax-path="'+e+'"]').each(function(){l.set_els_value(this,this.tagName.toLowerCase(),(this.type||"").toLowerCase(),t,e,"change")});return this},this.get=function(e){return"undefined"==typeof e?this.model:Function("","return this"+a(e)+";").call(this.model)},this.onChange=function(e,t){return this.change_trigger[e||"*"]=t,this},this.onClick=function(e,t){return this.click_trigger[e]=t,this},this.add=function(e,t){var n=Function("","return this"+a(e)+";").call(this.model),i=this.tmpl[e];t["@i"]=n.length,t["@r"]=n.length,t.__ADDED__=!0,Function("val","this"+a(e)+".push(val);").call(this.model,t);for(var o in i){var r=$(ax5.mustache.render(i[o].content,t));r.attr("data-ax-repeat-path",e),r.attr("data-ax-repeat-i",t["@i"]),this.bind_event_tmpl(r,e),i[o].container.append(r)}this.change("*");var l=this.update_trigger[e];if(l){var s={repeat_path:e,tmpl:i,list:n};l.call(s,s)}return this},this.remove=function(e,t){var n=Function("","return this"+a(e)+";").call(this.model),i=this.tmpl[e];"undefined"==typeof t&&(t=n.length-1);var o=n[t];o.__ADDED__?n.splice(t,1):n[t].__DELETED__=!0;for(var r in i)i[r].container.empty(),this.print_tmpl(e,i[r]);this.change("*");var l=this.update_trigger[e];if(l){var s={repeat_path:e,tmpl:i,list:n};l.call(s,s)}return this},this.update=function(e,t,n){var i=Function("","return this"+a(e)+";").call(this.model),o=this.tmpl[e];"undefined"!=typeof t&&n&&i.splice(t,1,n);for(var r in o)o[r].container.empty(),this.print_tmpl(e,o[r]);this.change("*");var l=this.update_trigger[e];if(l){var s={repeat_path:e,tmpl:o,list:i};l.call(s,s)}return this},this.childAdd=function(e,t,n,i){var o=Function("","return this"+a(e)+";").call(this.model),r=Function("","return this"+a(e)+"["+t+"]."+n+";").call(this.model);i.__ADDED__=!0,r.push(i),this.update(e,t,o[t])},this.childRemove=function(e,t,n,i){var o=Function("","return this"+a(e)+";").call(this.model),r=Function("","return this"+a(e)+"["+t+"]."+n+";").call(this.model),l=r[i];l.__ADDED__?r.splice(i,1):r[i].__DELETED__=!0,this.update(e,t,o[t])},this.childUpdate=function(e,t,n,i,o){var r=Function("","return this"+a(e)+";").call(this.model),l=Function("","return this"+a(e)+"["+t+"]."+n+";").call(this.model);l[i]=o,this.update(e,t,r[t])},this.childSet=function(e,t,n,i){var o=this;return Function("val","this"+a(e)+"["+t+"]."+n+" = val;").call(this.model,i),this.view_target.find('[data-ax-repeat="'+e+'"]').find('[data-ax-repeat-i="'+t+'"]').find('[data-ax-item-path="'+n+'"]').each(function(){o.set_els_value(this,this.tagName.toLowerCase(),(this.type||"").toLowerCase(),i,e+"["+t+"]."+n)}),this},this.onUpdate=function(e,t){return this.update_trigger[e]=t,this},this._binding=function(e){var t=this;this.view_target.find("[data-ax-path]").each(function(){var e,n=$(this),i=n.attr("data-ax-path"),o=(this.type||"").toLowerCase();try{e=Function("","return this"+a(i)+";").call(t.model)}catch(r){t.onerror&&t.onerror("not found target [model."+a(i)+"]")}t.set_els_value(this,this.tagName.toLowerCase(),o,e||"",i)}),"undefined"==typeof e?this.view_target.find("[data-ax-repeat]").each(function(){var e=$(this),n=e.attr("data-ax-repeat"),i=e.attr("data-ax-repeat-idx");"undefined"==typeof t.tmpl[n]&&(t.tmpl[n]={}),"undefined"!=typeof i?t.tmpl[n][i]={container:e,content:e.find("script").html()}:t.tmpl[n][0]={container:e,content:e.find("script").html()},e.empty()}):this.view_target.find("[data-ax-repeat]").each(function(){var e=$(this);e.empty().show()}),this.view_target.find("[data-ax-path]").off("change.axbinder").on("change.axbinder",function(e){var n,o,r=!1,l=[],s=$(e.target),d=s.attr("data-ax-path"),c=Function("","return this"+a(d)+";").call(t.model),u=(this.type||"").toLowerCase(),h=i(c),p=!0;if("object"!=h&&"array"!=h||(p=!1),"checkbox"==u){if(t.view_target.find('[data-ax-path="'+d+'"]').length>1){for("array"!=i(c)&&(c="undefined"==typeof c||""==c?[]:[].concat(c)),n=c.length,r=!1,o=this.checked;n--;)c[n]==this.value&&(r=!0);if(o)r||c.push(this.value);else{for(n=c.length;n--;)c[n]==this.value||l.push(c[n]);c=l}}else c=this.checked?this.value:"";Function("val","this"+a(d)+" = val;").call(t.model,c),t.change(d,{el:this,jquery:s,tagname:this.tagName.toLowerCase(),value:c})}else p&&(Function("val","this"+a(d)+" = val;").call(t.model,this.value),t.change(d,{el:this,jquery:s,tagname:this.tagName.toLowerCase(),value:this.value}));s.data("changedTime",(new Date).getTime())});var n;for(var o in t.tmpl){for(var r in t.tmpl[o])this.print_tmpl(o,t.tmpl[o][r],"isInit");if(n=this.update_trigger[o]){var l={repeat_path:o,tmpl:t.tmpl[o],list:Function("","return this."+o+";").call(this.model)};n.call(l,l)}}},this.set_els_value=function(e,t,n,i,o,r){i="undefined"==typeof i?[]:[].concat(i);var l,s;if("input"==t)if("checkbox"==n||"radio"==n){s=i.length;var d=!1;try{if(s>0)for(;s--;)"undefined"!=typeof i[s]&&e.value===i[s].toString()&&(d=!0)}catch(c){console.log(c)}e.checked=d}else e.value=i.join("");else if("select"==t){l=e.options,s=l.length;for(var u,h=!1;s--;){for(u=i.length;u--;)if("undefined"!=typeof i[u]&&l[s].value===i[u].toString()){l[s].selected=!0,h=!0;break}if(h)break}h||(l[0]?(l[0].selected=!0,Function("val","this"+a(o)+" = val;").call(this.model,l[0].value)):Function("val","this"+a(o)+" = val;").call(this.model,"")),window.AXSelect&&$("undefined"!=typeof i&&e).bindSelectSetValue(i[i.length-1])}else"textarea"==t?e.value=i.join("")||"":e.innerText?e.innerText=i.join(""):e.innerHTML=i.join("");return r&&this.change(o,{el:e,tagname:t,value:i}),this},this.change=function(e,t){var n=this.change_trigger[e];n&&n.call(t,t),"*"!=e&&this.change_trigger["*"]&&this.change_trigger["*"].call(t,t)},this.click=function(e,t){var n=this.click_trigger[e];n&&n.call(t,t)},this.sync_model=function(){},this.print_tmpl=function(e,t,n){var o=Function("","return this"+a(e)+";").call(this.model);if(o&&"array"==i(o))for(var r=0,l=o.length;r<l;r++){var s=o[r];if(jQuery.isPlainObject(s)?(s["@i"]=r,s["@r"]=r,0===r&&(s["@first"]=!0)):(s={"@i":r,"@value":s},0===r&&(s["@first"]=!0),console.log(s)),!s.__DELETED__){var d=$(ax5.mustache.render(t.content,s));d.attr("data-ax-repeat-path",e),d.attr("data-ax-repeat-i",s["@i"]),this.bind_event_tmpl(d,e),t.container.append(d)}}},this.bind_event_tmpl=function(e,t){var n=this,r=e.attr("data-ax-repeat-i"),l=Function("","return this"+a(t)+";").call(this.model);e.find("[data-ax-repeat-click]").off("click.axbinder").on("click.axbinder",function(e){var i=ax5.util.findParentNode(e.target,function(e){return e.getAttribute("data-ax-repeat-click")});if(i){var o=$(i),a=o.attr("data-ax-repeat-click"),s=(o.attr("data-ax-repeat-path"),{el:i,jquery:o,tagname:i.tagName.toLowerCase(),value:a,repeat_path:t,item:l[r],item_index:r,item_path:t+"["+r+"]"});n.click(t,s)}}),e.find("[data-ax-item-path]").each(function(){var e,i=$(this),a=i.attr("data-ax-item-path"),l=o(t,r,a),s=(this.type||"").toLowerCase();try{e=Function("","return this."+l+";").call(n.model)}catch(d){n.onerror&&n.onerror("not found target [model."+l+"]")}n.set_els_value(this,this.tagName.toLowerCase(),s,e||"",l)}),e.find("[data-ax-item-path]").off("change.axbinder").on("change.axbinder",function(a){var l,s,d=!1,c=[],u=(this.type||"").toLowerCase(),h=$(a.target),p=h.attr("data-ax-item-path"),f=o(t,r,p),g=Function("","return this."+f+";").call(n.model),m=i(g),v=!0;if("object"!=m&&"array"!=m||(v=!1),"checkbox"==u){if(e.find('[data-ax-item-path="'+p+'"]').length>1){for("array"!=i(g)&&(g="undefined"==typeof g||""==g?[]:[].concat(g)),l=g.length,d=!1,s=this.checked;l--;)g[l]==this.value&&(d=!0);if(s)d||g.push(this.value);else{for(l=g.length;l--;)g[l]==this.value||c.push(g[l]);g=c}}else g=this.checked?this.value:"";Function("val","this."+f+" = val;").call(n.model,g),n.change(f,{el:this,jquery:h,tagname:this.tagName.toLowerCase(),value:g})}else v&&(Function("val","this."+f+" = val;").call(n.model,this.value),n.change(f,{el:this,jquery:h,tagname:this.tagName.toLowerCase(),value:this.value}));h.data("changedTime",(new Date).getTime())}),e.find("[data-ax-item-path]").off("blur.axbinder").on("blur.axbinder",function(e){var t=$(e.target);("undefined"==typeof t.data("changedTime")||t.data("changedTime")<(new Date).getTime()-10)&&t.trigger("change")})},this.focus=function(e){return this.view_target.find('[data-ax-path="'+e+'"]').focus(),this},this.validate=function(){var e=this,t=[];return this.view_target.find("[data-ax-path]").each(function(){var n=$(this),i=n.attr("data-ax-path"),o=n.attr("data-ax-validate"),r=n.attr("pattern");if(o){var l,s,d;l=Function("","return this"+a(i)+";").call(e.model),"undefined"!=typeof l&&null!==l||(l=""),s=l.toString(),d=!1,"required"==o&&""==s.trim()?d=!0:"pattern"==o?d=!new RegExp(r).test(s):"email"==o?d=!/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/.test(s):!/\D.?/g.test(o)&&s.trim().length<o.number()&&(d=!0),d&&t.push({type:o,dataPath:i,el:this,jquery:n,value:l})}}),this.view_target.find("[data-ax-repeat-path]").each(function(){var n=$(this),i=n.attr("data-ax-repeat-path"),o=n.attr("data-ax-repeat-i");n.find("[data-ax-validate]").each(function(){var n=$(this),r=n.attr("data-ax-validate"),l=n.attr("data-ax-item-path"),s=Function("","return this"+a(i)+"["+o+"]."+l+";").call(e.model);"undefined"==typeof s&&(s="");var d=s.toString();if(r){var c=!1;"required"==r&&""==d.trim()?c=!0:"pattern"==r?c=!new RegExp(pattern).test(d):"email"==r?c=!/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/.test(d):!/\D.?/g.test(r)&&d.trim().length<r.number()&&(c=!0),c&&t.push({type:r,dataPath:i,el:this,jquery:n,value:s})}})}),t.length>0?{error:t}:{}},this.main=function(){arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}())}(),function(){var e=ax5.ui,t=ax5.util,n=void 0;e.addClass({className:"autocomplete"},function(){return function(){var e,i=this;this.instanceId=ax5.getGuid(),this.config={theme:"default",animateTime:250,removeIcon:"X",lang:{noSelected:"",noOptions:"no options",loading:"Now Processing"},columnKeys:{optionValue:"value",optionText:"text",optionSelected:"selected"}},this.queue=[],this.activeautocompleteOptionGroup=null,this.activeautocompleteQueueIndex=-1,this.openTimer=null,this.closeTimer=null,this.waitOptionsCallback=null,this.keyUpTimer=null,e=this.config;var o=jQuery(window),a={18:"KEY_ALT",17:"KEY_CONTROL",46:"KEY_DELETE",40:"KEY_DOWN",35:"KEY_END",187:"KEY_EQUAL",36:"KEY_HOME",45:"KEY_INSERT",37:"KEY_LEFT",189:"KEY_MINUS",34:"KEY_PAGEDOWN",33:"KEY_PAGEUP",39:"KEY_RIGHT",16:"KEY_SHIFT",9:"KEY_TAB",38:"KEY_UP",91:"KEY_WINDOW"},r=function(e,t){return e&&e.onStateChanged?e.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),"changeValue"==t.state&&(e&&e.onChange?e.onChange.call(t,t):this.onChange&&this.onChange.call(t,t)),e=null,t=null,!0},l=function(){for(var e,n=this.queue.length;n--;){var i=this.queue[n];if(i.$display&&(e=Math.max(i.$select.outerWidth(),t.number(i.minWidth)),i.$display.css({"min-width":e}),i.reset&&i.$display.find(".addon-icon-reset").css({"line-height":this.queue[n].$display.height()+"px"}),i.multiple)){var o=function(){return t.number(i.$display.css("border-top-width"))+t.number(i.$display.css("border-bottom-width"))}.call(this);i.$target.height(""),i.$display.height("");var a=i.$displayTable.outerHeight();Math.abs(a-i.$target.height())>=o&&(i.$target.css({height:a+o+4}),i.$display.css({height:a+o+4}))}}return n=null,e=null,this},s=function(e){if(e&&!this.activeautocompleteOptionGroup)return this;var t,n=this.queue[this.activeautocompleteQueueIndex],i={},a=0,r={},l={};return n?(e&&jQuery(document.body).append(this.activeautocompleteOptionGroup),i=n.$target.offset(),r={width:n.$target.outerWidth(),height:n.$target.outerHeight()},l={winWidth:Math.max(o.width(),jQuery(document.body).width()),winHeight:Math.max(o.height(),jQuery(document.body).height()),width:this.activeautocompleteOptionGroup.outerWidth(),height:this.activeautocompleteOptionGroup.outerHeight()},n.direction&&""!==n.direction&&"auto"!==n.direction?t=n.direction:(t="top",i.top-l.height-a<0?t="top":i.top+r.height+l.height+a>l.winHeight&&(t="bottom")),e&&this.activeautocompleteOptionGroup.addClass("direction-"+t),void this.activeautocompleteOptionGroup.css(function(){if("top"==t){if(i.top+r.height+l.height+a>l.winHeight){var e=i.top+l.height;return e+l.height+a>l.winHeight&&(e=0),e<0&&(e=0),{left:i.left,top:e,width:r.width}}return{left:i.left,top:i.top+r.height+1,width:r.width}}if("bottom"==t)return{left:i.left,top:i.top-l.height-1,width:r.width}}.call(this))):this},d=function(e,n){if(!this.activeautocompleteOptionGroup)return this;var i=this.queue[this.activeautocompleteQueueIndex],o="display";return(n=t.findParentNode(e.target,function(e){return e.getAttribute("data-option-value")?(o="optionItem",!0):i.$target.get(0)==e?(o="display",!0):void 0}))?("optionItem"===o&&(_.call(this,i.id,{optionIndex:{index:n.getAttribute("data-option-index")}},void 0,"optionItemClick"),l.call(this),s.call(this),i.multiple||this.close()),this):(this.close(),this)},c=function(e){var t=this.queue[e],i={};return i.id=t.id,i.theme=t.theme,i.size="ax5autocomplete-option-group-"+t.size,i.multiple=t.multiple,i.lang=t.lang,i.options=t.options,i.selected=t.selected,i.hasSelected=i.selected&&i.selected.length>0,i.removeIcon=t.removeIcon,n.tmpl.get.call(this,"label",i,t.columnKeys)},u=function(e){var t=this.queue[e];!t.multiple&&t.selected&&t.selected.length>0&&(t.selected=[].concat(t.selected[t.selected.length-1])),t.selected.forEach(function(e,t){e["@index"]=t}),t.$select.html(n.tmpl.get.call(this,"formSelectOptions",{selected:t.selected},t.columnKeys))},h=function(e){var t=this.queue[e];t.$displayLabel.find("[data-ax5autocomplete-selected-label]").remove(),t.$displayLabelInput.before(c.call(this,e))},p=function(e){return this.queue[e].disabled?this:(this.queue[e].$displayLabel.trigger("focus"),void this.queue[e].$displayLabelInput.focus())},f=function(e){this.queue[e].$displayLabelInput.val("")},g=function(e){this.queue[e].$displayLabel.trigger("blur")},m=function(e,i){if(this.activeautocompleteQueueIndex==-1)return this;var o=/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi;i=i.replace(o,""),this.queue[e].waitOptions=!0,this.queue[e].onSearch.call({self:this,item:this.queue[e],searchWord:i},function(e){var o={},a=this.queue[this.activeautocompleteQueueIndex];return!!a&&(function(e,n){var i={};n.options.forEach(function(t,n){t["@index"]=n,t["@findex"]=n,i[t[e.columnKeys.optionValue]]=t}),t.isArray(e.selected)&&e.selected.forEach(function(t){i[t[e.columnKeys.optionValue]]&&(n.options[i[t[e.columnKeys.optionValue]]["@index"]][e.columnKeys.optionSelected]=!0)})}(a,e),a.options=e.options,l.call(this),o.id=a.id,o.theme=a.theme,o.size="ax5autocomplete-option-group-"+a.size,o.multiple=a.multiple,o.lang=a.lang,o.options=a.options,this.activeautocompleteOptionGroup.find('[data-els="content"]').html(n.tmpl.get.call(this,"options",o,a.columnKeys)),v.call(this,this.activeautocompleteQueueIndex,i),s.call(this),void setTimeout(function(){s.call(this)}.bind(this)))}.bind(this))},v=function(e,t){if(this.activeautocompleteQueueIndex==-1)return this;var n,i=[],o=-1,a=this.queue[e].options.length-1;if(""!=t){for(;a-o++;){if(n=this.queue[e].options[o],(""+n.text).toLowerCase()==t.toLowerCase()){i=[{"@findex":n["@findex"],optionsSort:0}];break}var r=(""+n.text).toLowerCase().search(t.toLowerCase());if(r>-1&&(i.push({"@findex":n["@findex"],optionsSort:r}),i.length>2))break;r=null}i.sort(function(e,t){return e.optionsSort-t.optionsSort})}i&&i.length>0?y.call(this,e,void 0,i[0]["@findex"]):x.call(this,e)},x=function(e){this.activeautocompleteOptionGroup&&this.activeautocompleteOptionGroup.find("[data-option-focus-index]").removeClass("hover").removeAttr("data-option-selected"),this.queue[e].optionFocusIndex=-1},y=function(e,t,n){var i,o,a,r,l=this.queue[e];if(this.activeautocompleteOptionGroup&&l.options&&l.options.length>0){if("undefined"!=typeof n?i=n:(o=l.optionFocusIndex==-1?l.optionSelectedIndex||-1:l.optionFocusIndex,o==-1?i=0:(i=o+t,i<0?i=0:i>l.optionItemLength-1&&(i=l.optionItemLength-1))),l.optionFocusIndex=i,l.options[i]&&l.options[i].hide){if("undefined"==typeof t)return this;for(;l.options[i].hide;){if(i+=t,i<0){i=0;break}if(i>l.optionItemLength-1){i=l.optionItemLength-1;break}}}if("undefined"!=typeof i&&(this.activeautocompleteOptionGroup.find("[data-option-focus-index]").removeClass("hover"),a=this.activeautocompleteOptionGroup.find('[data-option-focus-index="'+i+'"]').addClass("hover"),r=this.activeautocompleteOptionGroup.find('[data-els="content"]'),a.get(0))){var s=a.outerHeight(),d=r.innerHeight(),c=r.scrollTop(),u=a.position().top+r.scrollTop();d+c<u+s?r.scrollTop(u+s-d):c>u&&r.scrollTop(u),"undefined"!=typeof t&&l.$displayLabelInput.val(l.options[i].text)}}},b=function(e){return e instanceof jQuery?e=e.data("data-ax5autocomplete-id"):t.isString(e)||(e=jQuery(e).data("data-ax5autocomplete-id")),
t.isString(e)?t.search(this.queue,function(){return this.id==e}):void console.log(ax5.info.getError("ax5autocomplete","402","getQueIdx"))},w=function(e,t,n){return"undefined"==typeof n?!e.multiple||!t:n},C=function(e){this.queue[e].options.forEach(function(e){e.optgroup?e.options.forEach(function(e){e.selected=!1}):e.selected=!1}),this.queue[e].selected=[],this.queue[e].$select.html(n.tmpl.get.call(this,"formSelectOptions",{selected:this.queue[e].selected},this.queue[e].columnKeys))},_=function(){var n={selectedIndex:function(e,t,n,i){},removeSelectedIndex:function(e,t,n,i){for(var o=this.queue[e],a={},r=[],l=0,s=0;s<o.selected.length;s++)o.selected[s]["@index"]!=t.removeSelectedIndex.index&&(a={"@index":l,"@findex":l},a[o.columnKeys.optionValue]=o.selected[s][o.columnKeys.optionValue],a[o.columnKeys.optionText]=o.selected[s][o.columnKeys.optionText],r.push(a),l++);o.selected=r},optionIndex:function o(e,t,n,i){var a=this.queue[e],r={},o=a.selected.length,l=!0;r={"@index":o,"@findex":o},r[a.columnKeys.optionValue]=a.options[t.optionIndex.index][a.columnKeys.optionValue],r[a.columnKeys.optionText]=a.options[t.optionIndex.index][a.columnKeys.optionText];for(var s=0;s<a.selected.length;s++)a.selected[s][a.columnKeys.optionValue]==r[a.columnKeys.optionValue]&&(l=!1);l&&a.selected.push(r)},arr:function(e,o,a,r){o.forEach(function(o){if(t.isString(o)||t.isNumber(o))n.text.call(i,e,o,a,"justSetValue");else for(var r in n)if(o[r]){n[r].call(i,e,o,a,"justSetValue");break}})},value:function(n,i,o,a){var r,l=this.queue[n],s=t.search(l.options,function(){return this[l.columnKeys.optionValue]==i.value[l.columnKeys.optionValue]});if(s>-1)if(l.options[s][l.columnKeys.optionSelected]=w(l,l.options[s][l.columnKeys.optionSelected],o),l.options[s][l.columnKeys.optionSelected]){for(var d=!0,c=0;c<l.selected.length;c++)if(l.selected[c][e.columnKeys.optionValue]==l.options[s][e.columnKeys.optionValue]){d=!1;break}d&&(r={},r[l.columnKeys.optionValue]=l.options[s][l.columnKeys.optionValue],r[l.columnKeys.optionText]=l.options[s][l.columnKeys.optionText],l.selected.push(r))}else{for(var u=[],c=0;c<l.selected.length;c++)l.selected[c][e.columnKeys.optionValue]==l.options[s][e.columnKeys.optionValue]||(r={},r[l.columnKeys.optionValue]=l.selected[c][l.columnKeys.optionValue],r[l.columnKeys.optionText]=l.selected[c][l.columnKeys.optionText],u.push(r));l.selected=u}else{for(var d=!0,c=0;c<l.selected.length;c++)if(l.selected[c][e.columnKeys.optionValue]==i.value[e.columnKeys.optionValue]){d=!1;break}d&&(r={},r[l.columnKeys.optionValue]=i.value[e.columnKeys.optionValue],r[l.columnKeys.optionText]=i.value[e.columnKeys.optionText],l.selected.push(r))}},text:function(n,i,o,a){var r,l=this.queue[n],s=t.search(l.options,function(){return this[l.columnKeys.optionText]==i});if(s>-1)if(l.options[s][l.columnKeys.optionSelected]=w(l,l.options[s][l.columnKeys.optionSelected],o),l.options[s][l.columnKeys.optionSelected]){for(var d=!0,c=0;c<l.selected.length;c++)if(l.selected[c][e.columnKeys.optionText]==l.options[s][e.columnKeys.optionText]){d=!1;break}d&&(r={},r[l.columnKeys.optionValue]=l.options[s][l.columnKeys.optionValue],r[l.columnKeys.optionText]=l.options[s][l.columnKeys.optionText],l.selected.push(r))}else{for(var u=[],c=0;c<l.selected.length;c++)l.selected[c][e.columnKeys.optionText]==l.options[s][e.columnKeys.optionText]||(r={},r[l.columnKeys.optionValue]=l.selected[c][l.columnKeys.optionValue],r[l.columnKeys.optionText]=l.selected[c][l.columnKeys.optionText],u.push(r));l.selected=u}else{for(var d=!0,c=0;c<l.selected.length;c++)if(l.selected[c][e.columnKeys.optionText]==i){d=!1;break}d&&(r={},r[l.columnKeys.optionValue]=i,r[l.columnKeys.optionText]=i,l.selected.push(r))}},clear:function(e){C.call(this,e),x.call(this,e),this.activeautocompleteOptionGroup&&this.activeautocompleteOptionGroup.find("[data-option-index]").attr("data-option-Selected","false"),this.queue[e].optionSelectedIndex=-1}};return function(e,i,o,a){var l=t.isNumber(e)?e:b.call(this,e);if(l===-1)return void console.log(ax5.info.getError("ax5autocomplete","402","val"));if("undefined"==typeof i)throw"error not found value";if(t.isArray(i))n.clear.call(this,l),n.arr.call(this,l,this.queue[l].multiple||0==i.length?i:[i[i.length-1]],o);else if(t.isString(i)||t.isNumber(i))"undefined"==typeof i||null===i||this.queue[l].multiple||C.call(this,l),n.text.call(this,l,i,o);else if(null===i)n.clear.call(this,l);else{this.queue[l].multiple||C.call(this,l);for(var d in n)if(i[d]){n[d].call(this,l,i,o);break}}return u.call(this,l),h.call(this,l),p.call(this,l),s.call(this),"undefined"!=typeof i&&a&&!a.noStateChange&&r.call(this,this.queue[l],{self:this,item:this.queue[l],state:"changeValue",value:this.queue[l].selected}),e=null,this}}();this.init=function(){this.onStateChanged=e.onStateChanged,this.onChange=e.onChange,jQuery(window).on("resize.ax5autocomplete-display-"+this.instanceId,function(){l.call(this)}.bind(this))},this.bind=function(o){var r,d=function(){var e=t.debounce(function(e){return this.activeautocompleteQueueIndex==-1?this:void m.call(i,e,this.queue[e].$displayLabelInput.val())},150),r=function(e){f.call(this,e)},d={click:function(e,n){var o,a=t.findParentNode(n.target,function(e){return e.getAttribute("data-ax5autocomplete-remove")?(o="optionItemRemove",!0):e.getAttribute("data-selected-clear")?(o="clear",!0):void 0});if(a){if("optionItemRemove"===o){var r=a.getAttribute("data-ax5autocomplete-remove-index");return this.queue[e].selected.splice(r,1),u.call(this,e),h.call(this,e),p.call(this,e),l.call(this),s.call(this),t.stopEvent(n),this}"clear"===o&&(_.call(this,e,{clear:!0}),l.call(this),s.call(this))}else i.activeautocompleteQueueIndex==e?this.queue[e].optionFocusIndex==-1&&i.close():p.call(this,e)},keyUp:function(n,i){return i.which==ax5.info.eventKeys.ESC&&this.activeautocompleteQueueIndex===-1?(t.stopEvent(i),this):i.which==ax5.info.eventKeys.TAB?(this.close(),this):(this.activeautocompleteQueueIndex!=n&&this.open(n),void(a[i.which]?t.stopEvent(i):i.which==ax5.info.eventKeys.BACKSPACE&&""==this.queue[n].$displayLabelInput.val()?(this.queue[n].selected.pop(),u.call(this,n),h.call(this,n),p.call(this,n),l.call(this),s.call(this),t.stopEvent(i)):e.call(this,n)))},keyDown:function(e,n){if(n.which==ax5.info.eventKeys.ESC)f.call(this,e),this.close(),t.stopEvent(n);else if(n.which==ax5.info.eventKeys.RETURN){var i=this.queue[e].$displayLabelInput.val();o.optionFocusIndex>-1?_.call(this,o.id,{optionIndex:{index:o.optionFocusIndex}},void 0,"optionItemClick"):""!=i&&_.call(this,e,i,!0),f.call(this,e),l.call(this),this.close(),t.stopEvent(n)}else n.which==ax5.info.eventKeys.DOWN?(y.call(this,e,1),t.stopEvent(n)):n.which==ax5.info.eventKeys.UP&&(y.call(this,e,-1),t.stopEvent(n))},focus:function(e,t){},blur:function(e,n){r.call(this,e),t.stopEvent(n)},selectChange:function(e,t){_.call(this,e,{value:this.queue[e].$select.val()},!0)}};return function(e){var t=this.queue[e],i={};return t.$display?h.call(this,e):(i.instanceId=this.instanceId,i.id=t.id,i.name=t.name,i.theme=t.theme,i.tabIndex=t.tabIndex,i.multiple=t.multiple,i.reset=t.reset,i.label=c.call(this,e),i.formSize=function(){return t.size?"input-"+t.size:""}(),t.$display=jQuery(n.tmpl.get.call(this,"autocompleteDisplay",i,t.columnKeys)),t.$displayTable=t.$display.find('[data-els="display-table"]'),t.$displayLabel=t.$display.find('[data-ax5autocomplete-display="label"]'),t.$displayLabelInput=t.$display.find('[data-ax5autocomplete-display="input"]'),t.$target.find("select").get(0)?(t.$select=t.$target.find("select"),t.$select.attr("tabindex","-1").attr("class","form-control "+i.formSize),i.name&&t.$select.attr("name","name"),t.$select.attr("multiple","multiple")):(t.$select=jQuery(n.tmpl.get.call(this,"formSelect",i,t.columnKeys)),t.$target.append(t.$select)),t.$target.append(t.$display)),l.call(this),t.$display.off("click.ax5autocomplete").on("click.ax5autocomplete",d.click.bind(this,e)),t.$displayLabelInput.off("focus.ax5autocomplete").on("focus.ax5autocomplete",d.focus.bind(this,e)).off("blur.ax5autocomplete").on("blur.ax5autocomplete",d.blur.bind(this,e)).off("keydown.ax5autocomplete").on("keydown.ax5autocomplete",d.keyDown.bind(this,e)).off("keyup.ax5autocomplete").on("keyup.ax5autocomplete",d.keyUp.bind(this,e)),t.$select.off("change.ax5autocomplete").on("change.ax5autocomplete",d.selectChange.bind(this,e)),i=null,t=null,e=null,this}}(),g={};return o=jQuery.extend(!0,g,e,o),o.target?(o.$target=jQuery(o.target),o.id||(o.id=o.$target.data("data-ax5autocomplete-id")),o.id||(o.id="ax5autocomplete-"+ax5.getGuid(),o.$target.data("data-ax5autocomplete-id",o.id)),o.name=o.$target.attr("data-ax5autocomplete"),o.options=[],o.selected=[],function(e){t.isObject(e)&&!e.error&&(o=jQuery.extend(!0,o,e))}(t.parseJson(o.$target.attr("data-ax5autocomplete-config"),!0)),r=t.search(this.queue,function(){return this.id==o.id}),r===-1?(this.queue.push(o),d.call(this,this.queue.length-1)):(this.queue[r]=jQuery.extend(!0,{},this.queue[r],o),d.call(this,r)),g=null,r=null,this):(console.log(ax5.info.getError("ax5autocomplete","401","bind")),this)},this.open=function(){return function(i,o){this.waitOptionsCallback=null;var a,l,c=t.isNumber(i)?i:b.call(this,i),u=this.queue[c],h={};return u.$display.attr("disabled")?this:(this.openTimer&&clearTimeout(this.openTimer),this.activeautocompleteOptionGroup?this.activeautocompleteQueueIndex==c?this:o>2?this:(this.close(),this.openTimer=setTimeout(function(){this.open(c,(o||0)+1)}.bind(this),e.animateTime),this):(u.optionFocusIndex=-1,u.selected&&u.selected.length>0&&(u.optionSelectedIndex=u.selected[0]["@findex"]),h.id=u.id,h.theme=u.theme,h.size="ax5autocomplete-option-group-"+u.size,h.multiple=u.multiple,h.lang=u.lang,u.$display.attr("data-autocomplete-option-group-opened","true"),h.waitOptions=!0,h.options=[],this.activeautocompleteOptionGroup=jQuery(n.tmpl.get.call(this,"optionGroup",h,u.columnKeys)),this.activeautocompleteOptionGroup.find('[data-els="content"]').html(n.tmpl.get.call(this,"options",h,u.columnKeys)),this.activeautocompleteQueueIndex=c,s.call(this,"append"),jQuery(window).on("resize.ax5autocomplete-"+this.instanceId,function(){s.call(this)}.bind(this)),u.selected&&u.selected.length>0&&(l=this.activeautocompleteOptionGroup.find('[data-option-index="'+u.selected[0]["@index"]+'"]'),l.get(0)&&(a=l.position().top-this.activeautocompleteOptionGroup.height()/3,this.activeautocompleteOptionGroup.find('[data-els="content"]').stop().animate({scrollTop:a},u.animateTime,"swing",function(){}))),jQuery(window).on("click.ax5autocomplete-"+this.instanceId,function(e){e=e||window.event,d.call(this,e),t.stopEvent(e)}.bind(this)),r.call(this,u,{self:this,state:"open",item:u}),h=null,a=null,l=null,this))}}(),this.setValue=function(e,n){var i=t.isNumber(e)?e:b.call(this,e);if(i===-1)return void console.log(ax5.info.getError("ax5autocomplete","402","val"));if(C.call(this,i),t.isArray(n)){var o=t.map(n,function(){return{value:this}});_.call(this,i,o,!0,{noStateChange:!0})}else t.isObject(n)?_.call(this,i,{value:n},!0,{noStateChange:!0}):h.call(this,i);return g.call(this,i),l.call(this),this},this.setText=function(e,n){var i=t.isNumber(e)?e:b.call(this,e);return i===-1?void console.log(ax5.info.getError("ax5autocomplete","402","val")):(this.queue[i].selected=[],C.call(this,i),_.call(this,i,n,!0,{noStateChange:!0}),g.call(this,i),l.call(this),this)},this.getSelectedOption=function(e){var n=t.isNumber(e)?e:b.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5autocomplete","402","val")):t.deepCopy(this.queue[n].selected)},this.close=function(t){return this.closeTimer&&clearTimeout(this.closeTimer),this.activeautocompleteOptionGroup?(t=this.queue[this.activeautocompleteQueueIndex],t.optionFocusIndex=-1,t.$display.removeAttr("data-autocomplete-option-group-opened").trigger("focus"),this.activeautocompleteOptionGroup.addClass("destroy"),jQuery(window).off("resize.ax5autocomplete-"+this.instanceId).off("click.ax5autocomplete-"+this.instanceId).off("keyup.ax5autocomplete-"+this.instanceId),this.closeTimer=setTimeout(function(){this.activeautocompleteOptionGroup&&this.activeautocompleteOptionGroup.remove(),this.activeautocompleteOptionGroup=null,this.activeautocompleteQueueIndex=-1,r.call(this,t,{self:this,state:"close"})}.bind(this),e.animateTime),this.waitOptionsCallback=null,this):this},this.blur=function(e){var n=t.isNumber(e)?e:b.call(this,e);return n===-1?void console.log(ax5.info.getError("ax5autocomplete","402","val")):(g.call(this,n),this)},this.enable=function(e){var t=b.call(this,e);return"undefined"!=typeof t&&(this.queue[t].disable=!1,this.queue[t].$display[0]&&(this.queue[t].$display.removeAttr("disabled"),this.queue[t].$displayLabelInput.removeAttr("disabled")),this.queue[t].$select[0]&&this.queue[t].$select.removeAttr("disabled"),r.call(this,this.queue[t],{self:this,state:"enable"})),this},this.disable=function(e){var t=b.call(this,e);return"undefined"!=typeof t&&(this.queue[t].disable=!0,this.queue[t].$display[0]&&(this.queue[t].$display.attr("disabled","disabled"),this.queue[t].$displayLabelInput.attr("disabled","disabled")),this.queue[t].$select[0]&&this.queue[t].$select.attr("disabled","disabled"),r.call(this,this.queue[t],{self:this,state:"disable"})),this},this.align=function(){return l.call(this),this},this.main=function(){arguments&&t.isObject(arguments[0])?this.setConfig(arguments[0]):this.init()}.apply(this,arguments)}}()),n=ax5.ui.autocomplete}(),function(){var e=ax5.ui.autocomplete,t=(ax5.util,function(e){return'\n<div class="ax5autocomplete-option-group {{theme}} {{size}}" data-ax5autocomplete-option-group="{{id}}">\n    <div class="ax-autocomplete-body">\n        <div class="ax-autocomplete-option-group-content" data-els="content"></div>\n    </div>\n    <div class="ax-autocomplete-arrow"></div> \n</div>\n'}),n=function(e){return' \n<input tabindex="-1" type="text" data-input-dummy="" style="display: none;" />\n<div class="form-control {{formSize}} ax5autocomplete-display {{theme}}" \ndata-ax5autocomplete-display="{{id}}" data-ax5autocomplete-instance="{{instanceId}}">\n    <div class="ax5autocomplete-display-table" data-els="display-table">\n        <div data-ax5autocomplete-display="label-holder"> \n        <a {{^tabIndex}}{{/tabIndex}}{{#tabIndex}}tabindex="{{tabIndex}}" {{/tabIndex}}\n        data-ax5autocomplete-display="label"\n        spellcheck="false"><input type="text"data-ax5autocomplete-display="input" style="border:0px none;" /></a>\n        </div>\n        <div data-ax5autocomplete-display="addon"> \n            {{#multiple}}{{#reset}}\n            <span class="addon-icon-reset" data-selected-clear="true">{{{.}}}</span>\n            {{/reset}}{{/multiple}}\n        </div>\n    </div>\n</a>\n'},i=function(e){return'\n<select tabindex="-1" class="form-control {{formSize}}" name="{{name}}" multiple="multiple"></select>\n'},o=function(e){return'\n{{#selected}}\n<option value="{{'+e.optionValue+'}}" selected="true">{{'+e.optionText+"}}</option>\n{{/selected}}\n"},a=function(e){return'\n{{#waitOptions}}\n    <div class="ax-autocomplete-option-item">\n            <div class="ax-autocomplete-option-item-holder">\n                <span class="ax-autocomplete-option-item-cell ax-autocomplete-option-item-label">\n                    {{{lang.loading}}}\n                </span>\n            </div>\n        </div>\n{{/waitOptions}}\n{{^waitOptions}}\n    {{#options}}\n        {{^hide}}\n        <div class="ax-autocomplete-option-item" data-option-focus-index="{{@findex}}" data-option-index="{{@index}}" data-option-value="{{'+e.optionValue+'}}" {{#'+e.optionSelected+'}}data-option-selected="true"{{/'+e.optionSelected+'}}>\n            <div class="ax-autocomplete-option-item-holder">\n                <span class="ax-autocomplete-option-item-cell ax-autocomplete-option-item-label">{{'+e.optionText+'}}</span>\n            </div>\n        </div>\n        {{/hide}}\n    {{/options}}\n    {{^options}}\n        <div class="ax-autocomplete-option-item">\n            <div class="ax-autocomplete-option-item-holder">\n                <span class="ax-autocomplete-option-item-cell ax-autocomplete-option-item-label">\n                    {{{lang.noOptions}}}\n                </span>\n            </div>\n        </div>\n    {{/options}}\n{{/waitOptions}}\n'},r=function(e){return'{{#selected}}\n<div tabindex="-1" data-ax5autocomplete-selected-label="{{@i}}" data-ax5autocomplete-selected-text="{{text}}">\n<div data-ax5autocomplete-remove="true" data-ax5autocomplete-remove-index="{{@i}}">{{{removeIcon}}}</div>\n<span>{{'+e.optionText+"}}</span>\n</div>{{/selected}}"};e.tmpl={autocompleteDisplay:n,formSelect:i,formSelectOptions:o,optionGroup:t,options:a,label:r,get:function(t,n,i){return ax5.mustache.render(e.tmpl[t].call(this,i),n)}}}(),ax5.ui.autocomplete_instance=new ax5.ui.autocomplete,jQuery.fn.ax5autocomplete=function(){return function(e){if(ax5.util.isString(arguments[0])){var t=arguments[0];switch(t){case"open":return ax5.ui.autocomplete_instance.open(this);case"close":return ax5.ui.autocomplete_instance.close(this);case"setValue":return ax5.ui.autocomplete_instance.setValue(this,arguments[1],arguments[2],arguments[3],arguments[4]||"justSetValue");case"setText":return ax5.ui.autocomplete_instance.setText(this,arguments[1],arguments[2],arguments[3],arguments[4]||"justSetValue");case"getSelectedOption":return ax5.ui.autocomplete_instance.getSelectedOption(this);case"enable":return ax5.ui.autocomplete_instance.enable(this);case"disable":return ax5.ui.autocomplete_instance.disable(this);case"blur":return ax5.ui.autocomplete_instance.blur(this);case"align":return ax5.ui.autocomplete_instance.align(this);default:return this}}else"undefined"==typeof e&&(e={}),jQuery.each(this,function(){var t={target:this};e=jQuery.extend({},e,t),ax5.ui.autocomplete_instance.bind(e)});return this}}();
//# sourceMappingURL=plugins.min.js.map
