DocumentServer/OfficeWeb/3rdparty/extjs/ext-all.js
nikolay ivanov a8be6b9e72 init repo
2014-07-05 18:22:49 +00:00

16 lines
1 MiB

/*
This file is part of Ext JS 4
Copyright (c) 2011 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
*/
(function(){var e=this,a=Object.prototype,g=a.toString,b=true,d={toString:1},c;if(typeof Ext==="undefined"){e.Ext={}}Ext.global=e;for(c in d){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(n,m,q){if(q){Ext.apply(n,q)}if(n&&m&&typeof m==="object"){var p,l,h;for(p in m){n[p]=m[p]}if(b){for(l=b.length;l--;){h=b[l];if(m.hasOwnProperty(h)){n[h]=m[h]}}}}return n};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:function(){},baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(i,h){var j;if(i){for(j in h){if(i[j]===undefined){i[j]=h[j]}}}return i},iterate:function(h,j,i){if(Ext.isEmpty(h)){return}if(i===undefined){i=h}if(Ext.isIterable(h)){Ext.Array.each.call(Ext.Array,h,j,i)}else{Ext.Object.each.call(Ext.Object,h,j,i)}}});Ext.apply(Ext,{extend:function(){var h=a.constructor,i=function(k){for(var j in k){if(!k.hasOwnProperty(j)){continue}this[j]=k[j]}};return function(j,p,m){if(Ext.isObject(p)){m=p;p=j;j=m.constructor!==h?m.constructor:function(){p.apply(this,arguments)}}var l=function(){},k,n=p.prototype;l.prototype=n;k=j.prototype=new l();k.constructor=j;j.superclass=n;if(n.constructor===h){n.constructor=p}j.override=function(q){Ext.override(j,q)};k.override=i;k.proto=k;j.override(m);j.extend=function(q){return Ext.extend(j,q)};return j}}(),override:function(h,i){if(h.prototype.$className){return h.override(i)}else{Ext.apply(h.prototype,i)}}});Ext.apply(Ext,{valueFrom:function(j,h,i){return Ext.isEmpty(j,i)?h:j},typeOf:function(i){if(i===null){return"null"}var h=typeof i;if(h==="undefined"||h==="string"||h==="number"||h==="boolean"){return h}var j=g.call(i);switch(j){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(h==="function"){return"function"}if(h==="object"){if(i.nodeType!==undefined){if(i.nodeType===3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(h,i){return(h===null)||(h===undefined)||(!i?h==="":false)||(Ext.isArray(h)&&h.length===0)},isArray:("isArray" in Array)?Array.isArray:function(h){return g.call(h)==="[object Array]"},isDate:function(h){return g.call(h)==="[object Date]"},isObject:(g.call(null)==="[object Object]")?function(h){return h!==null&&h!==undefined&&g.call(h)==="[object Object]"&&h.ownerDocument===undefined}:function(h){return g.call(h)==="[object Object]"},isPrimitive:function(i){var h=typeof i;return h==="string"||h==="number"||h==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(h){return g.call(h)==="[object Function]"}:function(h){return typeof h==="function"},isNumber:function(h){return typeof h==="number"&&isFinite(h)},isNumeric:function(h){return !isNaN(parseFloat(h))&&isFinite(h)},isString:function(h){return typeof h==="string"},isBoolean:function(h){return typeof h==="boolean"},isElement:function(h){return h?h.nodeType===1:false},isTextNode:function(h){return h?h.nodeName==="#text":false},isDefined:function(h){return typeof h!=="undefined"},isIterable:function(h){return(h&&typeof h!=="string")?h.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}var p=g.call(q);if(p==="[object Date]"){return new Date(q.getTime())}var n,l,h,r,m;if(p==="[object Array]"){n=q.length;r=[];while(n--){r[n]=Ext.clone(q[n])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(m in q){r[m]=Ext.clone(q[m])}if(b){for(l=b.length;l--;){h=b[l];r[h]=q[h]}}}}return r||q},getUniqueGlobalNamespace:function(){var j=this.uniqueGlobalNamespace;if(j===undefined){var h=0;do{j="ExtBox"+(++h)}while(Ext.global[j]!==undefined);Ext.global[j]=Ext;this.uniqueGlobalNamespace=j}return j},functionFactory:function(){var h=Array.prototype.slice.call(arguments);if(h.length>0){h[h.length-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+h[h.length-1]}return Function.prototype.constructor.apply(Function.prototype,h)}});Ext.type=Ext.typeOf})();(function(){var a="4.0.7",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isLessThan:function(c){return b.compare(this.version,c)===-1},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;"},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){return d[g]})}})(),htmlDecode:(function(){var d={"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){if(g in d){return d[g]}else{return String.fromCharCode(parseInt(g.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.length<c){a=d+a}return a},format:function(b){var a=Ext.Array.toArray(arguments,1);return b.replace(Ext.String.formatRe,function(c,d){return a[d]})},repeat:function(e,d,b){for(var a=[],c=d;c--;){a.push(e)}return a.join(b||"")}};(function(){var a=(0.9).toFixed()!=="1";Ext.Number={constrain:function(d,c,b){d=parseFloat(d);if(!isNaN(c)){d=Math.max(d,c)}if(!isNaN(b)){d=Math.min(d,b)}return d},snap:function(e,c,d,h){var g=e,b;if(!(c&&e)){return e}b=e%c;if(b!==0){g-=b;if(b*2>=c){g+=c}else{if(b*2<-c){g-=c}}}return Ext.Number.constrain(g,d,h)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var g=Array.prototype,p=g.slice,r=function(){var B=[],e,A=20;if(!B.splice){return false}while(A--){B.push("A")}B.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=B.length;B.splice(13,0,"XXX");if(e+1!=B.length){return false}return true}(),j="forEach" in g,v="map" in g,q="indexOf" in g,z="every" in g,c="some" in g,d="filter" in g,n=function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}(),k=true,a;try{if(typeof document!=="undefined"){p.call(document.getElementsByTagName("body"))}}catch(t){k=false}function m(A,e){return(e<0)?Math.max(0,A.length+e):Math.min(A.length,e)}function y(H,G,A,K){var L=K?K.length:0,C=H.length,I=m(H,G);if(I===C){if(L){H.push.apply(H,K)}}else{var F=Math.min(A,C-I),J=I+F,B=J+L-F,e=C-J,D=C-F,E;if(B<J){for(E=0;E<e;++E){H[B+E]=H[J+E]}}else{if(B>J){for(E=e;E--;){H[B+E]=H[J+E]}}}if(L&&I===D){H.length=D;H.push.apply(H,K)}else{H.length=D+L;for(E=0;E<L;++E){H[I+E]=K[E]}}}return H}function i(C,e,B,A){if(A&&A.length){if(e<C.length){C.splice.apply(C,[e,B].concat(A))}else{C.push.apply(C,A)}}else{C.splice(e,B)}return C}function b(B,e,A){return y(B,e,A)}function s(B,e,A){B.splice(e,A);return B}function l(D,e,B){var C=m(D,e),A=D.slice(e,m(D,C+B));if(arguments.length<4){y(D,C,B)}else{y(D,C,B,p.call(arguments,3))}return A}function h(e){return e.splice.apply(e,p.call(arguments,1))}var x=r?s:b,u=r?i:y,w=r?h:l;a=Ext.Array={each:function(E,C,B,e){E=a.from(E);var A,D=E.length;if(e!==true){for(A=0;A<D;A++){if(C.call(B||E[A],E[A],A,E)===false){return A}}}else{for(A=D-1;A>-1;A--){if(C.call(B||E[A],E[A],A,E)===false){return A}}}return true},forEach:function(D,B,A){if(j){return D.forEach(B,A)}var e=0,C=D.length;for(;e<C;e++){B.call(A,D[e],e,D)}},indexOf:function(D,B,C){if(q){return D.indexOf(B,C)}var e,A=D.length;for(e=(C<0)?Math.max(0,A+C):C||0;e<A;e++){if(D[e]===B){return e}}return -1},contains:function(C,B){if(q){return C.indexOf(B)!==-1}var e,A;for(e=0,A=C.length;e<A;e++){if(C[e]===B){return true}}return false},toArray:function(B,D,e){if(!B||!B.length){return[]}if(typeof B==="string"){B=B.split("")}if(k){return p.call(B,D||0,e||B.length)}var C=[],A;D=D||0;e=e?((e<0)?B.length+e:e):B.length;for(A=D;A<e;A++){C.push(B[A])}return C},pluck:function(E,e){var A=[],B,D,C;for(B=0,D=E.length;B<D;B++){C=E[B];A.push(C[e])}return A},map:function(E,D,C){if(v){return E.map(D,C)}var B=[],A=0,e=E.length;for(;A<e;A++){B[A]=D.call(C,E[A],A,E)}return B},every:function(D,B,A){if(z){return D.every(B,A)}var e=0,C=D.length;for(;e<C;++e){if(!B.call(A,D[e],e,D)){return false}}return true},some:function(D,B,A){if(c){return D.some(B,A)}var e=0,C=D.length;for(;e<C;++e){if(B.call(A,D[e],e,D)){return true}}return false},clean:function(D){var A=[],e=0,C=D.length,B;for(;e<C;e++){B=D[e];if(!Ext.isEmpty(B)){A.push(B)}}return A},unique:function(D){var C=[],e=0,B=D.length,A;for(;e<B;e++){A=D[e];if(a.indexOf(C,A)===-1){C.push(A)}}return C},filter:function(E,C,B){if(d){return E.filter(C,B)}var A=[],e=0,D=E.length;for(;e<D;e++){if(C.call(B,E[e],e,E)){A.push(E[e])}}return A},from:function(A,e){if(A===undefined||A===null){return[]}if(Ext.isArray(A)){return(e)?p.call(A):A}if(A&&A.length!==undefined&&typeof A!=="string"){return Ext.toArray(A)}return[A]},remove:function(B,A){var e=a.indexOf(B,A);if(e!==-1){x(B,e,1)}return B},include:function(A,e){if(!a.contains(A,e)){A.push(e)}},clone:function(e){return p.call(e)},merge:function(){var e=p.call(arguments),C=[],A,B;for(A=0,B=e.length;A<B;A++){C=C.concat(e[A])}return a.unique(C)},intersect:function(){var B=[],e=p.call(arguments),F,D,C,H,I,L,K,J,A,E;if(!e.length){return B}for(F=L=0,J=e.length;F<J,I=e[F];F++){if(!H||I.length<H.length){H=I;L=F}}H=a.unique(H);x(e,L,1);for(F=0,J=H.length;F<J,L=H[F];F++){var G=0;for(D=0,A=e.length;D<A,I=e[D];D++){for(C=0,E=I.length;C<E,K=I[C];C++){if(L===K){G++;break}}}if(G===A){B.push(L)}}return B},difference:function(A,e){var F=p.call(A),D=F.length,C,B,E;for(C=0,E=e.length;C<E;C++){for(B=0;B<D;B++){if(F[B]===e[C]){x(F,B,1);B--;D--}}}return F},slice:([1,2].slice(1,undefined).length?function(B,A,e){return p.call(B,A,e)}:function(B,A,e){if(typeof A==="undefined"){return p.call(B)}if(typeof e==="undefined"){return p.call(B,A)}return p.call(B,A,e)}),sort:function(G,F){if(n){if(F){return G.sort(F)}else{return G.sort()}}var D=G.length,C=0,E,e,B,A;for(;C<D;C++){B=C;for(e=C+1;e<D;e++){if(F){E=F(G[e],G[B]);if(E<0){B=e}}else{if(G[e]<G[B]){B=e}}}if(B!==C){A=G[C];G[C]=G[B];G[B]=A}}return G},flatten:function(B){var A=[];function e(C){var E,F,D;for(E=0,F=C.length;E<F;E++){D=C[E];if(Ext.isArray(D)){e(D)}else{A.push(D)}}return A}return e(B)},min:function(E,D){var A=E[0],e,C,B;for(e=0,C=E.length;e<C;e++){B=E[e];if(D){if(D(A,B)===1){A=B}}else{if(B<A){A=B}}}return A},max:function(E,D){var e=E[0],A,C,B;for(A=0,C=E.length;A<C;A++){B=E[A];if(D){if(D(e,B)===-1){e=B}}else{if(B>e){e=B}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(D){var A=0,e,C,B;for(e=0,C=D.length;e<C;e++){B=D[e];A+=B}return A},erase:x,insert:function(B,A,e){return u(B,A,0,e)},replace:u,splice:w};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}})();Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||window,h)}},pass:function(c,a,b){if(a){a=Ext.Array.from(a)}return function(){return c.apply(b,a.concat(Ext.Array.toArray(arguments)))}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||window,g)!==false)?d.apply(h||window,g):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var g=this;setTimeout(function(){e.apply(g,arguments)},c)}},defer:function(d,c,e,b,a){d=Ext.Function.bind(d,e,b,a);if(c>0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}},createBuffered:function(d,a,c,b){return function(){var e;return function(){var g=this;if(e){clearTimeout(e);e=null}e=setTimeout(function(){d.apply(c||g,b||arguments)},a)}}()},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=Ext.Object={toQueryObjects:function(d,j,c){var b=a.toQueryObjects,h=[],e,g;if(Ext.isArray(j)){for(e=0,g=j.length;e<g;e++){if(c){h=h.concat(b(d+"["+e+"]",j[e],true))}else{h.push({name:d,value:j[e]})}}}else{if(Ext.isObject(j)){for(e in j){if(j.hasOwnProperty(e)){if(c){h=h.concat(b(d+"["+e+"]",j[e],true))}else{h.push({name:d,value:j[e]})}}}}else{h.push({name:d,value:j})}}return h},toQueryString:function(e,c){var g=[],d=[],k,h,l,b,m;for(k in e){if(e.hasOwnProperty(k)){g=g.concat(a.toQueryObjects(k,e[k],c))}}for(h=0,l=g.length;h<l;h++){b=g[h];m=b.value;if(Ext.isEmpty(m)){m=""}else{if(Ext.isDate(m)){m=Ext.Date.toString(m)}}d.push(encodeURIComponent(b.name)+"="+encodeURIComponent(String(m)))}return d.join("&")},fromQueryString:function(c,r){var l=c.replace(/^\?/,"").split("&"),u={},s,h,w,m,q,e,n,p,b,g,t,k,v,d;for(q=0,e=l.length;q<e;q++){n=l[q];if(n.length>0){h=n.split("=");w=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(m)}else{u[w]=m}}else{g=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];k=[];if(g===null){u[w]=m;continue}for(p=0,b=g.length;p<b;p++){v=g[p];v=(v.length===2)?"":v.substring(1,v.length-1);k.push(v)}k.unshift(w);s=u;for(p=0,b=k.length;p<b;p++){v=k[p];if(p===b-1){if(Ext.isArray(s)&&v===""){s.push(m)}else{s[v]=m}}else{if(s[v]===undefined||typeof s[v]==="string"){d=k[p+1];s[v]=(Ext.isNumeric(d)||d==="")?[]:{}}s=s[v]}}}}}return u},each:function(b,d,c){for(var e in b){if(b.hasOwnProperty(e)){if(d.call(c||b,e,b[e],b)===false){return}}}},merge:function(j,d,h){if(typeof d==="string"){if(h&&h.constructor===Object){if(j[d]&&j[d].constructor===Object){a.merge(j[d],h)}else{j[d]=Ext.clone(h)}}else{j[d]=h}return j}var c=1,e=arguments.length,b,g;for(;c<e;c++){b=arguments[c];for(g in b){if(b.hasOwnProperty(g)){a.merge(j,g,b[g])}}}return j},getKey:function(b,d){for(var c in b){if(b.hasOwnProperty(c)&&b[c]===d){return c}}return null},getValues:function(c){var b=[],d;for(d in c){if(c.hasOwnProperty(d)){b.push(c[d])}}return b},getKeys:("keys" in Object.prototype)?Object.keys:function(b){var c=[],d;for(d in b){if(b.hasOwnProperty(d)){c.push(d)}}return c},getSize:function(b){var c=0,d;for(d in b){if(b.hasOwnProperty(d)){c++}}return c}};Ext.merge=Ext.Object.merge;Ext.urlEncode=function(){var b=Ext.Array.from(arguments),c="";if((typeof b[1]==="string")){c=b[1]+"&";b[1]=false}return c+Ext.Object.toQueryString.apply(Ext.Object,b)};Ext.urlDecode=function(){return Ext.Object.fromQueryString.apply(Ext.Object,arguments)}})();(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Ext.Date={now:Date.now||function(){return +new Date()},toString:function(c){var d=Ext.String.leftPad;return c.getFullYear()+"-"+d(c.getMonth()+1,2,"0")+"-"+d(c.getDate(),2,"0")+"T"+d(c.getHours(),2,"0")+":"+d(c.getMinutes(),2,"0")+":"+d(c.getSeconds(),2,"0")},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatContainsDateInfo:(function(){var d=/(\\.)/g,c=/([djzmnYycU]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":a.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(p,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=a.add(new Date(p<100?100:p,c-1,n,k,g,j,e),a.YEAR,p<100?p-100:0);return p==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parse:function(d,g,c){var e=a.parseFunctions;if(e[g]==null){a.createParser(g)}return e[g](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+Ext.String.escape(e)+"'")}else{g.push(a.getFormatCode(e))}}}a.formatFunctions[h]=Ext.functionFactory("return "+g.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=a.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j<m.length;++j){d=m.charAt(j);if(!k&&d=="\\"){k=true}else{if(k){k=false;l.push(Ext.String.escape(d))}else{var h=a.formatCodeToRegex(d,n);n+=h.g;l.push(h.s);if(h.g&&h.c){g.push(h.c)}}}}a.parseRegexes[e]=new RegExp("^"+l.join("")+"$","i");a.parseFunctions[m]=Ext.functionFactory("input","strict",b(c,e,g.join("")))}})(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},format:function(d,e){if(a.formatFunctions[e]==null){a.createFormat(e)}var c=a.formatFunctions[e].call(d);return c+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h<c;j.setMonth(++h)){e+=a.getDaysInMonth(j)}return e+g.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(g){var h=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate()+3)/c,e=Math.floor(h/7),i=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/d)+1}})(),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}})(),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,j){if(j){return Ext.Date.clearTime(Ext.Date.clone(e))}var h=e.getDate();e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=h){for(var g=1,i=a.add(e,Ext.Date.HOUR,g);i.getDate()!=h;g++,i=a.add(e,Ext.Date.HOUR,g)){}e.setDate(h);e.setHours(i.getHours())}return e},add:function(h,g,i){var j=Ext.Date.clone(h),c=Ext.Date;if(!g||i===0){return j}switch(g.toLowerCase()){case Ext.Date.MILLI:j.setMilliseconds(j.getMilliseconds()+i);break;case Ext.Date.SECOND:j.setSeconds(j.getSeconds()+i);break;case Ext.Date.MINUTE:j.setMinutes(j.getMinutes()+i);break;case Ext.Date.HOUR:j.setHours(j.getHours()+i);break;case Ext.Date.DAY:j.setDate(j.getDate()+i);break;case Ext.Date.MONTH:var e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),"mo",i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var g=window.Date,e,c,h=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],d=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"];Ext.Array.forEach(h,function(i){g[i]=a[i]});Ext.Array.forEach(d,function(i){g.prototype[i]=function(){var j=Array.prototype.slice.call(arguments);j.unshift(this);return a[i].apply(a,j)}})}};var a=Ext.Date})();(function(a){var b=Ext.Base=function(){};b.prototype={$className:"Ext.Base",$class:b,self:b,constructor:function(){return this},initConfig:function(c){if(!this.$configInited){this.config=Ext.Object.merge({},this.config||{},c||{});this.applyConfig(this.config);this.$configInited=true}return this},setConfig:function(c){this.applyConfig(c||{});return this},applyConfig:a(function(c,d){var e="set"+Ext.String.capitalize(c);if(typeof this[e]==="function"){this[e].call(this,d)}return this}),callParent:function(d){var g=this.callParent.caller,e,c;if(!g.$owner){g=g.caller}e=g.$owner.superclass;c=g.$name;return e[c].apply(this,d||[])},statics:function(){var d=this.statics.caller,c=this.self;if(!d){return c}return d.$owner},callOverridden:function(c){var d=this.callOverridden.caller;return d.$previous.apply(this,c||[])},destroy:function(){}};Ext.apply(Ext.Base,{create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},own:function(c,d){if(typeof d=="function"){this.ownMethod(c,d)}else{this.prototype[c]=d}},ownMethod:function(c,d){var e;if(typeof d.$owner!=="undefined"&&d!==Ext.emptyFn){e=d;d=function(){return e.apply(this,arguments)}}d.$owner=this;d.$name=c;this.prototype[c]=d},addStatics:function(c){for(var d in c){if(c.hasOwnProperty(d)){this[d]=c[d]}}return this},addInheritableStatics:function(d){var h,c,g=this.prototype,e,i;h=g.$inheritableStatics;c=g.$hasInheritableStatics;if(!h){h=g.$inheritableStatics=[];c=g.$hasInheritableStatics={}}for(e in d){if(d.hasOwnProperty(e)){i=d[e];this[e]=i;if(!c[e]){c[e]=true;h.push(e)}}}return this},implement:function(d){var g=this.prototype,c=Ext.enumerables,e,h,j;for(e in d){if(d.hasOwnProperty(e)){j=d[e];if(typeof j==="function"){j.$owner=this;j.$name=e}g[e]=j}}if(c){for(h=c.length;h--;){e=c[h];if(d.hasOwnProperty(e)){j=d[e];j.$owner=this;j.$name=e;g[e]=j}}}},borrow:function(h,d){var c=h.prototype,e,g,j;d=Ext.Array.from(d);for(e=0,g=d.length;e<g;e++){j=d[e];this.own(j,c[j])}return this},override:function(d){var g=this.prototype,c=Ext.enumerables,e,h,k,j;if(arguments.length===2){e=d;k=arguments[1];if(typeof k=="function"){if(typeof g[e]=="function"){j=g[e];k.$previous=j}this.ownMethod(e,k)}else{g[e]=k}return this}for(e in d){if(d.hasOwnProperty(e)){k=d[e];if(typeof k==="function"){if(typeof g[e]==="function"){j=g[e];k.$previous=j}this.ownMethod(e,k)}else{g[e]=k}}}if(c){for(h=c.length;h--;){e=c[h];if(d.hasOwnProperty(e)){if(typeof g[e]!=="undefined"){j=g[e];d[e].$previous=j}this.ownMethod(e,d[e])}}}return this},mixin:function(e,c){var d=c.prototype,i=this.prototype,g,h;for(g in d){if(d.hasOwnProperty(g)){if(typeof i[g]==="undefined"&&g!=="mixins"&&g!=="mixinId"){if(typeof d[g]==="function"){h=d[g];if(typeof h.$owner==="undefined"){this.ownMethod(g,h)}else{i[g]=h}}else{i[g]=d[g]}}else{if(g==="config"&&i.config&&d.config){Ext.Object.merge(i.config,d.config)}}}}if(typeof d.onClassMixedIn!=="undefined"){d.onClassMixedIn.call(c,this)}if(!i.hasOwnProperty("mixins")){if("mixins" in i){i.mixins=Ext.Object.merge({},i.mixins)}else{i.mixins={}}}i.mixins[e]=d},getName:function(){return Ext.getClassName(this)},createAlias:a(function(d,c){this.prototype[d]=function(){return this[c].apply(this,arguments)}})})})(Ext.Function.flexSetter);(function(){var c,d=Ext.Base,b=[],a;for(a in d){if(d.hasOwnProperty(a)){b.push(a)}}Ext.Class=c=function(m,t,r){if(typeof m!="function"){r=t;t=m;m=function(){return this.constructor.apply(this,arguments)}}if(!t){t={}}var g=t.preprocessors||c.getDefaultPreprocessors(),n=c.getPreprocessors(),l=0,q=[],u,s,e,k,h,p;for(k=0,p=b.length;k<p;k++){s=b[k];m[s]=d[s]}delete t.preprocessors;for(h=0,p=g.length;h<p;h++){u=g[h];if(typeof u=="string"){u=n[u];if(!u.always){if(t.hasOwnProperty(u.name)){q.push(u.fn)}}else{q.push(u.fn)}}else{q.push(u)}}t.onClassCreated=r||Ext.emptyFn;t.onBeforeClassCreated=function(i,j){r=j.onClassCreated;delete j.onBeforeClassCreated;delete j.onClassCreated;i.implement(j);r.call(i,i)};e=function(i,j){u=q[l++];if(!u){j.onBeforeClassCreated.apply(this,arguments);return}if(u.call(this,i,j,e)!==false){e.apply(this,arguments)}};e.call(c,m,t);return m};Ext.apply(c,{preprocessors:{},registerPreprocessor:function(g,h,e){this.preprocessors[g]={name:g,always:e||false,fn:h};return this},getPreprocessor:function(e){return this.preprocessors[e]},getPreprocessors:function(){return this.preprocessors},getDefaultPreprocessors:function(){return this.defaultPreprocessors||[]},setDefaultPreprocessors:function(e){this.defaultPreprocessors=Ext.Array.from(e);return this},setDefaultPreprocessorPosition:function(h,j,i){var e=this.defaultPreprocessors,g;if(typeof j=="string"){if(j==="first"){e.unshift(h);return this}else{if(j==="last"){e.push(h);return this}}j=(j==="after")?1:-1}g=Ext.Array.indexOf(e,i);if(g!==-1){Ext.Array.splice(e,Math.max(0,g+j),0,h)}return this}});c.registerPreprocessor("extend",function(v,j){var q=j.extend,e=Ext.Base,n=e.prototype,s=function(){},t,l,h,p,u,g,r,m;if(q&&q!==Object){t=q}else{t=e}r=t.prototype;s.prototype=r;m=v.prototype=new s();if(!("$class" in t)){for(l in n){if(!r[l]){r[l]=n[l]}}}m.self=v;v.superclass=m.superclass=r;delete j.extend;g=r.$inheritableStatics;if(g){for(h=0,p=g.length;h<p;h++){u=g[h];if(!v.hasOwnProperty(u)){v[u]=t[u]}}}if(r.config){m.config=Ext.Object.merge({},r.config)}else{m.config={}}if(m.$onExtended){m.$onExtended.call(v,v,j)}if(j.onClassExtended){m.$onExtended=j.onClassExtended;delete j.onClassExtended}},true);c.registerPreprocessor("statics",function(e,g){e.addStatics(g.statics);delete g.statics});c.registerPreprocessor("inheritableStatics",function(e,g){e.addInheritableStatics(g.inheritableStatics);delete g.inheritableStatics});c.registerPreprocessor("config",function(e,h){var g=e.prototype;Ext.Object.each(h.config,function(m){var j=m.charAt(0).toUpperCase()+m.substr(1),k=m,l="apply"+j,n="set"+j,i="get"+j;if(!(l in g)&&!h.hasOwnProperty(l)){h[l]=function(p){return p}}if(!(n in g)&&!h.hasOwnProperty(n)){h[n]=function(q){var p=this[l].call(this,q,this[k]);if(typeof p!="undefined"){this[k]=p}return this}}if(!(i in g)&&!h.hasOwnProperty(i)){h[i]=function(){return this[k]}}});Ext.Object.merge(g.config,h.config);delete h.config});c.registerPreprocessor("mixins",function(g,m){var e=m.mixins,j,h,k,l;delete m.mixins;Ext.Function.interceptBefore(m,"onClassCreated",function(i){if(e instanceof Array){for(k=0,l=e.length;k<l;k++){h=e[k];j=h.prototype.mixinId||h.$className;i.mixin(j,h)}}else{for(j in e){if(e.hasOwnProperty(j)){i.mixin(j,e[j])}}}})});c.setDefaultPreprocessors(["extend","statics","inheritableStatics","config","mixins"]);Ext.extend=function(g,i,h){if(arguments.length===2&&Ext.isObject(i)){h=i;i=g;g=null}var e;if(!i){Ext.Error.raise("Attempting to extend from a class which has not been loaded on the page.")}h.extend=i;h.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(g){e=new c(g,h)}else{e=new c(h)}e.prototype.override=function(k){for(var j in k){if(k.hasOwnProperty(j)){this[j]=k[j]}}};return e}})();(function(b,c){var e=Array.prototype.slice;var a=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(k){var j,l,h,g,m;if(this.classes.hasOwnProperty(k)||this.existCache.hasOwnProperty(k)){return true}g=Ext.global;m=this.parseNamespace(k);for(j=0,l=m.length;j<l;j++){h=m[j];if(typeof h!=="string"){g=h}else{if(!g||!g[h]){return false}g=g[h]}}Ext.Loader.historyPush(k);this.existCache[k]=true;return true},parseNamespace:function(h){var g=this.namespaceParseCache;if(this.enableNamespaceParseCache){if(g.hasOwnProperty(h)){return g[h]}}var j=[],l=this.namespaceRewrites,r,p,q,k,m,n=Ext.global;for(k=0,m=l.length;k<m;k++){r=l[k];p=r.from;q=r.to;if(h===p||h.substring(0,p.length)===p){h=h.substring(p.length);if(typeof q!=="string"){n=q}else{j=j.concat(q.split("."))}break}}j.push(n);j=j.concat(h.split("."));if(this.enableNamespaceParseCache){g[h]=j}return j},setNamespace:function(k,n){var h=Ext.global,p=this.parseNamespace(k),m=p.length-1,g=p[m],l,j;for(l=0;l<m;l++){j=p[l];if(typeof j!=="string"){h=j}else{if(!h[j]){h[j]={}}h=h[j]}}h[g]=n;return h[g]},createNamespaces:function(){var g=Ext.global,n,k,l,h,m,p;for(l=0,m=arguments.length;l<m;l++){n=this.parseNamespace(arguments[l]);for(h=0,p=n.length;h<p;h++){k=n[h];if(typeof k!=="string"){g=k}else{if(!g[k]){g[k]={}}g=g[k]}}}return g},set:function(g,i){var h=this.getName(i);this.classes[g]=this.setNamespace(g,i);if(h&&h!==g){this.maps.alternateToName[g]=h}return this},get:function(j){if(this.classes.hasOwnProperty(j)){return this.classes[j]}var g=Ext.global,m=this.parseNamespace(j),h,k,l;for(k=0,l=m.length;k<l;k++){h=m[k];if(typeof h!=="string"){g=h}else{if(!g||!g[h]){return null}g=g[h]}}return g},setAlias:function(g,h){var j=this.maps.aliasToName,k=this.maps.nameToAliases,i;if(typeof g==="string"){i=g}else{i=this.getName(g)}if(h&&j[h]!==i){j[h]=i}if(!k[i]){k[i]=[]}if(h){Ext.Array.include(k[i],h)}return this},getByAlias:function(g){return this.get(this.getNameByAlias(g))},getNameByAlias:function(g){return this.maps.aliasToName[g]||""},getNameByAlternate:function(g){return this.maps.alternateToName[g]||""},getAliasesByName:function(g){return this.maps.nameToAliases[g]||[]},getName:function(g){return g&&g.$className||""},getClass:function(g){return g&&g.self||null},create:function(i,j,g){var h=this;j.$className=i;return new b(j,function(){var s=j.postprocessors||h.defaultPostprocessors,r=h.postprocessors,m=0,l=[],k,q,n,p;delete j.postprocessors;for(n=0,p=s.length;n<p;n++){k=s[n];if(typeof k==="string"){k=r[k];if(!k.always){if(j[k.name]!==undefined){l.push(k.fn)}}else{l.push(k.fn)}}else{l.push(k)}}q=function(u,t,v){k=l[m++];if(!k){h.set(i,t);Ext.Loader.historyPush(i);if(g){g.call(t,t)}return}if(k.call(this,u,t,v,q)!==false){q.apply(this,arguments)}};q.call(h,i,this,j)})},instantiateByAlias:function(){var h=arguments[0],g=e.call(arguments),i=this.getNameByAlias(h);if(!i){i=this.maps.aliasToName[h];Ext.syncRequire(i)}g[0]=i;return this.instantiate.apply(this,g)},instantiate:function(){var i=arguments[0],h=e.call(arguments,1),j=i,k,g;if(typeof i!=="function"){g=this.get(i)}else{g=i}if(!g){k=this.getNameByAlias(i);if(k){i=k;g=this.get(i)}}if(!g){k=this.getNameByAlternate(i);if(k){i=k;g=this.get(i)}}if(!g){Ext.syncRequire(i);g=this.get(i)}return this.getInstantiator(h.length)(g,h)},dynInstantiate:function(h,g){g=Ext.Array.from(g,true);g.unshift(h);return this.instantiate.apply(this,g)},getInstantiator:function(j){if(!this.instantiators[j]){var h=j,g=[];for(h=0;h<j;h++){g.push("a["+h+"]")}this.instantiators[j]=new Function("c","a","return new c("+g.join(",")+")")}return this.instantiators[j]},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(h,i,g){this.postprocessors[h]={name:h,always:g||false,fn:i};return this},setDefaultPostprocessors:function(g){this.defaultPostprocessors=Ext.Array.from(g);return this},setDefaultPostprocessorPosition:function(h,k,j){var i=this.defaultPostprocessors,g;if(typeof k==="string"){if(k==="first"){i.unshift(h);return this}else{if(k==="last"){i.push(h);return this}}k=(k==="after")?1:-1}g=Ext.Array.indexOf(i,j);if(g!==-1){Ext.Array.splice(i,Math.max(0,g+k),0,h)}return this},getNamesByExpression:function(p){var m=this.maps.nameToAliases,q=[],g,l,j,h,r,k,n;if(p.indexOf("*")!==-1){p=p.replace(/\*/g,"(.*?)");r=new RegExp("^"+p+"$");for(g in m){if(m.hasOwnProperty(g)){j=m[g];if(g.search(r)!==-1){q.push(g)}else{for(k=0,n=j.length;k<n;k++){l=j[k];if(l.search(r)!==-1){q.push(g);break}}}}}}else{h=this.getNameByAlias(p);if(h){q.push(h)}else{h=this.getNameByAlternate(p);if(h){q.push(h)}else{q.push(p)}}}return q}};var d=a.defaultPostprocessors;a.registerPostprocessor("alias",function(j,h,m){var g=m.alias,k,l;delete m.alias;for(k=0,l=g.length;k<l;k++){c=g[k];this.setAlias(h,c)}});a.registerPostprocessor("singleton",function(h,g,j,i){i.call(this,h,new g(),j);return false});a.registerPostprocessor("alternateClassName",function(h,g,m){var k=m.alternateClassName,j,l,n;if(!(k instanceof Array)){k=[k]}for(j=0,l=k.length;j<l;j++){n=k[j];this.set(n,g)}});a.setDefaultPostprocessors(["alias","singleton","alternateClassName"]);Ext.apply(Ext,{create:c(a,"instantiate"),factory:function(n,l){if(n instanceof Array){var k,m;for(k=0,m=n.length;k<m;k++){n[k]=Ext.factory(n[k],l)}return n}var g=(typeof n==="string");if(g||(n instanceof Object&&n.constructor===Object)){var j,h={};if(g){j=n}else{j=n.className;h=n;delete h.className}if(l!==undefined&&j.indexOf(l)===-1){j=l+"."+Ext.String.capitalize(j)}return Ext.create(j,h)}if(typeof n==="function"){return Ext.create(n)}return n},widget:function(h){var g=e.call(arguments);g[0]="widget."+h;return a.instantiateByAlias.apply(a,g)},createByAlias:c(a,"instantiateByAlias"),define:function(k,l,i){if(!l.override){return a.create.apply(a,arguments)}var j=l.requires,h=l.uses,g=k;k=l.override;l=Ext.apply({},l);delete l.requires;delete l.uses;delete l.override;if(typeof j=="string"){j=[k,j]}else{if(j){j=j.slice(0);j.unshift(k)}else{j=[k]}}return a.create(g,{requires:j,uses:h,isPartial:true,constructor:function(){}},function(){var m=a.get(k);if(m.override){m.override(l)}else{m.self.override(l)}if(i){i.call(m)}})},getClassName:c(a,"getName"),getDisplayName:function(g){if(g.displayName){return g.displayName}if(g.$name&&g.$class){return Ext.getClassName(g.$class)+"#"+g.$name}if(g.$className){return g.$className}return"Anonymous"},getClass:c(a,"getClass"),namespace:c(a,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;b.registerPreprocessor("className",function(g,h){if(h.$className){g.$className=h.$className}},true);b.setDefaultPreprocessorPosition("className","first");b.registerPreprocessor("xtype",function(h,n){var m=Ext.Array.from(n.xtype),j="widget.",g=Ext.Array.from(n.alias),k,l,p;n.xtype=m[0];n.xtypes=m;g=n.alias=Ext.Array.from(n.alias);for(k=0,l=m.length;k<l;k++){p=m[k];g.push(j+p)}n.alias=g});b.setDefaultPreprocessorPosition("xtype","last");b.registerPreprocessor("alias",function(q,k){var g=Ext.Array.from(k.alias),j=Ext.Array.from(k.xtypes),r="widget.",p=r.length,l,n,m,h;for(l=0,n=g.length;l<n;l++){m=g[l];if(m.substring(0,p)===r){h=m.substring(p);Ext.Array.include(j,h);if(!q.xtype){q.xtype=k.xtype=h}}}k.alias=g;k.xtypes=j});b.setDefaultPreprocessorPosition("alias","last")})(Ext.Class,Ext.Function.alias);(function(c,b,a,e){var d=["extend","mixins","requires"],g;g=Ext.Loader={documentHead:typeof document!=="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},history:[],config:{enabled:false,disableCaching:true,disableCachingParam:"_dc",paths:{Ext:"."}},setConfig:function(h,i){if(Ext.isObject(h)&&arguments.length===1){Ext.Object.merge(this.config,h)}else{this.config[h]=(Ext.isObject(i))?Ext.Object.merge(this.config[h],i):i}return this},getConfig:function(h){if(h){return this.config[h]}return this.config},setPath:a(function(h,i){this.config.paths[h]=i;return this}),getPath:function(h){var j="",k=this.config.paths,i=this.getPrefix(h);if(i.length>0){if(i===h){return k[i]}j=k[i];h=h.substring(i.length+1)}if(j.length>0){j+="/"}return j.replace(/\/\.\//g,"/")+h.replace(/\./g,"/")+".js"},getPrefix:function(i){var k=this.config.paths,j,h="";if(k.hasOwnProperty(i)){return i}for(j in k){if(k.hasOwnProperty(j)&&j+"."===i.substring(0,j.length+1)){if(j.length>h.length){h=j}}}return h},refreshQueue:function(){var n=this.queue.length,k,m,h,l;if(n===0){this.triggerReady();return}for(k=0;k<n;k++){m=this.queue[k];if(m){l=m.requires;if(l.length>this.numLoadedFiles){continue}h=0;do{if(c.isCreated(l[h])){Ext.Array.erase(l,h,1)}else{h++}}while(h<l.length);if(m.requires.length===0){Ext.Array.erase(this.queue,k,1);m.callback.call(m.scope);this.refreshQueue();break}}}return this},injectScriptElement:function(j,l,n,k){var i=document.createElement("script"),m=this,h=function(){m.cleanupScriptElement(i);l.call(k)},p=function(){m.cleanupScriptElement(i);n.call(k)};i.type="text/javascript";i.src=j;i.onload=h;i.onerror=p;i.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){h()}};this.documentHead.appendChild(i);return i},cleanupScriptElement:function(h){h.onload=null;h.onreadystatechange=null;h.onerror=null;return this},loadScriptFile:function(i,q,m,t,h){var p=this,u=i+(this.getConfig("disableCaching")?("?"+this.getConfig("disableCachingParam")+"="+Ext.Date.now()):""),l=i.split("/").pop(),j=false,s,k,r;t=t||this;this.isLoading=true;if(!h){r=function(){m.call(t,"Failed loading '"+i+"', please verify that the file exists",h)};if(!Ext.isReady&&Ext.onDocumentReady){Ext.onDocumentReady(function(){p.injectScriptElement(u,q,r,t)})}else{this.injectScriptElement(u,q,r,t)}}else{if(typeof XMLHttpRequest!=="undefined"){s=new XMLHttpRequest()}else{s=new ActiveXObject("Microsoft.XMLHTTP")}try{s.open("GET",u,false);s.send(null)}catch(n){j=true}k=(s.status===1223)?204:s.status;if(!j){j=(k===0)}if(j){m.call(this,"Failed loading synchronously via XHR: '"+i+"'; It's likely that the file is either being loaded from a different domain or from the local file system whereby cross origin requests are not allowed due to security reasons. Use asynchronous loading with Ext.require instead.",h)}else{if(k>=200&&k<300){new Function(s.responseText+"\n//@ sourceURL="+l)();q.call(t)}else{m.call(this,"Failed loading synchronously via XHR: '"+i+"'; please verify that the file exists. XHR status code: "+k,h)}}s=null}},exclude:function(i){var h=this;return{require:function(l,k,j){return h.require(l,k,j,i)},syncRequire:function(l,k,j){return h.syncRequire(l,k,j,i)}}},syncRequire:function(){this.syncModeEnabled=true;this.require.apply(this,arguments);this.refreshQueue();this.syncModeEnabled=false},require:function(s,y,A,z){var n,w,k,x,u={},l=[],m=[],r,h=[],q,p,v,t;s=Ext.Array.from(s);z=Ext.Array.from(z);y=y||Ext.emptyFn;A=A||Ext.global;for(q=0,v=z.length;q<v;q++){k=z[q];if(typeof k==="string"&&k.length>0){l=c.getNamesByExpression(k);for(p=0,t=l.length;p<t;p++){u[l[p]]=true}}}for(q=0,v=s.length;q<v;q++){w=s[q];if(typeof w==="string"&&w.length>0){m=c.getNamesByExpression(w);for(p=0,t=m.length;p<t;p++){r=m[p];if(!u.hasOwnProperty(r)&&!c.isCreated(r)){Ext.Array.include(h,r)}}}}if(!this.config.enabled){if(h.length>0){Ext.Error.raise({sourceClass:"Ext.Loader",sourceMethod:"require",msg:"Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((h.length>1)?"es":"")+": "+h.join(", ")})}}if(h.length===0){y.call(A);return this}this.queue.push({requires:h,callback:y,scope:A});h=h.slice();for(q=0,v=h.length;q<v;q++){x=h[q];if(!this.isFileLoaded.hasOwnProperty(x)){this.isFileLoaded[x]=false;n=this.getPath(x);this.classNameToFilePathMap[x]=n;this.numPendingFiles++;this.loadScriptFile(n,Ext.Function.pass(this.onFileLoaded,[x,n],this),Ext.Function.pass(this.onFileLoadError,[x,n]),this,this.syncModeEnabled)}}return this},onFileLoaded:function(i,h){this.numLoadedFiles++;this.isFileLoaded[i]=true;this.numPendingFiles--;if(this.numPendingFiles===0){this.refreshQueue()}},onFileLoadError:function(j,i,h,k){this.numPendingFiles--;this.hasFileLoadError=true},addOptionalRequires:function(k){var m=this.optionalRequires,j,l,h;k=Ext.Array.from(k);for(j=0,l=k.length;j<l;j++){h=k[j];Ext.Array.include(m,h)}return this},triggerReady:function(i){var k=this.readyListeners,j,h;if(this.isLoading||i){this.isLoading=false;if(this.optionalRequires.length){j=Ext.Array.clone(this.optionalRequires);this.optionalRequires.length=0;this.require(j,Ext.Function.pass(this.triggerReady,[true],this),this);return this}while(k.length){h=k.shift();h.fn.call(h.scope);if(this.isLoading){return this}}}return this},onReady:function(k,j,l,h){var i;if(l!==false&&Ext.onDocumentReady){i=k;k=function(){Ext.onDocumentReady(i,j,h)}}if(!this.isLoading){k.call(j)}else{this.readyListeners.push({fn:k,scope:j})}},historyPush:function(h){if(h&&this.isFileLoaded.hasOwnProperty(h)){Ext.Array.include(this.history,h)}return this}};Ext.require=e(g,"require");Ext.syncRequire=e(g,"syncRequire");Ext.exclude=e(g,"exclude");Ext.onReady=function(j,i,h){g.onReady(j,i,true,h)};b.registerPreprocessor("loader",function(w,l,v){var t=this,r=[],s=c.getName(w),m,k,q,p,u,n,h;for(m=0,q=d.length;m<q;m++){n=d[m];if(l.hasOwnProperty(n)){h=l[n];if(typeof h==="string"){r.push(h)}else{if(h instanceof Array){for(k=0,p=h.length;k<p;k++){u=h[k];if(typeof u==="string"){r.push(u)}}}else{if(typeof h!="function"){for(k in h){if(h.hasOwnProperty(k)){u=h[k];if(typeof u==="string"){r.push(u)}}}}}}}}if(r.length===0){return}g.require(r,function(){for(m=0,q=d.length;m<q;m++){n=d[m];if(l.hasOwnProperty(n)){h=l[n];if(typeof h==="string"){l[n]=c.get(h)}else{if(h instanceof Array){for(k=0,p=h.length;k<p;k++){u=h[k];if(typeof u==="string"){l[n][k]=c.get(u)}}}else{if(typeof h!="function"){for(var i in h){if(h.hasOwnProperty(i)){u=h[i];if(typeof u==="string"){l[n][i]=c.get(u)}}}}}}}}v.call(t,w,l)});return false},true);b.setDefaultPreprocessorPosition("loader","after","className");c.registerPostprocessor("uses",function(l,j,q){var h=Ext.Array.from(q.uses),k=[],m,p,n;for(m=0,p=h.length;m<p;m++){n=h[m];if(typeof n==="string"){k.push(n)}}g.addOptionalRequires(k)});c.setDefaultPostprocessorPosition("uses","last")})(Ext.ClassManager,Ext.Class,Ext.Function.flexSetter,Ext.Function.alias);Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){var b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.className?c.className:"",a=c.methodName?"."+c.methodName+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(doEncode(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(doEncode(i),":",doEncode(o[i]),",")}}a[a.length-1]="}";return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json,safe){if(!dc){dc=isNative()?JSON.parse:doDecode}try{return dc(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}}()})();Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){if(!b.uniqueGlobalNamespace){b.getUniqueGlobalNamespace()}d=b.uniqueGlobalNamespace+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},getBody:function(){return Ext.get(document.body||false)},getHead:function(){var a;return function(){if(a==undefined){a=Ext.get(document.getElementsByTagName("head")[0])}return a}}(),getDoc:function(){return Ext.get(document)},getCmp:function(a){return Ext.ComponentManager.get(a)},getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){if(!Ext.isEmpty(b)){return a+(a.indexOf("?")===-1?"?":"&")+b}return a}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var m=function(e){return e.test(Ext.userAgent)},r=document.compatMode=="CSS1Compat",D=function(P,O){var e;return(P&&(e=O.exec(Ext.userAgent)))?parseFloat(e[1]):0},n=document.documentMode,a=m(/opera/),t=a&&m(/version\/10\.5/),I=m(/\bchrome\b/),x=m(/webkit/),c=!I&&m(/safari/),G=c&&m(/applewebkit\/4/),E=c&&m(/version\/3/),B=c&&m(/version\/4/),A=c&&m(/version\/5/),i=!a&&m(/msie/),H=i&&(m(/msie 7/)||n==7),F=i&&(m(/msie 8/)&&n!=7&&n!=9||n==8),C=i&&(m(/msie 9/)&&n!=7&&n!=8||n==9),K=i&&m(/msie 6/),b=!x&&m(/gecko/),N=b&&m(/rv:1\.9/),M=b&&m(/rv:2\.0/),L=b&&m(/rv:5\./),w=N&&m(/rv:1\.9\.0/),u=N&&m(/rv:1\.9\.1/),s=N&&m(/rv:1\.9\.2/),g=m(/windows|win32/),z=m(/macintosh|mac os x/),v=m(/linux/),j=null,k=D(true,/\bchrome\/(\d+\.\d+)/),h=D(true,/\bfirefox\/(\d+\.\d+)/),l=D(i,/msie (\d+\.\d+)/),q=D(a,/version\/(\d+\.\d+)/),d=D(c,/version\/(\d+\.\d+)/),y=D(x,/webkit\/(\d+\.\d+)/),p=/^https/i.test(window.location.protocol);try{document.execCommand("BackgroundImageCache",false,true)}catch(J){}Ext.setVersion("extjs","4.0.7");Ext.apply(Ext,{SSL_SECURE_URL:p&&i?'javascript:""':"about:blank",scopeResetCSS:Ext.buildSettings.scopeResetCSS,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(P,O){if(!P||!document){return null}if(P.dom){return P.dom}else{if(typeof P=="string"){var Q=document.getElementById(P);if(Q&&i&&O){if(P==Q.getAttribute("id")){return Q}else{return null}}return Q}else{return P}}},removeNode:K||H?function(){var e;return function(O){if(O&&O.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(O):Ext.EventManager.removeAll(O);e=e||document.createElement("div");e.appendChild(O);e.innerHTML="";delete Ext.cache[O.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.cache[e.id]}},isStrict:r,isIEQuirks:i&&!r,isOpera:a,isOpera10_5:t,isWebKit:x,isChrome:I,isSafari:c,isSafari3:E,isSafari4:B,isSafari5:A,isSafari2:G,isIE:i,isIE6:K,isIE7:H,isIE8:F,isIE9:C,isGecko:b,isGecko3:N,isGecko4:M,isGecko5:L,isFF3_0:w,isFF3_5:u,isFF3_6:s,isFF4:4<=h&&h<5,isFF5:5<=h&&h<6,isLinux:v,isWindows:g,isMac:z,chromeVersion:k,firefoxVersion:h,ieVersion:l,operaVersion:q,safariVersion:d,webKitVersion:y,isSecure:p,BLANK_IMAGE_URL:(K||H)?"//www.sencha.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",value:function(P,e,O){return Ext.isEmpty(P,O)?e:P},escapeRe:function(e){return e.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},addBehaviors:function(R){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(R)})}else{var O={},Q,e,P;for(e in R){if((Q=e.split("@"))[1]){P=Q[0];if(!O[P]){O[P]=Ext.select(P)}O[P].on(Q[1],R[e])}}O=null}},getScrollbarSize:function(R){if(!Ext.isReady){return 0}if(R===true||j===null){var P=Ext.isIE9?"":Ext.baseCSSPrefix+"hide-offsets",T=Ext.getBody().createChild('<div class="'+P+'" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),S=T.child("div",true),O=S.offsetWidth;T.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var e=S.offsetWidth,Q=O-e;T.remove();j={width:Q,height:Q}}return j},getScrollBarWidth:function(O){var e=Ext.getScrollbarSize(O);return e.width+2},copyTo:function(e,O,Q,P){if(typeof Q=="string"){Q=Q.split(/[,;\s]/)}Ext.each(Q,function(R){if(P||O.hasOwnProperty(R)){e[R]=O[R]}},this);return e},destroyMembers:function(Q){for(var P=1,O=arguments,e=O.length;P<e;P++){Ext.destroy(Q[O[P]]);delete Q[O[P]]}},log:Ext.emptyFn,partition:function(e,O){var P=[[],[]];Ext.each(e,function(R,S,Q){P[(O&&O(R,S,Q))||(!O&&R)?0:1].push(R)});return P},invoke:function(e,O){var Q=[],P=Array.prototype.slice.call(arguments,2);Ext.each(e,function(R,S){if(R&&typeof R[O]=="function"){Q.push(R[O].apply(R,P))}else{Q.push(undefined)}});return Q},zip:function(){var U=Ext.partition(arguments,function(V){return typeof V!="function"}),R=U[0],T=U[1][0],e=Ext.max(Ext.pluck(R,"length")),Q=[];for(var S=0;S<e;S++){Q[S]=[];if(T){Q[S]=T.apply(T,Ext.pluck(R,S))}else{for(var P=0,O=R.length;P<O;P++){Q[S].push(R[P][S])}}}return Q},toSentence:function(O,e){var R=O.length;if(R<=1){return O[0]}else{var Q=O.slice(0,R-1),P=O[R-1];return Ext.util.Format.format("{0} {1} {2}",Q.join(", "),e||"and",P)}},useShims:K})})();Ext.application=function(a){Ext.require("Ext.app.Application");Ext.onReady(function(){Ext.create("Ext.app.Application",a)})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var p="",n=",0",l=0;k=k-0;if(k<0){k=-k;p="-"}j=j||g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",p,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",p,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}(),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(z,t){if(!t){return z}z=Ext.Number.from(z,NaN);if(isNaN(z)){return""}var B=g.thousandSeparator,r=g.decimalSeparator,A=false,s=z<0,k,h;z=Math.abs(z);if(t.substr(t.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}t=t.substr(0,t.length-2);A=true;k=t.indexOf(B)!=-1;h=t.replace(a,"").split(r)}else{k=t.indexOf(",")!=-1;h=t.replace(d,"").split(".")}if(1<h.length){z=z.toFixed(h[1].length)}else{if(2<h.length){}else{z=z.toFixed(0)}}var y=z.toString();h=y.split(".");if(k){var x=h[0],q=[],u=x.length,p=Math.floor(u/3),l=x.length%3||3,w;for(w=0;w<u;w+=l){if(w!==0){l=3}q[q.length]=x.substr(w,l);p-=1}y=q.join(B);if(h[1]){y+=r+h[1]}}else{if(h[1]){y=h[0]+r+h[1]}}if(s){s=y.replace(/[^1-9]/g,"")!==""}return(s?"-":"")+t.replace(/[\d,?\.?]+/,y)},numberRenderer:function(h){return function(i){return g.number(i,h)}},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})})();Ext.ns("Ext.util");Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0},i=function(){if(!h){h=true;b=setInterval(j,e)}},c=function(k){a.push(k);if(k.onStop){k.onStop.apply(k.scope||k)}},j=function(){var m=a.length,p=new Date().getTime(),r;if(m>0){for(r=0;r<m;r++){Ext.Array.remove(g,a[r])}a=[];if(g.length<1){d();return}}r=0;var q,l,n,k=g.length;for(;r<k;++r){q=g[r];l=p-q.taskRunTime;if(q.interval<=l){n=q.run.apply(q.scope||q,q.args||[++q.taskRunCount]);q.taskRunTime=p;if(n===false||q.taskRunCount===q.repeat){c(q);return}}if(q.duration&&q.duration<=(p-q.taskStartTime)){c(q)}}};this.start=function(k){g.push(k);k.taskStartTime=new Date().getTime();k.taskRunTime=0;k.taskRunCount=0;i();return k};this.stop=function(k){c(k);return k};this.stopAll=function(){d();for(var l=0,k=g.length;l<k;l++){if(g[l].onStop){g[l].onStop()}}g=[];a=[]}};Ext.TaskManager=Ext.create("Ext.util.TaskRunner");Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();Ext.supports={init:function(){var d=document,g=d.createElement("div"),b=this.tests,c=b.length,a,e;g.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="float:left; background-color:transparent;"></div>'].join("");d.body.appendChild(g);for(a=0;a<c;a++){e=b[a];this[e.identity]=e.fn.call(this,d,g)}d.body.removeChild(g)},CSS3BoxShadow:Ext.isDefined(document.documentElement.style.boxShadow),ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),tests:[{identity:"Transitions",fn:function(g,j){var e=["webkit","Moz","o","ms","khtml"],h="TransitionEnd",a=[e[0]+h,"transitionend",e[2]+h,e[3]+h,e[4]+h],d=e.length,c=0,b=false;j=Ext.get(j);for(;c<d;c++){if(j.getStyle(e[c]+"TransitionProperty")){Ext.supports.CSS3Prefix=e[c];Ext.supports.CSS3TransitionEnd=a[c];b=true;break}}return b}},{identity:"RightMargin",fn:function(b,c){var a=b.defaultView;return !(a&&a.getComputedStyle(c.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",fn:function(){var a=Ext.webKitVersion;return 0<a&&a<533}},{identity:"DisplayChangeTextAreaSelectionBug",fn:function(){var a=Ext.webKitVersion;return 0<a&&a<534.24}},{identity:"TransparentColor",fn:function(b,c,a){a=b.defaultView;return !(a&&a.getComputedStyle(c.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(b,c,a){a=b.defaultView;return a&&a.getComputedStyle}},{identity:"Svg",fn:function(a){return !!a.createElementNS&&!!a.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(a){return !!a.createElement("canvas").getContext}},{identity:"Vml",fn:function(a){var b=a.createElement("div");b.innerHTML="<!--[if vml]><br><br><![endif]-->";return(b.childNodes.length==2)}},{identity:"Float",fn:function(a,b){return !!b.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(a){return !!a.createElement("audio").canPlayType}},{identity:"History",fn:function(){return !!(window.history&&history.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(e,h){var d="background-image:",b="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",g="linear-gradient(left top, black, white)",c="-moz-"+g,a=[d+b,d+g,d+c];h.style.cssText=a.join(";");return(""+h.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(d,e){var b=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],c=false,a;for(a=0;a<b.length;a++){if(document.body.style[b[a]]!==undefined){return true}}return c}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&typeof navigator.geolocation!="undefined")||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(a,b){return("onmouseenter" in b&&"onmouseleave" in b)}},{identity:"MouseWheel",fn:function(a,b){return("onmousewheel" in b)}},{identity:"Opacity",fn:function(a,b){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}b.firstChild.style.cssText="opacity:0.73";return b.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(a){return"placeholder" in a.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)}},{identity:"BoundingClientRect",fn:function(a,b){return Ext.isFunction(b.getBoundingClientRect)}},{identity:"IncludePaddingInWidthCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getWidth()==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getHeight()==210}},{identity:"ArraySort",fn:function(){var b=[1,2,3,4,5].sort(function(){return 0});return b[0]===1&&b[1]===2&&b[2]===3&&b[3]===4&&b[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var a=Ext.supports.Range?document.createRange():false;return a&&!!a.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}}]};Ext.ns("Ext.core");Ext.core.DomHelper=Ext.DomHelper=function(){var y=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,d=/tag|children|cn|html$/i,u=/td|tr|tbody/i,w=/end/i,s,p="afterbegin",q="afterend",c="beforebegin",r="beforeend",a="<table>",i="</table>",b=a+"<tbody>",j="</tbody>"+i,l=b+"<tr>",x="</tr>"+j;function h(C,E,D,F,B,z){C=Ext.getDom(C);var A;if(s.useDom){A=n(E,null);if(z){C.appendChild(A)}else{(B=="firstChild"?C:C.parentNode).insertBefore(A,C[B]||C)}}else{A=Ext.DomHelper.insertHtml(F,C,Ext.DomHelper.createHtml(E))}return D?Ext.get(A,true):A}function n(z,F){var A,I=document,D,G,B,H;if(Ext.isArray(z)){A=I.createDocumentFragment();for(var E=0,C=z.length;E<C;E++){n(z[E],A)}}else{if(typeof z=="string"){A=I.createTextNode(z)}else{A=I.createElement(z.tag||"div");D=!!A.setAttribute;for(G in z){if(!d.test(G)){B=z[G];if(G=="cls"){A.className=B}else{if(D){A.setAttribute(G,B)}else{A[G]=B}}}}Ext.DomHelper.applyStyles(A,z.style);if((H=z.children||z.cn)){n(H,A)}else{if(z.html){A.innerHTML=z.html}}}}if(F){F.appendChild(A)}return A}function v(E){var A="",z,D,C,F,B;if(typeof E=="string"){A=E}else{if(Ext.isArray(E)){for(B=0;B<E.length;B++){if(E[B]){A+=v(E[B])}}}else{A+="<"+(E.tag=E.tag||"div");for(z in E){D=E[z];if(!d.test(z)){if(typeof D=="object"){A+=" "+z+'="';for(C in D){A+=C+":"+D[C]+";"}A+='"'}else{A+=" "+({cls:"class",htmlFor:"for"}[z]||z)+'="'+D+'"'}}}if(k.test(E.tag)){A+="/>"}else{A+=">";if((F=E.children||E.cn)){A+=v(F)}else{if(E.html){A+=E.html}}A+="</"+E.tag+">"}}}return A}function g(G,D,C,E){y.innerHTML=[D,C,E].join("");var z=-1,B=y,A;while(++z<G){B=B.firstChild}A=B.nextSibling;if(A){var F=document.createDocumentFragment();while(B){A=B.nextSibling;F.appendChild(B);B=A}B=F}return B}function e(z,A,C,B){var D,E;y=y||document.createElement("div");if(z=="td"&&(A==p||A==r)||!u.test(z)&&(A==c||A==q)){return null}E=A==c?C:A==q?C.nextSibling:A==p?C.firstChild:null;if(A==c||A==q){C=C.parentNode}if(z=="td"||(z=="tr"&&(A==r||A==p))){D=g(4,l,B,x)}else{if((z=="tbody"&&(A==r||A==p))||(z=="tr"&&(A==c||A==q))){D=g(3,b,B,j)}else{D=g(2,a,B,i)}}C.insertBefore(D,E);return D}function t(B){var E=document.createElement("div"),z=document.createDocumentFragment(),A=0,C,D;E.innerHTML=B;D=E.childNodes;C=D.length;for(;A<C;A++){z.appendChild(D[A].cloneNode(true))}return z}s={markup:function(z){return v(z)},applyStyles:function(z,A){if(A){z=Ext.fly(z);if(typeof A=="function"){A=A.call()}if(typeof A=="string"){A=Ext.Element.parseStyles(A)}if(typeof A=="object"){z.setStyle(A)}}},insertHtml:function(E,z,F){var C={},B,G,D,H,I,A;E=E.toLowerCase();C[c]=["BeforeBegin","previousSibling"];C[q]=["AfterEnd","nextSibling"];if(z.insertAdjacentHTML){if(m.test(z.tagName)&&(A=e(z.tagName.toLowerCase(),E,z,F))){return A}C[p]=["AfterBegin","firstChild"];C[r]=["BeforeEnd","lastChild"];if((B=C[E])){z.insertAdjacentHTML(B[0],F);return z[B[1]]}}else{if(Ext.isTextNode(z)){E=E==="afterbegin"?"beforebegin":E;E=E==="beforeend"?"afterend":E}G=Ext.supports.CreateContextualFragment?z.ownerDocument.createRange():undefined;H="setStart"+(w.test(E)?"After":"Before");if(C[E]){if(G){G[H](z);I=G.createContextualFragment(F)}else{I=t(F)}z.parentNode.insertBefore(I,E==c?z:z.nextSibling);return z[(E==c?"previous":"next")+"Sibling"]}else{D=(E==p?"first":"last")+"Child";if(z.firstChild){if(G){G[H](z[D]);I=G.createContextualFragment(F)}else{I=t(F)}if(E==p){z.insertBefore(I,z.firstChild)}else{z.appendChild(I)}}else{z.innerHTML=F}return z[D]}}},insertBefore:function(z,B,A){return h(z,B,A,c)},insertAfter:function(z,B,A){return h(z,B,A,q,"nextSibling")},insertFirst:function(z,B,A){return h(z,B,A,p,"firstChild")},append:function(z,B,A){return h(z,B,A,r,"",true)},overwrite:function(z,B,A){z=Ext.getDom(z);z.innerHTML=v(B);return A?Ext.get(z.firstChild):z.firstChild},createHtml:v,createDom:n,useDom:false,createTemplate:function(A){var z=Ext.DomHelper.createHtml(A);return Ext.create("Ext.Template",z)}};return s}();Ext.ns("Ext.core");Ext.core.DomQuery=Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,xml,hasXml;for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}if(!hasXml){xml=Ext.DomQuery.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;var tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){var matched=false;for(var j=0;j<matchersLn;j++){var t=matchers[j];var m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath);if(!cache[subPath]){}}var result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)&&!(Ext.isSafari3&&!Ext.isStrict)){try{var isDocumentRoot=root.nodeType===9,_path=path,_root=root;if(!isDocumentRoot&&path.indexOf(",")===-1&&!startIdRe.test(path)){_path="#"+Ext.id(root)+" "+path;_root=root.parentNode}return Ext.Array.toArray(_root.querySelectorAll(_path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;(function(){var h=document,a=Ext.cache;Ext.Element=Ext.core.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,p;if(!n){return null}p=n.id;if(!m&&p&&a[p]){return a[p].el}this.dom=n;this.id=p||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element;e.prototype={set:function(q,m){var n=this.dom,l,p;m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(p,n){var l=this;n=n||l.dom;try{if(Number(p)){Ext.defer(l.focus,p,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,p,n,m){Ext.EventManager.on(this.dom,l,p,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.un(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this},addUnits:function(m,l){if(Ext.isNumber(m)){return m+(l||this.defaultUnit||"px")}if(m===""||m=="auto"||m==null){return m||""}if(!i.test(m)){return m||""}return m},isBorderBox:function(){return Ext.isBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,p,n){var q=this;q.on("mouseenter",m,p||q.dom,n);q.on("mouseleave",l,p||q.dom,n);return q},contains:function(l){return !l?false:Ext.Element.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&document.documentMode===9))?function(l,n){var p=this.dom,m;if(n){m=typeof p[n+":"+l];if(m!="undefined"&&m!="unknown"){return p[n+":"+l]||null}return null}if(l==="for"){l="htmlFor"}return p[l]||null}:function(l,m){var n=this.dom;if(m){return n.getAttributeNS(m,l)||n.getAttribute(m+":"+l)}return n.getAttribute(l)||n[l]||null},update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.clearListeners=k.removeAllListeners;k.destroy=k.remove;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,q,p;if(!m){return null}if(typeof m=="string"){if(!(q=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=q}else{l=e.addToCache(new e(q))}return l}else{if(m.tagName){if(!(p=m.id)){p=Ext.id(m)}if(a[p]&&a[p].el){l=a[p].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};k.getById=(!Ext.isIE6&&!Ext.isIE7&&!Ext.isIE8)?e.get:function(q){var p=this.dom,n,m,l;if(p){m=p.all[q];if(m){n=a[q];if(n&&n.el){l=n.el;l.dom=m}else{l=e.addToCache(new e(m))}return l}}return e.get(q)};e.addToCache=function(l,m){if(l){m=m||l.id;a[m]={el:l,data:{},events:{}}}return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var p=a[m.id].data;if(arguments.length==2){return p[l]}else{return(p[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){if(!a.hasOwnProperty(l)){continue}p=a[l];if(p.skipGarbageCollection){continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(q&&Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){if(!a.hasOwnProperty(l)){continue}m[l]=a[l]}a=Ext.cache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";n=Ext.getDom(n);if(n){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods({findParent:function(i,h,c){var e=this.dom,a=document.body,g=0,d;h=h||50;if(isNaN(h)){d=Ext.getDom(h);h=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<h&&e!=a&&e!=d){if(Ext.DomQuery.is(e,i)){return c?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,c,a){var b=Ext.fly(this.dom.parentNode,"_internal");return b?b.findParent(d,c,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a){return Ext.Element.select(a,false,this.dom)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.get(c).id;e=e.replace(/[\.:]/g,"\\$0");d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null}});Ext.Element.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(e,c,d){var g=this,b,a=(c||"before").toLowerCase()=="after",h;if(Ext.isArray(e)){h=g;Ext.each(e,function(i){b=Ext.fly(h,"_internal").insertSibling(i,c,d);if(a){h=b}});return b}e=e||{};if(e.nodeType||e.dom){b=g.dom.parentNode.insertBefore(Ext.getDom(e),a?g.dom.nextSibling:g.dom);if(!d){b=Ext.get(b)}}else{if(a&&!g.dom.nextSibling){b=Ext.DomHelper.append(g.dom.parentNode,e,!d)}else{b=Ext.DomHelper[a?"insertAfter":"insertBefore"](g.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.Element.addToCache(b.isFlyweight?new Ext.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(a,b){var e=Ext.DomHelper.insertBefore(this.dom,a||{tag:"div"},!b),c=e.dom||e;c.appendChild(this.dom);return e},insertHtml:function(b,c,a){var d=Ext.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});(function(){var x=Ext.Element,A=Ext.supports,s=document.defaultView,C=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,u=/\s+/,b=/\w/g,v=/table-row|table-.*-group/,c="_internal",e="padding",d="margin",y="border",t="-left",q="-right",w="-top",p="-bottom",j="-width",r=Math,z="hidden",g="isClipped",k="overflow",n="overflow-x",m="overflow-y",B="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+p+j},h={l:e+t,r:e+q,t:e+w,b:e+p},a={l:d+t,r:d+q,t:d+w,b:d+p},D=x.data;x.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';x.inheritedProps={fontSize:1,fontStyle:1,opacity:1};Ext.override(x,{adjustWidth:function(E){var F=this,G=(typeof E=="number");if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("lr")+F.getPadding("lr"))}return(G&&E<0)?0:E},adjustHeight:function(E){var F=this,G=(typeof E=="number");if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("tb")+F.getPadding("tb"))}return(G&&E<0)?0:E},addCls:function(I){var J=this,F=[],K=((J.dom.className.replace(l,"")=="")?"":" "),H,E,G;if(I===undefined){return J}if(Object.prototype.toString.call(I)!=="[object Array]"){if(typeof I==="string"){I=I.replace(l,"").split(u);if(I.length===1){I=I[0];if(!J.hasCls(I)){J.dom.className+=K+I}}else{this.addCls(I)}}}else{for(H=0,E=I.length;H<E;H++){G=I[H];if(typeof G=="string"&&(" "+J.dom.className+" ").indexOf(" "+G+" ")==-1){F.push(G)}}if(F.length){J.dom.className+=K+F.join(" ")}}return J},removeCls:function(J){var K=this,I,F,E,H,G;if(J===undefined){return K}if(Object.prototype.toString.call(J)!=="[object Array]"){J=J.replace(l,"").split(u)}if(K.dom&&K.dom.className){G=K.dom.className.replace(l,"").split(u);for(I=0,E=J.length;I<E;I++){H=J[I];if(typeof H=="string"){H=H.replace(l,"");F=Ext.Array.indexOf(G,H);if(F!=-1){Ext.Array.erase(G,F,1)}}}K.dom.className=G.join(" ")}return K},radioCls:function(H){var I=this.dom.parentNode.childNodes,F,G,E;H=Ext.isArray(H)?H:[H];for(G=0,E=I.length;G<E;G++){F=I[G];if(F&&F.nodeType==1){Ext.fly(F,"_internal").removeCls(H)}}return this.addCls(H)},toggleCls:Ext.supports.ClassList?function(E){this.dom.classList.toggle(Ext.String.trim(E));return this}:function(E){return this.hasCls(E)?this.removeCls(E):this.addCls(E)},hasCls:Ext.supports.ClassList?function(F){if(!F){return false}F=F.split(u);var G=F.length,E=0;for(;E<G;E++){if(F[E]&&this.dom.classList.contains(F[E])){return true}}return false}:function(E){return E&&(" "+this.dom.className+" ").indexOf(" "+E+" ")!=-1},replaceCls:function(F,E){return this.removeCls(F).addCls(E)},isStyle:function(E,F){return this.getStyle(E)==F},getStyle:function(){return s&&s.getComputedStyle?function(K){var I=this.dom,E,H,F,J,G;if(I==document){return null}K=x.normalize(K);F=(E=I.style[K])?E:(H=s.getComputedStyle(I,""))?H[K]:null;if(K=="marginRight"&&F!="0px"&&!A.RightMargin){G=x.getRightMarginFixCleaner(I);J=this.getStyle("display");I.style.display="inline-block";F=s.getComputedStyle(I,"").marginRight;I.style.display=J;G()}if(K=="backgroundColor"&&F=="rgba(0, 0, 0, 0)"&&!A.TransparentColor){F="transparent"}return F}:function(J){var G=this.dom,E,F;if(G==document){return null}J=x.normalize(J);do{if(J=="opacity"){if(G.style.filter.match){E=G.style.filter.match(C);if(E){var I=parseFloat(E[1]);if(!isNaN(I)){return I?I/100:0}}}return 1}if(!Ext.isIE6){return G.style[J]||((F=G.currentStyle)?F[J]:null)}try{return G.style[J]||((F=G.currentStyle)?F[J]:null)}catch(H){}if(!x.inheritedProps[J]){break}G=G.parentNode}while(G);return null}}(),getColor:function(E,F,J){var H=this.getStyle(E),G=J||J===""?J:"#",I;if(!H||(/transparent|inherit/.test(H))){return F}if(/^r/.test(H)){Ext.each(H.slice(4,H.length-1).split(","),function(K){I=parseInt(K,10);G+=(I<16?"0":"")+I.toString(16)})}else{H=H.replace("#","");G+=H.length==3?H.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):H}return(G.length>5?G.toLowerCase():F)},setStyle:function(I,H){var G=this,E,F;if(!G.dom){return G}if(typeof I==="string"){E={};E[I]=H;I=E}for(F in I){if(I.hasOwnProperty(F)){H=Ext.value(I[F],"");if(F=="opacity"){G.setOpacity(H)}else{G.dom.style[x.normalize(F)]=H}}}return G},setOpacity:function(F,E){var H=this,J=H.dom,I,G;if(!H.dom){return H}G=H.dom.style;if(!E||!H.anim){if(!Ext.supports.Opacity){F=F<1?"alpha(opacity="+F*100+")":"";I=G.filter.replace(C,"").replace(l,"");G.zoom=1;G.filter=I+(I.length>0?" ":"")+F}else{G.opacity=F}}else{if(!Ext.isObject(E)){E={duration:350,easing:"ease-in"}}H.animate(Ext.applyIf({to:{opacity:F}},E))}return H},clearOpacity:function(){var E=this.dom.style;if(!Ext.supports.Opacity){if(!Ext.isEmpty(E.filter)){E.filter=E.filter.replace(C,"").replace(l,"")}}else{E.opacity=E["-moz-opacity"]=E["-khtml-opacity"]=""}return this},adjustDirect2DDimension:function(I){var G=this,J=G.dom,H=G.getStyle("display"),F=J.style.display,E=J.style.position,L=I==="width"?0:1,K;if(H==="inline"){J.style.display="inline-block"}J.style.position=H.match(v)?"absolute":"static";K=(parseFloat(G.getStyle(I))||parseFloat(J.currentStyle.msTransformOrigin.split(" ")[L])*2)%1;J.style.position=E;if(H==="inline"){J.style.display=F}return K},getHeight:function(L,G){var K=this,H=K.dom,I=Ext.isIE&&K.isStyle("display","none"),M,F,E,J;if(Ext.isIEQuirks){E=H.style;F=E.overflow;K.setStyle({overflow:"hidden"})}M=H.offsetHeight;M=r.max(M,I?0:H.clientHeight)||0;if(!I&&Ext.supports.Direct2DBug){J=K.adjustDirect2DDimension("height");if(G){M+=J}else{if(J>0&&J<0.5){M++}}}if(L){M-=(K.getBorderWidth("tb")+K.getPadding("tb"))}if(Ext.isIEQuirks){K.setStyle({overflow:F})}if(M<0){M=0}return M},getWidth:function(E,O){var L=this,I=L.dom,J=Ext.isIE&&L.isStyle("display","none"),M,G,H,F,K,N;if(Ext.isIEQuirks){F=I.style;H=F.overflow;L.setStyle({overflow:"hidden"})}if(Ext.isOpera10_5){if(I.parentNode.currentStyle.position==="relative"){N=I.parentNode.style.position;I.parentNode.style.position="static";G=I.offsetWidth;I.parentNode.style.position=N}G=Math.max(G||0,I.offsetWidth)}else{if(Ext.supports.BoundingClientRect){M=I.getBoundingClientRect();G=M.right-M.left;G=O?G:Math.ceil(G)}else{G=I.offsetWidth}}G=r.max(G,J?0:I.clientWidth)||0;if(!J&&Ext.supports.Direct2DBug){K=L.adjustDirect2DDimension("width");if(O){G+=K}else{if(K>0&&K<0.5){G++}}}if(E){G-=(L.getBorderWidth("lr")+L.getPadding("lr"))}if(Ext.isIEQuirks){L.setStyle({overflow:H})}if(G<0){G=0}return G},setWidth:function(F,E){var G=this;F=G.adjustWidth(F);if(!E||!G.anim){G.dom.style.width=G.addUnits(F)}else{if(!Ext.isObject(E)){E={}}G.animate(Ext.applyIf({to:{width:F}},E))}return G},setHeight:function(E,F){var G=this;E=G.adjustHeight(E);if(!F||!G.anim){G.dom.style.height=G.addUnits(E)}else{if(!Ext.isObject(F)){F={}}G.animate(Ext.applyIf({to:{height:E}},F))}return G},getBorderWidth:function(E){return this.addStyles(E,i)},getPadding:function(E){return this.addStyles(E,h)},clip:function(){var E=this,F=E.dom;if(!D(F,g)){D(F,g,true);D(F,B,{o:E.getStyle(k),x:E.getStyle(n),y:E.getStyle(m)});E.setStyle(k,z);E.setStyle(n,z);E.setStyle(m,z)}return E},unclip:function(){var F=this,G=F.dom,E;if(D(G,g)){D(G,g,false);E=D(G,B);if(E.o){F.setStyle(k,E.o)}if(E.x){F.setStyle(n,E.x)}if(E.y){F.setStyle(m,E.y)}}return F},addStyles:function(L,K){var F=0,J=L.match(b),I=0,E=J.length,H,G;for(;I<E;I++){H=J[I];G=H&&parseInt(this.getStyle(K[H]),10);if(G){F+=r.abs(G)}}return F},margins:a,applyStyles:function(E){Ext.DomHelper.applyStyles(this.dom,E);return this},getStyles:function(){var H={},E=arguments.length,F=0,G;for(;F<E;++F){G=arguments[F];H[G]=this.getStyle(G)}return H},boxWrap:function(E){E=E||Ext.baseCSSPrefix+"box";var F=Ext.get(this.insertHtml("beforeBegin","<div class='"+E+"'>"+Ext.String.format(x.boxMarkup,E)+"</div>"));Ext.DomQuery.selectNode("."+E+"-mc",F.dom).appendChild(this.dom);return F},setSize:function(G,E,F){var H=this;if(Ext.isObject(G)){F=E;E=G.height;G=G.width}G=H.adjustWidth(G);E=H.adjustHeight(E);if(!F||!H.anim){if(!Ext.isIEQuirks&&(Ext.isIE6||Ext.isIE7)){H.dom.offsetTop}H.dom.style.width=H.addUnits(G);H.dom.style.height=H.addUnits(E)}else{if(F===true){F={}}H.animate(Ext.applyIf({to:{width:G,height:E}},F))}return H},getComputedHeight:function(){var F=this,E=Math.max(F.dom.offsetHeight,F.dom.clientHeight);if(!E){E=parseFloat(F.getStyle("height"))||0;if(!F.isBorderBox()){E+=F.getFrameWidth("tb")}}return E},getComputedWidth:function(){var F=this,E=Math.max(F.dom.offsetWidth,F.dom.clientWidth);if(!E){E=parseFloat(F.getStyle("width"))||0;if(!F.isBorderBox()){E+=F.getFrameWidth("lr")}}return E},getFrameWidth:function(F,E){return E&&this.isBorderBox()?0:(this.getPadding(F)+this.getBorderWidth(F))},addClsOnOver:function(E){var F=this.dom;this.hover(function(){Ext.fly(F,c).addCls(E)},function(){Ext.fly(F,c).removeCls(E)});return this},addClsOnFocus:function(E){var F=this,G=F.dom;F.on("focus",function(){Ext.fly(G,c).addCls(E)});F.on("blur",function(){Ext.fly(G,c).removeCls(E)});return F},addClsOnClick:function(E){var F=this.dom;this.on("mousedown",function(){Ext.fly(F,c).addCls(E);var H=Ext.getDoc(),G=function(){Ext.fly(F,c).removeCls(E);H.removeListener("mouseup",G)};H.on("mouseup",G)});return this},getViewSize:function(){var H=this,I=H.dom,F=(I==Ext.getDoc().dom||I==Ext.getBody().dom),G,J,E;if(F){E={width:x.getViewWidth(),height:x.getViewHeight()}}else{if(Ext.isIE6||Ext.isIEQuirks){G=I.style;J=G.overflow;H.setStyle({overflow:"hidden"})}E={width:I.clientWidth,height:I.clientHeight};if(Ext.isIE6||Ext.isIEQuirks){H.setStyle({overflow:J})}}return E},getStyleSize:function(){var I=this,J=document,K=this.dom,F=(K==J||K==J.body),H=K.style,E,G;if(F){return{width:x.getViewWidth(),height:x.getViewHeight()}}if(H.width&&H.width!="auto"){E=parseFloat(H.width);if(I.isBorderBox()){E-=I.getFrameWidth("lr")}}if(H.height&&H.height!="auto"){G=parseFloat(H.height);if(I.isBorderBox()){G-=I.getFrameWidth("tb")}}return{width:E||I.getWidth(true),height:G||I.getHeight(true)}},getSize:function(E){return{width:this.getWidth(E),height:this.getHeight(E)}},repaint:function(){var E=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(E).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},selectable:function(){var E=this;E.dom.unselectable="off";E.on("selectstart",function(F){F.stopPropagation();return true});E.applyStyles("-moz-user-select: text; -khtml-user-select: text;");E.removeCls(Ext.baseCSSPrefix+"unselectable");return E},unselectable:function(){var E=this;E.dom.unselectable="on";E.swallowEvent("selectstart",true);E.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");E.addCls(Ext.baseCSSPrefix+"unselectable");return E},getMargin:function(F){var G=this,H={t:"top",l:"left",r:"right",b:"bottom"},I={},E;if(!F){for(E in G.margins){I[H[E]]=parseFloat(G.getStyle(G.margins[E]))||0}return I}else{return G.addStyles.call(G,F,G.margins)}}})})();Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls=Ext.baseCSSPrefix+"hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,q="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(s){var r=i(s,b);if(r===undefined){i(s,b,r="")}return r},p=function(s){var r=i(s,c);if(r===undefined){i(s,c,r=1)}return r};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(r){i(this.dom,c,r);return this},isVisible:function(){var r=this,t=r.dom,s=i(t,h);if(typeof s=="boolean"){return s}s=!r.isStyle(j,d)&&!r.isStyle(g,m)&&!((p(t)==e.ASCLASS)&&r.hasCls(r.visibilityCls||e.visibilityCls));i(t,h,s);return s},setVisible:function(u,r){var x=this,s,z,y,w,v=x.dom,t=p(v);if(typeof r=="string"){switch(r){case g:t=e.DISPLAY;break;case j:t=e.VISIBILITY;break;case n:t=e.OFFSETS;break;case a:case k:t=e.ASCLASS;break}x.setVisibilityMode(t);r=false}if(!r||!x.anim){if(t==e.ASCLASS){x[u?"removeCls":"addCls"](x.visibilityCls||e.visibilityCls)}else{if(t==e.DISPLAY){return x.setDisplayed(u)}else{if(t==e.OFFSETS){if(!u){if(!x.hideModeStyles){x.hideModeStyles={position:x.getStyle("position"),top:x.getStyle("top"),left:x.getStyle("left")}}x.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{if(x.hideModeStyles){x.applyStyles(x.hideModeStyles||{position:"",top:"",left:""});delete x.hideModeStyles}}}else{x.fixDisplay();v.style.visibility=u?"":d}}}}else{if(u){x.setOpacity(0.01);x.setVisible(true)}if(!Ext.isObject(r)){r={duration:350,easing:"ease-in"}}x.animate(Ext.applyIf({callback:function(){u||x.setVisible(false).setOpacity(1)},to:{opacity:(u)?1:0}},r))}i(v,h,u);return x},hasMetrics:function(){var r=this.dom;return this.isVisible()||(p(r)==e.OFFSETS)||(p(r)==e.VISIBILITY)},toggle:function(r){var s=this;s.setVisible(!s.isVisible(),s.anim(r));return s},setDisplayed:function(r){if(typeof r=="boolean"){r=r?l(this.dom):m}this.setStyle(g,r);return this},fixDisplay:function(){var r=this;if(r.isStyle(g,m)){r.setStyle(j,d);r.setStyle(g,l(this.dom));if(r.isStyle(g,m)){r.setStyle(g,"block")}}},hide:function(r){if(typeof r=="string"){this.setVisible(false,r);return this}this.setVisible(false,this.anim(r));return this},show:function(r){if(typeof r=="string"){this.setVisible(true,r);return this}this.setVisible(true,this.anim(r));return this}}}());Ext.applyIf(Ext.Element.prototype,{animate:function(a){var b=this;if(!b.id){b=Ext.get(b.dom)}if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim",b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(b,h,e){var g=this,d=g.dom.style,c,a;b=b||"t";h=h||{};c=function(){var m=this,l=h.listeners,n,i,k,j,p;if(!e){g.fixDisplay()}n=g.getBox();if((b=="t"||b=="b")&&n.height===0){n.height=g.dom.scrollHeight}else{if((b=="l"||b=="r")&&n.width===0){n.width=g.dom.scrollWidth}}i=g.getPositioning();g.setSize(n.width,n.height);j=g.wrap({style:{visibility:e?"visible":"hidden"}});j.setPositioning(i);if(j.isStyle("position","static")){j.position("relative")}g.clearPositioning("auto");j.clip();g.setStyle({visibility:"",position:"absolute"});if(e){j.setSize(n.width,n.height)}switch(b){case"t":p={from:{width:n.width+"px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break;case"l":p={from:{width:"0px",height:n.height+"px"},to:{width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"r":p={from:{x:n.x+n.width,width:"0px",height:n.height+"px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};break;case"b":p={from:{y:n.y+n.height,width:n.width+"px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tl":p={from:{x:n.x,y:n.y,width:"0px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";d.right="0px";break;case"bl":p={from:{x:n.x+n.width,width:"0px",height:"0px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"br":p={from:{x:n.x+n.width,y:n.y+n.height,width:"0px",height:"0px"},to:{x:n.x,y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tr":p={from:{y:n.y+n.height,width:"0px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break}j.show();a=Ext.apply({},h);delete a.listeners;a=Ext.create("Ext.fx.Anim",Ext.applyIf(a,{target:j,duration:500,easing:"ease-out",from:e?p.to:p.from,to:e?p.from:p.to}));a.on("afteranimate",function(){if(e){g.setPositioning(i);if(h.useDisplay){g.setDisplayed(false)}else{g.hide()}}else{g.clearPositioning();g.setPositioning(i)}if(j.dom){j.dom.parentNode.insertBefore(g.dom,j.dom);j.remove()}g.setSize(n.width,n.height);m.end()});if(l){a.on(l)}};g.animate({duration:h.duration?h.duration*2:1000,listeners:{beforeanimate:{fn:c},afteranimate:{fn:function(){if(a&&a.running){a.end()}}}}});return g},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-out",duration:500,useDisplay:false});a=function(){b.clearOpacity();b.show();var e=b.getBox(),g=b.getStyle("fontSize"),d=b.getPositioning();this.to={width:e.width*2,height:e.height*2,x:e.x-(e.width/2),y:e.y-(e.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){if(b.dom){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setStyle({fontSize:g})}})};b.animate({duration:c.duration,easing:c.easing,listeners:{beforeanimate:{fn:a}}});return b},switchOff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var h=this,g=b.getSize(),i=b.getXY(),e,d;b.clearOpacity();b.clip();d=b.getPositioning();e=Ext.create("Ext.fx.Animator",{target:b,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:i[1]+g.height/2},100:{width:1,x:i[0]+g.width/2}}});e.on("afteranimate",function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setSize(g);h.end()})};b.animate({duration:(c.duration*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){c.show();var i=this,j=c.getBox(),h=Ext.getBody().createChild({style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}}),g;g=Ext.create("Ext.fx.Anim",{target:h,duration:e.duration||1000,iterations:d,from:{top:j.y,left:j.x,borderWidth:0,opacity:1,height:j.height,width:j.width},to:{top:j.y-20,left:j.x-20,borderWidth:10,opacity:0,height:j.height+40,width:j.width+40}});g.on("afteranimate",function(){h.remove();i.end()})};c.animate({duration:(e.duration*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,b;a=a||"b";b=function(){var h=c.getWidth(),g=c.getHeight(),i=c.getXY(),e=c.getPositioning(),j={opacity:0};switch(a){case"t":j.y=i[1]-g;break;case"l":j.x=i[0]-h;break;case"r":j.x=i[0]+h;break;case"b":j.y=i[1]+g;break;case"tl":j.x=i[0]-h;j.y=i[1]-g;break;case"bl":j.x=i[0]-h;j.y=i[1]+g;break;case"br":j.x=i[0]+h;j.y=i[1]+g;break;case"tr":j.x=i[0]+h;j.y=i[1]-g;break}this.to=j;this.on("afteranimate",function(){if(c.dom){c.hide();c.clearOpacity();c.setPositioning(e)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:{fn:b}}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];i.clearOpacity();i.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(a){this.animate(Ext.apply({},a,{opacity:1}));return this},fadeOut:function(a){this.animate(Ext.apply({},a,{opacity:0}));return this},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this}});Ext.applyIf(Ext.Element,{unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,opacityRe:/alpha\(opacity=(.*)\)/i,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:Ext.Element.prototype.addUnits,parseBox:function(b){if(Ext.isObject(b)){return{top:b.top||0,right:b.right||0,bottom:b.bottom||0,left:b.left||0}}else{if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}}},unitizeBox:function(c,b){var a=this.addUnits,d=this.parseBox(c);return a(d.top,b)+" "+a(d.right,b)+" "+a(d.bottom,b)+" "+a(d.left,b)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c<a;++c){g.push(e.transformElement(d[c]))}return e},invoke:function(g,b){var h=this,d=h.elements,a=d.length,j,c;for(c=0;c<a;c++){j=d[c];if(j){Ext.Element.prototype[g].apply(h.getElement(j),b)}}return h},item:function(b){var d=this,c=d.elements[b],a=null;if(c){a=d.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(a){var b=[],d=this,c=Ext.isFunction(a)?a:function(e){return e.is(a)};d.each(function(h,e,g){if(c(h,g)!==false){b[b.length]=d.transformElement(h)}});d.elements=b;return d},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){function b(e,g,h,d){g.task=new Ext.util.DelayedTask();return function(){g.task.delay(h.buffer,e,d,Ext.Array.toArray(arguments))}}function a(e,g,h,d){return function(){var i=new Ext.util.DelayedTask();if(!g.tasks){g.tasks=[]}g.tasks.push(i);i.delay(h.delay||10,e,d,Ext.Array.toArray(arguments))}}function c(e,g,h,d){return function(){g.ev.removeListener(g.fn,d);return e.apply(d,arguments)}}return{isEvent:true,constructor:function(e,d){this.name=d;this.observable=e;this.listeners=[]},addListener:function(g,e,d){var h=this,i;e=e||h.observable;if(!h.isListening(g,e)){i=h.createListener(g,e,d);if(h.firing){h.listeners=h.listeners.slice(0)}h.listeners.push(i)}},createListener:function(g,e,i){i=i||{};e=e||this.observable;var h={fn:g,scope:e,o:i,ev:this},d=g;if(i.single){d=c(d,h,i,e)}if(i.delay){d=a(d,h,i,e)}if(i.buffer){d=b(d,h,i,e)}h.fireFn=d;return h},findListener:function(j,h){var g=this.listeners,d=g.length,k,e;while(d--){k=g[d];if(k){e=k.scope;if(k.fn==j&&(e==h||e==this.observable)){return d}}}return -1},isListening:function(e,d){return this.findListener(e,d)!==-1},removeListener:function(h,g){var i=this,e,j,d;e=i.findListener(h,g);if(e!=-1){j=i.listeners[e];if(i.firing){i.listeners=i.listeners.slice(0)}if(j.task){j.task.cancel();delete j.task}d=j.tasks&&j.tasks.length;if(d){while(d--){j.tasks[d].cancel()}delete j.tasks}Ext.Array.erase(i.listeners,e,1);return true}return false},clearListeners:function(){var e=this.listeners,d=e.length;while(d--){this.removeListener(e[d].fn,e[d].scope)}},fire:function(){var j=this,g=j.listeners,h=g.length,e,d,k;if(h>0){j.firing=true;for(e=0;e<h;e++){k=g[e];d=arguments.length?Array.prototype.slice.call(arguments,0):[];if(k.o){d.push(k.o)}if(k&&k.fireFn.apply(k.scope||j.observable,d)===false){return(j.firing=false)}}}j.firing=false;return true}}})())});Ext.EventManager={hasBoundOnReady:false,hasFiredReady:false,readyTimeout:null,hasOnReadyStateChange:false,readyEvent:new Ext.util.Event(),checkReadyState:function(){var a=Ext.EventManager;if(window.attachEvent){if(window!=top){return false}try{document.documentElement.doScroll("left")}catch(b){return false}a.fireDocReady();return true}if(document.readyState=="complete"){a.fireDocReady();return true}a.readyTimeout=setTimeout(arguments.callee,2);return false},bindReadyEvent:function(){var a=Ext.EventManager;if(a.hasBoundOnReady){return}if(document.addEventListener){document.addEventListener("DOMContentLoaded",a.fireDocReady,false);window.addEventListener("load",a.fireDocReady,false)}else{if(!a.checkReadyState()){document.attachEvent("onreadystatechange",a.checkReadyState);a.hasOnReadyStateChange=true}window.attachEvent("onload",a.fireDocReady,false)}a.hasBoundOnReady=true},fireDocReady:function(){var a=Ext.EventManager;if(!a.hasFiredReady){a.hasFiredReady=true;if(document.addEventListener){document.removeEventListener("DOMContentLoaded",a.fireDocReady,false);window.removeEventListener("load",a.fireDocReady,false)}else{if(a.readyTimeout!==null){clearTimeout(a.readyTimeout)}if(a.hasOnReadyStateChange){document.detachEvent("onreadystatechange",a.checkReadyState)}window.detachEvent("onload",a.fireDocReady)}Ext.supports.init()}if(!Ext.isReady){Ext.isReady=true;a.onWindowUnload();a.readyEvent.fire()}},onDocumentReady:function(c,b,a){a=a||{};var d=Ext.EventManager,e=d.readyEvent;a.single=true;if(Ext.isReady){e.addListener(c,b,a);e.fire()}else{a.delay=a.delay||1;e.addListener(c,b,a);d.bindReadyEvent()}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(a){var b=false,c;a=Ext.getDom(a);if(a===document||a===window){c=a===document?Ext.documentId:Ext.windowId}else{c=Ext.id(a)}if(a&&(a.getElementById||a.navigator)){b=true}if(!Ext.cache[c]){Ext.Element.addToCache(new Ext.Element(a),c);if(b){Ext.cache[c].skipGarbageCollection=true}}return c},prepareListenerConfig:function(d,b,h){var e=this,i=e.propRe,c,g,a;for(c in b){if(b.hasOwnProperty(c)){if(!i.test(c)){g=b[c];if(Ext.isFunction(g)){a=[d,c,g,b.scope,b]}else{a=[d,c,g.fn,g.scope,g]}if(h===true){e.removeListener.apply(this,a)}else{e.addListener.apply(e,a)}}}}},normalizeEvent:function(a,b){if(/mouseenter|mouseleave/.test(a)&&!Ext.supports.MouseEnterLeave){if(b){b=Ext.Function.createInterceptor(b,this.contains,this)}a=a=="mouseenter"?"mouseover":"mouseout"}else{if(a=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){a="DOMMouseScroll"}}return{eventName:a,fn:b}},contains:function(b){var a=b.browserEvent.currentTarget,c=this.getRelatedTarget(b);if(a&&a.firstChild){while(c){if(c===a){return false}c=c.parentNode;if(c&&(c.nodeType!=1)){c=null}}}return true},addListener:function(c,a,g,e,b){if(typeof a!=="string"){this.prepareListenerConfig(c,a);return}var h=Ext.getDom(c),i,d;b=b||{};i=this.normalizeEvent(a,g);d=this.createListenerWrap(h,a,i.fn,e,b);if(h.attachEvent){h.attachEvent("on"+i.eventName,d)}else{h.addEventListener(i.eventName,d,b.capture||false)}if(h==document&&a=="mousedown"){this.stoppedMouseDownEvent.addListener(d)}this.getEventListenerCache(h,a).push({fn:g,wrap:d,scope:e})},removeListener:function(h,l,m,p){if(typeof l!=="string"){this.prepareListenerConfig(h,l,true);return}var g=Ext.getDom(h),a=this.getEventListenerCache(g,l),n=this.normalizeEvent(l).eventName,k=a.length,e,c,b,d;while(k--){c=a[k];if(c&&(!m||c.fn==m)&&(!p||c.scope===p)){b=c.wrap;if(b.task){clearTimeout(b.task);delete b.task}e=b.tasks&&b.tasks.length;if(e){while(e--){clearTimeout(b.tasks[e])}delete b.tasks}if(g.detachEvent){g.detachEvent("on"+n,b)}else{g.removeEventListener(n,b,false)}if(b&&g==document&&l=="mousedown"){this.stoppedMouseDownEvent.removeListener(b)}Ext.Array.erase(a,k,1)}}},removeAll:function(b){var d=Ext.getDom(b),a,c;if(!d){return}a=this.getElementEventCache(d);for(c in a){if(a.hasOwnProperty(c)){this.removeListener(d,c)}}Ext.cache[d.id].events={}},purgeElement:function(d,b){var e=Ext.getDom(d),c=0,a;if(b){this.removeListener(e,b)}else{this.removeAll(e)}if(e&&e.childNodes){for(a=d.childNodes.length;c<a;c++){this.purgeElement(d.childNodes[c],b)}}},createListenerWrap:function(i,b,e,d,a){a=a||{};var g,h;return function c(k,j){if(!h){g=["if(!Ext) {return;}"];if(a.buffer||a.delay||a.freezeEvent){g.push("e = new Ext.EventObjectImpl(e, "+(a.freezeEvent?"true":"false")+");")}else{g.push("e = Ext.EventObject.setEvent(e);")}if(a.delegate){g.push('var t = e.getTarget("'+a.delegate+'", this);');g.push("if(!t) {return;}")}else{g.push("var t = e.target;")}if(a.target){g.push("if(e.target !== options.target) {return;}")}if(a.stopEvent){g.push("e.stopEvent();")}else{if(a.preventDefault){g.push("e.preventDefault();")}if(a.stopPropagation){g.push("e.stopPropagation();")}}if(a.normalized===false){g.push("e = e.browserEvent;")}if(a.buffer){g.push("(wrap.task && clearTimeout(wrap.task));");g.push("wrap.task = setTimeout(function(){")}if(a.delay){g.push("wrap.tasks = wrap.tasks || [];");g.push("wrap.tasks.push(setTimeout(function(){")}g.push("fn.call(scope || dom, e, t, options);");if(a.single){g.push("Ext.EventManager.removeListener(dom, ename, fn, scope);")}if(a.delay){g.push("}, "+a.delay+"));")}if(a.buffer){g.push("}, "+a.buffer+");")}h=Ext.functionFactory("e","options","fn","scope","ename","dom","wrap","args",g.join("\n"))}h.call(i,k,a,e,d,b,i,c,j)}},getEventListenerCache:function(c,a){if(!c){return[]}var b=this.getElementEventCache(c);return b[a]||(b[a]=[])},getElementEventCache:function(b){if(!b){return{}}var a=Ext.cache[this.getId(b)];return a.events||(a.events={})},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(a){this.stopPropagation(a);this.preventDefault(a)},stopPropagation:function(a){a=a.browserEvent||a;if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}},preventDefault:function(a){a=a.browserEvent||a;if(a.preventDefault){a.preventDefault()}else{a.returnValue=false;try{if(a.ctrlKey||a.keyCode>111&&a.keyCode<124){a.keyCode=-1}}catch(b){}}},getRelatedTarget:function(a){a=a.browserEvent||a;var b=a.relatedTarget;if(!b){if(this.mouseLeaveRe.test(a.type)){b=a.toElement}else{if(this.mouseEnterRe.test(a.type)){b=a.fromElement}}}return this.resolveTextNode(b)},getPageX:function(a){return this.getXY(a)[0]},getPageY:function(a){return this.getXY(a)[1]},getPageXY:function(c){c=c.browserEvent||c;var b=c.pageX,e=c.pageY,d=document.documentElement,a=document.body;if(!b&&b!==0){b=c.clientX+(d&&d.scrollLeft||a&&a.scrollLeft||0)-(d&&d.clientLeft||a&&a.clientLeft||0);e=c.clientY+(d&&d.scrollTop||a&&a.scrollTop||0)-(d&&d.clientTop||a&&a.clientTop||0)}return[b,e]},getTarget:function(a){a=a.browserEvent||a;return this.resolveTextNode(a.target||a.srcElement)},resolveTextNode:Ext.isGecko?function(b){if(!b){return}var a=HTMLElement.prototype.toString.call(b);if(a=="[xpconnect wrapped native prototype]"||a=="[object XULElement]"){return}return b.nodeType==3?b.parentNode:b}:function(a){return a&&a.nodeType==3?a.parentNode:a},curWidth:0,curHeight:0,onWindowResize:function(d,c,b){var a=this.resizeEvent;if(!a){this.resizeEvent=a=new Ext.util.Event();this.on(window,"resize",this.fireResize,this,{buffer:100})}a.addListener(d,c,b)},fireResize:function(){var c=this,a=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight();if(c.curHeight!=b||c.curWidth!=a){c.curHeight=b;c.curWidth=a;c.resizeEvent.fire(a,b)}},removeResizeListener:function(b,a){if(this.resizeEvent){this.resizeEvent.removeListener(b,a)}},onWindowUnload:function(){var a=this.unloadEvent;if(!a){this.unloadEvent=a=new Ext.util.Event();this.addListener(window,"unload",this.fireUnload,this)}},fireUnload:function(){try{this.removeUnloadListener();if(Ext.isGecko3){var h=Ext.ComponentQuery.query("gridview"),b=0,d=h.length;for(;b<d;b++){h[b].scrollToTop()}}var c,a=Ext.cache;for(c in a){if(a.hasOwnProperty(c)){Ext.EventManager.removeAll(c)}}}catch(g){}},removeUnloadListener:function(){if(this.unloadEvent){this.removeListener(window,"unload",this.fireUnload)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return this.useKeyDown?"keydown":"keypress"}};Ext.onReady=function(c,b,a){Ext.Loader.onReady(c,b,true,a)};Ext.onDocumentReady=Ext.EventManager.onDocumentReady;Ext.EventManager.on=Ext.EventManager.addListener;Ext.EventManager.un=Ext.EventManager.removeListener;(function(){var a=function(){var g=document.body||document.getElementsByTagName("body")[0],e=Ext.baseCSSPrefix,c=[e+"body"],b=[],d;if(!g){return false}d=g.parentNode;function h(i){c.push(e+i)}if(Ext.isIE){h("ie");if(Ext.isIE6){h("ie6")}else{h("ie7p");if(Ext.isIE7){h("ie7")}else{h("ie8p");if(Ext.isIE8){h("ie8")}else{h("ie9p");if(Ext.isIE9){h("ie9")}}}}if(Ext.isIE6||Ext.isIE7){h("ie7m")}if(Ext.isIE6||Ext.isIE7||Ext.isIE8){h("ie8m")}if(Ext.isIE7||Ext.isIE8){h("ie78")}}if(Ext.isGecko){h("gecko");if(Ext.isGecko3){h("gecko3")}if(Ext.isGecko4){h("gecko4")}if(Ext.isGecko5){h("gecko5")}}if(Ext.isOpera){h("opera")}if(Ext.isWebKit){h("webkit")}if(Ext.isSafari){h("safari");if(Ext.isSafari2){h("safari2")}if(Ext.isSafari3){h("safari3")}if(Ext.isSafari4){h("safari4")}if(Ext.isSafari5){h("safari5")}}if(Ext.isChrome){h("chrome")}if(Ext.isMac){h("mac")}if(Ext.isLinux){h("linux")}if(!Ext.supports.CSS3BorderRadius){h("nbr")}if(!Ext.supports.CSS3LinearGradient){h("nlg")}if(!Ext.scopeResetCSS){h("reset")}if(d){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}b.push(e+(Ext.isBorderBox?"border-box":"strict"));if(!Ext.isStrict){b.push(e+"quirks")}Ext.fly(d,"_internal").addCls(b)}Ext.fly(g,"_internal").addCls(c);return true};Ext.onReady(a)})();Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a})(),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return Ext.create("Ext.util.Point",a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:function(){var d,e={};if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(v,t,m,l,p,k,i,j,g,s,r,n,q){var h=v.createEvent("MouseEvents"),u=v.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(t,m,l,u,p,k,i,k,i,j,g,s,r,n,q)}else{h=v.createEvent("UIEvents");h.initEvent(t,m,l);h.view=u;h.detail=p;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=r;h.shiftKey=s;h.button=n;h.relatedTarget=q}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){var c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(u,t,m,l,p,k,i,j,g,s,r,n,q){var h=u.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=p;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=s;h.metaKey=r;h.button=c[n]||n;h.relatedTarget=q;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}()},function(){Ext.EventObject=new Ext.EventObjectImpl()});(function(){var e=document,d=null,b=e.compatMode=="CSS1Compat",h=Ext.Element,a=function(i){if(!c){c=new Ext.Element.Flyweight()}c.dom=i;return c},c;if(!("activeElement" in e)&&e.addEventListener){e.addEventListener("focus",function(i){if(i&&i.target){d=(i.target==e)?null:i.target}},true)}function g(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}Ext.apply(h,{isAncestor:function(j,k){var i=false;j=Ext.getDom(j);k=Ext.getDom(k);if(j&&k){if(j.contains){return j.contains(k)}else{if(j.compareDocumentPosition){return !!(j.compareDocumentPosition(k)&16)}else{while((k=k.parentNode)){i=k==j||i}}}}return i},getActiveElement:function(){return e.activeElement||d},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug;if(l||m){var p=e.activeElement||d,i=p&&p.tagName,q,j;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&p.type=="text")){if(h.isAncestor(n,p)){q=p.selectionStart;j=p.selectionEnd;if(Ext.isNumber(q)&&Ext.isNumber(j)){return g(p,q,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?h.getDocumentWidth():h.getViewportWidth()},getViewHeight:function(i){return i?h.getDocumentHeight():h.getViewportHeight()},getDocumentHeight:function(){return Math.max(!b?e.body.scrollHeight:e.documentElement.scrollHeight,h.getViewportHeight())},getDocumentWidth:function(){return Math.max(!b?e.body.scrollWidth:e.documentElement.scrollWidth,h.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?e.documentElement.clientHeight:e.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?e.body.clientWidth:Ext.isIE?e.documentElement.clientWidth:self.innerWidth},getY:function(i){return h.getXY(i)[1]},getX:function(i){return h.getXY(i)[0]},getOffsetParent:function(j){j=Ext.getDom(j);try{return j.offsetParent}catch(k){var i=document.body;return(j==i)?null:i}},getXY:function(k){var j,s,u,z,l,m,w=0,t=0,v,i,n=(e.body||e.documentElement),r;k=Ext.getDom(k);if(k!=n){i=a(k).isStyle("position","absolute");if(k.getBoundingClientRect){try{u=k.getBoundingClientRect();v=a(document).getScroll();r=[Math.round(u.left+v.left),Math.round(u.top+v.top)]}catch(q){}}if(!r){for(j=k;j;j=h.getOffsetParent(j)){s=a(j);w+=j.offsetLeft;t+=j.offsetTop;i=i||s.isStyle("position","absolute");if(Ext.isGecko){t+=z=parseInt(s.getStyle("borderTopWidth"),10)||0;w+=l=parseInt(s.getStyle("borderLeftWidth"),10)||0;if(j!=k&&!s.isStyle("overflow","visible")){w+=l;t+=z}}}if(Ext.isSafari&&i){w-=n.offsetLeft;t-=n.offsetTop}if(Ext.isGecko&&!i){m=a(n);w+=parseInt(m.getStyle("borderLeftWidth"),10)||0;t+=parseInt(m.getStyle("borderTopWidth"),10)||0}j=k.parentNode;while(j&&j!=n){if(!Ext.isOpera||(j.tagName!="TR"&&!a(j).isStyle("display","inline"))){w-=j.scrollLeft;t-=j.scrollTop}j=j.parentNode}r=[w,t]}}return r||[0,0]},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){h.setXY(j,[i,false])},setY:function(i,j){h.setXY(i,[false,j])},serializeForm:function(p){var n=p.elements||(document.forms[p]||Ext.getDom(p)).elements,i=false,m=encodeURIComponent,j,q="",l,k;Ext.each(n,function(r){j=r.name;l=r.type;if(!r.disabled&&j){if(/select-(one|multiple)/i.test(l)){Ext.each(r.options,function(s){if(s.selected){k=s.hasAttribute?s.hasAttribute("value"):s.getAttributeNode("value").specified;q+=Ext.String.format("{0}={1}&",m(j),m(k?s.value:s.text))}})}else{if(!(/file|undefined|reset|button/i.test(l))){if(!(/radio|checkbox/i.test(l)&&!r.checked)&&!(l=="submit"&&i)){q+=m(j)+"="+m(r.value)+"&";i=/submit/i.test(l)}}}}});return q.substr(0,q.length-1)}})})();Ext.Element.addMethods((function(){var focusRe=/button|input|textarea|select|object/;return{monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){Ext.each(eventName,function(e){me.on(e,fn)});return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,n=dom.firstChild,nx,ni=-1;if(Ext.Element.data(dom,"isCleaned")&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(/\S/.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{Ext.fly(n).clean();n.nodeIndex=++ni}n=nx}Ext.Element.data(dom,"isCleaned",true);return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var dom=this.dom,data=Ext.Element.data,loader=data(dom,"loader");if(!loader){loader=Ext.create("Ext.ElementLoader",{target:this});data(dom,"loader",loader)}return loader},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){if(!document.getElementById(id)){return false}clearInterval(interval);var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},getScopeParent:function(){var parent=this.dom.parentNode;return Ext.scopeResetCSS?parent.parentNode:parent},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Ext.Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},focusable:function(){var dom=this.dom,nodeName=dom.nodeName.toLowerCase(),canFocus=false,hasTabIndex=!isNaN(dom.tabIndex);if(!dom.disabled){if(focusRe.test(nodeName)){canFocus=true}else{canFocus=nodeName=="a"?dom.href||hasTabIndex:hasTabIndex}}return canFocus&&this.isVisible(true)}}})());Ext.Element.prototype.clearListeners=Ext.Element.prototype.removeAllListeners;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.Element.getViewWidth():k.getWidth(),i=q.height||b?Ext.Element.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignVector:function(c,a,h){var d=this,b={t:"top",l:"left",r:"right",b:"bottom"},e=d.getRegion(),g;c=Ext.get(c);if(!c||!c.dom){}g=c.getRegion()},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!(/-/).test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.Element.getViewWidth()-10,G=Ext.Element.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(n<E){n=z?v.right:E}if(l+F>G+D){l=u?v.top-F:G+D-F}if(l<D){l=u?v.bottom:D}}return[n,l]},alignTo:function(c,a,e,b){var d=this;return d.setXY(d.getAlignToXY(c,a,e),d.anim&&!!b?d.anim(b):false)},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c},getConstrainVector:function(d,b){if(!(d instanceof Ext.util.Region)){d=Ext.get(d).getViewRegion()}var g=this.getRegion(),a=[0,0],e=this.shadow&&this.shadow.offset,c=false;if(b){g.translateBy(b[0]-g.x,b[1]-g.y)}if(e){d.adjust(0,-e,-e,e)}if(g.right>d.right){c=true;a[0]=(d.right-g.right)}if(g.left+a[0]<d.left){c=true;a[0]=(d.left-g.left)}if(g.bottom>d.bottom){c=true;a[1]=(d.bottom-g.bottom)}if(g.top+a[1]<d.top){c=true;a[1]=(d.top-g.top)}return c?a:false},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(a){return this.alignTo(a||document,"c-c")}});(function(){var i=Ext.Element,a="left",e="right",c="top",h="bottom",g="position",b="static",d="relative",j="auto",k="z-index";Ext.override(Ext.Element,{getX:function(){return i.getX(this.dom)},getY:function(){return i.getY(this.dom)},getXY:function(){return i.getXY(this.dom)},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]]},setX:function(l,m){return this.setXY([l,this.getY()],m)},setY:function(m,l){return this.setXY([this.getX(),m],l)},setLeft:function(l){this.setStyle(a,this.addUnits(l));return this},setTop:function(l){this.setStyle(c,this.addUnits(l));return this},setRight:function(l){this.setStyle(e,this.addUnits(l));return this},setBottom:function(l){this.setStyle(h,this.addUnits(l));return this},setXY:function(n,l){var m=this;if(!l||!m.anim){i.setXY(m.dom,n)}else{if(!Ext.isObject(l)){l={}}m.animate(Ext.applyIf({to:{x:n[0],y:n[1]}},l))}return m},setLocation:function(l,n,m){return this.setXY([l,n],m)},moveTo:function(l,n,m){return this.setXY([l,n],m)},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(a),10)||0},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(c),10)||0},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0},position:function(q,p,l,n){var m=this;if(!q&&m.isStyle(g,b)){m.setStyle(g,d)}else{if(q){m.setStyle(g,q)}}if(p){m.setStyle(k,p)}if(l||n){m.setXY([l||false,n||false])}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:b});return this},getPositioning:function(){var m=this.getStyle(a);var n=this.getStyle(c);return{position:this.getStyle(g),left:m,right:m?"":this.getStyle(e),top:n,bottom:n?"":this.getStyle(h),"z-index":this.getStyle(k)}},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right=""}if(l.bottom==j){m.bottom=""}return n},translatePoints:function(l,s){if(Ext.isArray(l)){s=l[1];l=l[0]}var m=this,n=m.isStyle(g,d),r=m.getXY(),q=parseInt(m.getStyle(a),10),p=parseInt(m.getStyle(c),10);if(!Ext.isNumber(q)){q=n?0:m.dom.offsetLeft}if(!Ext.isNumber(p)){p=n?0:m.dom.offsetTop}q=(Ext.isNumber(l))?l-r[0]+q:undefined;p=(Ext.isNumber(s))?s-r[1]+p:undefined;return{left:q,top:p}},setBox:function(q,r,m){var p=this,l=q.width,n=q.height;if((r&&!p.autoBoxAdjust)&&!p.isBorderBox()){l-=(p.getBorderWidth("lr")+p.getPadding("lr"));n-=(p.getBorderWidth("tb")+p.getPadding("tb"))}p.setBounds(q.x,q.y,l,n,m);return p},getBox:function(u,A){var x=this,E,p,z,n=x.getBorderWidth,B=x.getPadding,q,m,D,y,C,s,v;if(!A){E=x.getXY()}else{p=parseInt(x.getStyle("left"),10)||0;z=parseInt(x.getStyle("top"),10)||0;E=[p,z]}C=x.getWidth();s=x.getHeight();if(!u){v={x:E[0],y:E[1],0:E[0],1:E[1],width:C,height:s}}else{q=n.call(x,"l")+B.call(x,"l");m=n.call(x,"r")+B.call(x,"r");D=n.call(x,"t")+B.call(x,"t");y=n.call(x,"b")+B.call(x,"b");v={x:E[0]+q,y:E[1]+D,0:E[0]+q,1:E[1]+D,width:C-(q+m),height:s-(D+y)}}v.right=v.x+v.width;v.bottom=v.y+v.height;return v},move:function(u,m,n){var r=this,z=r.getXY(),v=z[0],t=z[1],p=[v-m,t],w=[v+m,t],s=[v,t-m],l=[v,t+m],q={l:p,left:p,r:w,right:w,t:s,top:s,up:s,b:l,bottom:l,down:l};u=u.toLowerCase();r.moveTo(q[u][0],q[u][1],n)},setLeftTop:function(p,n){var m=this,l=m.dom.style;l.left=m.addUnits(p);l.top=m.addUnits(n);return m},getRegion:function(){return this.getPageBox(true)},getViewRegion:function(){var q=this,n=q.dom===document.body,m,t,s,r,p,l;if(n){m=q.getScroll();r=m.left;s=m.top;p=Ext.Element.getViewportWidth();l=Ext.Element.getViewportHeight()}else{t=q.getXY();r=t[0]+q.getBorderWidth("l")+q.getPadding("l");s=t[1]+q.getBorderWidth("t")+q.getPadding("t");p=q.getWidth(true);l=q.getHeight(true)}return Ext.create("Ext.util.Region",s,r+p,s+l,r)},getPageBox:function(q){var u=this,n=u.dom,x=n===document.body,y=x?Ext.Element.getViewWidth():n.offsetWidth,s=x?Ext.Element.getViewHeight():n.offsetHeight,A=u.getXY(),z=A[1],m=A[0]+y,v=A[1]+s,p=A[0];if(q){return Ext.create("Ext.util.Region",z,m,v,p)}else{return{left:p,top:z,width:y,height:s,right:m,bottom:v}}},setBounds:function(m,r,p,l,n){var q=this;if(!n||!q.anim){q.setSize(p,l);q.setLocation(m,r)}else{if(!Ext.isObject(n)){n={}}q.animate(Ext.applyIf({to:{x:m,y:r,width:q.adjustWidth(p),height:q.adjustHeight(l)}},n))}return q},setRegion:function(m,l){return this.setBounds(m.left,m.top,m.right-m.left,m.bottom-m.top,l)}})})();Ext.override(Ext.Element,{isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollTo:function(b,d,a){var g=/top/i.test(b),c=this,h=c.dom,e={},i;if(!a||!c.anim){i="scroll"+(g?"Top":"Left");h[i]=d}else{if(!Ext.isObject(a)){a={}}e["scroll"+(g?"Top":"Left")]=d;c.animate(Ext.applyIf({to:e},a))}return c},scrollIntoView:function(b,e){b=Ext.getDom(b)||Ext.getBody().dom;var c=this.dom,h=this.getOffsetsTo(b),g=h[0]+b.scrollLeft,j=h[1]+b.scrollTop,a=j+c.offsetHeight,k=g+c.offsetWidth,n=b.clientHeight,m=parseInt(b.scrollTop,10),d=parseInt(b.scrollLeft,10),i=m+n,l=d+b.clientWidth;if(c.offsetHeight>n||j<m){b.scrollTop=j}else{if(a>i){b.scrollTop=a-n}}b.scrollTop=b.scrollTop;if(e!==false){if(c.offsetWidth>b.clientWidth||g<d){b.scrollLeft=g}else{if(k>l){b.scrollLeft=k-b.clientWidth}}b.scrollLeft=b.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,q=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,p,j={l:Math.min(g+b,n-i),r:p=Math.max(g-b,0),t:Math.max(q-b,0),b:Math.min(q+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((p=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",p,this.anim(d))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c=Ext.baseCSSPrefix+"masked",g=Ext.baseCSSPrefix+"masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!(/^body/i.test(k.tagName))){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,p){var r=this,l=r.dom,m=l.style.setExpression,q=Ext.DomHelper,n=Ext.baseCSSPrefix+"mask-msg",i,s;if(!(/^body/i.test(l.tagName)&&r.getStyle("position")=="static")){r.addCls(g)}i=e(l,"maskMsg");if(i){i.remove()}i=e(l,"mask");if(i){i.remove()}s=q.append(l,{cls:Ext.baseCSSPrefix+"mask"},true);e(l,"mask",s);r.addCls(c);s.setDisplayed(true);if(typeof j=="string"){var k=q.append(l,{cls:n,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=p?n+" "+p:n;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(r)}if(!Ext.supports.IncludePaddingInWidthCalculation&&m){s.dom.style.setExpression("width",'this.parentNode.offsetWidth + "px"')}if(!Ext.supports.IncludePaddingInHeightCalculation&&m){s.dom.style.setExpression("height",'this.parentNode.offsetHeight + "px"')}else{if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&r.getStyle("height")=="auto"){s.setSize(undefined,r.getHeight())}}return s},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(i.dom.style.clearExpression){i.dom.style.clearExpression("width");i.dom.style.clearExpression("height")}if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined);k.removeCls([c,g])}},isMasked:function(){var k=this,i=e(k.dom,"mask"),j=e(k.dom,"maskMsg");if(i&&i.isVisible()){if(j){j.center(k)}return true}return false},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className=Ext.baseCSSPrefix+"shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return Ext.create("Ext.util.KeyMap",this,a)},addKeyMap:function(a){return Ext.create("Ext.util.KeyMap",this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}Ext.Array.erase(a,g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.listeners){b.on(b.listeners);delete b.listeners}b.events=b.events||{};if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(i,d,g,e,c){var h=this,a=h.managedListeners=h.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!h.eventOptionsRe.test(d)){h.addManagedListener(i,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:i,ename:d,fn:g,scope:e,options:c});i.on(d,g,e,c)}},removeManagedListener:function(j,c,g,k){var e=this,l,b,h,a,d;if(typeof c!=="string"){l=c;for(c in l){if(l.hasOwnProperty(c)){b=l[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(j,c,b.fn||b,b.scope||l.scope)}}}}h=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=h.length;d<a;d++){e.removeManagedListenerItem(false,h[d],j,c,g,k)}},fireEvent:function(b){var c=b.toLowerCase(),d=this.events,e=d&&d[c],a=e&&e.bubble;return this.continueFireEvent(c,Ext.Array.slice(arguments,1),a)},continueFireEvent:function(c,e,b){var h=this,a,g,d=true;do{if(h.eventsSuspended===true){if((a=h.eventQueue)){a.push([c,e,b])}return d}else{g=h.events[c];if(g&&g!=true){if((d=g.fire.apply(g,e))===false){break}}}}while(b&&(h=h.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&&b.getBubbleTarget();if(a&&a.isObservable){return a}return null},addListener:function(c,e,d,b){var h=this,a,g;if(typeof c!=="string"){b=c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(!h.eventOptionsRe.test(c)){h.addListener(c,a.fn||a,a.scope||b.scope,a.fn?a:b)}}}}else{c=c.toLowerCase();h.events[c]=h.events[c]||true;g=h.events[c]||true;if(Ext.isBoolean(g)){h.events[c]=g=new Ext.util.Event(h,c)}g.addListener(e,d,Ext.isObject(b)?b:{})}},removeListener:function(c,e,d){var h=this,b,g,a;if(typeof c!=="string"){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!h.eventOptionsRe.test(c)){h.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();g=h.events[c];if(g&&g.isEvent){g.removeListener(e,d)}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c<a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,g,c,e,d){if(b||(a.item===g&&a.ename===c&&(!e||a.fn===e)&&(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(e){var d=this,b,a,c;d.events=d.events||{};if(Ext.isString(e)){b=arguments;c=b.length;while(c--){d.events[b[c]]=d.events[b[c]]||true}}else{Ext.applyIf(d.events,e)}},hasListener:function(a){var b=this.events[a.toLowerCase()];return b&&b.isEvent===true&&b.listeners.length>0},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue;a.eventsSuspended=false;delete a.eventQueue;if(b){Ext.each(b,function(c){a.continueFireEvent.apply(a,c)})}},relayEvents:function(c,e,j){j=j||"";var h=this,a=e.length,d=0,g,b;for(;d<a;d++){g=e[d].substr(j.length);b=j+g;h.events[b]=h.events[b]||true;c.on(g,h.createRelayer(b))}},createRelayer:function(a){var b=this;return function(){return b.fireEvent.apply(b,[a].concat(Array.prototype.slice.call(arguments,0,-1)))}},enableBubble:function(a){var b=this;if(!Ext.isEmpty(a)){a=Ext.isArray(a)?a:Ext.Array.toArray(arguments);Ext.each(a,function(c){c=c.toLowerCase();var d=b.events[c]||true;if(Ext.isBoolean(d)){d=new Ext.util.Event(b,c);b.events[c]=d}d.bubble=true})}}},function(){this.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});this.observeClass=this.observe;Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k,m,e;d=c=undefined;g=false;for(m=0,e=i.before.length;m<e;m++){k=i.before[m];b(k.fn,k.scope,l);if(g){return d}}if((c=i.originalFn.apply(h,l))!==undefined){d=c}for(m=0,e=i.after.length;m<e;m++){k=i.after[m];b(k.fn,k.scope,l);if(g){return d}}return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(j,g,d){var h=this.getMethodEvent(j),c,b;for(c=0,b=h.before.length;c<b;c++){if(h.before[c].fn==g&&h.before[c].scope==d){Ext.Array.erase(h.before,c,1);return}}for(c=0,b=h.after.length;c<b;c++){if(h.after[c].fn==g&&h.after[c].scope==d){Ext.Array.erase(h.after,c,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}())});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim",b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(g)),b,a,g,h;if(!e||!e[1]){return}a=e[1];g=e[2];switch(a){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":b=[];if(g!=""){Ext.each(g.split("^"),function(i){b.push(d.decodeValue(i))},d)}return b;case"o":b={};if(g!=""){Ext.each(g.split("^"),function(i){h=i.split("=");b[h[0]]=d.decodeValue(h[1])},d)}return b;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var h=this,k=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(q,p){return p.method.apply(this,[q].concat(p.args))},a=function(r,v){var p=[],s=0,u=r.length,t,q=v!==">";for(;s<u;s++){t=r[s];if(t.getRefItems){p=p.concat(t.getRefItems(q))}}return p},g=function(q){var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];while(!!(s=(s.ownerCt||s.floatParent))){p.push(s)}}return p},m=function(q,v,u){if(v==="*"){return q.slice()}else{var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(s.isXType(v,u)){p.push(s)}}return p}},j=function(q,t){var v=Ext.Array,p=[],r=0,u=q.length,s;for(;r<u;r++){s=q[r];if(s.el?s.el.hasCls(t):v.contains(s.initCls(),t)){p.push(s)}}return p},n=function(r,w,q,v){var p=[],s=0,u=r.length,t;for(;s<u;s++){t=r[s];if(!v?!!t[w]:(String(t[w])===v)){p.push(t)}}return p},d=function(q,u){var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(s.getItemId()===u){p.push(s)}}return p},l=function(p,q,r){return h.pseudos[q](p,r)},i=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(p){p=p||{};Ext.apply(this,p)},execute:function(q){var s=this.operations,t=0,u=s.length,r,p;if(!q){p=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(q)){p=q}}for(;t<u;t++){r=s[t];if(r.mode==="^"){p=g(p||[q])}else{if(r.mode){p=a(p||[q],r.mode)}else{p=e(p||a([q]),r)}}if(t===u-1){return p}}return[]},is:function(r){var q=this.operations,u=Ext.isArray(r)?r:[r],p=u.length,v=q[q.length-1],t,s;u=e(u,v);if(u.length===p){if(q.length>1){for(s=0,t=u.length;s<t;s++){if(Ext.Array.indexOf(this.execute(),u[s])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(v,p){var w=Ext.ComponentQuery,t=0,u=v.length,s=[],r=-1,q;for(;t<u;++t){q=v[t];if(!w.is(q,p)){s[++r]=q}}return s},last:function(p){return p[p.length-1]}},query:function(q,x){var y=q.split(","),p=y.length,r=0,s=[],z=[],w={},u,t,v;for(;r<p;r++){q=Ext.String.trim(y[r]);u=this.cache[q];if(!u){this.cache[q]=u=this.parse(q)}s=s.concat(u.execute(x))}if(p>1){t=s.length;for(r=0;r<t;r++){v=s[r];if(!w[v.id]){z.push(v);w[v.id]=true}}s=z}return s},is:function(q,p){if(!p){return true}var r=this.cache[p];if(!r){this.cache[p]=r=this.parse(p)}return r.is(q)},parse:function(s){var q=[],r=b.length,w,t,x,y,z,u,v,p;while(s&&w!==s){w=s;t=s.match(c);if(t){x=t[1];if(x==="#"){q.push({method:d,args:[Ext.String.trim(t[2])]})}else{if(x==="."){q.push({method:j,args:[Ext.String.trim(t[2])]})}else{q.push({method:m,args:[Ext.String.trim(t[2]),Boolean(t[3])]})}}s=s.replace(t[0],"")}while(!(y=s.match(i))){for(u=0;s&&u<r;u++){v=b[u];z=s.match(v.re);p=v.method;if(z){q.push({method:Ext.isString(v.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[p].concat(z.slice(1)))):v.method,args:z.slice(1)});s=s.replace(z[0],"");break}}}if(y[1]){q.push({mode:y[2]||y[1]});s=s.replace(y[0],"")}}return new h.Query({operations:q})}})});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){return b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=Ext.create("Ext.state.Provider")},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=[c]}var d=this,b=0,a=c.length;for(;b<a;++b){d.on(c[b],d.onStateChange,d)}},onStateChange:function(){var b=this,a=b.saveDelay;if(a>0){if(!b.stateTask){b.stateTask=Ext.create("Ext.util.DelayedTask",b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent("beforestatesave",a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent("statesave",a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent("beforestaterestore",a,b)!==false){a.applyState(b);a.fireEvent("staterestore",a,b)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(c,b){var a=this;Ext.each(c,function(d){a.savePropToState(d,b)});return b},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=Ext.create("Ext.util.HashMap");this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(i,g,h){if(g==e){c.call(b||h,h);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(b,d){if(b instanceof Ext.AbstractComponent){return b}else{if(Ext.isString(b)){return Ext.createByAlias("widget."+b)}else{var c=b.xtype||d,a=b;return Ext.createByAlias("widget."+c,a)}}},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.ComponentManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},renderTpl:null,tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,needsLayout:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,weight:0,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,maskOnDisable:true,constructor:function(b){var d=this,c,a;b=b||{};d.initialConfig=b;Ext.apply(d,b);d.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","resize","move");d.getId();d.mons=[];d.additionalCls=[];d.renderData=d.renderData||{};d.renderSelectors=d.renderSelectors||{};if(d.plugins){d.plugins=[].concat(d.plugins);d.constructPlugins()}d.initComponent();Ext.ComponentManager.register(d);d.mixins.observable.constructor.call(d);d.mixins.state.constructor.call(d,b);this.addStateEvents("resize");if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;c<a;c++){d.plugins[c]=d.initPlugin(d.plugins[c])}}d.loader=d.getLoader();if(d.renderTo){d.render(d.renderTo)}if(d.autoShow){d.show()}},initComponent:function(){this.constructPlugins()},getState:function(){var g=this,e=g.ownerCt?(g.shadowOwnerCt||g.ownerCt).getLayout():null,h={collapsed:g.collapsed},c=g.width,b=g.height,a=g.collapseMemento,d;if(g.collapsed&&a){if(Ext.isDefined(a.data.width)){c=a.width}if(Ext.isDefined(a.data.height)){b=a.height}}if(e&&g.flex){h.flex=g.flex;if(e.perpendicularPrefix){h[e.perpendicularPrefix]=g["get"+e.perpendicularPrefixCap]()}else{}}else{if(e&&g.anchor){h.anchor=g.anchor;d=g.anchor.split(" ").concat(null);if(!d[0]){if(g.width){h.width=c}}if(!d[1]){if(g.height){h.height=b}}}else{if(g.width){h.width=c}if(g.height){h.height=b}}}if(h.width==g.initialConfig.width){delete h.width}if(h.height==g.initialConfig.height){delete h.height}if(e&&e.align&&(e.align.indexOf("stretch")!==-1)){delete h[e.perpendicularPrefix]}return h},show:Ext.emptyFn,animate:function(b){var g=this,k;b=b||{};k=b.to||{};if(Ext.fx.Manager.hasFxBlock(g.id)){return g}if(!b.dynamic&&(k.height||k.width)){var e=g.getWidth(),l=e,d=g.getHeight(),c=d,a=false;if(k.height&&k.height>d){c=k.height;a=true}if(k.width&&k.width>e){l=k.width;a=true}if(a){var j=!Ext.isNumber(g.width),i=!Ext.isNumber(g.height);g.componentLayout.childrenChanged=true;g.setSize(l,c,g.ownerCt);g.el.setSize(e,d);if(j){delete g.width}if(i){delete g.height}}}return g.mixins.animate.animate.apply(g,arguments)},findLayoutController:function(){return this.findParentBy(function(a){return !a.ownerCt||(a.layout.layoutBusy&&!a.ownerCt.layout.layoutBusy)})},onShow:function(){var a=this.needsLayout;if(Ext.isObject(a)){this.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c<a;c++){b[c]=d.constructPlugin(b[c])}}},initPlugin:function(a){a.init(this);return a},doAutoRender:function(){var a=this;if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}},render:function(b,a){var c=this;if(!c.rendered&&c.fireEvent("beforerender",c)!==false){c.rendering=true;if(c.el){c.el=Ext.get(c.el)}if(c.floating){c.onFloatRender()}b=c.initContainer(b);c.onRender(b,a);c.el.setVisibilityMode(Ext.Element[c.hideMode.toUpperCase()]);if(c.overCls){c.el.hover(c.addOverCls,c.removeOverCls,c)}c.fireEvent("render",c);c.initContent();c.afterRender(b);c.fireEvent("afterrender",c);c.initEvents();if(c.hidden){c.el.hide()}if(c.disabled){c.disable(true)}delete c.rendering}return c},onRender:function(b,a){var g=this,d=g.el,e=g.initStyles(),j,h,c;a=g.getInsertPosition(a);if(!d){if(a){d=Ext.DomHelper.insertBefore(a,g.getElConfig(),true)}else{d=Ext.DomHelper.append(b,g.getElConfig(),true)}}else{if(g.allowDomMove!==false){if(a){b.dom.insertBefore(d.dom,a)}else{b.dom.appendChild(d.dom)}}}if(Ext.scopeResetCSS&&!g.ownerCt){if(d.dom==Ext.getBody().dom){d.parent().addCls(Ext.baseCSSPrefix+"reset")}else{g.resetEl=d.wrap({cls:Ext.baseCSSPrefix+"reset"})}}g.setUI(g.ui);d.addCls(g.initCls());d.setStyle(e);g.el=d;g.initFrame();j=g.initRenderTpl();if(j){h=g.initRenderData();j.append(g.getTargetEl(),h)}g.applyRenderSelectors();g.rendered=true},afterRender:function(){var a=this,c,b;a.getComponentLayout();if(a.collapsed||(!a.ownerCt||(a.height||a.width))){a.setSize(a.width,a.height)}else{a.renderChildren()}if(a.floating&&(a.x===undefined||a.y===undefined)){if(a.floatParent){b=a.el.getAlignToXY(a.floatParent.getTargetEl(),"c-c");c=a.floatParent.getTargetEl().translatePoints(b[0],b[1])}else{b=a.el.getAlignToXY(a.container,"c-c");c=a.container.translatePoints(b[0],b[1])}a.x=a.x===undefined?c.left:a.x;a.y=a.y===undefined?c.top:a.y}if(Ext.isDefined(a.x)||Ext.isDefined(a.y)){a.setPosition(a.x,a.y)}if(a.styleHtmlContent){a.getTargetEl().addCls(a.styleHtmlCls)}},registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=Ext.create("Ext.ZIndexManager",a)}a.floatingItems.register(b)},renderChildren:function(){var b=this,a=b.getComponentLayout();b.suspendLayout=true;a.renderChildren();delete b.suspendLayout},frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameTpl:['<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>"],frameTableTpl:["<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" style="background-position: 0 0;" role="presentation"></td>','<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>"],initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,d=e.getFrameInfo(),b=d.width,a=e.getFrameTpl(d.table),c;if(e.frame){e.frameGenId=c=(e.frameGenId||0)+1;c=e.id+"-frame"+c;a.insertFirst(e.el,Ext.apply({},{fgid:c,ui:e.ui,uiCls:e.uiCls,frameCls:e.frameCls,baseCls:e.baseCls,frameWidth:b,top:!!d.top,left:!!d.left,right:!!d.right,bottom:!!d.bottom},e.getFramePositions(d)));e.frameBody=e.el.down("."+e.frameCls+"-mc");e.removeChildEls(function(g){return g.id&&e.frameIdRegex.test(g.id)});Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(g){e.childEls.push({name:"frame"+g,id:c+g})})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,h=this.frameSize&&this.frameSize.table,g=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){delete e.frameTL;delete e.frameTC;delete e.frameTR;delete e.frameML;delete e.frameMC;delete e.frameMR;delete e.frameBL;delete e.frameBC;delete e.frameBR;this.applyRenderSelectors();b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}c.remove()}}else{}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius){return false}var c=this,g=c.el.getStyle("background-position-x"),e=c.el.getStyle("background-position-y"),d,b=false,a;if(!g&&!e){d=c.el.getStyle("background-position").split(" ");g=d[0];e=d[1]}if(parseInt(g,10)>=1000000&&parseInt(e,10)>=1000000){a=Math.max;b={table:g.substr(0,3)=="110",vertical:e.substr(0,3)=="110",top:a(g.substr(3,2),g.substr(5,2)),right:a(g.substr(5,2),e.substr(3,2)),bottom:a(e.substr(3,2),e.substr(5,2)),left:a(e.substr(5,2),g.substr(3,2))};b.width=a(b.top,b.right,b.bottom,b.left);c.el.setStyle("background-image","none")}if(c.frame===true&&!b){}c.frame=c.frame||!!b;c.frameSize=b||false;return b},getFramePositions:function(e){var h=this,i=e.width,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return a?this.getTpl("frameTableTpl"):this.getTpl("frameTpl")},initCls:function(){var b=this,a=[];a.push(b.baseCls);if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}if(b.cls){a.push(b.cls);delete b.cls}return a.concat(b.additionalCls)},setUI:function(g){var e=this,b=Ext.Array.clone(e.uiCls),h=[],d=[],a,c;for(c=0;c<b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));h.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=g;e.addUIToElement();d=[];for(c=0;c<h.length;c++){a=h[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}},addClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&!d.hasUICls(a[b])){d.uiCls=Ext.Array.clone(d.uiCls);d.uiCls.push(a[b]);c=c.concat(d.addUIClsToElement(a[b]))}}if(e!==true){d.addCls(c)}return c},removeClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&d.hasUICls(a[b])){d.uiCls=Ext.Array.remove(d.uiCls,a[b]);c=c.concat(d.removeUIClsFromElement(a[b]))}}if(e!==true){d.removeCls(c)}return c},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},addUIClsToElement:function(l,a){var h=this,m=[],k=h.frameElementCls;m.push(Ext.baseCSSPrefix+l);m.push(h.baseCls+"-"+l);m.push(h.baseCls+"-"+h.ui+"-"+l);if(!a&&h.frame&&!Ext.supports.CSS3BorderRadius){var e=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,g,d,b;for(g=0;g<e.length;g++){b=h["frame"+e[g].toUpperCase()];c=[h.baseCls+"-"+h.ui+"-"+e[g],h.baseCls+"-"+h.ui+"-"+l+"-"+e[g]];if(b&&b.dom){b.addCls(c)}else{for(d=0;d<c.length;d++){if(Ext.Array.indexOf(k[e[g]],c[d])==-1){k[e[g]].push(c[d])}}}}}h.frameElementCls=k;return m},removeUIClsFromElement:function(b,j){var h=this,a=[],g=h.frameElementCls;a.push(Ext.baseCSSPrefix+b);a.push(h.baseCls+"-"+b);a.push(h.baseCls+"-"+h.ui+"-"+b);if(!j&&h.frame&&!Ext.supports.CSS3BorderRadius){var d=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,e;b=h.baseCls+"-"+h.ui+"-"+b+"-"+d[c];for(c=0;c<d.length;c++){e=h["frame"+d[c].toUpperCase()];if(e&&e.dom){e.removeCls(b)}else{Ext.Array.remove(g[d[c]],b)}}}h.frameElementCls=g;return a},addUIToElement:function(h){var g=this,e=g.frameElementCls;g.addCls(g.baseCls+"-"+g.ui);if(g.frame&&!Ext.supports.CSS3BorderRadius){var c=["tl","tc","tr","ml","mc","mr","bl","bc","br"],b,d,a;for(b=0;b<c.length;b++){d=g["frame"+c[b].toUpperCase()];a=g.baseCls+"-"+g.ui+"-"+c[b];if(d){d.addCls(a)}else{if(!Ext.Array.contains(e[c[b]],a)){e[c[b]].push(a)}}}}},removeUIFromElement:function(){var h=this,g=h.frameElementCls;h.removeCls(h.baseCls+"-"+h.ui);if(h.frame&&!Ext.supports.CSS3BorderRadius){var d=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,b,e,a;for(c=0;c<d.length;c++){e=h["frame"+d[c].toUpperCase()];a=h.baseCls+"-"+h.ui+"-"+d[c];if(e){e.removeCls(a)}else{Ext.Array.remove(g[d[c]],a)}}}},getElConfig:function(){if(Ext.isString(this.autoEl)){this.autoEl={tag:this.autoEl}}var a=this.autoEl||{tag:"div"};a.id=this.id;return a},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=Ext.get(a);if(b.ctCls){b.container.addCls(b.ctCls)}return b.container},initRenderData:function(){var a=this;return Ext.applyIf(a.renderData,{id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame})},getTpl:function(c){var e=this,b=e.self.prototype,d,a;if(e.hasOwnProperty(c)){a=e[c];if(a&&!(a instanceof Ext.XTemplate)){e[c]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",a)}return e[c]}if(!(b[c] instanceof Ext.XTemplate)){d=b;do{if(d.hasOwnProperty(c)){a=d[c];if(a&&!(a instanceof Ext.XTemplate)){d[c]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",a);break}}d=d.superclass}while(d)}return b[c]},initRenderTpl:function(){return this.getTpl("renderTpl")},initStyles:function(){var b={},c=this,a=Ext.Element;if(Ext.isString(c.style)){b=a.parseStyles(c.style)}else{b=Ext.apply({},c.style)}if(c.padding!==undefined){b.padding=a.unitizeBox((c.padding===true)?5:c.padding)}if(c.margin!==undefined){b.margin=a.unitizeBox((c.margin===true)?5:c.margin)}delete c.style;return b},initContent:function(){var b=this,d=b.getTargetEl(),a,c;if(b.html){d.update(Ext.DomHelper.markup(b.html));delete b.html}if(b.contentEl){a=Ext.get(b.contentEl);c=Ext.baseCSSPrefix;a.removeCls([c+"hidden",c+"hide-display",c+"hide-offsets",c+"hide-nosize"]);d.appendChild(a.dom)}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=Ext.create("Ext.XTemplate",b.tpl)}if(b.data){b.tpl[b.tplWriteMode](d,b.data);delete b.data}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(g){c.mon(b,g)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&&b.on){Ext.each(e[d],a)}}}}},addChildEls:function(){var b=this,a=b.childEls||(b.childEls=[]);a.push.apply(a,arguments)},removeChildEls:function(g){var e=this,a=e.childEls,d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}},applyRenderSelectors:function(){var g=this,h=g.childEls,j=g.renderSelectors,a=g.el,d=a.dom,k,l,c,e,b;if(h){k=g.id+"-";for(e=h.length;e--;){l=c=h[e];if(typeof(l)!="string"){c=l.id||(k+l.itemId);l=l.name}else{c=k+c}g[l]=a.getById(c)}}if(j){for(b in j){if(j.hasOwnProperty(b)&&j[b]){g[b]=Ext.get(Ext.DomQuery.selectNode(j[b],d))}}}},is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.ownerCt;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.prev(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items.items,e=Ext.Array.indexOf(g,h)-1;e>-1;e--){if(g[e].query){b=g[e].query(c);b=b[b.length-1];if(b){return b}}}return h.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.next(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items,e=g.indexOf(h)+1,g=g.items,a=g.length;e<a;e++){if(g[e].down){b=g[e].down(c);if(b){return b}}}return h.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},isXType:function(b,a){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.statics().xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.self.xtype==b},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.doComponentLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&c.rendered&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},enable:function(a){var b=this;if(b.rendered){b.el.removeCls(b.disabledCls);b.el.dom.disabled=false;b.onEnable()}b.disabled=false;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;if(b.rendered){b.el.addCls(b.disabledCls);b.el.dom.disabled=true;b.onDisable()}b.disabled=true;if(a!==true){b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.mask()}},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.addCls(a)}else{b.additionalCls=Ext.Array.unique(b.additionalCls.concat(a))}return b},addClass:function(){return this.addCls.apply(this,arguments)},removeCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.removeCls(a)}else{if(b.additionalCls.length){Ext.each(a,function(c){Ext.Array.remove(b.additionalCls,c)})}}return b},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,b){this.ownerCt=a;this.fireEvent("added",this,a,b)},onRemoved:function(){var a=this;a.fireEvent("removed",a,a.ownerCt);delete a.ownerCt},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this,d;if(Ext.isObject(b)){a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:true};if(!c.rendered){c.width=(b!==undefined)?b:c.width;c.height=(a!==undefined)?a:c.height}return c}c.doComponentLayout(b,a,true);return c},isFixedWidth:function(){var b=this,a=b.layoutManagedWidth;if(Ext.isDefined(b.width)||a==1){return true}if(a==2){return false}return(b.ownerCt&&b.ownerCt.isFixedWidth())},isFixedHeight:function(){var a=this,b=a.layoutManagedHeight;if(Ext.isDefined(a.height)||b==1){return true}if(b==2){return false}return(a.ownerCt&&a.ownerCt.isFixedHeight())},setCalculatedSize:function(b,a,e){var c=this,d;if(Ext.isObject(b)){e=b.ownerCt;a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:false,ownerCt:e};return c}c.doComponentLayout(b,a,false,e);return c},doComponentLayout:function(e,b,c,h){var g=this,d=g.getComponentLayout(),a=d.lastComponentSize||{width:undefined,height:undefined};if(g.rendered&&d){if(!Ext.isDefined(e)){if(g.isFixedWidth()){e=Ext.isDefined(g.width)?g.width:a.width}}if(!Ext.isDefined(b)){if(g.isFixedHeight()){b=Ext.isDefined(g.height)?g.height:a.height}}if(c){g.width=e;g.height=b}d.layout(e,b,c,h)}return g},forceComponentLayout:function(){this.doComponentLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,h){var g=this,e=g.componentLayout,d=g.preLayoutSize;++g.componentLayoutCounter;if(!d||((c!==d.width)||(a!==d.height))){g.fireEvent("resize",g,c,a)}},beforeComponentLayout:function(c,a,b,d){this.preLayoutSize=this.componentLayout.lastComponentSize;return true},setPosition:function(a,c){var b=this;if(Ext.isObject(a)){c=a.y;a=a.x}if(!b.rendered){return b}if(a!==undefined||c!==undefined){b.el.setBox(a,c);b.onPosition(a,c);b.fireEvent("move",b,a,c)}return b},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=Ext.create("Ext.ComponentLoader",Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setLoading:function(c,d){var b=this,a;if(b.rendered){if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=c}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}b.loadMask=b.loadMask||Ext.create("Ext.LoadMask",d?b.getTargetEl():b.el,a);b.loadMask.show()}else{if(b.loadMask){Ext.destroy(b.loadMask);b.loadMask=null}}}return b.loadMask},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.doComponentLayout()}return a},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingItems)},cleanElementRefs:function(){var h=this,e=0,g=h.childEls,d=h.renderSelectors,b,c,a;if(h.rendered){if(g){for(a=g.length;e<a;++e){c=g[e];if(typeof(c)!="string"){c=c.name}delete h[c]}}if(d){for(b in d){if(d.hasOwnProperty(b)){delete h[b]}}}}delete h.rendered;delete h.el;delete h.frameBody},destroy:function(){var a=this;if(!a.isDestroyed){if(a.fireEvent("beforedestroy",a)!==false){a.destroying=true;a.beforeDestroy();if(a.floating){delete a.floatParent;if(a.zIndexManager){a.zIndexManager.unregister(a)}}else{if(a.ownerCt&&a.ownerCt.remove){a.ownerCt.remove(a,false)}}a.onDestroy();Ext.destroy(a.plugins);if(a.rendered){a.el.remove()}a.fireEvent("destroy",a);Ext.ComponentManager.unregister(a);a.mixins.state.destroy.call(a);a.clearListeners();a.cleanElementRefs();a.destroying=false;a.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){this.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"})});Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(a){Ext.apply(this,a)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.addEvents("beforerequest","requestcomplete","requestexception");this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(this.isFormUpload(k)===true){this.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort===true||g.autoAbort){g.abort()}if((k.cors===true||g.cors===true)&&Ext.isIe&&Ext.ieVersion>=8){i=new XDomainRequest()}else{i=this.getXhrInstance()}b=k.async!==false?(k.async||g.async):false;if(e){i.open(c.method,c.url,b,e,h)}else{i.open(c.method,c.url,b)}if(k.withCredentials===true||g.withCredentials===true){i.withCredentials=true}a=g.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}i.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(d,b,i,k){d=Ext.getDom(d);k=k||{};var c=Ext.id(),g=document.createElement("iframe"),j=[],h="multipart/form-data",e={target:d.target,method:d.method,encoding:d.encoding,enctype:d.enctype,action:d.action},a;Ext.fly(g).set({id:c,name:c,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(g);if(document.frames){document.frames[c].name=c}Ext.fly(d).set({target:c,method:"POST",enctype:h,encoding:h,action:b||e.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(l,m){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:m,name:l});d.appendChild(a);j.push(a)})}Ext.fly(g).on("load",Ext.Function.bind(this.onUploadComplete,this,[g,k]),null,{single:true});d.submit();Ext.fly(d).set(e);Ext.each(j,function(l){Ext.removeNode(l)})},onUploadComplete:function(i,b){var c=this,a={responseText:"",responseXML:null},h,g;try{h=i.contentWindow.document||i.contentDocument||window.frames[i.id].document;if(h){if(h.body){if(/textarea/i.test((g=h.body.firstChild||{}).tagName)){a.responseText=g.value}else{a.responseText=h.body.innerHTML}}a.responseXML=h.XMLDocument||h}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(i)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g})(),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){b.xhr.onreadystatechange=null;b.xhr.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(g){var d=this,c=g.options,a,i,b;try{a=d.parseStatus(g.xhr.status)}catch(h){a={success:false,isException:false}}i=a.success;if(i){b=d.createResponse(g);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||g.aborted||g.timedout){b=d.createException(g)}else{b=d.createResponse(g)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,i,b]);delete d.requests[g.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(i){i=Ext.apply({},i);var e=this,d=e.target,j=Ext.isDefined(i.loadMask)?i.loadMask:e.loadMask,b=Ext.apply({},i.params),a=Ext.apply({},i.ajaxOptions),g=i.callback||e.callback,h=i.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(i,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(i,{url:e.url});Ext.apply(i,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,i)===false){return}if(j){e.addMask(j)}c=Ext.Ajax.request(i);e.active={request:c,options:i,mask:j,scope:h,callback:g,success:i.success||e.success,failure:i.failure||e.failure,renderer:i.renderer||e.renderer,scripts:Ext.isDefined(i.scripts)?i.scripts:e.scripts};e.setOptions(e.active,i)},setOptions:Ext.emptyFn,onComplete:function(b,h,a){var d=this,g=d.active,c=g.scope,e=d.getRenderer(g.renderer);if(h){h=e.call(d,d,a,g)}if(h){Ext.callback(g.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(g.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(g.callback,c,[d,h,a,b]);if(g.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){if(h.removeAll){g.removeAll()}g.add(b)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.data.Association",{primaryKey:"id",defaultReaderType:"json",statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return Ext.create("Ext.data.BelongsToAssociation",a);case"hasMany":return Ext.create("Ext.data.HasManyAssociation",a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,g=b.associatedModel,e=c[d],h=c[g],a;this.ownerModel=e;this.associatedModel=h;Ext.applyIf(this,{ownerName:d,associatedName:g})},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,g){var e=[],b=this.types;for(var a in b){if(!b.hasOwnProperty(a)){continue}var d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.Template",{requires:["Ext.DomHelper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}d=a.join("")}else{if(Ext.isArray(d)){a.push(d.join(""))}else{a.push(d)}}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,applyTemplate:function(a){var g=this,c=g.disableFormats!==true,e=Ext.util.Format,b=g;if(g.compiled){return g.compiled(a)}function d(h,j,k,i){if(k&&c){if(i){i=[a[j]].concat(Ext.functionFactory("return ["+i+"];")())}else{i=[a[j]]}if(k.substr(0,5)=="this."){return b[k.substr(5)].apply(b,i)}else{return e[k].apply(e,i)}}else{return a[j]!==undefined?a[j]:""}}return g.html.replace(g.re,d)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'].join('');};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}},function(){this.createAlias("apply","applyTemplate")});Ext.define("Ext.XTemplate",{extend:"Ext.Template",argsRe:/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,nameRe:/^<tpl\b[^>]*?for="(.*?)"/,ifRe:/^<tpl\b[^>]*?if="(.*?)"/,execRe:/^<tpl\b[^>]*?exec="(.*?)"/,constructor:function(){this.callParent(arguments);var z=this,j=z.html,w=z.argsRe,c=z.nameRe,u=z.ifRe,y=z.execRe,q=0,k=[],p="values",x="parent",l="xindex",n="xcount",d="return ",b="with(values){ ",r,g,v,a,e,h,s,A,t;j=["<tpl>",j,"</tpl>"].join("");while((r=j.match(w))){e=null;h=null;s=null;g=r[0].match(c);v=r[0].match(u);a=r[0].match(y);e=v?v[1]:null;if(e){h=Ext.functionFactory(p,x,l,n,b+"try{"+d+Ext.String.htmlDecode(e)+";}catch(e){return;}}")}e=a?a[1]:null;if(e){s=Ext.functionFactory(p,x,l,n,b+Ext.String.htmlDecode(e)+";}")}A=g?g[1]:null;if(A){if(A==="."){A=p}else{if(A===".."){A=x}}A=Ext.functionFactory(p,x,"try{"+b+d+A+";}}catch(e){return;}")}k.push({id:q,target:A,exec:s,test:h,body:r[1]||""});j=j.replace(r[0],"{xtpl"+q+"}");q=q+1}for(t=k.length-1;t>=0;--t){z.compileTpl(k[t])}z.master=k[k.length-1];z.tpls=k},applySubTemplate:function(h,a,c,e,g){var d=this,b=d.tpls[h];return b.compiled.call(d,a,c,e,g)},codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?\}/g,compileTpl:function(tpl){var fm=Ext.util.Format,me=this,useFormat=me.disableFormats!==true,body,bodyReturn,evaluatedFn;function fn(m,name,format,args,math){var v;if(name.substr(0,4)=="xtpl"){return"',this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount),'"}if(name=="."){v='Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'}else{if(name=="#"){v="xindex"}else{if(name.substr(0,7)=="parent."){v=name}else{if(name.indexOf(".")!=-1){v="values."+name}else{v="values['"+name+"']"}}}}if(math){v="("+v+math+")"}if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="("+v+" === undefined ? '' : "}return"',"+format+v+args+"),'"}function codeFn(m,code){return"',("+code.replace(me.compileARe,"'")+"),'"}bodyReturn=tpl.body.replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn).replace(me.codeRe,codeFn);body="evaluatedFn = function(values, parent, xindex, xcount){return ['"+bodyReturn+"'].join('');};";eval(body);tpl.compiled=function(values,parent,xindex,xcount){var vs,length,buffer,i;if(tpl.test&&!tpl.test.call(me,values,parent,xindex,xcount)){return""}vs=tpl.target?tpl.target.call(me,values,parent):values;if(!vs){return""}parent=tpl.target?values:parent;if(tpl.target&&Ext.isArray(vs)){buffer=[];length=vs.length;if(tpl.exec){for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length);tpl.exec.call(me,vs[i],parent,i+1,length)}}else{for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length)}}return buffer.join("")}if(tpl.exec){tpl.exec.call(me,vs,parent,xindex,xcount)}return evaluatedFn.call(me,vs,parent,xindex,xcount)};return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}},function(){this.createAlias("apply","applyTemplate")});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(i,c){var h=Ext.getClassName(i),d=h.match(/^(.*)\.controller\./);if(d!==null){var a=Ext.Loader.getPrefix(h)||d[1],g=c.onBeforeClassCreated,j=[],b=["model","view","store"],e;c.onBeforeClassCreated=function(t,m){var n,q,k,r,l,p,s;for(n=0,q=b.length;n<q;n++){k=b[n];r=Ext.Array.from(m[k+"s"]);for(l=0,p=r.length;l<p;l++){s=r[l];e=Ext.Loader.getPrefix(s);if(e===""||e===s){j.push(a+"."+k+"."+s)}else{j.push(s)}}}Ext.require(j,Ext.Function.pass(g,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(b,a){b=Ext.String.capitalize(b);Ext.Array.each(a,function(d){var c="get",e=d.split(".");Ext.Array.each(e,function(g){c+=Ext.String.capitalize(g)});c+=b;if(!this[c]){this[c]=Ext.Function.pass(this["get"+b],[d],this)}this[c](d)},this)},ref:function(a){var b=this;a=Ext.Array.from(a);Ext.Array.each(a,function(e){var d=e.ref,c="get"+Ext.String.capitalize(d);if(!b[c]){b[c]=Ext.Function.pass(b.getRef,[d,e],b)}})},getRef:function(e,g,b){this.refCache=this.refCache||{};g=g||{};b=b||{};Ext.apply(g,b);if(g.forceCreate){return Ext.ComponentManager.create(g,"component")}var d=this,a=g.selector,c=d.refCache[e];if(!c){d.refCache[e]=c=Ext.ComponentQuery.query(g.selector)[0];if(!c&&g.autoCreate){d.refCache[e]=c=Ext.ComponentManager.create(g,"component")}if(c){c.on("beforedestroy",function(){d.refCache[e]=null})}}return c},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(h,g){return a*b.call(c,h,g)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,group:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(b){var g=this,h,c,d,e,a;if(!g.actionSkipSyncRe.test(g.action)){d=g.records;if(d&&d.length){h=Ext.create("Ext.util.MixedCollection",true,function(i){return i.getId()});h.addAll(d);for(c=b?b.length:0;c--;){e=b[c];a=h.get(e.getId());if(a){a.beginEdit();a.set(e.data);a.endEdit(true)}}if(g.actionCommitRecordsRe.test(g.action)){for(c=d.length;c--;){d[c].commit()}}}}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return(a===undefined?this.records:a.records)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(b===undefined){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d]))}return this.writeRecords(e,g)},getRecordData:function(e){var j=e.phantom===true,b=this.writeAllFields||j,c=this.nameProperty,g=e.fields,d={},i,a,h,k;if(b){g.each(function(l){if(l.persist){a=l[c]||l.name;d[a]=e.get(l.name)}})}else{i=e.getChanges();for(k in i){if(i.hasOwnProperty(k)){h=g.get(k);a=h[c]||h.name;d[a]=i[k]}}if(!j){d[e.idProperty]=e.getId()}}return d}});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(a){var b=this;b.floating=true;b.el=Ext.create("Ext.Layer",Ext.apply({},a,{hideMode:b.hideMode,hidden:b.hidden,shadow:Ext.isDefined(b.shadow)?b.shadow:"sides",shadowOffset:b.shadowOffset,constrain:false,shim:b.shim===false?false:undefined}),b.el)},onFloatRender:function(){var a=this;a.zIndexParent=a.getZIndexParent();a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false){a.showOnParentShow=a.isVisible();a.hide()}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},getZIndexParent:function(){var a=this.ownerCt,b;if(a){while(a){b=a;a=a.ownerCt}if(b.floating){return b}}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingItems){a=Math.floor(b.floatingItems.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b||c.el.getScopeParent()),d;if(a){d=c.getPosition();d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(b){var c=this,a;if(c.constrain||c.constrainHeader){a=c.constrainHeader?c.header.el:c.el;b=b||(c.floatParent&&c.floatParent.getTargetEl())||c.container;return a.getConstrainVector(b)}},alignTo:function(b,a,c){if(b.isComponent){b=b.getEl()}var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d);return this},toFront:function(b){var a=this;if(a.zIndexParent){a.zIndexParent.toFront(true)}if(a.zIndexManager.bringToFront(a)){if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(!b){a.focus(false,true)}}return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}a.fireEvent("activate",a)}else{if((a instanceof Ext.window.Window)&&(c instanceof Ext.window.Window)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b);return a},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define("Ext.layout.Layout",{isLayout:true,initialized:false,statics:{create:function(b,c){var a;if(b instanceof Ext.layout.Layout){return Ext.createByAlias("layout."+b)}else{if(!b||typeof b==="string"){a=b||c;b={}}else{a=b.type||c}return Ext.createByAlias("layout."+a,b||{})}}},constructor:function(a){this.id=Ext.id(null,this.type+"-");Ext.apply(this,a)},layout:function(){var a=this;a.layoutBusy=true;a.initLayout();if(a.beforeLayout.apply(a,arguments)!==false){a.layoutCancelled=false;a.onLayout.apply(a,arguments);a.childrenChanged=false;a.owner.needsLayout=false;a.layoutBusy=false;a.afterLayout.apply(a,arguments)}else{a.layoutCancelled=true}a.layoutBusy=false;a.doOwnerCtLayouts()},beforeLayout:function(){this.renderChildren();return true},renderChildren:function(){this.renderItems(this.getLayoutItems(),this.getRenderTarget())},renderItems:function(a,g){var e=this,d=a.length,b=0,c;for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}},isValidParent:function(b,c,a){var d=b.el?b.el.dom:Ext.getDom(b);if(d&&c&&c.dom){if(Ext.isNumber(a)&&d!==c.dom.childNodes[a]){return false}return(d.parentNode==(c.dom||c))}return false},renderItem:function(c,d,a){var b=this;if(!c.rendered){if(b.itemCls){c.addCls(b.itemCls)}if(b.owner.itemCls){c.addCls(b.owner.itemCls)}c.render(d,a);b.configureItem(c);b.childrenChanged=true}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b);this.childrenChanged=true},initLayout:function(){var a=this,b=a.targetCls;if(!a.initialized&&!Ext.isEmpty(b)){a.getTarget().addCls(b)}a.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},configureItem:Ext.emptyFn,onLayout:Ext.emptyFn,afterLayout:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,doOwnerCtLayouts:Ext.emptyFn,afterRemove:function(c){var b=c.el,a=this.owner,e=this.itemCls,d=a.itemCls;if(c.rendered&&!c.isDestroyed){if(e){b.removeCls(e)}if(d){b.removeCls(d)}}delete c.layoutManagedWidth;delete c.layoutManagedHeight},destroy:function(){var b=this.targetCls,a;if(!Ext.isEmpty(b)){a=this.getTarget();if(a){a.removeCls(b)}}this.onDestroy()}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(a.getEl().getStyle("zIndex"),b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(a){this.zseed=a;return this.assignZIndices()},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,g=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){g=d.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(a){if(a!==this.front){if(this.front){this.front.setActive(false,a)}this.front=a;if(a){a.setActive(true);if(a.modal){this._showModalMask(a)}}}},_activateLast:function(a){var b,d=false,c;for(c=this.zIndexStack.length-1;c>=0;--c){b=this.zIndexStack[c];if(!b.hidden){if(!d){this._setActiveChild(b);d=true}if(b.modal){this._showModalMask(b);return}}}this._hideModalMask();if(!d){this._setActiveChild(null)}},_showModalMask:function(a){var d=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():Ext.get(a.getEl().dom.parentNode),c;if(!b){return}c=b.getBox();if(!this.mask){this.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});this.mask.setVisibilityMode(Ext.Element.DISPLAY);this.mask.on("click",this._onMaskClick,this)}if(b.dom===document.body){c.height=Ext.Element.getViewHeight()}b.addCls(Ext.baseCSSPrefix+"body-masked");this.mask.setBox(c);this.mask.setStyle("zIndex",d);this.mask.show()},_hideModalMask:function(){if(this.mask&&this.mask.dom.parentNode){Ext.get(this.mask.dom.parentNode).removeCls(Ext.baseCSSPrefix+"body-masked");this.mask.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){if(this.mask&&this.mask.isVisible()){this.mask.setSize(Ext.get(this.mask.dom.parentNode).getViewSize(true))}},register:function(a){if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=this;this.list[a.id]=a;this.zIndexStack.push(a);a.on("hide",this._activateLast,this)},unregister:function(a){delete a.zIndexManager;if(this.list&&this.list[a.id]){delete this.list[a.id];a.un("hide",this._activateLast);Ext.Array.remove(this.zIndexStack,a);this._activateLast(a)}},get:function(a){return typeof a=="object"?a:this.list[a]},bringToFront:function(a){a=this.get(a);if(a!==this.front){Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.push(a);this.assignZIndices();return true}if(a.modal){this._showModalMask(a)}return false},sendToBack:function(a){a=this.get(a);Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.unshift(a);this.assignZIndices();return a},hideAll:function(){for(var a in this.list){if(this.list[a].isComponent&&this.list[a].isVisible()){this.list[a].hide()}}},hide:function(){var b=0,c=this.zIndexStack.length,a;this.tempHidden=[];for(;b<c;b++){a=this.zIndexStack[b];if(a.isVisible()){this.tempHidden.push(a);a.hide()}}},show:function(){var c=0,d=this.tempHidden.length,b,a,e;for(;c<d;c++){b=this.tempHidden[c];a=b.x;e=b.y;b.show();b.setPosition(a,e)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(e,d){var g=[],c=0,a=this.zIndexStack.length,b;for(;c<a;c++){b=this.zIndexStack[c];if(e.call(d||b,b)!==false){g.push(b)}}return g},each:function(c,b){var a;for(var d in this.list){a=this.list[d];if(a.isComponent&&c.call(b||a,a)===false){return}}},eachBottomUp:function(e,d){var b,a=this.zIndexStack,c,g;for(c=0,g=a.length;c<g;c++){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},eachTopDown:function(e,d){var b,a=this.zIndexStack,c;for(c=a.length;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){this.each(function(a){a.destroy()});delete this.zIndexStack;delete this.list;delete this.container;delete this.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{})},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},onRemove:Ext.emptyFn});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",constructor:function(b,d,a){var c=this;Ext.apply(c,{el:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},eventName:"keydown",addBinding:function(h){if(Ext.isArray(h)){Ext.each(h,this.addBinding,this);return}var g=h.key,j=false,d,e,b,c,a;if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;j=true}if(!Ext.isArray(g)){g=[g]}if(!j){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:g},h))},handleKeyDown:function(c){if(this.enabled){var d=this.bindings,b=0,a=d.length;c=this.processEvent(c);for(;b<a;++b){this.processBinding(d[b],c)}}},processEvent:function(a){return a},processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.el.on(a.eventName,a.handleKeyDown,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.el.removeListener(a.eventName,a.handleKeyDown,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.el.remove()}delete a.el}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on("click",this.handler,this.scope||this)}this.callParent()},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",monitorChildren:true,initLayout:function(){var c=this,a=c.owner,b=a.el;if(!c.initialized){if(a.frameSize){c.frameSize=a.frameSize}else{a.frameSize=c.frameSize={top:0,left:0,bottom:0,right:0}}}c.callParent(arguments)},beforeLayout:function(b,k,l,i){this.callParent(arguments);var h=this,c=h.owner,d=c.ownerCt,g=c.layout,e=c.isVisible(true),a=c.el.child,j;h.previousComponentSize=h.lastComponentSize;if(!l&&((!Ext.isNumber(b)&&c.isFixedWidth())||(!Ext.isNumber(k)&&c.isFixedHeight()))&&i&&i!==d){h.doContainerLayout();return false}if(!e&&(c.hiddenAncestor||c.floating)){if(c.hiddenAncestor){j=c.hiddenAncestor.layoutOnShow;j.remove(c);j.add(c)}c.needsLayout={width:b,height:k,isSetSize:false}}if(e&&this.needsLayout(b,k)){return c.beforeComponentLayout(b,k,l,i)}else{return false}},needsLayout:function(d,a){var e=this,c,b;e.lastComponentSize=e.lastComponentSize||{width:-Infinity,height:-Infinity};c=!Ext.isDefined(d)||e.lastComponentSize.width!==d;b=!Ext.isDefined(a)||e.lastComponentSize.height!==a;return !e.isSizing&&(e.childrenChanged||c||b)},setElementSize:function(c,b,a){if(b!==undefined&&a!==undefined){c.setSize(b,a)}else{if(a!==undefined){c.setHeight(a)}else{if(b!==undefined){c.setWidth(b)}}}},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},setTargetSize:function(d,a){var e=this;e.setElementSize(e.owner.el,d,a);if(e.owner.frameBody){var h=e.getTargetInfo(),g=h.padding,c=h.border,b=e.frameSize;e.setElementSize(e.owner.frameBody,Ext.isNumber(d)?(d-b.left-b.right-g.left-g.right-c.left-c.right):d,Ext.isNumber(a)?(a-b.top-b.bottom-g.top-g.bottom-c.top-c.bottom):a)}e.autoSized={width:!Ext.isNumber(d),height:!Ext.isNumber(a)};e.lastComponentSize={width:d,height:a}},getTargetInfo:function(){if(!this.targetInfo){var b=this.getTarget(),a=this.owner.getTargetEl();this.targetInfo={padding:{top:b.getPadding("t"),right:b.getPadding("r"),bottom:b.getPadding("b"),left:b.getPadding("l")},border:{top:b.getBorderWidth("t"),right:b.getBorderWidth("r"),bottom:b.getBorderWidth("b"),left:b.getBorderWidth("l")},bodyMargin:{top:a.getMargin("t"),right:a.getMargin("r"),bottom:a.getMargin("b"),left:a.getMargin("l")}}}return this.targetInfo},doOwnerCtLayouts:function(){var b=this.owner,e=b.ownerCt,c,i,d=this.lastComponentSize,h=this.previousComponentSize,a=(h&&d&&Ext.isNumber(d.width))?d.width!==h.width:true,g=(h&&d&&Ext.isNumber(d.height))?d.height!==h.height:true;if(!e||(!a&&!g)){return}c=e.componentLayout;i=e.layout;if(!b.floating&&c&&c.monitorChildren&&!c.layoutBusy){if(!e.suspendLayout&&i&&!i.layoutBusy){if(((a&&!e.isFixedWidth())||(g&&!e.isFixedHeight()))){this.isSizing=true;e.doComponentLayout();this.isSizing=false}else{if(i.bindToOwnerCtContainer===true){i.layout()}}}}},doContainerLayout:function(){var e=this,a=e.owner,c=a.ownerCt,d=a.layout,b;if(!a.suspendLayout&&d&&d.isLayout&&!d.layoutBusy&&!d.isAutoDock){d.layout()}if(c&&c.componentLayout){b=c.componentLayout;if(!a.floating&&b.monitorChildren&&!b.layoutBusy){b.childrenChanged=true}}},afterLayout:function(c,a,b,d){this.doContainerLayout();this.owner.afterComponentLayout(c,a,b,d)}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:"x-textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{});this.addEvents("scroll")},initCSSClasses:function(){var b=this,a=b.layout;if(!b.CSSinitialized){b.beforeCtCls=b.beforeCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelBefore;b.afterCtCls=b.afterCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelAfter;b.beforeScrollerCls=b.beforeScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelBefore;b.afterScrollerCls=b.afterScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelAfter;b.CSSinitializes=true}},handleOverflow:function(a,g){var e=this,d=e.layout,c="get"+d.parallelPrefixCap,b={};e.initCSSClasses();e.callParent(arguments);this.createInnerElements();this.showScrollers();b[d.perpendicularPrefix]=g[d.perpendicularPrefix];b[d.parallelPrefix]=g[d.parallelPrefix]-(e.beforeCt[c]()+e.afterCt[c]());return{targetSize:b}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!a.beforeCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");a.beforeCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls},"before");a.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls},"after");a.createWheelListener()}},createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons();this.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide();this.layout.owner.removeClsWithUI("scroller")}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:Ext.String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:Ext.String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClsOnOver(this.beforeScrollerCls+"-hover");b.addClsOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=Ext.create("Ext.util.ClickRepeater",a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=Ext.create("Ext.util.ClickRepeater",b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeRepeater,this.afterRepeater,this.beforeScroller,this.afterScroller,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addCls":"removeCls",c=this.atExtremeAfter()?"addCls":"removeCls",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var a=this.layout;return parseInt(a.innerCt.dom["scroll"+a.parallelBeforeCap],10)||0},getMaxScrollPosition:function(){var a=this.layout;return a.innerCt.dom["scroll"+a.parallelPrefixCap]-this.layout.innerCt["get"+a.parallelPrefixCap]()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){if(b==undefined){b=g.animateScroll}e.innerCt.scrollTo(e.parallelBefore,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.scrolling=false;g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,a,d,c;h=g.getItem(h);if(h!=undefined){a=this.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[e.parallelPosition];if(a.hiddenEnd){c-=(this.layout.innerCt["get"+e.parallelPrefixCap]()-d[e.parallelPrefix])}this.scrollTo(c,b)}}},getItemVisibility:function(g){var e=this,d=e.getItem(g).getBox(true,true),c=e.layout,b=d[c.parallelPosition],h=b+d[c.parallelPrefix],i=e.getScrollPosition(),a=i+c.innerCt["get"+c.parallelPrefixCap]();return{hiddenStart:b<i,hiddenEnd:h>a,fullyVisible:b>i&&h<a}}});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(b,a){this.setConfig(b,a||{})},setConfig:function(d,a){if(this.map){this.map.destroy()}var g=Ext.create("Ext.util.KeyMap",d,null,this.getKeyEvent("forceKeyDown" in a?a.forceKeyDown:this.forceKeyDown)),e=Ext.util.KeyNav.keyOptions,c=a.scope||this,b;this.map=g;for(b in e){if(e.hasOwnProperty(b)){if(a[b]){g.addBinding({scope:c,key:e[b],handler:Ext.Function.bind(this.handleEvent,c,[a[b]],true),defaultEventAction:a.defaultEventAction||this.defaultEventAction})}}}g.disable();if(!a.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(a){return(a||Ext.EventManager.useKeyDown)?"keydown":"keypress"}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=Ext.create("Ext.util.HashMap");this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;if(a=="translate"){c={x:b.attr.translation.x||0,y:b.attr.translation.y||0}}else{if(a=="rotate"){c={degrees:b.attr.rotation.degrees||0,x:b.attr.rotation.x,y:b.attr.rotation.y}}else{c=b.attr[a]}}return c},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(n){var h=n.length,l=[],s,g,r,e,b,q,p,d,c,m,k,a;for(d=0;d<h;d++){s=n[d].attrs;for(g in s){r=s[g];a=r.length;for(c=0;c<a;c++){b=r[c][0];e=r[c][1];if(g==="translate"){p={x:e.x,y:e.y}}else{if(g==="rotate"){m=e.x;if(isNaN(m)){m=null}k=e.y;if(isNaN(k)){k=null}p={degrees:e.degrees,x:m,y:k}}else{if(g==="width"||g==="height"||g==="x"||g==="y"){p=parseFloat(e)}else{p=e}}}q=Ext.Array.indexOf(l,b);if(q==-1){l.push([b,{}]);q=l.length-1}l[q][1][g]=p}}}h=l.length;for(d=0;d<h;d++){b=l[d];b[0].setAttributes(b[1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,d!=undefined?d:this.getFromPrim(e,a)])},this);return b}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(t,e,b){var r=this,m=r.target,q=t.length,v,n,a,g,d,p,l,c,s,u,k;for(g=0;g<q;g++){v=t[g].attrs;for(n in v){l=v[n].length;p={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<l;d++){a=v[n][d];p[r.compMethod[n]].target=a[0];p[r.compMethod[n]][n]=a[1]}if(p.setPosition.target){a=p.setPosition;c=(a.left===undefined)?undefined:parseInt(a.left,10);s=(a.top===undefined)?undefined:parseInt(a.top,10);a.target.setPosition(c,s)}if(p.setPagePosition.target){a=p.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(p.setSize.target&&p.setSize.target.el){a=p.setSize;u=(a.width===undefined)?a.target.getWidth():parseInt(a.width,10);k=(a.height===undefined)?a.target.getHeight():parseInt(a.height,10);if(b||r.dynamic){a.target.componentLayout.childrenChanged=true;if(r.layoutAnimation){a.target.setCalculatedSize(u,k)}else{a.target.setSize(u,k)}}else{a.target.el.setSize(u,k)}}if(p.setOpacity.target){a=p.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(p,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,q=1-h-k;function g(r){return((a*r+l)*r+j)*r}function c(r,u){var s=e(r,u);return((q*s+k)*s+h)*s}function e(r,z){var y,w,u,s,v,t;for(u=r,t=0;t<8;t++){s=g(u)-r;if(Math.abs(s)<z){return u}v=(3*a*u+2*l)*u+j;if(Math.abs(v)<0.000001){break}u=u-s/v}y=0;w=1;u=r;if(u<y){return y}if(u>w){return w}while(y<w){s=g(u);if(Math.abs(s-r)<z){return u}if(r>s){y=u}else{w=u}u=(w-y)/2+y}return u}return c(p,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,p=0,c=0.5*(m+d);if(d!=m){p=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,p,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b);if(Ext.isArray(e)){var g=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return""}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:Ext.create("Ext.draw.Color",e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,p,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(p==0||g==null){k=[d,d,d]}else{g/=60;a=p*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return Ext.create("Ext.draw.Color",k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.dd.StatusProxy",{animRepair:false,constructor:function(a){Ext.apply(this,a);this.id=this.id||Ext.id();this.proxy=Ext.createWidget("component",{floating:true,stateful:false,id:this.id,html:'<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>',cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:document.body});this.el=this.proxy.el;this.el.show();this.el.setVisibilityMode(Ext.Element.VISIBILITY);this.el.hide();this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className=Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.proxy.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.proxy.show();this.proxy.toFront()},sync:function(){this.proxy.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.animate({duration:this.repairDuration||500,easing:"ease-out",to:{x:b[0],y:b[1]},stopAnimation:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.proxy,this.el)}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.unghost(null,false);delete this.ghost}},show:function(){if(!this.ghost){var a=this.panel.getSize();this.panel.el.setVisibilityMode(Ext.Element.DISPLAY);this.ghost=this.panel.ghost();if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});this.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.layout.component.AbstractDock",{extend:"Ext.layout.component.Component",type:"dock",autoSizing:true,beforeLayout:function(){var a=this.callParent(arguments);if(a!==false&&(!this.initializedBorders||this.childrenChanged)&&(!this.owner.border||this.owner.manageBodyBorders)){this.handleItemBorders();this.initializedBorders=true}return a},handleItemBorders:function(){var a=this.owner,e=a.body,m=this.getLayoutItems(),h={top:[],right:[],bottom:[],left:[]},b=this.borders,d={top:"bottom",right:"left",bottom:"top",left:"right"},c,j,l,k,g;for(c=0,j=m.length;c<j;c++){l=m[c];k=l.dock;if(l.ignoreBorderManagement){continue}if(!h[k].satisfied){h[k].push(l);h[k].satisfied=true}if(!h.top.satisfied&&d[k]!=="top"){h.top.push(l)}if(!h.right.satisfied&&d[k]!=="right"){h.right.push(l)}if(!h.bottom.satisfied&&d[k]!=="bottom"){h.bottom.push(l)}if(!h.left.satisfied&&d[k]!=="left"){h.left.push(l)}}if(b){for(g in b){if(b.hasOwnProperty(g)){j=b[g].length;if(!a.manageBodyBorders){for(c=0;c<j;c++){b[g][c].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if(!b[g].satisfied&&!a.bodyBorder){e.removeCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(b[g].satisfied){e.setStyle("border-"+g+"-width","")}}}}}for(g in h){if(h.hasOwnProperty(g)){j=h[g].length;if(!a.manageBodyBorders){for(c=0;c<j;c++){h[g][c].addCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if((!h[g].satisfied&&!a.bodyBorder)||a.bodyBorder===false){e.addCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(h[g].satisfied){e.setStyle("border-"+g+"-width","1px")}}}}this.borders=h},onLayout:function(a,n){if(this.onLayout_running){return}this.onLayout_running=true;var j=this,b=j.owner,h=b.body,g=b.layout,i=j.getTarget(),l=false,m=false,k,e,d;var c=j.info={boxes:[],size:{width:a,height:n},bodyBox:{}};delete g.isAutoDock;Ext.applyIf(c,j.getTargetInfo());if(b&&b.ownerCt&&b.ownerCt.layout&&b.ownerCt.layout.isLayout){if(!Ext.isNumber(b.height)||!Ext.isNumber(b.width)){b.ownerCt.layout.bindToOwnerCtComponent=true}else{b.ownerCt.layout.bindToOwnerCtComponent=false}}if(n==null||a==null){k=c.padding;e=c.border;d=j.frameSize;if((n==null)&&(a==null)){m=true;l=true;j.setTargetSize(null);j.setBodyBox({width:null,height:null})}else{if(n==null){m=true;j.setTargetSize(a);j.setBodyBox({width:a-k.left-e.left-k.right-e.right-d.left-d.right,height:null})}else{l=true;j.setTargetSize(null,n);j.setBodyBox({width:null,height:n-k.top-k.bottom-e.top-e.bottom-d.top-d.bottom})}}if(g&&g.isLayout){g.bindToOwnerCtComponent=true;g.isAutoDock=g.autoSize!==true;g.layout();c.autoSizedCtLayout=g.autoSize===true;c.autoHeight=m;c.autoWidth=l}j.dockItems();j.setTargetSize(c.size.width,c.size.height)}else{j.setTargetSize(a,n);j.dockItems()}j.callParent(arguments);this.onLayout_running=false},dockItems:function(){this.calculateDockBoxes();var h=this.info,j=h.autoWidth,a=h.autoHeight,c=h.boxes,g=c.length,e,b,d;for(b=0;b<g;b++){e=c[b];d=e.item;d.setPosition(e.x,e.y);if((j||a)&&d.layout&&d.layout.isLayout){d.layout.bindToOwnerCtComponent=true}}if(!h.autoSizedCtLayout){if(j){h.bodyBox.width=null}if(a){h.bodyBox.height=null}}this.setBodyBox(h.bodyBox)},calculateDockBoxes:function(){if(this.calculateDockBoxes_running){return}this.calculateDockBoxes_running=true;var l=this,h=l.getTarget(),k=l.getLayoutItems(),a=l.owner,s=a.body,b=l.info,p=b.autoWidth,q=b.autoHeight,t=b.size,j=k.length,n=b.padding,d=b.border,c=l.frameSize,r,e,g,m;if(q){t.height=s.getHeight()+n.top+d.top+n.bottom+d.bottom+c.top+c.bottom}else{t.height=h.getHeight()}if(p){t.width=s.getWidth()+n.left+d.left+n.right+d.right+c.left+c.right}else{t.width=h.getWidth()}b.bodyBox={x:n.left+c.left,y:n.top+c.top,width:t.width-n.left-d.left-n.right-d.right-c.left-c.right,height:t.height-d.top-n.top-d.bottom-n.bottom-c.top-c.bottom};for(e=0;e<j;e++){r=k[e];g=l.initBox(r);if(q===true){g=l.adjustAutoBox(g,e)}else{g=l.adjustSizedBox(g,e)}b.boxes.push(g)}this.calculateDockBoxes_running=false},adjustSizedBox:function(e,d){var a=this.info.bodyBox,b=this.frameSize,h=this.info,g=h.padding,i=e.type,c=h.border;switch(i){case"top":e.y=a.y;break;case"left":e.x=a.x;break;case"bottom":e.y=(a.y+a.height)-e.height;break;case"right":e.x=(a.x+a.width)-e.width;break}if(e.ignoreFrame){if(i=="bottom"){e.y+=(b.bottom+g.bottom+c.bottom)}else{e.y-=(b.top+g.top+c.top)}if(i=="right"){e.x+=(b.right+g.right+c.right)}else{e.x-=(b.left+g.left+c.left)}}if(!e.overlay){switch(i){case"top":a.y+=e.height;a.height-=e.height;break;case"left":a.x+=e.width;a.width-=e.width;break;case"bottom":a.height-=e.height;break;case"right":a.width-=e.width;break}}return e},adjustAutoBox:function(j,m){var b=this.info,a=this.owner,n=b.bodyBox,s=b.size,k=b.boxes,g=k.length,q=j.type,e=this.frameSize,r=b.padding,d=b.border,c=b.autoSizedCtLayout,p=(g<m)?g:m,h,l;if(q=="top"||q=="bottom"){for(h=0;h<p;h++){l=k[h];if(l.stretched&&l.type=="left"||l.type=="right"){l.height+=j.height}else{if(l.type=="bottom"){l.y+=j.height}}}}switch(q){case"top":j.y=n.y;if(!j.overlay){n.y+=j.height;if(b.autoHeight){s.height+=j.height}else{n.height-=j.height}}break;case"bottom":if(!j.overlay){if(b.autoHeight){s.height+=j.height}else{n.height-=j.height}}j.y=(n.y+n.height);break;case"left":j.x=n.x;if(!j.overlay){n.x+=j.width;if(b.autoWidth){s.width+=j.width}else{n.width-=j.width}}break;case"right":if(!j.overlay){if(b.autoWidth){s.width+=j.width}else{n.width-=j.width}}j.x=(n.x+n.width);break}if(j.ignoreFrame){if(q=="bottom"){j.y+=(e.bottom+r.bottom+d.bottom)}else{j.y-=(e.top+r.top+d.top)}if(q=="right"){j.x+=(e.right+r.right+d.right)}else{j.x-=(e.left+r.left+d.left)}}return j},initBox:function(k){var i=this,h=i.info.bodyBox,a=(k.dock=="top"||k.dock=="bottom"),b=i.owner,e=i.frameSize,c=i.info,j=c.padding,d=c.border,g={item:k,overlay:k.overlay,type:k.dock,offsets:Ext.Element.parseBox(k.offsets||{}),ignoreFrame:k.ignoreParentFrame};if(k.stretch!==false){g.stretched=true;if(a){g.x=h.x+g.offsets.left;g.width=h.width-(g.offsets.left+g.offsets.right);if(g.ignoreFrame){g.width+=(e.left+e.right+d.left+d.right+j.left+j.right)}k.setCalculatedSize(g.width-k.el.getMargin("lr"),undefined,b)}else{g.y=h.y+g.offsets.top;g.height=h.height-(g.offsets.bottom+g.offsets.top);if(g.ignoreFrame){g.height+=(e.top+e.bottom+d.top+d.bottom+j.top+j.bottom)}k.setCalculatedSize(undefined,g.height-k.el.getMargin("tb"),b);if(!Ext.supports.ComputedStyle){k.el.repaint()}}}else{k.doComponentLayout();g.width=k.getWidth()-(g.offsets.left+g.offsets.right);g.height=k.getHeight()-(g.offsets.bottom+g.offsets.top);g.y+=g.offsets.top;if(a){g.x=(k.align=="right")?h.width-g.width:h.x;g.x+=g.offsets.left}}if(g.width===undefined){g.width=k.getWidth()+k.el.getMargin("lr")}if(g.height===undefined){g.height=k.getHeight()+k.el.getMargin("tb")}return g},getLayoutItems:function(){var c=this.owner.getDockedItems(),d=c.length,b=0,a=[];for(;b<d;b++){if(c[b].isVisible(true)){a.push(c[b])}}return a},renderItems:function(h,e){var a=e.dom.childNodes,d=a.length,g=h.length,l=0,c,b,k,m;for(c=0;c<d;c++){k=Ext.get(a[c]);for(b=0;b<g;b++){m=h[b];if(m.rendered&&(k.id==m.el.id||k.contains(m.el.id))){break}}if(b===g){l++}}for(c=0,b=0;c<g;c++,b++){m=h[c];if(c===b&&(m.dock==="right"||m.dock==="bottom")){b+=l}if(m&&!m.rendered){this.renderItem(m,e,b)}else{if(!this.isValidParent(m,e,b)){this.moveItem(m,e,b)}}}},setBodyBox:function(g){var i=this,a=i.owner,h=a.body,b=i.info,e=b.bodyMargin,j=b.padding,d=b.border,c=i.frameSize;if(a.collapsed){return}if(Ext.isNumber(g.width)){g.width-=e.left+e.right}if(Ext.isNumber(g.height)){g.height-=e.top+e.bottom}i.setElementSize(h,g.width,g.height);if(Ext.isNumber(g.x)){h.setLeft(g.x-j.left-c.left)}if(Ext.isNumber(g.y)){h.setTop(g.y-j.top-c.top)}},configureItem:function(a,b){this.callParent(arguments);if(a.dock=="top"||a.dock=="bottom"){a.layoutManagedWidth=1;a.layoutManagedHeight=2}else{a.layoutManagedWidth=2;a.layoutManagedHeight=1}a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.util.Memento",function(){function d(h,g,i){h[i]=g[i]}function c(h,g,i){delete h[i]}function e(i,h,j){var g=i[j];if(g||i.hasOwnProperty(j)){a(h,j,g)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(g,j,i,h){if(j){if(Ext.isArray(h)){Ext.each(h,function(k){g(j,i,k)})}else{g(j,i,h)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,h){b(d,this.data||(this.data={}),h||this.target,g)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,i){b(e,this.data,i||this.target,h);if(g!==false){this.remove(h)}},restoreAll:function(g,j){var i=this,h=j||this.target;Ext.Object.each(i.data,function(l,k){a(h,l,k)});if(g!==false){delete i.data}}}}());Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(l,g,k){var h=this.bus,m=h[l],d,c,b,n,a,e,j;if(m){for(d in m){if(g.is(d)){c=m[d];for(b in c){n=c[b];for(e=0,j=n.length;e<j;e++){a=n[e];if(a.fire.apply(a,Array.prototype.slice.call(k,1))===false){return false}}}}}}},control:function(d,g,c){var b=this.bus,a,e;if(Ext.isString(d)){a=d;d={};d[a]=g;this.control(d,null,c);return}Ext.Object.each(d,function(h,i){Ext.Object.each(i,function(m,n){var j={},k=c,l=Ext.create("Ext.util.Event",c,m);if(Ext.isObject(n)){j=n;n=j.fn;k=j.scope||c;delete j.fn;delete j.scope}l.addListener(n,k,j);b[m]=b[m]||{};b[m][h]=b[m][h]||{};b[m][h][c.id]=b[m][h][c.id]||[];b[m][h][c.id].push(l)})})}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{convert:function(b){return b},sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=d[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.addEvents("clear","add","replace","remove");c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.length++;d.items.push(g);d.keys.push(c);d.fireEvent("add",d.length-1,g,c);return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in g){if(g.hasOwnProperty(c)){if(e.allowFunctions||typeof g[c]!="function"){e.add(c,g[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,g=e;if(arguments.length==2){g=c;c=d.getKey(g)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,g)}d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,g,c);return g},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(g<=a){for(d=g;d<=a;d++){b[b.length]=c[d]}}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,p=b.length,j;for(j=0;j<p;j++){var m=b[j],l=m.filterFn,k=m.scope;n=n&&l.call(k,h)}return n};return this.filterBy(e)},filterBy:function(e,d){var j=this,a=new this.self(),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,g=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){g.add(d[c],b[c])}g.getKey=e.getKey;return g}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(h,g,c,e){var d=this,i,b,a;if(Ext.isArray(h)){e=c;c=g;a=h}else{if(Ext.isObject(h)){e=c;c=g;a=[h]}else{if(Ext.isString(h)){i=d.sorters.get(h);if(!i){i={property:h,direction:g};a=[i]}else{if(g===undefined){i.toggle()}else{i.setDirection(g)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){h=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(h)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);h=d.sorters.items;if(h.length){b=function(l,k){var j=h[0].sort(l,k),n=h.length,m;for(m=1;m<n;m++){j=j||h[m].sort.call(this,l,k)}return j};d.doSort(b)}}return h},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}g[c]=Ext.create("Ext.util.Sorter",b)}}return g},getSorters:function(){return this.sorters.items}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(l,a,k){var j=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=j.keys,g=j.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:m[d],value:g[d],index:d}}Ext.Array.sort(h,function(i,c){var n=k(i[l],c[l])*b;if(n===0){n=(i.index<c.index?-1:1)}return n});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;m[d]=h[d].key}j.fireEvent("sort",j)},sortBy:function(c){var h=this,b=h.items,g=h.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:g[d],value:b[d],index:d}}Ext.Array.sort(a,function(j,i){var k=c(j.value,i.value);if(k===0){k=(j.index<i.index?-1:1)}return k});for(d=0;d<e;d++){b[d]=a[d].value;g[d]=a[d].key}h.fireEvent("sort",h,b,g)},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,isReader:true,constructor:function(a){var b=this;Ext.apply(b,a||{});b.fieldCount=0;b.model=Ext.ModelManager.getModel(a.model);if(b.model){b.buildExtractors()}},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b=a;if(a&&a.responseText){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);var g=Ext.isArray(c)?c:d.getRoot(c),i=true,b=0,e,h,a,j;if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(g){a=d.extractData(g);b=a.length}else{b=0;a=[]}return Ext.create("Ext.data.ResultSet",{total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,l=[],e=[],d=j.model,g=0,b=k.length,m=j.getIdProperty(),c,a,h;if(!k.length&&Ext.isObject(k)){k=[k];b=1}for(;g<b;g++){c=k[g];l=j.extractValues(c);a=j.getId(c);h=new d(l,a,c);e.push(h);if(j.implicitIncludes){j.readAssociated(h,c)}}return e},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.proxy;if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},extractValues:function(g){var a=this.getFields(),c=0,d=a.length,b={},h,e;for(;c<d;c++){h=a[c];e=this.extractorFunctions[c](g);b[h.name]=e}return b},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(c){var a=c.fields,b;Ext.apply(this,c);if(a){b=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:a});this.setModel(b,true)}else{this.buildExtractors(true)}},getIdProperty:function(){var a=this.idProperty;if(Ext.isEmpty(a)){a=this.model.prototype.idProperty}return a},buildExtractors:function(e){var c=this,h=c.getIdProperty(),d=c.totalProperty,b=c.successProperty,g=c.messageProperty,a;if(e===true){delete c.extractorFunctions}if(c.extractorFunctions){return}if(d){c.getTotal=c.createAccessor(d)}if(b){c.getSuccess=c.createAccessor(b)}if(g){c.getMessage=c.createAccessor(g)}if(h){a=c.createAccessor(h);c.getId=function(i){var j=a.call(c,i);return(j===undefined||j==="")?null:j}}else{c.getId=function(){return null}}c.buildFieldExtractors()},buildFieldExtractors:function(){var d=this,a=d.getFields(),c=a.length,b=0,h=[],g,e;for(;b<c;b++){g=a[b];e=(g.mapping!==undefined&&g.mapping!==null)?g.mapping:g.name;h.push(d.createAccessor(e))}d.fieldCount=c;d.extractorFunctions=h}},function(){Ext.apply(this,{nullResultSet:Ext.create("Ext.data.ResultSet",{total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var c;try{c=Ext.decode(a.responseText)}catch(b){Ext.Error.raise({response:a,json:a.responseText,parseError:b,msg:"Unable to parse the JSON returned by the server: "+b.toString()})}return c},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}this.mixins.observable.constructor.call(this,a);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a=="string"){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}b.reader=a;return b.reader},getReader:function(){return this.reader},setWriter:function(a){if(a===undefined||typeof a=="string"){a={type:a}}if(!(a instanceof Ext.data.writer.Writer)){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias("writer."+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(d,e){var g=this,c=Ext.create("Ext.data.Batch",{proxy:g,listeners:e||{}}),b=g.batchActions,a;Ext.each(g.batchOrder.split(","),function(h){a=d[h];if(a){if(b){c.add(Ext.create("Ext.data.Operation",{action:h,records:a}))}else{Ext.each(a,function(i){c.add(Ext.create("Ext.data.Operation",{action:h,records:[i]}))})}}},g);c.start();return c}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};this.addEvents("exception");b.callParent([a]);b.extraParams=a.extraParams||{};b.api=a.api||{};b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},buildRequest:function(a){var c=Ext.applyIf(a.params||{},this.extraParams||{}),b;c=Ext.applyIf(c,this.getParams(a));if(a.id&&!c.id){c.id=a.id}b=Ext.create("Ext.data.Request",{params:c,action:a.action,records:a.records,operation:a,url:a.url});b.url=this.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(l){var t=this,s={},p=Ext.isDefined,q=l.groupers,a=l.sorters,j=l.filters,h=l.page,g=l.start,r=l.limit,i=t.simpleSortMode,n=t.pageParam,d=t.startParam,b=t.limitParam,c=t.groupParam,e=t.sortParam,m=t.filterParam,k=t.directionParam;if(n&&p(h)){s[n]=h}if(d&&p(g)){s[d]=g}if(b&&p(r)){s[b]=r}if(c&&q&&q.length>0){s[c]=t.encodeSorters(q)}if(e&&a&&a.length>0){if(i){s[e]=a[0].property;s[k]=a[0].direction}else{s[e]=t.encodeSorters(a)}}if(m&&j&&j.length>0){s[m]=t.encodeFilters(j)}return s},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.data.proxy.Ajax","Ext.util.MixedCollection"],onClassExtended:function(a,b){var c=b.onBeforeClassCreated;b.onBeforeClassCreated=function(d,z){var y=this,A=Ext.getClassName(d),m=d.prototype,s=d.prototype.superclass,e=z.validations||[],p=z.fields||[],u=z.associations||[],t=z.belongsTo,n=z.hasMany,q=z.idgen,w=new Ext.util.MixedCollection(false,function(i){return i.name}),v=new Ext.util.MixedCollection(false,function(i){return i.name}),l=s.validations,x=s.fields,h=s.associations,g,r,j,k=[];d.modelName=A;m.modelName=A;if(l){e=l.concat(e)}z.validations=e;if(x){p=x.items.concat(p)}for(r=0,j=p.length;r<j;++r){w.add(new Ext.data.Field(p[r]))}z.fields=w;if(q){z.idgen=Ext.data.IdGenerator.get(q)}if(t){t=Ext.Array.from(t);for(r=0,j=t.length;r<j;++r){g=t[r];if(!Ext.isObject(g)){g={model:g}}g.type="belongsTo";u.push(g)}delete z.belongsTo}if(n){n=Ext.Array.from(n);for(r=0,j=n.length;r<j;++r){g=n[r];if(!Ext.isObject(g)){g={model:g}}g.type="hasMany";u.push(g)}delete z.hasMany}if(h){u=h.items.concat(u)}for(r=0,j=u.length;r<j;++r){k.push("association."+u[r].type.toLowerCase())}if(z.proxy){if(typeof z.proxy==="string"){k.push("proxy."+z.proxy)}else{if(typeof z.proxy.type==="string"){k.push("proxy."+z.proxy.type)}}}Ext.require(k,function(){Ext.ModelManager.registerType(A,d);for(r=0,j=u.length;r<j;++r){g=u[r];Ext.apply(g,{ownerModel:A,associatedModel:g.model});if(Ext.ModelManager.getModel(g.model)===undefined){Ext.ModelManager.registerDeferredAssociation(g)}else{v.add(Ext.data.Association.create(g))}}z.associations=v;c.call(y,d,z);d.setProxy(d.prototype.proxy||d.prototype.defaultProxyType);Ext.ModelManager.onModelDefined(d)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=Ext.create("Ext.data.Operation",c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",defaultProxyType:"ajax",constructor:function(g,b,m){g=g||{};var k=this,j,c,l,a,e,d,h=Ext.isArray(g),n=h?{}:null;k.internalId=(b||b===0)?b:Ext.data.Model.id(k);k.raw=m;Ext.applyIf(k,{data:{}});k.modified={};if(k.persistanceProperty){k.persistenceProperty=k.persistanceProperty}k[k.persistenceProperty]={};k.mixins.observable.constructor.call(k);j=k.fields.items;c=j.length;for(e=0;e<c;e++){l=j[e];a=l.name;if(h){n[a]=g[e]}else{if(g[a]===undefined){g[a]=l.defaultValue}}}k.set(n||g);if(k.getId()){k.phantom=false}else{if(k.phantom){d=k.idgen.generate();if(d!==null){k.setId(d)}}}k.dirty=false;k.modified={};if(typeof k.init=="function"){k.init()}k.id=k.idgen.getRecId(k)},get:function(a){return this[this.persistenceProperty][a]},set:function(p,k){var h=this,e=h.fields,n=h.modified,d=[],j,m,c,l,b,g,a;if(arguments.length==1&&Ext.isObject(p)){b=!h.editing;g=0;for(m in p){if(p.hasOwnProperty(m)){j=e.get(m);if(j&&j.convert!==j.type.convert){d.push(m);continue}if(!g&&b){h.beginEdit()}++g;h.set(m,p[m])}}a=d.length;if(a){if(!g&&b){h.beginEdit()}g+=a;for(c=0;c<a;c++){j=d[c];h.set(j,p[j])}}if(b&&g){h.endEdit()}}else{if(e){j=e.get(p);if(j&&j.convert){k=j.convert(k,h)}}l=h.get(p);h[h.persistenceProperty][p]=k;if(j&&j.persist&&!h.isEqual(l,k)){if(h.isModified(p)){if(h.isEqual(n[p],k)){delete n[p];h.dirty=false;for(m in n){if(n.hasOwnProperty(m)){h.dirty=true;break}}}}else{h.dirty=true;n[p]=l}}if(!h.editing){h.afterEdit()}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a){var b=this,c;if(b.editing){b.editing=false;c=b.dirty||b.changedWhileEditing();delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(a!==true&&c){b.afterEdit()}}},changedWhileEditing:function(){var c=this,b=c.dataSave,d=c[c.persistenceProperty],a;for(a in d){if(d.hasOwnProperty(a)){if(!c.isEqual(d[a],b[a])){return true}}}return false},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.persist){a=c.name;b.modified[a]=b.get(a)}},b)},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistenceProperty]),a||b.internalId)},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var k=Ext.create("Ext.data.Errors"),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(c){c=Ext.apply({},c);var e=this,g=e.phantom?"create":"update",a=null,d=c.scope||e,b,h;Ext.apply(c,{records:[e],action:g});b=Ext.create("Ext.data.Operation",c);h=function(i){if(i.wasSuccessful()){a=i.getRecords()[0];e.set(a.data);a.dirty=false;Ext.callback(c.success,d,[a,i])}else{Ext.callback(c.failure,d,[a,i])}Ext.callback(c.callback,d,[a,i])};e.getProxy()[g](b,h,e);return e},destroy:function(c){c=Ext.apply({},c);var e=this,a=null,d=c.scope||e,b,g;Ext.apply(c,{records:[e],action:"destroy"});b=Ext.create("Ext.data.Operation",c);g=function(h){if(h.wasSuccessful()){Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};e.getProxy().destroy(b,g,e);return e},getId:function(){return this.get(this.idProperty)},setId:function(a){this.set(this.idProperty,a)},join:function(a){this.store=a},unjoin:function(a){delete this.store},afterEdit:function(){this.callStore("afterEdit")},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(b){var a=this.store;if(a!==undefined&&typeof a[b]=="function"){a[b](this)}},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(r,b,q){var l=r.associations.items,n=l.length,g={},h,a,k,t,u,e,d,p,m,s,c;for(p=0;p<n;p++){e=l[p];s=e.type;c=true;if(q){c=s==q}if(c&&s=="hasMany"){h=r[e.storeName];g[e.name]=[];if(h&&h.data.length>0){k=h.data.items;u=k.length;for(m=0;m<u;m++){t=k[m];d=t.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);g[e.name][m]=t.data;Ext.apply(g[e.name][m],this.prepareAssociatedData(t,b,s))}}}}else{if(c&&s=="belongsTo"){t=r[e.instanceName];if(t!==undefined){d=t.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);g[e.name]=t.data;Ext.apply(g[e.name],this.prepareAssociatedData(t,b,s))}}}}}return g}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return Ext.create("Ext.data.ArrayStore",{data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=Ext.create("Ext.data.Store",b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,ariaRole:"presentation",bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);delete a.listeners}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var b=this,a=b.resizable;if(b.floating){b.makeFloating(b.floating)}else{b.el.setVisibilityMode(Ext.Element[b.hideMode.toUpperCase()])}if(Ext.isDefined(b.autoScroll)){b.setAutoScroll(b.autoScroll)}b.callParent();if(!(b.x&&b.y)&&(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(a){b.initResizable(a)}if(b.draggable){b.initDraggable()}b.initAria()},initAria:function(){var a=this.getActionEl(),b=this.ariaRole;if(b){a.dom.setAttribute("role",b)}},setAutoScroll:function(a){var b=this,c;a=!!a;if(b.rendered){c=b.getTargetEl();c.setStyle("overflow",a?"auto":"");if(a&&(Ext.isIE6||Ext.isIE7)){c.position()}}b.autoScroll=a;return b},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent()),handles:b.resizeHandles},a);a.target=b;b.resizer=Ext.create("Ext.resizer.Resizer",a)},getDragEl:function(){return this.el},initDraggable:function(){var b=this,a=Ext.applyIf({el:b.getDragEl(),constrainTo:b.constrain?(b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent())):undefined},b.draggable);if(b.constrain||b.constrainDelegate){a.constrain=b.constrain;a.constrainDelegate=b.constrainDelegate}b.dd=Ext.create("Ext.util.ComponentDragger",b,a)},setPosition:function(k,i,a){var g=this,b=g.el,l={},h,j,e,d,c;if(Ext.isArray(k)){a=i;i=k[1];k=k[0]}g.x=k;g.y=i;if(!g.rendered){return g}h=g.adjustPosition(k,i);j=h.x;e=h.y;d=Ext.isNumber(j);c=Ext.isNumber(e);if(d||c){if(a){if(d){l.left=j}if(c){l.top=e}g.stopAnimation();g.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(g.afterSetPosition,g,[j,e])},to:l},a))}else{if(!d){b.setTop(e)}else{if(!c){b.setLeft(j)}else{b.setLeftTop(j,e)}}g.afterSetPosition(j,e)}}return g},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,e,b){var c=this,d;if(Ext.isArray(a)){e=a[1];a=a[0]}c.pageX=a;c.pageY=e;if(c.floating&&c.floatParent){d=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(d.left)){a-=d.left}if(Ext.isNumber(e)&&Ext.isNumber(d.top)){e-=d.top}c.setPosition(a,e,b)}else{d=c.el.translatePoints(a,e);c.setPosition(d.left,d.top,b)}return c},getBox:function(b){var c=this.getPosition(b),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,c){if(this.floating&&this.floatParent){var b=this.floatParent.getTargetEl().getViewRegion();a+=b.left;c+=b.top}return{x:a,y:c}},getPosition:function(a){var c=this,b=c.el,d,e;if((a===true)||(c.floating&&!c.floatParent)){return[b.getLeft(true),b.getTop(true)]}d=c.xy||b.getXY();if(c.floating){e=c.floatParent.getTargetEl().getViewRegion();d[0]-=e.left;d[1]-=e.top}return d},getId:function(){var a=this,b;if(!a.id){b=a.getXType();b=b?b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-"):"ext-comp";a.id=b+"-"+a.getAutoId()}return a.id},onEnable:function(){var a=this.getActionEl();a.dom.removeAttribute("aria-disabled");a.dom.disabled=false;this.callParent()},onDisable:function(){var a=this.getActionEl();a.dom.setAttribute("aria-disabled",true);a.dom.disabled=true;this.callParent()},show:function(d,a,b){var c=this;if(c.rendered&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender()}if(c.rendered){c.beforeShow();c.onShow.apply(c,arguments);if(c.ownerCt&&!c.floating&&!(c.ownerCt.suspendLayout||c.ownerCt.layout.layoutBusy)){c.ownerCt.doLayout()}c.afterShow.apply(c,arguments)}}}return c},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating&&a.constrain){a.doConstrain()}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront()}Ext.callback(a,b||c);c.fireEvent("show",c)},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments);if(a.ownerCt&&!a.floating&&!(a.ownerCt.suspendLayout||a.ownerCt.layout.layoutBusy)){a.ownerCt.doLayout()}}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){Ext.callback(a,b||this);this.fireEvent("hide",this)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer);if(a.actionMode=="container"||a.removeMode=="container"){a.container.remove()}}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a;if(b){if(!c.focusTask){c.focusTask=Ext.create("Ext.util.DelayedTask",c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if(c.rendered&&!c.isDestroyed){a=c.getFocusEl();a.focus();if(a.dom&&d===true){a.dom.select()}if(c.floating){c.toFront(true)}}return c},getFocusEl:function(){return this.el},blur:function(){if(this.rendered){this.getFocusEl().blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.ownerCt;b&&!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy}});Ext.define("Ext.layout.container.AbstractContainer",{extend:"Ext.layout.Layout",type:"container",bindToOwnerCtComponent:false,bindToOwnerCtContainer:false,setItemSize:function(c,b,a){if(Ext.isObject(b)){a=b.height;b=b.width}c.setCalculatedSize(b,a,this.owner)},getLayoutItems:function(){return this.owner&&this.owner.items&&this.owner.items.items||[]},beforeLayout:function(){return !this.owner.collapsed&&this.callParent(arguments)},afterLayout:function(){this.owner.afterLayout(this)},getTarget:function(){return this.owner.getTargetEl()},getRenderTarget:function(){return this.owner.getTargetEl()}});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.container.AbstractContainer",alternateClassName:"Ext.layout.ContainerLayout",layoutItem:function(b,a){if(a){b.doComponentLayout(a.width,a.height)}else{b.doComponentLayout()}},getLayoutTargetSize:function(){var b=this.getTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},beforeLayout:function(){if(this.owner.beforeLayout(arguments)!==false){return this.callParent(arguments)}else{return false}},getRenderedItems:function(){var e=this,h=e.getTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getVisibleItems:function(){var g=this.getTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",bindToOwnerCtComponent:true,onLayout:function(a,g){var e=this,b=e.getLayoutItems(),d=b.length,c;if(d){if(!e.clearEl){e.clearEl=e.getRenderTarget().createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}for(c=0;c<d;c++){e.setItemSize(b[c])}}},configureItem:function(a){this.callParent(arguments);a.layoutManagedHeight=2;a.layoutManagedWidth=2}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],suspendLayout:false,autoDestroy:true,defaultType:"panel",isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.layoutOnShow=Ext.create("Ext.util.MixedCollection");a.callParent();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},afterRender:function(){this.getLayout();this.callParent()},renderChildren:function(){var b=this,a=b.getLayout();b.callParent();if(a){b.suspendLayout=true;a.renderChildren();delete b.suspendLayout}},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,"autocontainer"))}return a.layout},doLayout:function(){var b=this,a=b.getLayout();if(b.rendered&&a&&!b.suspendLayout){if(!b.isFixedWidth()||!b.isFixedHeight()){if(b.componentLayout.layoutBusy!==true){b.doComponentLayout();if(b.componentLayout.layoutCancelled===true){a.layout()}}}else{if(a.layoutBusy!==true){a.layout()}}}return b},afterLayout:function(a){++this.layoutCounter;this.fireEvent("afterlayout",this,a)},prepareItems:function(b,d){if(!Ext.isArray(b)){b=[b]}var c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return Ext.isString(a)?Ext.ComponentManager.get(a):this.createComponent(a)},createComponent:function(a,b){return Ext.ComponentManager.create(a,b||this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var j=this,g=Array.prototype.slice.call(arguments),a,h,b=[],c,e,l,d=-1,k;if(typeof g[0]=="number"){d=g.shift()}a=g.length>1;if(a||Ext.isArray(g[0])){h=a?g:g[0];j.suspendLayout=true;for(c=0,e=h.length;c<e;c++){l=h[c];if(d!=-1){l=j.add(d+c,l)}else{l=j.add(l)}b.push(l)}j.suspendLayout=false;j.doLayout();return b}k=j.prepareItems(g[0],true)[0];if(k.floating){k.onAdded(j,d)}else{d=(d!==-1)?d:j.items.length;if(j.fireEvent("beforeadd",j,k,d)!==false&&j.onBeforeAdd(k)!==false){j.items.insert(d,k);k.onAdded(j,d);j.onAdd(k,d);j.fireEvent("add",j,k,d)}j.doLayout()}return k},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(b){var a=this;if(b.ownerCt){b.ownerCt.remove(b,false)}if(a.border===false||a.border===0){b.border=(b.border===true)}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&d.fireEvent("beforeremove",d,e)!==false){d.doRemove(e,b);d.fireEvent("remove",d,e)}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered;e.items.remove(c);c.onRemoved();if(a){d.onRemove(c)}e.onRemove(c,b);if(b===true||(b!==false&&e.autoDestroy)){c.destroy()}if(a&&!b){d.afterRemove(c)}if(!e.destroying){e.doLayout()}},removeAll:function(c){var h=this,e=h.items.items.slice(),b=[],d=0,a=e.length,g;h.suspendLayout=true;for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.suspendLayout=false;if(a){h.doLayout()}return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}if(h.floatingItems&&h.floatingItems.accessList){a.push.apply(a,h.floatingItems.accessList)}return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},child:function(a){a=a||"";return this.query("> "+a)[0]||null},down:function(a){return this.query(a)[0]||null},show:function(){this.callParent(arguments);this.performDeferredLayouts();return this},performDeferredLayouts:function(){var e=this.layoutOnShow,d=e.getCount(),b=0,a,c;for(;b<d;b++){c=e.get(b);a=c.needsLayout;if(Ext.isObject(a)){c.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}}e.clear()},onEnable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable){a.enable();delete a.resetDisable}});this.callParent()},onDisable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable!==false&&!a.disabled){a.disable();a.resetDisable=true}});this.callParent()},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",getChildByElement:function(d){var g,b,a=0,c=this.items.items,e=c.length;d=Ext.getDom(d);for(;a<e;a++){g=c[a];b=g.getEl();if((b.dom===d)||b.contains(d)){return g}}return null}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=Ext.create("Ext.util.MixedCollection");Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var a=this.active,b;if(a&&a.length>0){b=a.clone();b.each(function(c){c.hide()});return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,g=e.active,d=g.last(),c=e.attached,b=a.getEl(),h;e.lastShow=new Date();g.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e);e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(g){var b=this,d=b.active,a=b.lastShow,c=g.target;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!g.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll();if(Ext.isIE&&Ext.fly(c).focusable()){c.focus()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return Ext.create("Ext.menu.Menu",{items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Component",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,beforeLayout:function(){return this.callParent(arguments)||this.lastText!==this.owner.text},onLayout:function(c,p){var l=this,h=Ext.isNumber,d=l.owner,n=d.el,i=d.btnEl,e=d.btnInnerEl,g=d.btnIconEl,j=(d.icon||d.iconCls)&&(d.iconAlign=="top"||d.iconAlign=="bottom"),b=d.minWidth,m=d.maxWidth,a,q,k;l.getTargetInfo();l.callParent(arguments);e.unclip();l.setTargetSize(c,p);if(!h(c)){if(d.text&&(Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&i&&i.getWidth()>20){q=l.btnFrameWidth;k=Ext.util.TextMetrics.measure(e,d.text);n.setWidth(k.width+q+l.adjWidth);i.setWidth(k.width+q);e.setWidth(k.width+q);if(j){g.setWidth(k.width+q)}}else{n.setWidth(null);i.setWidth(null);e.setWidth(null);g.setWidth(null)}if(b||m){a=n.getWidth();if(b&&(a<b)){l.setTargetSize(b,p)}else{if(m&&(a>m)){e.clip();l.setTargetSize(m,p)}}}}this.lastText=d.text},setTargetSize:function(a,l){var h=this,b=h.owner,e=Ext.isNumber,d=b.btnInnerEl,j=(e(a)?a-h.adjWidth:a),g=(e(l)?l-h.adjHeight:l),c=h.btnFrameHeight,k=b.getText(),i;h.callParent(arguments);h.setElementSize(b.btnEl,j,g);h.setElementSize(d,j,g);if(g>=0){d.setStyle("line-height",g-c+"px")}if(k&&this.htmlRE.test(k)){d.setStyle("line-height","normal");i=Ext.util.TextMetrics.measure(d,k).height;d.setStyle("padding-top",h.btnFrameTop+Math.max(d.getHeight()-c-i,0)/2+"px");h.setElementSize(d,j,g)}},getTargetInfo:function(){var e=this,a=e.owner,d=a.el,c=e.frameSize,h=a.frameBody,b=a.btnWrap,g=a.btnInnerEl;if(!("adjWidth" in e)){Ext.apply(e,{adjWidth:c.left+c.right+d.getBorderWidth("lr")+d.getPadding("lr")+b.getPadding("lr")+(h?h.getFrameWidth("lr"):0),adjHeight:c.top+c.bottom+d.getBorderWidth("tb")+d.getPadding("tb")+b.getPadding("tb")+(h?h.getFrameWidth("tb"):0),btnFrameWidth:g.getFrameWidth("lr"),btnFrameHeight:g.getFrameWidth("tb"),btnFrameTop:g.getFrameWidth("t")})}return e.callParent()}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",ariaRole:"button",renderTpl:'<em id="{id}-btnWrap" class="{splitCls}"><tpl if="href"><a id="{id}-btnEl" href="{href}" target="{target}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link"><span id="{id}-btnInnerEl" class="{baseCls}-inner">{text}</span><span id="{id}-btnIconEl" class="{baseCls}-icon"></span></a></tpl><tpl if="!href"><button id="{id}-btnEl" type="{type}" hidefocus="true"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off"><span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">{text}</span><span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}">&#160;</span></button></tpl></em>',scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerCt=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},initAria:function(){this.callParent();var a=this.getActionEl();if(this.menu){a.dom.setAttribute("aria-haspopup",true)}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.btnEl},setButtonCls:function(){var d=this,b=[],a=d.btnIconEl,c="x-hide-display";if(d.useSetClass){if(!Ext.isEmpty(d.oldCls)){d.removeClsWithUI(d.oldCls);d.removeClsWithUI(d.pressedCls)}if(d.iconCls||d.icon){if(d.text){b.push("icon-text-"+d.iconAlign)}else{b.push("icon")}if(a){a.removeCls(c)}}else{if(d.text){b.push("noicon")}if(a){a.addCls(c)}}d.oldCls=b;d.addClsWithUI(b);d.addClsWithUI(d.pressed?d.pressedCls:null)}},onRender:function(d,a){var e=this,c,b;Ext.applyIf(e.renderData,e.getTemplateArgs());e.addChildEls("btnEl","btnWrap","btnInnerEl","btnIconEl");if(e.scale){e.ui=e.ui+"-"+e.scale}e.callParent(arguments);if(e.split&&e.arrowTooltip){e.arrowEl.dom.setAttribute(e.getTipAttr(),e.arrowTooltip)}e.mon(e.btnEl,{scope:e,focus:e.onFocus,blur:e.onBlur});b=e.el;if(e.icon){e.setIcon(e.icon)}if(e.iconCls){e.setIconCls(e.iconCls)}if(e.tooltip){e.setTooltip(e.tooltip,true)}if(e.textAlign){e.setTextAlign(e.textAlign)}if(e.handleMouseEvents){e.mon(b,{scope:e,mouseover:e.onMouseOver,mouseout:e.onMouseOut,mousedown:e.onMouseDown});if(e.split){e.mon(b,{mousemove:e.onMouseMove,scope:e})}}if(e.menu){e.mon(e.menu,{scope:e,show:e.onMenuShow,hide:e.onMenuHide});e.keyMap=Ext.create("Ext.util.KeyMap",e.el,{key:Ext.EventObject.DOWN,handler:e.onDownKey,scope:e})}if(e.repeat){c=Ext.create("Ext.util.ClickRepeater",b,Ext.isObject(e.repeat)?e.repeat:{});e.mon(c,"click",e.onRepeatClick,e)}else{e.mon(b,e.clickEvent,e.onClick,e)}Ext.ButtonToggleManager.register(e)},getTemplateArgs:function(){var c=this,b=c.getPersistentBtnPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),target:c.target||"_blank",type:c.type,splitCls:c.getSplitCls(),cls:c.cls,iconCls:c.iconCls||"",text:c.text||"&#160;",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},afterRender:function(){var a=this;a.useSetClass=true;a.setButtonCls();a.doc=Ext.getDoc();this.callParent(arguments)},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setButtonCls()}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.el){a.btnInnerEl.update(b||"&#160;");a.setButtonCls()}a.doComponentLayout();return a},setIcon:function(b){var c=this,a=c.btnIconEl;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setButtonCls()}return c},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.btnEl.dom.setAttribute("aria-pressed",c);b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;b.fireEvent("click",b,c);if(a){a.call(b.scope||b,b,c)}b.onBlur()},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+(e.frameSize&&e.frameSize[b]||0)}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onFocus:function(b){var a=this;if(!a.disabled){a.addClsWithUI(a.focusCls)}},onBlur:function(b){var a=this;a.removeClsWithUI(a.focusCls)},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentBtnPadding:function(){var a=Ext.button.Button,e=a.persistentPadding,c,b,d,g;if(!e){e=a.persistentPadding=[0,0,0,0];if(!Ext.isIE){c=Ext.create("Ext.button.Button",{renderTo:Ext.getBody(),text:"test",style:"position:absolute;top:-999px;"});d=c.btnEl;g=c.btnInnerEl;d.setSize(null,null);b=g.getOffsetsTo(d);e[0]=b[1];e[1]=d.getWidth()-g.getWidth()-b[0];e[2]=d.getHeight()-g.getHeight()-b[1];e[3]=b[0];c.destroy()}}return e}},function(){var a={};function b(e,j){var h,d,c;if(j){h=a[e.toggleGroup];for(d=0,c=h.length;d<c;d++){if(h[d]!==e){h[d].toggle(false)}}}}Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un("toggle",b)}},getPressed:function(h){var e=a[h],d=0,c;if(e){for(c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);b.beforeLayout=Ext.Function.createInterceptor(b.beforeLayout,this.clearOverflow,this);a.afterCtCls=a.afterCtCls||Ext.baseCSSPrefix+"box-menu-"+b.parallelAfter;a.menuItems=[]},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},handleOverflow:function(a,h){var g=this,e=g.layout,c="get"+e.parallelPrefixCap,b={},d=[null,null];g.callParent(arguments);this.createMenu(a,h);b[e.perpendicularPrefix]=h[e.perpendicularPrefix];b[e.parallelPrefix]=h[e.parallelPrefix]-g.afterCt[c]();d[e.perpendicularSizeIndex]=(a.meta.maxSize-g.menuTrigger["get"+e.perpendicularPrefixCap]())/2;g.menuTrigger.setPosition.apply(g.menuTrigger,d);return{targetSize:b}},clearOverflow:function(a,j){var h=this,g=j?j.width+(h.afterCt?h.afterCt.getWidth():0):0,b=h.menuItems,c=0,e=b.length,d;h.hideTrigger();for(;c<e;c++){b[c].show()}b.length=0;return j?{targetSize:{height:j.height,width:g}}:null},showTrigger:function(){this.menuTrigger.show()},hideTrigger:function(){if(this.menuTrigger!==undefined){this.menuTrigger.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e;var c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(c,a){var b=this;if(a instanceof Ext.toolbar.Separator){c.add("-")}else{if(a.isComponent){if(a.isXType("splitbutton")){c.add(b.createMenuConfig(a,true))}else{if(a.isXType("button")){c.add(b.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(d){b.addComponentToMenu(c,d)})}else{c.add(Ext.create(Ext.getClassName(a),b.createMenuConfig(a)))}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){if(b.menu){delete b.menu}})}},createMenu:function(a,c){var l=this,j=l.layout,m=j.parallelBefore,e=j.parallelPrefix,b=c[e],h=a.boxes,d=0,k=h.length,g;if(!l.menuTrigger){l.createInnerElements();l.menu=Ext.create("Ext.menu.Menu",{listeners:{scope:l,beforeshow:l.beforeMenuShow}});l.menuTrigger=Ext.create("Ext.button.Button",{ownerCt:l.layout.owner,iconCls:l.layout.owner.menuTriggerCls,ui:j.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:l.menu,getSplitCls:function(){return""},renderTo:l.afterCt})}l.showTrigger();b-=l.afterCt.getWidth();l.menuItems.length=0;for(;d<k;d++){g=h[d];if(g[m]+g[e]>b){l.menuItems.push(g.component);g.component.hide()}}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!this.afterCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");this.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+this.afterCtCls},"before")}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=Ext.create("Ext.util.Offset");c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(c,b){for(var d in this.ids){for(var a in this.ids[d]){var e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[];for(var d in g.groups){for(var c in this.ids[d]){var a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true);for(var c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(b){for(var a in this.ids){if(this.ids[a][b]){return this.ids[a][b]}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}else{}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&&(c.button!==0&&c.button!==1&&c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}if(!this.dragThreshMet){var b=Math.abs(this.startX-c.getPageX());var a=Math.abs(this.startY-c.getPageY());if(b>this.clickPixelThresh||a>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(m,n){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=m.getPoint();var a=[];var d=[];var k=[];var h=[];var c=[];for(var g in this.dragOvers){var b=this.dragOvers[g];if(!this.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,this.mode)){d.push(b)}a[g]=true;delete this.dragOvers[g]}for(var p in q.groups){if("string"!=typeof p){continue}for(g in this.ids[p]){var j=this.ids[p][g];if(!this.isTypeOfDD(j)){continue}if(j.isTarget&&!j.isLocked()&&((j!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,j,this.mode)){if(n){h.push(j)}else{if(!a[j.id]){c.push(j)}else{k.push(j)}this.dragOvers[j.id]=j}}}}}if(this.mode){if(d.length){q.b4DragOut(m,d);q.onDragOut(m,d)}if(c.length){q.onDragEnter(m,c)}if(k.length){q.b4DragOver(m,k);q.onDragOver(m,k)}if(h.length){q.b4DragDrop(m,h);q.onDragDrop(m,h)}}else{var l=0;for(g=0,l=d.length;g<l;++g){q.b4DragOut(m,d[g].id);q.onDragOut(m,d[g].id)}for(g=0,l=c.length;g<l;++g){q.onDragEnter(m,c[g].id)}for(g=0,l=k.length;g<l;++g){q.b4DragOver(m,k[g].id);q.onDragOver(m,k[g].id)}for(g=0,l=h.length;g<l;++g){q.b4DragDrop(m,h[g].id);q.onDragDrop(m,h[g].id)}}if(n&&!h.length){q.onInvalidDrop(m)}},getBestMatch:function(c){var e=null;var b=c.length;if(b==1){e=c[0]}else{for(var d=0;d<b;++d){var a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){for(var a in b){if("string"!=typeof a){continue}for(var c in this.ids[a]){var d=this.ids[a][c];if(this.isTypeOfDD(d)){var e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,p,n,q,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;p=m[1];n=p+g.offsetHeight;q=p-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return Ext.create("Ext.util.Region",q,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id];if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);var i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;var g=i.getTargetCoord(j.x,j.y);var b=i.getDragEl();var d=Ext.create("Ext.util.Region",g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);var h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode;var b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount>2000){}else{setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:"0",pack:"start",type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",bindToOwnerCtContainer:true,availableSpaceOffset:0,reserveOffset:true,shrinkToFit:true,clearInnerCtOnLayout:false,flexSortFn:function(d,c){var e="max"+this.parallelPrefixCap,g=Infinity;d=d.component[e]||g;c=c.component[e]||g;if(!isFinite(d)&&!isFinite(c)){return false}return d-c},minSizeSortFn:function(d,c){return c.available-d.available},constructor:function(a){var b=this;b.callParent(arguments);b.flexSortFn=Ext.Function.bind(b.flexSortFn,b);b.initOverflowHandler()},getChildBox:function(b){b=b.el||this.owner.getComponent(b).el;var a=b.getBox(false,true);return{left:a.left,top:a.top,width:a.width,height:a.height}},calculateChildBox:function(e){var d=this,b=d.calculateChildBoxes(d.getVisibleItems(),d.getLayoutTargetSize()).boxes,c=b.length,a=0;e=d.owner.getComponent(e);for(;a<c;a++){if(b[a].component===e){return b[a]}}},calculateChildBoxes:function(r,b){var z=this,L=Math,m=L.max,q=Infinity,x,u=z.parallelPrefix,p=z.parallelPrefixCap,O=z.perpendicularPrefix,v=z.perpendicularPrefixCap,E="min"+p,H="min"+v,am="max"+v,c=b[u]-z.scrollOffset,ab=b[O],ag=z.padding,t=ag[z.parallelBefore],w=t+ag[z.parallelAfter],R=ag[z.perpendicularLeftTop],M=R+ag[z.perpendicularRightBottom],aj=m(0,ab-M),al=z.innerCt.getBorderWidth(z.perpendicularLT+z.perpendicularRB),ad=z.pack=="start",ap=z.pack=="center",G=z.pack=="end",af=Ext.Number.constrain,P=r.length,d=0,ak=0,an=0,y=0,I=0,S=[],N=[],ai,ah,j,ac,C,D,ao,aa,Y,Z,n,e,B,K,A,Q,k,T,ae,g,F,V,a,s,l,J,U,X,h,W;for(ah=0;ah<P;ah++){j=r[ah];C=j[O];if(!j.flex||!(z.align=="stretch"||z.align=="stretchmax")){if(j.componentLayout.initialized!==true){z.layoutItem(j)}}D=j.margins;J=D[z.parallelBefore]+D[z.parallelAfter];Y={component:j,margins:D};if(j.flex){ak+=j.flex;ac=x}else{if(!(j[u]&&C)){ao=j.getSize()}ac=j[u]||ao[u];C=C||ao[O]}d+=J+(ac||0);an+=J+(j.flex?j[E]||0:ac);y+=J+(j[E]||ac||0);if(typeof C!="number"){C=j["get"+v]()}I=m(I,m(C,j[H]||0)+D[z.perpendicularLeftTop]+D[z.perpendicularRightBottom]);Y[u]=ac||x;Y.dirtySize=j.componentLayout.lastComponentSize?(Y[u]!==j.componentLayout.lastComponentSize[u]):false;Y[O]=C||x;S.push(Y)}if(!z.autoSize){Z=an-c;n=y>c}e=m(0,c-d-w-(z.reserveOffset?z.availableSpaceOffset:0));if(n){for(ah=0;ah<P;ah++){k=S[ah];B=r[ah][E]||r[ah][u]||k[u];k.dirtySize=k.dirtySize||k[u]!=B;k[u]=B}}else{if(Z>0){for(ah=0;ah<P;ah++){K=r[ah];B=K[E]||0;if(K.flex){k=S[ah];k.dirtySize=k.dirtySize||k[u]!=B;k[u]=B}else{if(z.shrinkToFit){N.push({minSize:B,available:S[ah][u]-B,index:ah})}}}Ext.Array.sort(N,z.minSizeSortFn);for(ah=0,A=N.length;ah<A;ah++){Q=N[ah].index;if(Q==x){continue}K=r[Q];B=N[ah].minSize;k=S[Q];T=k[u];ae=m(B,T-L.ceil(Z/(A-ah)));g=T-ae;k.dirtySize=k.dirtySize||k[u]!=ae;k[u]=ae;Z-=g}n=(Z>0)}else{a=e;s=ak;V=[];for(ah=0;ah<P;ah++){j=r[ah];if(ad&&j.flex){V.push(S[Ext.Array.indexOf(r,j)])}}Ext.Array.sort(V,z.flexSortFn);for(ah=0;ah<V.length;ah++){U=V[ah];j=U.component;D=U.margins;l=L.ceil((j.flex/s)*a);l=Math.max(j["min"+p]||0,L.min(j["max"+p]||q,l));a-=l;s-=j.flex;U.dirtySize=U.dirtySize||U[u]!=l;U[u]=l}}}if(ap){t+=e/2}else{if(G){t+=e}}if(z.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!z.owner.width&&z.direction=="vertical"){ai=I+z.owner.el.getPadding("lr")+z.owner.el.getBorderWidth("lr");if(z.owner.frameSize){ai+=z.owner.frameSize.left+z.owner.frameSize.right}aj=Math.min(aj,b.width=I+ag.left+ag.right)}for(ah=0;ah<P;ah++){j=r[ah];U=S[ah];D=U.margins;h=D[z.perpendicularLeftTop]+D[z.perpendicularRightBottom];t+=D[z.parallelBefore];U[z.parallelBefore]=t;U[z.perpendicularLeftTop]=R+D[z.perpendicularLeftTop];if(z.align=="stretch"){W=af(aj-h,j[H]||0,j[am]||q);U.dirtySize=U.dirtySize||U[O]!=W;U[O]=W}else{if(z.align=="stretchmax"){W=af(I-h,j[H]||0,j[am]||q);U.dirtySize=U.dirtySize||U[O]!=W;U[O]=W}else{if(z.align==z.alignCenteringString){F=m(aj,I)-al-U[O];if(F>0){U[z.perpendicularLeftTop]=R+Math.round(F/2)}}}}t+=(U[u]||0)+D[z.parallelAfter]}return{boxes:S,meta:{calculatedWidth:ai,maxSize:I,nonFlexSize:d,desiredSize:an,minimumSize:y,shortfall:Z,tooNarrow:n}}},onRemove:function(a){this.callParent(arguments);if(this.overflowHandler){this.overflowHandler.onRemove(a)}},initOverflowHandler:function(){var c=this.overflowHandler;if(typeof c=="string"){c={type:c}}var b="None";if(c&&c.type!==undefined){b=c.type}var a=Ext.layout.container.boxOverflow[b];if(a[this.type]){a=a[this.type]}this.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,this,c)},onLayout:function(){this.callParent();if(this.clearInnerCtOnLayout===true&&this.adjustmentPass!==true){this.innerCt.setSize(null,null)}var h=this,c=h.getLayoutTargetSize(),g=h.getVisibleItems(),b=h.calculateChildBoxes(g,c),e=b.boxes,i=b.meta,j,a,d;if(h.autoSize&&b.meta.desiredSize){c[h.parallelPrefix]=b.meta.desiredSize}if(i.shortfall>0){j=h.overflowHandler;a=i.tooNarrow?"handleOverflow":"clearOverflow";d=j[a](b,c);if(d){if(d.targetSize){c=d.targetSize}if(d.recalculate){g=h.getVisibleItems();b=h.calculateChildBoxes(g,c);e=b.boxes}}}else{h.overflowHandler.clearOverflow()}h.layoutTargetLastSize=c;h.childBoxCache=b;h.updateInnerCtSize(c,b);h.updateChildBoxes(e);h.handleTargetOverflow(c)},animCallback:Ext.emptyFn,updateChildBoxes:function(h){var m=this,e=0,c=h.length,q=[],p=Ext.dd.DDM.getDDById(m.innerCt.id),a,g,d,j,k,b;for(;e<c;e++){g=h[e];j=g.component;if(p&&(p.getDragEl()===j.el.dom)){continue}d=false;a=m.getChildBox(j);if(m.animate){b=m.animate.callback||m.animate;k={layoutAnimation:true,target:j,from:{},to:{},listeners:{}};if(!isNaN(g.width)&&(g.width!=a.width)){d=true;k.to.width=g.width}if(!isNaN(g.height)&&(g.height!=a.height)){d=true;k.to.height=g.height}if(!isNaN(g.left)&&(g.left!=a.left)){d=true;k.to.left=g.left}if(!isNaN(g.top)&&(g.top!=a.top)){d=true;k.to.top=g.top}if(d){q.push(k)}}else{if(g.dirtySize){if(g.width!==a.width||g.height!==a.height){m.setItemSize(j,g.width,g.height)}}if(isNaN(g.left)||isNaN(g.top)){continue}j.setPosition(g.left,g.top)}}c=q.length;if(c){var n=function(i){c-=1;if(!c){m.animCallback(i);m.layoutBusy=false;if(Ext.isFunction(b)){b()}}};var l=function(){m.layoutBusy=true};for(e=0,c=q.length;e<c;e++){k=q[e];k.listeners.afteranimate=n;if(!e){k.listeners.beforeanimate=l}if(m.animate.duration){k.duration=m.animate.duration}j=k.target;delete k.target;j.stopAnimation();j.animate(k)}}},updateInnerCtSize:function(c,a){var h=this,e=Math.max,g=h.align,i=h.padding,b=c.width,k=c.height,l=a.meta,d,j;if(h.direction=="horizontal"){d=b;j=l.maxSize+i.top+i.bottom+h.innerCt.getBorderWidth("tb");if(g=="stretch"){j=k}else{if(g=="middle"){j=e(k,j)}}}else{j=k;d=l.maxSize+i.left+i.right+h.innerCt.getBorderWidth("lr");if(g=="stretch"){d=b}else{if(g=="center"){d=e(b,d)}}}h.getRenderTarget().setSize(d||undefined,j||undefined);if(l.calculatedWidth&&h.owner.el.getWidth()>l.calculatedWidth){h.owner.el.setWidth(l.calculatedWidth)}if(h.innerCt.dom.scrollTop){h.innerCt.dom.scrollTop=0}},handleTargetOverflow:function(c){var b=this.getTarget(),d=b.getStyle("overflow"),a;if(d&&d!="hidden"&&!this.adjustmentPass){a=this.getLayoutTargetSize();if(a.width!=c.width||a.height!=c.height){this.adjustmentPass=true;this.onLayout();return true}}delete this.adjustmentPass},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&this.innerCt&&b.parentNode===this.innerCt.dom)||false},getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:this.innerCls,role:"presentation"});this.padding=Ext.util.Format.parseBox(this.padding)}return this.innerCt},renderItem:function(d,g){this.callParent(arguments);var c=this,a=d.getEl(),b=a.dom.style,e=d.margins||d.margin;if(e){if(Ext.isString(e)||Ext.isNumber(e)){e=Ext.util.Format.parseBox(e)}else{Ext.applyIf(e,{top:0,right:0,bottom:0,left:0})}}else{e=Ext.apply({},c.defaultMargins)}e.top+=a.getMargin("t");e.right+=a.getMargin("r");e.bottom+=a.getMargin("b");e.left+=a.getMargin("l");e.height=e.top+e.bottom;e.width=e.left+e.right;b.marginTop=b.marginRight=b.marginBottom=b.marginLeft="0";d.margins=e},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",alignCenteringString:"middle",type:"hbox",direction:"horizontal",parallelSizeIndex:0,perpendicularSizeIndex:1,parallelPrefix:"width",parallelPrefixCap:"Width",parallelLT:"l",parallelRB:"r",parallelBefore:"left",parallelBeforeCap:"Left",parallelAfter:"right",parallelPosition:"x",perpendicularPrefix:"height",perpendicularPrefixCap:"Height",perpendicularLT:"t",perpendicularRB:"b",perpendicularLeftTop:"top",perpendicularRightBottom:"bottom",perpendicularPosition:"y",configureItem:function(a){if(a.flex){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",alignCenteringString:"center",type:"vbox",direction:"vertical",parallelSizeIndex:1,perpendicularSizeIndex:0,parallelPrefix:"height",parallelPrefixCap:"Height",parallelLT:"t",parallelRB:"b",parallelBefore:"top",parallelBeforeCap:"Top",parallelAfter:"bottom",parallelPosition:"y",perpendicularPrefix:"width",perpendicularPrefixCap:"Width",perpendicularLT:"l",perpendicularRB:"r",perpendicularLeftTop:"left",perpendicularRightBottom:"right",perpendicularPosition:"x",configureItem:function(a){if(a.flex){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}this.callParent(arguments)}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:"Ext.FocusMgr",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],tabIndexWhitelist:["a","button","embed","frame","iframe","img","input","object","select","textarea"],constructor:function(){var a=this,b=Ext.ComponentQuery;a.addEvents("beforecomponentfocus","componentfocus","disable","enable");a.keyNav=Ext.create("Ext.util.KeyNav",Ext.getDoc(),{disabled:true,scope:a,backspace:a.focusLast,enter:a.navigateIn,esc:a.navigateOut,tab:a.navigateSiblings});a.focusData={};a.subscribers=Ext.create("Ext.util.HashMap");a.focusChain={};Ext.apply(b.pseudos,{focusable:function(g){var d=g.length,j=[],h=0,k,e=function(c){return c&&c.focusable!==false&&b.is(c,"[rendered]:not([destroying]):not([isDestroyed]):not([disabled]){isVisible(true)}{el && c.el.dom && c.el.isVisible()}")};for(;h<d;h++){k=g[h];if(e(k)){j.push(k)}}return j},nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e+j,k;for(;h!=e;h+=j){if(h>=d){h=0}else{if(h<0){h=d-1}}k=g[h];if(b.is(k,":focusable")){return[k]}else{if(k.placeholder&&b.is(k.placeholder,":focusable")){return[k.placeholder]}}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;Ext.ComponentManager.all.un("add",a.onComponentCreated,a);a.removeDOM();a.keyNav.disable();a.setFocusAll(false);a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}Ext.ComponentManager.all.on("add",b.onComponentCreated,b);b.initDOM(a);b.keyNav.enable();b.setFocusAll(true,a);b.focusEl.focus();delete b.focusedCmp;b.enabled=true;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(g,e){return g.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(b){var c=this,d="&#160",a=c.focusFrameCls;if(!Ext.isReady){Ext.onReady(c.initDOM,c);return}if(!c.focusEl){c.focusEl=Ext.getBody().createChild({tabIndex:"-1",cls:c.focusElementCls,html:d})}if(!c.focusFrame&&b.focusFrame){c.focusFrame=Ext.getBody().createChild({cls:a,children:[{cls:a+"-top"},{cls:a+"-bottom"},{cls:a+"-left"},{cls:a+"-right"}],style:"top: -100px; left: -100px;"});c.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);c.focusFrameWidth=2;c.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(d){var b=this,a=b.focusedCmp,g,c;if(!a){g=b.getRootComponents();if(g.length){g[0].focus()}}else{c=Ext.ComponentQuery.query(">:focusable",a)[0];if(c){c.focus()}else{if(Ext.isFunction(a.onClick)){d.button=0;a.onClick(d);a.focus()}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,n){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",m,d,l;l=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!l&&!n){return}if(c&&j.isWhitelisted(l)){return true}n=n||l.up();if(n){m=l?Ext.Array.indexOf(n.getRefItems(),l):-1;d=Ext.ComponentQuery.query(">:"+h+"Focus("+m+")",n)[0];if(d&&l!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentCreated:function(b,c,a){this.setFocus(a,true,this.options)},onComponentDestroy:function(a){this.setFocus(a,false)},onComponentFocus:function(p,l){var m=this,a=m.focusChain;if(!Ext.ComponentQuery.is(p,":focusable")){m.clearComponent(p);if(a[p.id]){return}var r=p.up();if(r){a[p.id]=true;r.focus()}return}m.focusChain={};clearTimeout(m.cmpFocusDelay);if(arguments.length!==2){m.cmpFocusDelay=Ext.defer(m.onComponentFocus,90,m,[p,l]);return}if(m.fireEvent("beforecomponentfocus",m,p,m.previousFocusedCmp)===false){m.clearComponent(p);return}m.focusedCmp=p;if(m.shouldShowFocusFrame(p)){var t="."+m.focusFrameCls+"-",b=m.focusFrame,g=m.focusFrameWidth,j=p.el.getPageBox(),s=j.top,c=j.left,n=j.width,h=j.height,i=b.child(t+"top"),d=b.child(t+"bottom"),q=b.child(t+"left"),k=b.child(t+"right");i.setWidth(n).setLeftTop(c,s);d.setWidth(n).setLeftTop(c,s+h-g);q.setHeight(h-g-g).setLeftTop(c,s+g);k.setHeight(h-g-g).setLeftTop(c+n-g,s+g);b.show()}m.fireEvent("componentfocus",m,p,m.previousFocusedCmp)},onComponentHide:function(e){var d=this,g=Ext.ComponentQuery,b=false,a,c;if(d.focusedCmp){a=g.query("[id="+d.focusedCmp.id+"]",e)[0];b=d.focusedCmp.id===e.id||a;if(a){d.clearComponent(a)}}d.clearComponent(e);if(b){c=g.query("^:focusable",e)[0];if(c){c.focus()}}},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusEl,a.focusFrame);delete a.focusEl;delete a.focusFrame;delete a.focusFrameWidth},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setFocus:function(e,i,b){var d=this,c,h,g,a=function(j){return !Ext.Array.contains(d.tabIndexWhitelist,j.tagName.toLowerCase())&&j.tabIndex<=0};b=b||{};if(!e.rendered){e.on("afterrender",Ext.pass(d.setFocus,arguments,d),d,{single:true});return}c=e.getFocusEl();h=c.dom;if((i&&!d.focusData[e.id])||(!i&&d.focusData[e.id])){if(i){g={focusFrame:b.focusFrame};if(a(h)){g.tabIndex=h.tabIndex;h.tabIndex=-1}c.on({focus:g.focusFn=Ext.bind(d.onComponentFocus,d,[e],0),blur:g.blurFn=Ext.bind(d.onComponentBlur,d,[e],0),scope:d});e.on({hide:d.onComponentHide,close:d.onComponentHide,beforedestroy:d.onComponentDestroy,scope:d});d.focusData[e.id]=g}else{g=d.focusData[e.id];if("tabIndex" in g){h.tabIndex=g.tabIndex}c.un("focus",g.focusFn,d);c.un("blur",g.blurFn,d);e.un("hide",d.onComponentHide,d);e.un("close",d.onComponentHide,d);e.un("beforedestroy",d.onComponentDestroy,d);delete d.focusData[e.id]}}},setFocusAll:function(h,c){var g=this,b=Ext.ComponentManager.all.getArray(),a=b.length,e,d=0;for(;d<a;d++){g.setFocus(b[d],h,c)}},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return Ext.create("Ext.util.KeyNav",d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{};if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false},subscribe:function(a,c){var g=this,e=Ext.Array,h={},d=g.subscribers,b=function(i){if(i.isContainer&&!d.containsKey(i.id)){e.forEach(i.query(">"),b);g.setFocus(i,true,c);i.on("add",h.onAdd,g)}else{if(!i.isContainer){g.setFocus(i,true,c)}}};if(!a||!a.isContainer){return}if(!a.rendered){a.on("afterrender",Ext.pass(g.subscribe,arguments,g),g,{single:true});return}g.initDOM(c);h.keyNav=g.setupSubscriberKeys(a,c.keys);h.onAdd=function(j,k,i){b(k)};a.on("beforedestroy",g.unsubscribe,g);b(a);d.add(a.id,h)},unsubscribe:function(a){var e=this,d=Ext.Array,c=e.subscribers,g,b=function(h){if(h.isContainer&&!c.containsKey(h.id)){d.forEach(h.query(">"),b);e.setFocus(h,false);h.un("add",g.onAdd,e)}else{if(!h.isContainer){e.setFocus(h,false)}}};if(!a||!c.containsKey(a.id)){return}g=c.get(a.id);g.keyNav.destroy();a.un("beforedestroy",e.unsubscribe,e);c.removeAtKey(a.id);b(a);e.removeDOM()}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox","Ext.FocusManager"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle",clearInnerCtOnLayout:true});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange");a=b.vertical?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a})},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(b){if(Ext.isString(b)){var a=Ext.toolbar.Toolbar.shortcuts[b];if(a){b={xtype:a}}else{b={xtype:"tbtext",text:b}}this.applyDefaults(b)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:this.createComponent(a,a.split?"splitbutton":this.defaultType)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a);if(this.disabled){a.disable()}},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}},function(){this.shortcuts={"-":"tbseparator"," ":"tbspacer","->":"tbfill"}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",defaultDockWeights:{top:1,left:3,right:5,bottom:7},renderTpl:['<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"</div>"],border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");a.addChildEls("body");if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},initItems:function(){var b=this,a=b.dockedItems;b.callParent();b.dockedItems=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){b.addDocked(a)}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},initBodyStyles:function(){var d=this,a=d.bodyStyle,c=[],b=Ext.Element,e;if(Ext.isFunction(a)){a=a()}if(Ext.isString(a)){c=a.split(";")}else{for(e in a){if(a.hasOwnProperty(e)){c.push(e+":"+a[e])}}}if(d.bodyPadding!==undefined){c.push("padding: "+b.unitizeBox((d.bodyPadding===true)?5:d.bodyPadding))}if(d.frame&&d.bodyBorder){if(!Ext.isNumber(d.bodyBorder)){d.bodyBorder=1}c.push("border-width: "+b.unitizeBox(d.bodyBorder))}delete d.bodyStyle;return c.length?c.join(";"):undefined},initBodyCls:function(){var b=this,a="",c=b.bodyCls;if(c){Ext.each(c,function(d){a+=" "+d});delete b.bodyCls}return a.length>0?a:undefined},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyStyle:this.initBodyStyles(),bodyCls:this.initBodyCls()})},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(e.border===false){}if(g!==undefined){e.dockedItems.insert(g+b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);e.onDockedAdd(d)}e.componentLayout.childrenChanged=true;if(e.rendered&&!e.suspendLayout){e.doComponentLayout()}return a},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,insertDocked:function(b,a){this.addDocked(a,b)},removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}d.componentLayout.childrenChanged=true;if(!d.destroying&&!d.suspendLayout){d.doComponentLayout()}return e},getDockedItems:function(c){var d=this,b=d.defaultDockWeights,a;if(d.dockedItems&&d.dockedItems.items.length){if(c){a=Ext.ComponentQuery.query(c,d.dockedItems.items)}else{a=d.dockedItems.items.slice()}Ext.Array.sort(a,function(g,e){var h=g.weight||b[g.dock],i=e.weight||b[e.dock];if(Ext.isNumber(h)&&Ext.isNumber(i)){return h-i}return 0});return a}return[]},addUIClsToElement:function(b,g){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(h,d[c])){h.push(d[c])}}e.bodyCls=h.join(" ")}else{e.bodyCls=d.join(" ")}}return a},removeUIClsFromElement:function(b,g){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(h,d[c])}e.bodyCls=h.join(" ")}}return a},addUIToElement:function(c){var b=this,a=b.baseCls+"-body-"+b.ui,d;b.callParent(arguments);if(!c&&b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(" ");if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(" ")}else{b.bodyCls=a}}},removeUIFromElement:function(){var b=this,a=b.baseCls+"-body-"+b.ui,c;b.callParent(arguments);if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments),d=this.getDockedItems(a?"*,* *":undefined),g=d.length,c=0,e;for(;c<g;c++){e=d[c];if(e.dock==="right"||e.dock==="bottom"){break}}return Ext.Array.splice(d,0,c).concat(b).concat(d)},beforeDestroy:function(){var b=this.dockedItems,a;if(b){while((a=b.first())){this.removeDocked(a,true)}}this.callParent()},setBorder:function(a){var b=this;b.border=(a!==undefined)?a:true;if(b.rendered){b.doComponentLayout()}}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,renderTpl:['<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>','<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],initComponent:function(){var c=this,g,e,b,a,d;c.indicateDragCls=c.baseCls+"-draggable";c.title=c.title||"&#160;";c.tools=c.tools||[];c.items=c.items||[];c.orientation=c.orientation||"horizontal";c.dock=(c.dock)?c.dock:(c.orientation=="horizontal")?"top":"left";c.addClsWithUI(c.orientation);c.addClsWithUI(c.dock);c.addChildEls("body");if(!Ext.isEmpty(c.iconCls)){c.initIconCmp();c.items.push(c.iconCmp)}if(c.orientation=="vertical"){if(Ext.isIE6||Ext.isIE7){c.width=this.width||24}else{if(Ext.isIEQuirks){c.width=this.width||25}}c.layout={type:"vbox",align:"center",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.textConfig={cls:c.baseCls+"-text",type:"text",text:c.title,rotate:{degrees:90}};d=c.ui;if(Ext.isArray(d)){d=d[0]}g="."+c.baseCls+"-text-"+d;if(Ext.scopeResetCSS){g="."+Ext.baseCSSPrefix+"reset "+g}e=Ext.util.CSS.getRule(g);if(e){b=e.style}if(b){Ext.apply(c.textConfig,{"font-family":b.fontFamily,"font-weight":b.fontWeight,"font-size":b.fontSize,fill:b.color})}c.titleCmp=Ext.create("Ext.draw.Component",{ariaRole:"heading",focusable:false,viewBox:false,flex:1,autoSize:true,margins:"5 0 0 0",items:[c.textConfig],renderSelectors:{textEl:"."+c.baseCls+"-text"}})}else{c.layout={type:"hbox",align:"middle",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.titleCmp=Ext.create("Ext.Component",{xtype:"component",ariaRole:"heading",focusable:false,flex:1,cls:c.baseCls+"-text-container",renderTpl:['<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>'],renderData:{title:c.title,cls:c.baseCls,ui:c.ui},childEls:["textEl"]})}c.items.push(c.titleCmp);c.items=c.items.concat(c.tools);this.callParent()},initIconCmp:function(){this.iconCmp=Ext.create("Ext.Component",{focusable:false,renderTpl:['<img id="{id}-iconEl" alt="" src="{blank}" class="{cls}-icon {iconCls}"/>'],renderData:{blank:Ext.BLANK_IMAGE_URL,cls:this.baseCls,iconCls:this.iconCls,orientation:this.orientation},childEls:["iconEl"],iconCls:this.iconCls})},afterRender:function(){var a=this;a.el.unselectable();if(a.indicateDrag){a.el.addCls(a.indicateDragCls)}a.mon(a.el,{click:a.onClick,scope:a});a.callParent()},afterLayout:function(){var a=this;a.callParent(arguments);if(Ext.isIE7){a.el.repaint()}},addUIClsToElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(h,d[c])){h.push(d[c])}}e.bodyCls=h.join(" ")}else{e.bodyCls=d.join(" ")}}return a},removeUIClsFromElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(h,d[c])}e.bodyCls=h.join(" ")}}return a},addUIToElement:function(c){var b=this,d,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(!c&&b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(" ");if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(" ")}else{b.bodyCls=a}}if(!c&&b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+"-text-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+"-text-"+b.ui)}},onClick:function(a){if(!a.getTarget(Ext.baseCSSPrefix+"tool")){this.fireEvent("click",a)}},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";var b=c.titleCmp.surface.items.items[0],a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d||"&#160;";c.titleCmp.textEl.update(c.title)}}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.on({render:function(){c.layout.layout();c.setTitle(d)},single:true})}},setIconCls:function(a){var c=this,e=!a||!a.length,d=c.iconCmp,b;c.iconCls=a;if(!c.iconCmp&&!e){c.initIconCmp();c.insert(0,c.iconCmp)}else{if(d){if(e){c.iconCmp.destroy()}else{b=d.iconEl;b.removeCls(d.iconCls);b.addCls(a);d.iconCls=a}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent([arguments]);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(l){var g=this.target,k=l.length,n,h,b,e,c,a,d,m;for(e=0;e<k;e++){n=l[e].attrs;for(h in n){if(n.hasOwnProperty(h)){a=n[h].length;for(c=0;c<a;c++){b=n[h][c];d=b[0];m=b[1];if(h==="x"){d.setX(m)}else{if(h==="y"){d.setY(m)}else{if(h==="scrollTop"){d.scrollTo("top",m)}else{if(h==="scrollLeft"){d.scrollTo("left",m)}else{d.setStyle(h,m)}}}}}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,this.getElVal(e,a,d)])},this);return b}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.CompositeElement","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=Ext.create("Ext.util.MixedCollection");this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(Ext.isString(d)){d=Ext.get(d)}if(d&&d.tagName){d=Ext.get(d);a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d);b.targets.add(a);return a}if(Ext.isObject(d)){if(d.dom){a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d)}else{if(d.isComposite){a=Ext.create("Ext.fx.target.CompositeElement"+(c?"CSS":""),d)}else{if(d.isSprite){a=Ext.create("Ext.fx.target.Sprite",d)}else{if(d.isCompositeSprite){a=Ext.create("Ext.fx.target.CompositeSprite",d)}else{if(d.isComponent){a=Ext.create("Ext.fx.target.Component",d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(c){var b=this.items,a=this.task;b.remove(c);if(a&&!b.length){Ext.TaskManager.stop(a);delete this.task}},startingFilter:function(a){return a.paused===false&&a.running===false&&a.iterations>0},runningFilter:function(a){return a.paused===false&&a.running===true&&a.isAnimator!==true},runner:function(){var b=this,a=b.items;b.targetData={};b.targetArr={};b.timestamp=new Date();a.filterBy(b.startingFilter).each(b.startAnim,b);a.filterBy(b.runningFilter).each(b.runAnim,b);b.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(d){if(!d){return}var c=this,b=d.target.getId(),g=c.useCSS3&&d.target.type=="element",a=c.timestamp-d.startTime,e,h;this.collectTargetData(d,a,g);if(g){d.target.setAttr(c.targetData[b],true);c.targetData[b]=[];c.collectTargetData(d,d.duration,g);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}h={};h[Ext.supports.CSS3TransitionEnd]=d.lastFrame;h.scope=d;h.single=true;e.on(h)}else{if(a>=d.duration){c.applyPendingAttrs(true);delete c.targetData[b];delete c.targetArr[b];d.lastFrame()}}},collectTargetData:function(d,a,e){var b=d.target.getId(),g=this.targetData[b],c;if(!g){g=this.targetData[b]=[];this.targetArr[b]=d.target}c={duration:d.duration,easing:(e&&d.reverse)?d.easingFn.reverse().toCSS3():d.easing,attrs:{}};Ext.apply(c.attrs,d.runAnim(a));g.push(c)},applyPendingAttrs:function(d){var c=this.targetData,b=this.targetArr,a;for(a in c){if(c.hasOwnProperty(a)){b[a].setAttr(c[a],false,d)}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,p,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e<j;e++){p=(n[e-1])?c*(n[e-1].pct/100):0;a=c*(n[e].pct/100);k.timeline.push({duration:a-p,attrs:n[e].attrs})}},applyAnimator:function(e){var k=this,l=[],p=k.timeline,g=k.reverse,j=p.length,b,h,a,d,n,m,c;if(k.fireEvent("beforeanimate",k)!==false){for(c=0;c<j;c++){b=p[c];n=b.attrs;h=n.easing||k.easing;a=n.damper||k.damper;delete n.easing;delete n.damper;b=Ext.create("Ext.fx.Anim",{target:e,easing:h,damper:a,duration:b.duration,paused:true,to:n});l.push(b)}k.animations=l;k.target=b.target;for(c=0;c<j-1;c++){b=l[c];b.nextAnim=l[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},k)}l[j-1].on("afteranimate",function(){this.lastFrame()},k)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,p=g(0.0066+i*i),s=p-i,k=d(a(s),1/3)*(s<0?-1:1),r=-p-i,j=d(a(r),1/3)*(r<0?-1:1),u=k+j+0.25;return d(1-u,2)*3*u*0.1+(1-u)*3*u*u+u*u*u},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(s){var l=0.48-s/1.04,k=g(0.1734+l*l),i=k-l,r=d(a(i),1/3)*(i<0?-1:1),p=-k-l,m=d(a(p),1/3)*(p<0?-1:1),j=r+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}l{2},0,0,{3},{4},0z",a.x,a.y,a.width,a.height,-a.width)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,p=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];p=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":p=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=p;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;p=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],q=0,p=0,u=0,t=0,c=0;if(d[0][0]=="M"){q=d[0][1];p=d[0][2];u=q;t=p;c++;n.push(["M",q,p])}for(var h=c,v=d.length;h<v;h++){var a=n[h]=[],s=d[h];if(s[0]!=s[0].toLowerCase()){a[0]=s[0].toLowerCase();switch(a[0]){case"a":a[1]=s[1];a[2]=s[2];a[3]=s[3];a[4]=s[4];a[5]=s[5];a[6]=+(s[6]-q).toFixed(3);a[7]=+(s[7]-p).toFixed(3);break;case"v":a[1]=+(s[1]-p).toFixed(3);break;case"m":u=s[1];t=s[2];default:for(var g=1,l=s.length;g<l;g++){a[g]=+(s[g]-((g%2)?q:p)).toFixed(3)}}}else{a=n[h]=[];if(s[0]=="m"){u=s[1]+q;t=s[2]+p}for(var e=0,b=s.length;e<b;e++){n[h][e]=s[e]}}var m=n[h].length;switch(n[h][0]){case"z":q=u;p=t;break;case"h":q+=+n[h][m-1];break;case"v":p+=+n[h][m-1];break;default:q+=+n[h][m-2];p+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(s,l){var j=this,d=j.pathToAbsolute(s),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,t){if(p[t].length>7){p[t].shift();var u=p[t];while(u.length){Ext.Array.splice(p,t++,0,["C"].concat(Ext.Array.splice(u,0,6)))}Ext.Array.erase(p,t,1);q=Math.max(d.length,m.length||0)}},c=function(w,v,t,p,u){if(w&&v&&w[u][0]=="M"&&v[u][0]!="M"){Ext.Array.splice(v,u,0,["M",p.x,p.y]);t.bx=0;t.by=0;t.x=w[u][1];t.y=w[u][2];q=Math.max(d.length,m.length||0)}};for(var h=0,q=Math.max(d.length,m.length||0);h<q;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);var g=d[h],r=m[h],e=g.length,k=r.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(r[k-4])||a.x);a.by=(parseFloat(r[k-3])||a.y);a.x=r[k-2];a.y=r[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(w,ai,K,I,C,p,j,v,ah,D){var A=this,e=Math.PI,B=A.radian,H=e*120/180,b=B*(+C||0),P=[],M=Math,W=M.cos,a=M.sin,Y=M.sqrt,z=M.abs,q=M.asin,L,c,s,R,Q,ad,d,U,X,F,E,n,m,u,l,ag,g,af,S,V,T,ae,ac,ab,Z,O,aa,N,G,J,r;if(!D){L=A.rotate(w,ai,-b);w=L.x;ai=L.y;L=A.rotate(v,ah,-b);v=L.x;ah=L.y;c=W(B*C);s=a(B*C);R=(w-v)/2;Q=(ai-ah)/2;ad=(R*R)/(K*K)+(Q*Q)/(I*I);if(ad>1){ad=Y(ad);K=ad*K;I=ad*I}d=K*K;U=I*I;X=(p==j?-1:1)*Y(z((d*U-d*Q*Q-U*R*R)/(d*Q*Q+U*R*R)));F=X*K*Q/I+(w+v)/2;E=X*-I*R/K+(ai+ah)/2;n=q(((ai-E)/I).toFixed(7));m=q(((ah-E)/I).toFixed(7));n=w<F?e-n:n;m=v<F?e-m:m;if(n<0){n=e*2+n}if(m<0){m=e*2+m}if(j&&n>m){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=D[0];m=D[1];F=D[2];E=D[3]}u=m-n;if(z(u)>H){G=m;J=v;r=ah;m=n+H*(j&&m>n?1:-1);v=F+K*W(m);ah=E+I*a(m);P=A.arc2curve(v,ah,K,I,C,0,j,J,r,[m,G,F,E])}u=m-n;l=W(n);ag=a(n);g=W(m);af=a(m);S=M.tan(u/4);V=4/3*K*S;T=4/3*I*S;ae=[w,ai];ac=[w+V*ag,ai-T*l];ab=[v+V*af,ah-T*g];Z=[v,ah];ac[0]=2*ae[0]-ac[0];ac[1]=2*ae[1]-ac[1];if(D){return[ac,ab,Z].concat(P)}else{P=[ac,ab,Z].concat(P).join().split(",");O=[];N=P.length;for(aa=0;aa<N;aa++){O[aa]=aa%2?A.rotate(P[aa-1],P[aa],b).y:A.rotate(P[aa],P[aa+1],b).x}return O}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,q=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!q&&!l){return this.pathToAbsolute(k.attr.path)}q=q||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+q;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+q;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(m){if(!m||!(m+"")){return{x:0,y:0,width:0,height:0}}m=this.path2curve(m);var k=0,j=0,d=[],b=[],e=0,h=m.length,c,a,l,g;for(;e<h;e++){c=m[e];if(c[0]=="M"){k=c[1];j=c[2];d.push(k);b.push(j)}else{g=this.curveDim(k,j,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(g.min.x,g.max.x);b=b.concat(g.min.y,g.max.y);k=c[5];j=c[6]}}a=Math.min.apply(0,d);l=Math.min.apply(0,b);return{x:a,y:l,path:m,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-l}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(p,c){var n=this,k=0,m=c.length,h=c[m-1],r=p,g,t,l,q,a,b,d;for(;k<m;++k){g=c[k];b=r;r=[];t=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(t,h,g)){r.push(n.intersectIntersection(t,l,h,g))}r.push(l)}else{if(n.intersectInside(t,h,g)){r.push(n.intersectIntersection(t,l,h,g))}}t=l}h=g}return r},curveDim:function(g,d,i,h,u,t,q,m){var s=(u-2*i+g)-(q-2*u+i),p=2*(i-g)-2*(u-i),l=g-i,k=(-p+Math.sqrt(p*p-4*s*l))/2/s,j=(-p-Math.sqrt(p*p-4*s*l))/2/s,n=[d,m],r=[g,q],e;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,k);r.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,j);r.push(e.x);n.push(e.y)}s=(t-2*h+d)-(m-2*t+h);p=2*(h-d)-2*(t-h);l=d-h;k=(-p+Math.sqrt(p*p-4*s*l))/2/s;j=(-p-Math.sqrt(p*p-4*s*l))/2/s;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,k);r.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,j);r.push(e.x);n.push(e.y)}return{min:{x:Math.min.apply(0,r),y:Math.min.apply(0,n)},max:{x:Math.max.apply(0,r),y:Math.max.apply(0,n)}}},getAnchors:function(e,d,k,j,w,v,r){r=r||4;var i=Math,q=i.PI,s=q/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,u,t,h,l,p,n,y,x,c;u=(k-e)/r;t=(w-k)/r;if((j>=d&&j>=v)||(j<=d&&j<=v)){h=l=s}else{h=g((k-e)/m(j-d));if(d<j){h=q-h}l=g((w-k)/m(j-v));if(v<j){l=q-l}}c=s-((h+l)%(q*2))/2;if(c>s){c-=q}h+=c;l+=c;p=k-u*a(h);n=j+u*b(h);y=k+t*a(l);x=j+t*b(l);if((j>d&&n<d)||(j<d&&n>d)){p+=m(d-n)*(p-k)/(n-j);n=d}if((j>v&&x<v)||(j<v&&x>v)){y-=m(v-x)*(y-k)/(x-j);x=v}return{x1:p,y1:n,x2:y,y2:x}},smooth:function(a,s){var r=this.path2curve(a),e=[r[0]],k=r[0][1],h=r[0][2],t,v,w=1,l=r.length,g=1,n=k,m=h,c=0,b=0;for(;w<l;w++){var B=r[w],A=B.length,z=r[w-1],p=z.length,u=r[w+1],q=u&&u.length;if(B[0]=="M"){n=B[1];m=B[2];t=w+1;while(r[t][0]!="C"){t++}c=r[t][5];b=r[t][6];e.push(["M",n,m]);g=e.length;k=n;h=m;continue}if(B[A-2]==n&&B[A-1]==m&&(!u||u[0]=="M")){var d=e[g].length;v=this.getAnchors(z[p-2],z[p-1],n,m,e[g][d-2],e[g][d-1],s);e[g][1]=v.x2;e[g][2]=v.y2}else{if(!u||u[0]=="M"){v={x1:B[A-2],y1:B[A-1]}}else{v=this.getAnchors(z[p-2],z[p-1],B[A-2],B[A-1],u[q-2],u[q-1],s)}}e.push(["C",k,h,v.x1,v.y1,B[A-2],B[A-1]]);k=v.x2;h=v.y2}return e},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(r,s,d){if(Ext.isDate(r)){return this.snapEndsByDate(r,s,d)}var c=(s-r)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),t,p=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],h=0,q,k,j,g,l=1000000000,n=b.length;t=r=Math.floor(r/e)*e;for(j=0;j<n;j++){q=b[j][0];k=(q-p)<0?1000000:(q-p)/b[j][1];if(k<l){g=q;l=k}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+g*Math.pow(10,a-2);while(t<s){t+=c;h++}s=+t.toFixed(10);return{from:r,to:s,power:a,step:c,steps:h}},snapEndsByDate:function(i,h,b,a){var d=false,g=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],c,e;Ext.each(g,function(k,j){for(c=0;c<k[1].length;c++){if(h<Ext.Date.add(i,k[0],k[1][c]*b)){d=[k[0],k[1][c]];return false}}});if(!d){e=this.snapEnds(i.getFullYear(),h.getFullYear()+1,b,a);d=[Date.YEAR,Math.round(e.step)]}return this.snapEndsByDateAndStep(i,h,d,a)},snapEndsByDateAndStep:function(i,h,e,a){var d=[i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()],b=0,g,c;if(a){g=i}else{switch(e[0]){case Ext.Date.MILLI:g=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:g=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:g=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:g=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:g=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:g=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:g=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=g;while(c<h){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=h}return{from:+g,to:+c,step:(c-g)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(p,b,a,n,k){var m=p.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(p[e][1])&&Ext.isArray(b)){l=[];c=0;g=p[e][1].length;for(;c<g;c++){l.push(this.computeDelta(p[e][1][c],b[c],a,h,k))}d.push([p[e][0],l])}else{d.push([p[e][0],this.computeDelta(p[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+(a[b].delta*g)+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+(a.delta*g)+(a.units||0)])}}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(a,d){d=(typeof d=="number")?d:1;var e,c=false,b;Ext.each([this.hexRE,this.rgbRE,this.hex3RE],function(h,g){e=(g%2==0)?16:10;b=h.exec(a);if(b&&b.length==4){if(g==2){b[1]+=b[1];b[2]+=b[2];b[3]+=b[3]}c={red:parseInt(b[1],e),green:parseInt(b[2],e),blue:parseInt(b[3],e)};return false}});return c||a},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseInt(d[c],10)*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=Math.round(j[a]+k[a]*g)}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,r){var c=this.forcePath(l),n=[],t=b.length,d,h,p,g,q,m,e,u,s;for(p=0;p<t;p++){s=this.forcePath(b[p][1]);g=Ext.draw.Draw.interpolatePaths(s,c);s=g[0];c=g[1];d=s.length;u=[];for(m=0;m<d;m++){g=[s[m][0]];h=s[m].length;for(e=1;e<h;e++){q=r&&r[0][1][m][e].from;g.push(this.computeDelta(s[m][e],c[m][e],a,q))}u.push(g)}n.push([b[p][0],u])}return n},set:function(q,n){var p=q.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<p;h++){c=q[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([q[h][0],l.join(",")])}return e}}}},function(){Ext.each(["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],function(a){this[a]=this.color},this)});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return Ext.create("Ext.fx.Animator",a)}a=Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");Ext.fx.Manager.addAnim(b);b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b,a);if(a.callback){b.on("afteranimate",a.callback,a.scope)}return b},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},end:function(){var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime)}});Ext.enableFx=true;Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{var l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}var h=k.y-j.y,e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl();if(!this.DDMInstance.verifyEl(e)){return}var b=d||0;var a=c||0;var g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);var a=c.getPoint();if(!this.hasOuterHandles&&!this.DDMInstance.isOverTarget(a,this)){}else{if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}else{}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true;var h;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(var b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={};for(var b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={};for(var b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{for(var b=0,a=d.length;b<a;++b){var c=b+1;if(d[c]&&d[c]>=h){var g=h-d[b];var e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};var a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);var k=d.getLeft(true);var h=d.getTop(true);this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight();var b=Ext.Element.getViewWidth();var q=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var j=e+k;var p=m+l;var i=(n+q-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,q+a)}if(k<q&&q>0&&k-q<c){window.scrollTo(d,q-a)}if(p>b&&g<c){window.scrollTo(d+a,q)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,q)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=Ext.create("Ext.dd.StatusProxy",{animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){this.callParent(arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=Ext.create("Ext.panel.Proxy",b,a);this.callParent([b.el,a]);Ext.defer(function(){var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=d.el}c.setStyle("cursor","move");this.scroll=false},200,this)},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.el.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.define("Ext.layout.component.Dock",{alias:["layout.dock"],extend:"Ext.layout.component.AbstractDock"});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,headerPosition:"top",frame:false,frameHeader:true,initComponent:function(){var b=this,a;b.addEvents("beforeclose","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange");this.addStateEvents("expand","collapse");if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI(b.ui+"-framed")}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP},setBorder:function(a){this.callParent(arguments)},beforeDestroy:function(){Ext.destroy(this.ghostPanel,this.dd);this.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(c){var b=this,a=this.title;b.title=c;if(b.header){b.header.setTitle(c)}else{b.updateHeader()}if(b.reExpander){b.reExpander.setTitle(c)}b.fireEvent("titlechange",b,c,a)},setIconCls:function(a){var c=this,b=c.iconCls;c.iconCls=a;var d=c.header;if(d){d.setIconCls(a)}c.fireEvent("iconchange",c,a,b)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=a.createComponent({xtype:"tool",type:"collapse-"+a.collapseDirection,expandType:a.getOppositeDirection(a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,this,[])})}if(a.collapseTool&&!a.collapseFirst){a.tools.push(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},onRender:function(b,a){var d=this,c;d.initTools();d.updateHeader();d.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.collapsed){a.collapsed=false;a.collapse(null,false,true)}},updateHeader:function(b){var a=this,e=a.header,d=a.title,c=a.tools;if(!a.preventHeader&&(b||d||(c&&c.length))){if(!e){e=a.header=Ext.create("Ext.panel.Header",{title:d,orientation:(a.headerPosition=="left"||a.headerPosition=="right")?"vertical":"horizontal",dock:a.headerPosition||"top",textCls:a.headerTextCls,iconCls:a.iconCls,baseCls:a.baseCls+"-header",tools:c,ui:a.ui,indicateDrag:a.draggable,border:a.border,frame:a.frame&&a.frameHeader,ignoreParentFrame:a.frame||a.overlapHeader,ignoreBorderManagement:a.frame||a.ignoreHeaderBorderManagement,listeners:a.collapsible&&a.titleCollapse?{click:a.toggleCollapse,scope:a}:null});a.addDocked(e,0);a.tools=e.tools}e.show();a.initHeaderAria()}else{if(e){e.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},addTool:function(a){var b=this,c=b.header;if(Ext.isArray(a)){Ext.each(a,b.addTool,b);return}b.tools.push(a);if(c){c.addTool(a)}b.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},collapse:function(v,g,j){var w=this,u=Ext.Component,k=w.getHeight(),l=w.getWidth(),x,a=0,r=w.dockedItems.items,s=r.length,q=0,t,h,p={from:{height:k,width:l},to:{height:k,width:l},listeners:{afteranimate:w.afterCollapse,scope:w},duration:Ext.Number.from(g,Ext.fx.Anim.prototype.duration)},e,d,m,b,n;if(!v){v=w.collapseDirection}if(j){g=false}else{if(w.collapsed||w.fireEvent("beforecollapse",w,v,g)===false){return false}}m=v;w.expandDirection=w.getOppositeDirection(v);w.hiddenDocked=[];switch(v){case u.DIRECTION_TOP:case u.DIRECTION_BOTTOM:d="horizontal";n="height";b="getHeight";for(;q<s;q++){t=r[q];if(t.isVisible()){if(t.isXType("header",true)&&(!t.dock||t.dock=="top"||t.dock=="bottom")){e=t}else{w.hiddenDocked.push(t)}}else{if(t===w.reExpander){e=t}}}if(v==Ext.Component.DIRECTION_BOTTOM){h=w.getPosition()[1]-Ext.fly(w.el.dom.offsetParent).getRegion().top;p.from.top=h}break;case u.DIRECTION_LEFT:case u.DIRECTION_RIGHT:d="vertical";n="width";b="getWidth";for(;q<s;q++){t=r[q];if(t.isVisible()){if(t.isHeader&&(t.dock=="left"||t.dock=="right")){e=t}else{w.hiddenDocked.push(t)}}else{if(t===w.reExpander){e=t}}}if(v==Ext.Component.DIRECTION_RIGHT){h=w.getPosition()[0]-Ext.fly(w.el.dom.offsetParent).getRegion().left;p.from.left=h}break;default:throw ("Panel collapse must be passed a valid Component collapse direction")}if(g&&w.collapseTool){w.collapseTool.disable()}w.addClsWithUI(w.collapsedCls);if(e&&e.rendered){e.addClsWithUI(w.collapsedCls);e.addClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){e.addClsWithUI(w.collapsedCls+"-border-"+e.dock)}x=e.getFrameInfo();a=e[b]()+(x?x[v]:0);e.removeClsWithUI(w.collapsedCls);e.removeClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){e.removeClsWithUI(w.collapsedCls+"-border-"+e.dock)}}else{e={hideMode:"offsets",temporary:true,title:w.title,orientation:d,dock:m,textCls:w.headerTextCls,iconCls:w.iconCls,baseCls:w.baseCls+"-header",ui:w.ui,frame:w.frame&&w.frameHeader,ignoreParentFrame:w.frame||w.overlapHeader,indicateDrag:w.draggable,cls:w.baseCls+"-collapsed-placeholder "+Ext.baseCSSPrefix+"docked "+w.baseCls+"-"+w.ui+"-collapsed",renderTo:w.el};if(!w.hideCollapseTool){e[(e.orientation=="horizontal")?"tools":"items"]=[{xtype:"tool",type:"expand-"+w.expandDirection,handler:w.toggleCollapse,scope:w}]}e=w.reExpander=Ext.create("Ext.panel.Header",e);a=e[b]()+((e.frame)?e.frameSize[v]:0);e.hide();w.insertDocked(0,e)}w.reExpander=e;w.reExpander.addClsWithUI(w.collapsedCls);w.reExpander.addClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){w.reExpander.addClsWithUI(w.collapsedCls+"-border-"+w.reExpander.dock)}if(v==Ext.Component.DIRECTION_RIGHT){p.to.left=h+(l-a)}else{if(v==Ext.Component.DIRECTION_BOTTOM){p.to.top=h+(k-a)}}p.to[n]=a;if(!w.collapseMemento){w.collapseMemento=new Ext.util.Memento(w)}w.collapseMemento.capture(["width","height","minWidth","minHeight","layoutManagedHeight","layoutManagedWidth"]);w.savedFlex=w.flex;w.minWidth=0;w.minHeight=0;delete w.flex;w.suspendLayout=true;if(g){w.animate(p)}else{w.setSize(p.to.width,p.to.height);if(Ext.isDefined(p.to.left)||Ext.isDefined(p.to.top)){w.setPosition(p.to.left,p.to.top)}w.afterCollapse(false,j)}return w},afterCollapse:function(e,b){var d=this,c=0,a=d.hiddenDocked.length;d.collapseMemento.restore(["minWidth","minHeight"]);if(Ext.Component.VERTICAL_DIRECTION_Re.test(d.expandDirection)){d.layoutManagedHeight=2;d.collapseMemento.restore("width",false)}else{d.layoutManagedWidth=2;d.collapseMemento.restore("height",false)}d.saveScrollTop=d.body.dom.scrollTop;d.body.setStyle("display","none");for(;c<a;c++){d.hiddenDocked[c].hide()}if(d.reExpander){d.reExpander.updateFrame();d.reExpander.show()}d.collapsed=true;d.suspendLayout=false;if(!b){if(d.ownerCt){if(e){d.ownerCt.layout.layout()}}else{if(d.reExpander.temporary){d.doComponentLayout()}}}if(d.resizer){d.resizer.disable()}if(d.collapseTool){d.collapseTool.setType("expand-"+d.expandDirection)}if(!b){d.fireEvent("collapse",d)}if(e&&d.collapseTool){d.collapseTool.enable()}},expand:function(b){var g=this;if(!g.collapsed||g.fireEvent("beforeexpand",g,b)===false){return false}var e=0,c=g.hiddenDocked.length,j=g.expandDirection,k=g.getHeight(),a=g.getWidth(),h,d;if(b&&g.collapseTool){g.collapseTool.disable()}for(;e<c;e++){g.hiddenDocked[e].hidden=false;g.hiddenDocked[e].el.show()}if(g.reExpander){if(g.reExpander.temporary){g.reExpander.hide()}else{g.reExpander.removeClsWithUI(g.collapsedCls);g.reExpander.removeClsWithUI(g.collapsedCls+"-"+g.reExpander.dock);if(g.border&&(!g.frame||(g.frame&&Ext.supports.CSS3BorderRadius))){g.reExpander.removeClsWithUI(g.collapsedCls+"-border-"+g.reExpander.dock)}g.reExpander.updateFrame()}}if(g.collapseTool){g.collapseTool.setType("collapse-"+g.collapseDirection)}g.body.setStyle("display","");g.body.dom.scrollTop=g.saveScrollTop;g.collapsed=false;g.removeClsWithUI(g.collapsedCls);d={to:{},from:{height:k,width:a},listeners:{afteranimate:g.afterExpand,scope:g}};if((j==Ext.Component.DIRECTION_TOP)||(j==Ext.Component.DIRECTION_BOTTOM)){g.collapseMemento.restore("height",false);if(g.height===undefined){g.setCalculatedSize(g.width,null);d.to.height=g.getHeight();g.setCalculatedSize(g.width,d.from.height)}else{if(g.savedFlex){g.flex=g.savedFlex;d.to.height=g.ownerCt.layout.calculateChildBox(g).height;delete g.flex}else{d.to.height=g.height}}if(j==Ext.Component.DIRECTION_TOP){h=g.getPosition()[1]-Ext.fly(g.el.dom.offsetParent).getRegion().top;d.from.top=h;d.to.top=h-(d.to.height-k)}}else{if((j==Ext.Component.DIRECTION_LEFT)||(j==Ext.Component.DIRECTION_RIGHT)){g.collapseMemento.restore("width",false);if(g.width===undefined){g.setCalculatedSize(null,g.height);d.to.width=g.getWidth();g.setCalculatedSize(d.from.width,g.height)}else{if(g.savedFlex){g.flex=g.savedFlex;d.to.width=g.ownerCt.layout.calculateChildBox(g).width;delete g.flex}else{d.to.width=g.width}}if(j==Ext.Component.DIRECTION_LEFT){h=g.getPosition()[0]-Ext.fly(g.el.dom.offsetParent).getRegion().left;d.from.left=h;d.to.left=h-(d.to.width-a)}}}if(b){g.animate(d)}else{g.setCalculatedSize(d.to.width,d.to.height);if(d.to.x){g.setLeft(d.to.x)}if(d.to.y){g.setTop(d.to.y)}g.afterExpand(false)}return g},afterExpand:function(b){var a=this;if(a.savedFlex){a.flex=a.savedFlex;delete a.savedFlex;delete a.width;delete a.height}if(a.collapseMemento){a.collapseMemento.restoreAll()}if(b&&a.ownerCt){Ext.defer(a.ownerCt.doLayout,Ext.isIE6?1:0,a)}if(a.resizer){a.resizer.enable()}a.fireEvent("expand",a);if(b&&a.collapseTool){a.collapseTool.enable()}},toggleCollapse:function(){if(this.collapsed){this.expand(this.animCollapse)}else{this.collapse(this.collapseDirection,this.animCollapse)}return this},getKeyMap:function(){if(!this.keyMap){this.keyMap=Ext.create("Ext.util.KeyMap",this.el,this.keys)}return this.keyMap},initDraggable:function(){this.dd=Ext.create("Ext.panel.DD",this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var b=[],a=this.header.query("tool[hidden=false]");if(a.length){Ext.each(a,function(c){b.push({type:c.type})})}else{b=[{type:"placeholder"}]}return b},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=Ext.create("Ext.panel.Panel",{renderTo:d.floating?d.el.dom.parentNode:document.body,floating:{shadow:false},frame:Ext.supports.CSS3BorderRadius?d.frame:false,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}e=b.header;if(e){e.suspendLayout=true;Ext.Array.forEach(e.query("tool"),function(g){e.remove(g)});e.suspendLayout=false}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls);b.el.show();b.setPosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();if(d.floatingItems){d.floatingItems.hide()}return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPosition(c.ghostPanel.getPosition())}if(c.floatingItems){c.floatingItems.show()}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.layout.component.Tip",{alias:["layout.tip"],extend:"Ext.layout.component.Dock",type:"tip",onLayout:function(b,j){var h=this,c=h.owner,d=c.el,a,i,g,e,k=d.getXY();d.setXY([-9999,-9999]);this.callParent(arguments);if(!Ext.isNumber(b)){a=c.minWidth;i=c.maxWidth;if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){e=h.doAutoWidth()}else{g=d.getWidth()}if(g<a){e=a}else{if(g>i){e=i}}if(e){this.callParent([e,j])}}d.setXY(k)},doAutoWidth:function(){var d=this,b=d.owner,a=b.body,c=a.getTextWidth();if(b.header){c=Math.max(c,b.header.getWidth())}if(!Ext.isDefined(d.frameWidth)){d.frameWidth=b.el.getWidth()-a.getWidth()}c+=d.frameWidth+a.getPadding("lr");return c}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",requires:["Ext.layout.component.Tip"],alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,frame:false,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,componentLayout:"tip",closeAction:"hide",ariaRole:"tooltip",initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},afterRender:function(){var a=this,b;a.callParent(arguments);b=parseInt(a.el.getZIndex(),10)||0;a.anchorEl.setStyle("z-index",b+1).setVisibilityMode(Ext.Element.DISPLAY)},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;var c=j.getOffsets(),n=(j.anchorToTarget&&!j.trackMouse)?j.el.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY,a=Ext.Element.getViewWidth()-5,i=Ext.Element.getViewHeight()-5,l=document.documentElement,e=document.body,m=(l.scrollLeft||e.scrollLeft||0)+5,k=(l.scrollTop||e.scrollTop||0)+5,b=[n[0]+c[0],n[1]+c[1]],h=j.getSize(),g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}a.showAt(a.getTargetXY());if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(a.autoHide!==true&&!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(i){var g=this,h=i.getTarget(),j,c,d,b,a;if(g.disabled){return}g.targetXY=i.getXY();if(!h||h.nodeType!==1||h==document||h==document.body){return}if(g.activeTarget&&((h==g.activeTarget.el)||Ext.fly(g.activeTarget.el).contains(h))){g.clearTimer("hide");g.show();return}if(h){Ext.Object.each(g.targets,function(e,k){var l=Ext.fly(k.target);if(l&&(l.dom===h||l.contains(h))){j=l.dom;return false}});if(j){g.activeTarget=g.targets[j.id];g.activeTarget.el=h;g.anchor=g.activeTarget.anchor;if(g.anchor){g.anchorTarget=h}g.delayShow();return}}j=Ext.get(h);c=g.tagConfig;d=c.namespace;b=g.getTipCfg(i);if(b){if(b.target){h=b.target;j=Ext.get(h)}a=j.getAttribute(d+c.hide);g.activeTarget={el:h,text:b.text,width:+j.getAttribute(d+c.width)||null,autoHide:a!="user"&&a!=="false",title:j.getAttribute(d+c.title),cls:j.getAttribute(d+c.cls),align:j.getAttribute(d+c.align)};g.anchor=j.getAttribute(d+c.anchor);if(g.anchor){g.anchorTarget=h}g.delayShow()}},onTargetOut:function(b){var a=this;if(a.activeTarget&&b.within(a.activeTarget.el)&&!a.getTipCfg(b)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},showAt:function(c){var a=this,b=a.activeTarget;if(b){if(!a.rendered){a.render(Ext.getBody());a.activeTarget=b}if(b.title){a.setTitle(b.title||"");a.header.show()}else{a.header.hide()}a.body.update(b.text);a.autoHide=b.autoHide;a.dismissDelay=b.dismissDelay||a.dismissDelay;if(a.lastCls){a.el.removeCls(a.lastCls);delete a.lastCls}if(b.cls){a.el.addCls(b.cls);a.lastCls=b.cls}a.setWidth(b.width);if(a.anchor){a.constrainPosition=false}else{if(b.align){c=a.el.getAlignToXY(b.el,b.align);a.constrainPosition=false}else{a.constrainPosition=true}}}a.callParent([c])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g)});return}var c=Ext.apply({disabled:a},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}());Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var d=b.requires||[];Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){Ext.Object.each(this.paths,function(h,i){Ext.Loader.setPath(h,i)})}this.callParent(arguments);this.eventbus=Ext.create("Ext.app.EventBus");var g=Ext.Array.from(this.controllers),e=g&&g.length,c,a;this.controllers=Ext.create("Ext.util.MixedCollection");if(this.autoCreateViewport){d.push(this.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){d.push(this.getModuleClassName(g[c],"controller"))}Ext.require(d);Ext.onReady(function(){for(c=0;c<e;c++){a=this.getController(g[c]);a.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){if(this.enableQuickTips){Ext.tip.QuickTipManager.init()}if(this.autoCreateViewport){this.getView("Viewport").create()}this.launch.call(this.scope||this);this.launched=true;this.fireEvent("launch",this);this.controllers.each(function(a){a.onLaunch(this)},this)},getModuleClassName:function(a,c){var b=Ext.Loader.getPrefix(a);if(b.length>0&&b!==a){return a}return this.name+"."+c+"."+a},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var w=this,m=w.items,a=w.chart.animate,v=w.callouts,h=v.styles,e=w.calloutsArray,b=w.chart.store,t=b.getCount(),d=m.length/t,l=[],s,c,r,n;for(s=0,c=0;s<t;s++){for(r=0;r<d;r++){var u=m[c],g=e[c],k=b.getAt(s),q;q=v.filter(k);if(!q&&!g){c++;continue}if(!g){e[c]=g=w.onCreateCallout(k,u,s,q,r,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!q){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}v.renderer(g,k);w.onPlaceCallout(g,k,u,s,q,a,r,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,p=d.styles,c=p.width,m=p.height,h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},p));if(d.items){a.panel=Ext.create("widget.panel",{style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var c=this,a=c.getSurface(),b;if(a){while(c.getCount()>0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",onLayout:function(b,a){this.setTargetSize(b,a)}});Ext.define("Ext.chart.theme.Theme",{requires:["Ext.draw.Color"],theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}},function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var k=0,h,a,j,q,r,e,n,p,m=[],d,g;if(c.baseColor){d=Ext.draw.Color.fromString(c.baseColor);g=d.getHSL()[2];if(g<0.15){d=d.getLighter(0.3)}else{if(g<0.3){d=d.getLighter(0.15)}else{if(g>0.85){d=d.getDarker(0.3)}else{if(g>0.7){d=d.getDarker(0.15)}}}}c.colors=[d.getDarker(0.3).toString(),d.getDarker(0.15).toString(),d.toString(),d.getLighter(0.15).toString(),d.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();r=b.markerThemes;q=b.seriesThemes;h=a.length;b.colors=a;for(;k<h;k++){j=a[k];n=r[k]||{};e=q[k]||{};n.fill=e.fill=n.stroke=e.stroke=j;r[k]=n;q[k]=e}b.markerThemes=r.slice(0,h);b.seriesThemes=q.slice(0,h)}for(p in b){if(p in c){if(Ext.isObject(c[p])&&Ext.isObject(b[p])){Ext.apply(b[p],c[p])}else{b[p]=c[p]}}}if(c.useGradients){a=b.colors||(function(){var i=[];for(k=0,q=b.seriesThemes,h=q.length;k<h;k++){i.push(q[k].fill||q[k].stroke)}return i})();for(k=0,h=a.length;k<h;k++){d=Ext.draw.Color.fromString(a[k]);if(d){j=d.getDarker(0.1).toString();d=d.toString();p="theme-"+d.substr(1)+"-"+j.substr(1);m.push({id:p,angle:45,stops:{0:{color:d.toString()},100:{color:j.toString()}}});a[k]="url(#"+p+")"}}b.gradients=m;b.colors=a}Ext.apply(this,b)}})()});Ext.define("Ext.chart.Mask",{require:["Ext.chart.MaskLayer"],constructor:function(a){var b=this;b.addEvents("select");if(a){Ext.apply(b,a)}if(b.mask){b.on("afterrender",function(){var c=Ext.create("Ext.chart.MaskLayer",{renderTo:b.el});c.el.on({mousemove:function(g){b.onMouseMove(g)},mouseup:function(g){b.resized(g)}});var d=Ext.create("Ext.resizer.Resizer",{el:c.el,handles:"all",pinned:true});d.on({resize:function(g){b.resized(g)}});c.initDraggable();b.maskType=b.mask;b.mask=c;b.maskSprite=b.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.7,hidden:true,stroke:"#444"})},b,{single:true})}},resized:function(d){var g=this,l=g.bbox||g.chartBBox,j=l.x,i=l.y,a=l.width,m=l.height,c=g.mask.getBox(true),h=Math.max,b=Math.min,n=c.x-j,k=c.y-i;n=h(n,j);k=h(k,i);n=b(n,a);k=b(k,m);c.x=n;c.y=k;g.fireEvent("select",g,c)},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b=a.maskSelection;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.onMouseMove(c);a.mouseMoved=false;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(b){var a=this;a.mouseDown=true;a.mouseMoved=false;a.maskMouseDown={x:b.getPageX()-a.el.getX(),y:b.getPageY()-a.el.getY()}},onMouseMove:function(u){var v=this,p=v.maskType,a=v.bbox||v.chartBBox,i=a.x,h=a.y,b=Math,r=b.floor,j=b.abs,n=b.min,q=b.max,k=r(h+a.height),m=r(i+a.width),d=u.getPageX(),c=u.getPageY(),t=d-v.el.getX(),s=c-v.el.getY(),g=v.maskMouseDown,l;v.mouseMoved=v.mouseDown;t=q(t,i);s=q(s,h);t=n(t,m);s=n(s,k);if(g&&v.mouseDown){if(p=="horizontal"){s=h;g.y=k;c=v.el.getY()+a.height+v.insetPadding}else{if(p=="vertical"){t=i;g.x=m}}m=g.x-t;k=g.y-s;l=["M",t,s,"l",m,0,0,k,-m,0,"z"];v.maskSelection={x:m>0?t:t+m,y:k>0?s:s+k,width:j(m),height:j(k)};v.mask.updateBox(v.maskSelection);v.mask.show();v.maskSprite.setAttributes({hidden:true},true)}else{if(p=="horizontal"){l=["M",t,h,"L",t,k]}else{if(p=="vertical"){l=["M",i,s,"L",m,s]}else{l=["M",t,h,"L",t,k,"M",i,s,"L",m,s]}}v.maskSprite.setAttributes({path:l,fill:v.maskMouseDown?v.maskSprite.stroke:false,"stroke-width":p===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(a){var c=this,g=c.axes,h=c.chartBBox,e=1/h.width,b=1/h.height,d={x:a.x*e,y:a.y*b,width:a.width*e,height:a.height*b};g.each(function(j){var i=j.calcEnds();if(j.position=="bottom"||j.position=="top"){var l=(i.to-i.from)*d.x+i.from,k=(i.to-i.from)*d.width+l;j.minimum=l;j.maximum=k}else{var k=(i.to-i.from)*(1-d.y)+i.from,l=k-(i.to-i.from)*d.height;j.minimum=l;j.maximum=k}});c.redraw(false)},restoreZoom:function(){this.store=this.substore=this.originalStore;this.redraw(true)}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]){return Ext.create("Ext.draw.engine."+d[c],b)}}return false}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){var a=this.gradients;if(a){Ext.each(a,this.addGradient,this)}},initItems:function(){var a=this.items;this.items=Ext.create("Ext.draw.CompositeSprite");this.groups=Ext.create("Ext.draw.CompositeSprite");if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,g,h,c;if(b){if(b.gradient){h=b.gradient;g=h.id;e.addGradient(h);e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:"url(#"+g+")"})}else{if(b.fill){e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:b.fill})}else{if(b.image){e.background=e.add({type:"image",x:0,y:0,width:d,height:a,src:b.image})}}}}},setSize:function(a,b){if(this.background){this.background.setAttributes({width:a,height:b,hidden:false},true)}this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var g=Array.prototype.slice.call(arguments),j,d;var a=g.length>1;if(a||Ext.isArray(g[0])){var h=a?g:g[0],b=[],c,e,k;for(c=0,e=h.length;c<e;c++){k=h[c];k=this.add(k);b.push(k)}return b}j=this.prepareItems(g[0],true)[0];this.insertByZIndex(j);this.onAdd(j);return j},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(a,b){if(a){this.items.remove(a);this.groups.each(function(c){c.remove(a)});a.onRemove();if(b===true){a.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width,h=d.height,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;if(j*i<a){g-=(a-j*i)/2/i}if(b*c<h){e-=(h-b*c)/2/c}k=1/Math.min(j,i);d.viewBoxShift={dx:-g,dy:-e,scale:k}}},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a*b.scale-b.dx,d*b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b){b.bbox.transform=0;this.transform(b);var d=this,c=false,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){d.translate(b);c=true}if(a.scaling.x!=null||a.scaling.y!=null){d.scale(b);c=true}if(a.rotation.degrees!=null){d.rotate(b);c=true}if(c){b.bbox.transform=0;this.transform(b);b.transformations=[]}},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x,b.y,b.width,b.height,b.r)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=Ext.create("Ext.draw.CompositeSprite",{surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){if(typeof b=="string"){var a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){delete this.domRef;this.removeAll()}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",onLayout:function(b,a){this.owner.surface.setSize(b,a);this.callParent(arguments)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var d=this,b=d.surface.items,e=b.getBBox(),c=e.width,a=e.height;b.setAttributes({translate:{x:-e.x,y:-e.y+(+Ext.isOpera)}},true);if(d.rendered){d.setSize(c,a);d.surface.setSize(c,a)}else{d.surface.setSize(c,a)}d.el.setSize(c,a)},createSurface:function(){var a=Ext.draw.Surface.create(Ext.apply({},{width:this.width,height:this.height,renderTo:this.el},this.initialConfig));if(!a){return false}this.surface=a;function b(c){return function(d){this.fireEvent(c,d)}}a.on({scope:this,mouseup:b("mouseup"),mousedown:b("mousedown"),mousemove:b("mousemove"),mouseenter:b("mouseenter"),mouseleave:b("mouseleave"),click:b("click")})},onDestroy:function(){var a=this.surface;if(a){a.destroy()}this.callParent(arguments)}});Ext.define("Ext.chart.LegendItem",{extend:"Ext.draw.CompositeSprite",requires:["Ext.chart.Shape"],x:0,y:0,zIndex:500,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(t){var u=this,i=t.yFieldIndex,l=u.series,a=l.type,m=u.yFieldIndex,d=u.legend,q=u.surface,r=d.x+u.x,n=d.y+u.y,c,k=u.zIndex,b,j,s,e,p=false,h=Ext.apply(l.seriesStyle,l.style);function g(v){var w=l[v];return(Ext.isArray(w)?w[m]:w)}j=u.add("label",q.add({type:"text",x:20,y:0,zIndex:k||0,font:d.labelFont,text:g("title")||g("yField")}));if(a==="line"||a==="scatter"){if(a==="line"){u.add("line",q.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:k,"stroke-width":l.lineWidth,"stroke-linejoin":"round","stroke-dasharray":l.dash,stroke:h.stroke||"#000",style:{cursor:"pointer"}}))}if(l.showMarkers||a==="scatter"){b=Ext.apply(l.markerStyle,l.markerConfig||{});u.add("marker",Ext.chart.Shape[b.type](q,{fill:b.fill,x:8.5,y:0.5,zIndex:k,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{u.add("box",q.add({type:"rect",zIndex:k,x:0,y:0,width:12,height:12,fill:l.getLegendColor(i),style:{cursor:"pointer"}}))}u.setAttributes({hidden:false},true);c=u.getBBox();s=u.add("mask",q.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(k||0)+1000,fill:"#f00",opacity:0,style:{cursor:"pointer"}}));u.on("mouseover",function(){j.setStyle({"font-weight":"bold"});s.setStyle({cursor:"pointer"});l._index=i;l.highlightItem()},u);u.on("mouseout",function(){j.setStyle({"font-weight":"normal"});l._index=i;l.unHighlightItem()},u);if(!l.visibleInLegend(i)){p=true;j.setAttributes({opacity:0.5},true)}u.on("mousedown",function(){if(!p){l.hideAll();j.setAttributes({opacity:0.5},true)}else{l.showAll();j.setAttributes({opacity:1},true)}p=!p},u);u.updatePosition({x:0,y:0})},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{requires:["Ext.chart.LegendItem"],visible:true,position:"bottom",x:0,y:0,labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var a=this;a.createBox();a.createItems();if(!a.created&&a.isDisplayed()){a.created=true;a.chart.series.each(function(b){b.on("titlechange",function(){a.create();a.updatePosition()})})}},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var B=this,n=B.chart,t=n.surface,q=B.items,m=B.padding,C=B.itemSpacing,j=2,w=0,s=0,e=0,A=0,b=B.isVertical,d=Math,c=d.floor,D=d.max,h=0,u=0,v=q?q.length:0,l,k,g,z,a,p,r;if(v){for(;u<v;u++){q[u].destroy()}}q.length=[];n.series.each(function(y,x){if(y.showInLegend){Ext.each([].concat(y.yField),function(E,i){z=Ext.create("Ext.chart.LegendItem",{legend:this,series:y,surface:n.surface,yFieldIndex:i});a=z.getBBox();r=a.width;p=a.height;if(x+i===0){g=b?m+p/2:m}else{g=C/(b?2:1)}z.x=c(b?m:e+g);z.y=c(b?A+g:m+p/2);e+=r+g;A+=p+g;w=D(w,r);s=D(s,p);q.push(z)},this)}},B);B.width=c((b?w:e)+m*2);if(b&&q.length===1){j=1}B.height=c((b?A-j*g:s)+(m*2));B.itemHeight=s},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a;if(b.boxSprite){b.boxSprite.destroy()}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},b.getBBox()));a.redraw()},updatePosition:function(){var i=this,l,j,n=i.width,m=i.height,k=i.padding,h=i.chart,p=h.chartBBox,b=h.insetPadding,d=p.width-(b*2),c=p.height-(b*2),g=p.x+b,e=p.y+b,a=h.surface,q=Math.floor;if(i.isDisplayed()){switch(i.position){case"left":l=b;j=q(e+c/2-m/2);break;case"right":l=q(a.width-n)-b;j=q(e+c/2-m/2);break;case"top":l=q(g+d/2-n/2);j=b;break;case"bottom":l=q(g+d/2-n/2);j=q(a.height-m)-b;break;default:l=q(i.origX)+b;j=q(i.origY)+b}i.x=l;i.y=j;Ext.each(i.items,function(r){r.updatePosition()});i.boxSprite.setAttributes(i.getBBox(),true)}}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:"Ext.draw.Component",mixins:{themeManager:"Ext.chart.theme.Theme",mask:"Ext.chart.Mask",navigation:"Ext.chart.Navigation"},requires:["Ext.util.MixedCollection","Ext.data.StoreManager","Ext.chart.Legend","Ext.util.DelayedTask"],viewBox:false,animate:false,legend:false,insetPadding:10,enginePriority:["Svg","Vml"],background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}c.mixins.mask.constructor.call(c,b);c.mixins.navigation.constructor.call(c,b);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutter=[0,0];b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=Ext.create("Ext.util.MixedCollection",false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=Ext.create("Ext.util.MixedCollection",false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=Ext.create("Ext.chart.Legend",Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,scope:b})},afterComponentLayout:function(b,a){var c=this;if(Ext.isNumber(b)&&Ext.isNumber(a)){c.curWidth=b;c.curHeight=a;c.redraw(true)}this.callParent(arguments)},redraw:function(a){var d=this,c=d.chartBBox={x:0,y:0,height:d.curHeight,width:d.curWidth},b=d.legend;d.surface.setSize(c.width,c.height);d.series.each(d.initializeSeries,d);d.axes.each(d.initializeAxis,d);d.axes.each(function(e){e.processView()});d.axes.each(function(e){e.drawAxis(true)});if(b!==false){b.create()}d.alignAxes();if(d.legend!==false){b.updatePosition()}d.getMaxGutter();d.resizing=!!a;d.axes.each(d.drawAxis,d);d.series.each(d.drawCharts,d);d.resizing=false},afterRender:function(){var b,a=this;this.callParent();if(a.categoryNames){a.setCategoryNames(a.categoryNames)}if(a.tipRenderer){b=a.getFunctionRef(a.tipRenderer);a.setTipRenderer(b.fn,b.scope)}a.bindStore(a.store,true);a.refresh()},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(d){var c=this,a=c.getEventXY(d),b;c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemclick",b)}}}},c)},onMouseDown:function(d){var c=this,a=c.getEventXY(d),b;if(c.mask){c.mixins.mask.onMouseDown.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmousedown",b)}}}},c)},onMouseUp:function(d){var c=this,a=c.getEventXY(d),b;if(c.mask){c.mixins.mask.onMouseUp.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmouseup",b)}}}},c)},onMouseMove:function(i){var h=this,a=h.getEventXY(i),g,d,c,b;if(h.mask){h.mixins.mask.onMouseMove.call(h,i)}h.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){g=e.getItemForPoint(a[0],a[1]);d=e._lastItemForPoint;c=e._lastStoreItem;b=e._lastStoreField;if(g!==d||g&&(g.storeItem!=c||g.storeField!=b)){if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}if(g){e.fireEvent("itemmouseover",g);e._lastItemForPoint=g;e._lastStoreItem=g.storeItem;e._lastStoreField=g.storeField}}}}else{d=e._lastItemForPoint;if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}}},h)},onMouseLeave:function(b){var a=this;if(a.mask){a.mixins.mask.onMouseLeave.call(a,b)}a.series.each(function(c){delete c._lastItemForPoint})},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=Ext.create("Ext.util.DelayedTask",a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},bindStore:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("datachanged",c.refresh,c);c.store.un("add",c.delayRefresh,c);c.store.un("remove",c.delayRefresh,c);c.store.un("update",c.delayRefresh,c);c.store.un("clear",c.refresh,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:c,datachanged:c.refresh,add:c.delayRefresh,remove:c.delayRefresh,update:c.delayRefresh,clear:c.refresh})}c.store=a;if(a&&!b){c.refresh()}},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}},alignAxes:function(){var g=this,h=g.axes,e=g.legend,b=["top","right","bottom","left"],d,c=g.insetPadding,a={top:c,right:c,bottom:c,left:c};function i(k){var j=h.findIndex("position",k);return(j<0)?null:h.getAt(j)}Ext.each(b,function(k){var m=(k==="left"||k==="right"),j=i(k),l;if(e!==false){if(e.position===k){l=e.getBBox();a[k]+=(m?l.width:l.height)+a[k]}}if(j&&j.bbox){l=j.bbox;a[k]+=(m?l.width:l.height)}});d={x:a.left,y:a.top,width:g.curWidth-a.left-a.right,height:g.curHeight-a.top-a.bottom};g.chartBBox=d;h.each(function(j){var l=j.position,k=(l==="left"||l==="right");j.x=(l==="right"?d.x+d.width:d.x);j.y=(l==="top"?d.y:d.y+d.height);j.width=(k?d.width:d.height);j.length=(k?d.height:d.width)})},initializeSeries:function(h,k){var j=this,d=j.themeAttrs,c,e,n,q,p,m=[],g=0,b,a={chart:j,seriesId:h.seriesId};if(d){n=d.seriesThemes;p=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,n[k%n.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,p[k%p.length]);if(d.colors){a.colorArrayStyle=d.colors}else{m=[];for(b=n.length;g<b;g++){q=n[g];if(q.fill||q.stroke){m.push(q.fill||q.stroke)}}if(m.length){a.colorArrayStyle=m}}a.seriesIdx=k}if(h instanceof Ext.chart.series.Series){Ext.apply(h,a)}else{Ext.applyIf(a,h);h=j.series.replace(Ext.createByAlias("series."+h.type.toLowerCase(),a))}if(h.initialize){h.initialize()}},getMaxGutter:function(){var b=this,a=[0,0];b.series.each(function(c){var d=c.getGutters&&c.getGutters()||[0,0];a[0]=Math.max(a[0],d[0]);a[1]=Math.max(a[1],d[1])});b.maxGutter=a},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.Highlight",{requires:["Ext.fx.Anim"],highlight:false,highlightCfg:null,constructor:function(a){if(a.highlight){if(a.highlight!==true){this.highlightCfg=Ext.apply({},a.highlight)}else{this.highlightCfg={fill:"#fdd",radius:20,lineWidth:5,stroke:"#f55"}}}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=g.highlightCfg,d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=Ext.create("Ext.fx.Anim",{target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=j.highlightCfg,c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]={};Ext.apply(d[b],k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=Ext.create("Ext.fx.Anim",{target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.chart.Label",{requires:["Ext.draw.Color"],colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:function(c){return c}});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var p=this,M=p.chart,y=M.gradients,s=p.items,I=M.animate,B=p.label,v=B.display,w=B.color,d=[].concat(B.field),r=p.labelsGroup,l=(r||0)&&r.length,b=p.chart.store,q=b.getCount(),h=(s||0)&&s.length,E=h/q,A=(y||0)&&y.length,m=Ext.draw.Color,L=[],n,K,F,c,z,J,H,e,g,u,x,G,N,t,O,D,C,a;if(v=="none"){return}if(h==0){while(l--){L.push(l)}}else{for(K=0,F=0,c=0;K<q;K++){z=0;for(J=0;J<E;J++){x=s[F];G=r.getAt(c);N=b.getAt(K);while(this.__excludes&&this.__excludes[z]&&E>1){if(d[J]){L.push(c)}z++}if(!x&&G){G.hide(true);c++}if(x&&d[J]){if(!G){G=p.onCreateLabel(N,x,K,v,J,z)}p.onPlaceLabel(G,N,x,K,v,I,J,z);c++;if(B.contrast&&x.sprite){t=x.sprite;if(t._endStyle){a=t._endStyle.fill}else{if(t._to){a=t._to.fill}else{a=t.attr.fill}}a=a||t.attr.fill;O=m.fromString(a);if(a&&!O){a=a.match(p.colorStringRe)[1];for(H=0;H<A;H++){n=y[H];if(n.id==a){u=0;e=0;for(g in n.stops){u++;e+=m.fromString(n.stops[g].color).getGrayscale()}D=(e/u)/255;break}}}else{D=O.getGrayscale()/255}if(G.isOutside){D=1}C=m.fromString(G.attr.color||G.attr.fill).getHSL();C[2]=D>0.5?0.2:0.8;G.setAttributes({fill:String(m.fromHSL.apply({},C))},true)}}F++;z++}}}p.hideLabels(L)},hideLabels:function(b){var a=this.labelsGroup,c=b.length;while(c--){a.getAt(b[c]).hide(true)}}});Ext.define("Ext.chart.MaskLayer",{extend:"Ext.Component",constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.Tip",{requires:["Ext.tip.ToolTip","Ext.chart.TipSurface"],constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:false});c.tooltip=Ext.create("Ext.tip.ToolTip",c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=Ext.create("Ext.chart.TipSurface",{id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this;if(!e.tooltip){return}clearTimeout(e.tipTimeout);var m=e.tooltip,a=e.spriteTip,c=e.tipConfig,d=m.trackMouse,k,b,j,h,i,g;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.axis.Abstract",{requires:["Ext.chart.Chart"],constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=[].concat(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:"Ext.chart.axis.Abstract",alternateClassName:"Ext.chart.Axis",requires:["Ext.draw.Draw"],forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,majorTickSteps:false,applyData:Ext.emptyFn,getRange:function(){var t=this,d=t.chart.getChartStore(),k=t.fields,g=k.length,c=Math,v=c.max,s=c.min,j=false,n=isNaN(t.minimum)?Infinity:t.minimum,q=isNaN(t.maximum)?-Infinity:t.maximum,u=0,r,p,m,a,e,b=[],h=t.chart.series.items;for(r=0,p=h.length;!j&&r<p;r++){j=j||h[r].stacked;b=h[r].__excludes||b}d.each(function(i){if(j){if(!isFinite(n)){n=0}for(a=[0,0],r=0;r<g;r++){if(b[r]){continue}e=i.get(k[r]);a[+(e>0)]+=c.abs(e)}q=v(q,-a[0],+a[1]);n=s(n,-a[0],+a[1])}else{for(r=0;r<g;r++){if(b[r]){continue}m=i.get(k[r]);q=v(q,+m);n=s(n,+m)}}});if(!isFinite(q)){q=t.prevMax||0}if(!isFinite(n)){n=t.prevMin||0}if(n!=q&&(q!=Math.floor(q))){q=Math.floor(q)+1}if(!isNaN(t.minimum)){n=t.minimum}if(!isNaN(t.maximum)){q=t.maximum}return{min:n,max:q}},calcEnds:function(){var i=this,b=i.fields,c=i.getRange(),h=c.min,a=c.max,e,g,d;d=Ext.draw.Draw.snapEnds(h,a,i.majorTickSteps!==false?(i.majorTickSteps+1):i.steps);e=d.from;g=d.to;if(i.forceMinMax){if(!isNaN(a)){d.to=a}if(!isNaN(h)){d.from=h}}if(!isNaN(i.maximum)){d.to=i.maximum}if(!isNaN(i.minimum)){d.from=i.minimum}d.step=(d.to-d.from)/(g-e)*d.step;if(i.adjustMaximumByMajorUnit){d.to+=d.step}if(i.adjustMinimumByMajorUnit){d.from-=d.step}i.prevMin=h==a?0:h;i.prevMax=a;return d},drawAxis:function(v){var G=this,w,u,k=G.x,h=G.y,E=G.chart.maxGutter[0],D=G.chart.maxGutter[1],e=G.dashSize,C=G.minorTickSteps||0,B=G.minorTickSteps||0,b=G.length,H=G.position,g=[],n=false,c=G.applyData(),d=c.step,z=c.steps,t=c.from,a=c.to,A,s,r,q,p,m,l,F;if(G.hidden||isNaN(d)||(t==a)){return}G.from=c.from;G.to=c.to;if(H=="left"||H=="right"){s=Math.floor(k)+0.5;q=["M",s,h,"l",0,-b];A=b-(D*2)}else{r=Math.floor(h)+0.5;q=["M",k,r,"l",b,0];A=b-(E*2)}F=A/(z||1);m=Math.max(C+1,0);l=Math.max(B+1,0);if(G.type=="Numeric"||G.type=="Time"){n=true;G.labels=[c.from]}if(H=="right"||H=="left"){r=h-D;s=k-((H=="left")*e*2);while(r>=h-D-A){q.push("M",s,Math.floor(r)+0.5,"l",e*2+1,0);if(r!=h-D){for(w=1;w<l;w++){q.push("M",s+e,Math.floor(r+F*w/l)+0.5,"l",e+1,0)}}g.push([Math.floor(k),Math.floor(r)]);r-=F;if(n){G.labels.push(G.labels[G.labels.length-1]+d)}if(F===0){break}}if(Math.round(r+F-(h-D-A))){q.push("M",s,Math.floor(h-b+D)+0.5,"l",e*2+1,0);for(w=1;w<l;w++){q.push("M",s+e,Math.floor(h-b+D+F*w/l)+0.5,"l",e+1,0)}g.push([Math.floor(k),Math.floor(r)]);if(n){G.labels.push(G.labels[G.labels.length-1]+d)}}}else{s=k+E;r=h-((H=="top")*e*2);while(s<=k+E+A){q.push("M",Math.floor(s)+0.5,r,"l",0,e*2+1);if(s!=k+E){for(w=1;w<m;w++){q.push("M",Math.floor(s-F*w/m)+0.5,r,"l",0,e+1)}}g.push([Math.floor(s),Math.floor(h)]);s+=F;if(n){G.labels.push(G.labels[G.labels.length-1]+d)}if(F===0){break}}if(Math.round(s-F-(k+E+A))){q.push("M",Math.floor(k+b-E)+0.5,r,"l",0,e*2+1);for(w=1;w<m;w++){q.push("M",Math.floor(k+b-E-F*w/m)+0.5,r,"l",0,e+1)}g.push([Math.floor(s),Math.floor(h)]);if(n){G.labels.push(G.labels[G.labels.length-1]+d)}}}if(!G.axis){G.axis=G.chart.surface.add(Ext.apply({type:"path",path:q},G.axisStyle))}G.axis.setAttributes({path:q},true);G.inflections=g;if(!v&&G.grid){G.drawGrid()}G.axisBBox=G.axis.getBBox();G.drawLabel()},drawGrid:function(){var v=this,p=v.chart.surface,b=v.grid,d=b.odd,e=b.even,h=v.inflections,k=h.length-((d||e)?0:1),w=v.position,c=v.chart.maxGutter,n=v.width-2,t=false,q,r,s=1,m=[],g,a,j,l=[],u=[];if((c[1]!==0&&(w=="left"||w=="right"))||(c[0]!==0&&(w=="top"||w=="bottom"))){s=0;k++}for(;s<k;s++){q=h[s];r=h[s-1];if(d||e){m=(s%2)?l:u;g=((s%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;j=2*a;if(w=="left"){m.push("M",r[0]+1+a,r[1]+0.5-a,"L",r[0]+1+n-a,r[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5+a,"L",q[0]+1+a,q[1]+0.5+a,"Z")}else{if(w=="right"){m.push("M",r[0]-a,r[1]+0.5-a,"L",r[0]-n+a,r[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5+a,"L",q[0]-a,q[1]+0.5+a,"Z")}else{if(w=="top"){m.push("M",r[0]+0.5+a,r[1]+1+a,"L",r[0]+0.5+a,r[1]+1+n-a,"L",q[0]+0.5-a,q[1]+1+n-a,"L",q[0]+0.5-a,q[1]+1+a,"Z")}else{m.push("M",r[0]+0.5+a,r[1]-a,"L",r[0]+0.5+a,r[1]-n+a,"L",q[0]+0.5-a,q[1]-n+a,"L",q[0]+0.5-a,q[1]-a,"Z")}}}}else{if(w=="left"){m=m.concat(["M",q[0]+0.5,q[1]+0.5,"l",n,0])}else{if(w=="right"){m=m.concat(["M",q[0]-0.5,q[1]+0.5,"l",-n,0])}else{if(w=="top"){m=m.concat(["M",q[0]+0.5,q[1]+0.5,"l",0,n])}else{m=m.concat(["M",q[0]+0.5,q[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!v.gridOdd&&l.length){v.gridOdd=p.add({type:"path",path:l})}v.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(u.length){if(!v.gridEven){v.gridEven=p.add({type:"path",path:u})}v.gridEven.setAttributes(Ext.apply({path:u,hidden:false},e||{}),true)}}else{if(m.length){if(!v.gridLines){v.gridLines=v.chart.surface.add({type:"path",path:m,"stroke-width":v.lineWidth||1,stroke:v.gridColor||"#ccc"})}v.gridLines.setAttributes({hidden:false,path:m},true)}else{if(v.gridLines){v.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var G=this,c=G.label,B=Math.floor,z=Math.max,A=G.chart.axes,H=G.position,k=G.inflections,p=k.length,F=G.labels,s=G.labelGroup,t=0,g,D=G.chart.maxGutter[1],d,a,v,e,n,C=0,E,u,j,r,h,m,q,l,w,b;m=p-1;v=k[0];b=G.getOrCreateLabel(0,G.label.renderer(F[0]));g=Math.floor(Math.abs(Math.sin(c.rotate&&(c.rotate.degrees*Math.PI/180)||0)));for(w=0;w<p;w++){v=k[w];r=G.label.renderer(F[w]);E=G.getOrCreateLabel(w,r);a=E._bbox;t=z(t,a.height+G.dashSize+G.label.padding);q=B(v[0]-(g?a.height:a.width)/2);if(G.chart.maxGutter[0]==0){if(w==0&&A.findIndex("position","left")==-1){q=v[0]}else{if(w==m&&A.findIndex("position","right")==-1){q=v[0]-a.width}}}if(H=="top"){l=v[1]-(G.dashSize*2)-G.label.padding-(a.height/2)}else{l=v[1]+(G.dashSize*2)+G.label.padding+(a.height/2)}E.setAttributes({hidden:false,x:q,y:l},true);if(w!=0&&(G.intersect(E,n)||G.intersect(E,b))){E.hide(true);continue}n=E}return t},drawVerticalLabels:function(){var C=this,g=C.inflections,D=C.position,k=g.length,A=C.labels,v=0,s=Math.max,u=Math.floor,b=Math.ceil,t=C.chart.axes,w=C.chart.maxGutter[1],c,a,q,l,z=0,B,p,e,n,d,j,m,h,r;j=k;for(r=0;r<j;r++){q=g[r];n=C.label.renderer(A[r]);B=C.getOrCreateLabel(r,n);a=B._bbox;v=s(v,a.width+C.dashSize+C.label.padding);h=q[1];if(w<a.height/2){if(r==j-1&&t.findIndex("position","top")==-1){h=C.y-C.length+b(a.height/2)}else{if(r==0&&t.findIndex("position","bottom")==-1){h=C.y-u(a.height/2)}}}if(D=="left"){m=q[0]-a.width-C.dashSize-C.label.padding-2}else{m=q[0]+C.dashSize+C.label.padding+2}B.setAttributes(Ext.apply({hidden:false,x:m,y:h},C.label),true);if(r!=0&&C.intersect(B,l)){B.hide(true);continue}l=B}return v},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},elipsis:function(d,h,c,e,b){var g,a;if(c<e){d.hide(true);return false}while(h.length>4){h=h.substr(0,h.length-4)+"...";d.setAttributes({text:h},true);g=d.getBBox();if(g.width<c){if(typeof b=="number"){d.setAttributes({x:Math.floor(b-(g.width/2))},true)}break}}return true},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,setLabels:function(){var b=this.chart.store,a=this.fields,d=a.length,c;this.labels=[];b.each(function(e){for(c=0;c<d;c++){this.labels.push(e.get(a[c]))}},this)},applyData:function(){this.callParent();this.setLabels();var a=this.chart.store.getCount();return{from:0,to:a,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:"Ext.chart.axis.Abstract",position:"gauge",alias:"axis.gauge",drawAxis:function(r){var j=this.chart,a=j.surface,q=j.chartBBox,d=q.x+(q.width/2),b=q.y+q.height,c=this.margin||10,m=Math.min(q.width,2*q.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,p=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*p(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*p(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*p(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*p(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var k=this.chart,p=k.surface,b=k.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,l=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*l,u=Math.round,m=[],g,s=this.maximum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,n=e.renderer||function(i){return i};if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:n(u(q/r*s)),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);m.push(g)}}else{m=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;m[q].setAttributes({text:n(u(q/r*s)),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=m}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(d.roundToDecimal===false){return}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.floor(a*b)/b},minimum:NaN,maximum:NaN,decimals:2,scale:"linear",position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(v){var m=this.chart,a=m.surface,u=m.chartBBox,r=m.store,b=r.getCount(),e=u.x+(u.width/2),c=u.y+(u.height/2),q=Math.min(u.width,u.height)/2,k=[],s,p=this.steps,g,d,h=Math.PI*2,t=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=p;g++){s=a.add({type:"circle",x:e,y:c,radius:Math.max(q*g/p,0),stroke:"#ccc"});s.setAttributes({hidden:false},true);k.push(s)}r.each(function(l,j){s=a.add({type:"path",path:["M",e,c,"L",e+q*t(j/b*h),c+q*n(j/b*h),"Z"],stroke:"#ccc"});s.setAttributes({hidden:false},true);k.push(s)})}else{k=this.sprites;for(g=0;g<p;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(q*(g+1)/p,0),stroke:"#ccc"},true)}r.each(function(l,i){k[g+i].setAttributes({path:["M",e,c,"L",e+q*t(i/b*h),c+q*n(i/b*h),"Z"],stroke:"#ccc"},true)})}this.sprites=k;this.drawLabel()},drawLabel:function(){var s=this.chart,y=s.surface,b=s.chartBBox,h=s.store,m=b.x+(b.width/2),l=b.y+(b.height/2),e=Math.min(b.width,b.height)/2,C=Math.max,F=Math.round,t=[],k,w=[],c,x=[],g,u=!this.maximum,E=this.maximum||0,D=this.steps,B=0,A,q,p,v=Math.PI*2,d=Math.cos,a=Math.sin,z=this.label.display,n=z!=="none",r=10;if(!n){return}s.series.each(function(i){w.push(i.yField);g=i.xField});h.each(function(j,G){if(u){for(G=0,c=w.length;G<c;G++){E=C(+j.get(w[G]),E)}}x.push(j.get(g))});if(!this.labelArray){if(z!="categories"){for(B=1;B<=D;B++){k=y.add({type:"text",text:F(B/D*E),x:m,y:l-e*B/D,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});k.setAttributes({hidden:false},true);t.push(k)}}if(z!="scale"){for(A=0,D=x.length;A<D;A++){q=d(A/D*v)*(e+r);p=a(A/D*v)*(e+r);k=y.add({type:"text",text:x[A],x:m+q,y:l+p,"text-anchor":q*q<=0.001?"middle":(q<0?"end":"start")});k.setAttributes({hidden:false},true);t.push(k)}}}else{t=this.labelArray;if(z!="categories"){for(B=0;B<D;B++){t[B].setAttributes({text:F((B+1)/D*E),x:m,y:l-e*(B+1)/D,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(z!="scale"){for(A=0,D=x.length;A<D;A++){q=d(A/D*v)*(e+r);p=a(A/D*v)*(e+r);if(t[B+A]){t[B+A].setAttributes({type:"text",text:x[A],x:m+q,y:l+p,"text-anchor":q*q<=0.001?"middle":(q<0?"end":"start")},true)}}}}this.labelArray=t}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:false,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;c.addEvents("add","remove","update","datachanged","beforeload","load","write","beforesync","clear");Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=Ext.create("Ext.util.MixedCollection");c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=Ext.create("Ext.data.Operation",c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},onProxyRead:Ext.emptyFn,update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(){var d=this,b={},e=d.getNewRecords(),c=d.getUpdatedRecords(),a=d.getRemovedRecords(),g=false;if(e.length>0){b.create=e;g=true}if(c.length>0){b.update=c;g=true}if(a.length>0){b.destroy=a;g=true}if(g&&d.fireEvent("beforesync",b)!==false){d.proxy.batch(b,d.getBatchListeners())}},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.getSorters()});a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a){var b=this;if(b.autoSync){b.sync()}b.fireEvent("update",b,a,Ext.data.Model.EDIT)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT)},clearData:Ext.emptyFn,destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=null;a.tree=null;a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b)}},getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.ModelManager","Ext.data.Model","Ext.util.Grouper"],uses:["Ext.data.proxy.Memory"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",pageSize:25,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,isStore:true,onClassExtended:function(a,c){var b=c.model;if(typeof b=="string"){var d=c.onBeforeClassCreated;c.onBeforeClassCreated=function(e,h){var g=this;Ext.require(b,function(){d.call(g,e,h)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;if(b.buffered||d.buffered){d.prefetchData=Ext.create("Ext.util.MixedCollection",false,function(h){return h.index});d.pendingRequests=[];d.pagesRequested=[];d.sortOnLoad=false;d.filterOnLoad=false}d.addEvents("beforeprefetch","groupchange","prefetch");e=b.data||d.data;d.data=Ext.create("Ext.util.MixedCollection",false,function(h){return h.internalId});if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=Ext.create("Ext.util.MixedCollection");d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.groupers.items.length){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,e)}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(d){if(!Ext.isArray(d)){if(d===undefined){d=[]}else{d=[d]}}var c=d.length,e=Ext.util.Grouper,a,b;for(b=0;b<c;b++){a=d[b];if(!(a instanceof e)){if(Ext.isString(a)){a={property:a}}Ext.applyIf(a,{root:"data",direction:"ASC"});if(a.fn){a.sorterFn=a.fn}if(typeof a=="function"){a={sorterFn:a}}d[b]=new e(a)}}return d},group:function(e,g){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:g};a=[b]}else{if(g===undefined){b.toggle()}else{b.setDirection(g)}}}}}if(a&&a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var a=this;a.groupers.each(function(b){a.sorters.remove(b)});a.groupers.clear();if(a.remoteGroup){a.load({scope:a,callback:a.fireGroupChange})}else{a.sort();a.fireEvent("groupchange",a,a.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var h=this,g=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=h.createModel(c[e]);b.set(h.modelDefaults);c[e]=b;h.data.insert(d+e,b);b.join(h);g=g||b.phantom===true}if(h.snapshot){h.snapshot.addAll(c)}h.fireEvent("add",h,c,d);h.fireEvent("datachanged",h);if(h.autoSync&&g){h.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}var e=this,c=0,d=b.length,a;for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}e.insert(e.data.length,b);return b},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(b,a){this.data.each(b,a)},remove:function(b,k){if(!Ext.isArray(b)){b=[b]}k=k===true;var g=this,h=false,c=0,a=b.length,j,e,d;for(;c<a;c++){d=b[c];e=g.data.indexOf(d);if(g.snapshot){g.snapshot.remove(d)}if(e>-1){j=d.phantom===true;if(!k&&!j){g.removed.push(d)}d.unjoin(g);g.data.remove(d);h=h||!j;g.fireEvent("remove",g,d,e)}}g.fireEvent("datachanged",g);if(!k&&g.autoSync&&h){g.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(Ext.isFunction(a)){a={callback:a}}Ext.applyIf(a,{groupers:b.groupers.items,page:b.currentPage,start:(b.currentPage-1)*b.pageSize,limit:b.pageSize,addRecords:false});return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent("load",d,a,e);d.fireEvent("read",d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(d,e,m){if(m){var h=0,g=this.data,a=this.snapshot,b=d.length,l=e.records,j,c,k;for(;h<b;++h){j=d[h];c=l[h];if(c){k=g.indexOf(c);if(k>-1){g.removeAt(k);g.insert(k,j)}if(a){k=a.indexOf(c);if(k>-1){a.removeAt(k);a.insert(k,j)}}j.phantom=false;j.join(this)}}}},onUpdateRecords:function(d,c,j){if(j){var e=0,g=d.length,h=this.data,b=this.snapshot,a;for(;e<g;++e){a=d[e];h.replace(a);if(b){b.replace(a)}a.join(this)}}},onDestroyRecords:function(c,d,k){if(k){var j=this,g=0,b=c.length,e=j.data,a=j.snapshot,h;for(;g<b;++g){h=c[g];h.unjoin(j);e.remove(h);if(a){a.remove(h)}}j.removed=[]}},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b=0,h=d.sortOnFilter&&!d.remoteSort,c=a.length;for(;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){d.load()}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(h){d.sort()}if(!h||d.sorters.length<1){d.fireEvent("datachanged",d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){b.load()}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(h,a){var c=this.model,g=h.length,e=[],d,b;for(d=0;d<g;d++){b=h[d];if(!(b instanceof Ext.data.Model)){b=Ext.ModelManager.create(b,c)}e.push(b)}this.loadRecords(e,{addRecords:a})},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.loadRecords(c,{addRecords:b});d.fireEvent("load",d,c,true)}},loadRecords:function(a,b){var e=this,c=0,d=a.length;b=b||{};if(!b.addRecords){delete e.snapshot;e.clearData()}e.data.addAll(a);for(;c<d;c++){if(b.start!==undefined){a[c].index=b.start+c}a[c].join(e)}e.suspendEvents();if(e.filterOnLoad&&!e.remoteFilter){e.filter()}if(e.sortOnLoad&&!e.remoteSort){e.sort()}e.resumeEvents();e.fireEvent("datachanged",e,a)},loadPage:function(c,a){var b=this;a=Ext.apply({},a);b.currentPage=c;b.read(Ext.applyIf(a,{page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad}))},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(){var a=this;a.data.each(function(b){b.unjoin(a)});a.data.clear()},prefetch:function(b){var c=this,a,d=c.getRequestId();b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.sorters.items,requestId:d});c.pendingRequests.push(d);a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeprefetch",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyPrefetch,c)}return c},prefetchPage:function(e,c){var d=this,b=d.pageSize,g=(e-1)*d.pageSize,a=g+b;if(Ext.Array.indexOf(d.pagesRequested,e)===-1&&!d.rangeSatisfied(g,a)){c=c||{};d.pagesRequested.push(e);Ext.applyIf(c,{page:e,start:g,limit:b,callback:d.onWaitForGuarantee,scope:d});d.prefetch(c)}},getRequestId:function(){this.requestSeed=this.requestSeed||1;return this.requestSeed++},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e){d.cacheRecords(a,b)}Ext.Array.remove(d.pendingRequests,b.requestId);if(b.page){Ext.Array.remove(d.pagesRequested,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,e,b);if(b.blocking){d.fireEvent("load",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},cacheRecords:function(b,a){var e=this,c=0,d=b.length,g=a?a.start:0;if(!Ext.isDefined(e.totalCount)){e.totalCount=b.length;e.fireEvent("totalcountchange",e.totalCount)}for(;c<d;c++){b[c].index=g+c}e.prefetchData.addAll(b);if(e.purgePageCount){e.purgeRecords()}},purgeRecords:function(){var c=this,b=c.prefetchData.getCount(),d=c.purgePageCount*c.pageSize,e=b-d-1,a=0;for(;a<=e;a++){c.prefetchData.removeAt(0)}},rangeSatisfied:function(e,a){var c=this,b=e,d=true;for(;b<a;b++){if(!c.prefetchData.getByKey(b)){d=false;break}}return d},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(){var g=this,c=g.getTotalCount(),h=g.requestStart,b=((c-1)<g.requestEnd)?c-1:g.requestEnd,d=[],a,e=h;b=Math.max(0,b);if(h!==g.guaranteedStart&&b!==g.guaranteedEnd){g.guaranteedStart=h;g.guaranteedEnd=b;for(;e<=b;e++){a=g.prefetchData.getByKey(e);if(a){d.push(a)}}g.fireEvent("guaranteedrange",d,h,b);if(g.cb){g.cb.call(g.scope||g,d)}}g.unmask()},mask:function(){this.masked=true;this.fireEvent("beforeload")},unmask:function(){if(this.masked){this.fireEvent("load")}},hasPendingRequests:function(){return this.pendingRequests.length},onWaitForGuarantee:function(){if(!this.hasPendingRequests()){this.onGuaranteedRange()}},guaranteeRange:function(a,c,b,n){c=(c>this.totalCount)?this.totalCount-1:c;var j=this,d=a,l=j.prefetchData,e=[],h=!!l.getByKey(a),k=!!l.getByKey(c),g=j.getPageFromRecordIndex(a),m=j.getPageFromRecordIndex(c);j.cb=b;j.scope=n;j.requestStart=a;j.requestEnd=c;if(!h||!k){if(g===m){j.mask();j.prefetchPage(g,{callback:j.onWaitForGuarantee,scope:j})}else{j.mask();j.prefetchPage(g,{callback:j.onWaitForGuarantee,scope:j});j.prefetchPage(m,{callback:j.onWaitForGuarantee,scope:j})}}else{j.onGuaranteedRange()}},sort:function(){var d=this,c=d.prefetchData,e,g,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();g=d.guaranteedStart;a=d.guaranteedEnd;if(e.length){c.sort(e);b=c.getRange();c.clear();d.cacheRecords(b);delete d.guaranteedStart;delete d.guaranteedEnd;d.guaranteeRange(g,a)}d.callParent(arguments)}}else{d.callParent(arguments)}},doSort:function(b){var e=this;if(e.remoteSort){e.load()}else{e.data.sortBy(b);if(!e.buffered){var a=e.getRange(),d=a.length,c=0;for(;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)==a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},j;for(;c<d;++c){j=a[c];b[j.name]=h.apply(k||this,[j.children].concat(g))}return b}else{return h.apply(k||this,[this.data.items].concat(g))}}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"proxy"})});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"json",writer:"json"}});this.callParent([a])}});Ext.define("Ext.chart.axis.Time",{extend:"Ext.chart.axis.Numeric",alternateClassName:"Ext.chart.TimeAxis",alias:"axis.time",requires:["Ext.data.Store","Ext.data.JsonStore"],dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,roundToDecimal:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},doConstrain:function(){var t=this,d=t.chart.store,u=[],h=t.chart.series.items,c=Math,v=c.max,s=c.min,k=t.fields,g=k.length,j=t.getRange(),n=j.min,q=j.max,r,p,b=[],m,a,e,u=[];for(r=0,p=h.length;r<p;r++){b[r]=h[r].__excludes}d.each(function(i){for(r=0;r<g;r++){if(b[r]){continue}m=i.get(k[r]);if(+m<+n){return}if(+m>+q){return}}u.push(i)});t.chart.substore=Ext.create("Ext.data.JsonStore",{model:d.model,data:u})},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,triggerAfterDraw:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave})},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.triggerAfterDraw){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.triggerAfterDraw=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.triggerAfterDraw=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}return c}return"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:"Ext.chart.series.Series",alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var b=this,c=[],a=b.combinations;Ext.each([].concat(b.yField),function(e,d){var g=b.title;c.push((Ext.isArray(g)?g[d]:g)||e)});if(a){Ext.each(a,function(e){var d=c[e[0]],g=c[e[1]];c[e[1]]=d+" & "+g;c.splice(e[0],1)})}return c},eachYValue:function(a,c,b){Ext.each(this.getYValueAccessors(),function(d,e){c.call(b,d(a),e)})},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var b=this,a=b.yValueAccessors;if(!a){a=b.yValueAccessors=[];Ext.each([].concat(b.yField),function(c){a.push(function(d){return d.get(c)})})}return a},getMinMaxXValues:function(){var d=this,b,a,c=d.xField;if(d.getRecordCount()>0){b=Infinity;a=-b;d.eachRecord(function(e){var g=e.get(c);if(g>a){a=g}if(g<b){b=g}})}else{b=a=0}return[b,a]},getMinMaxYValues:function(){var i=this,g=i.stacked,e,c,d,b;function h(k,j){if(!i.isExcluded(j)){if(k<0){b+=k}else{d+=k}}}function a(k,j){if(!i.isExcluded(j)){if(k>c){c=k}if(k<e){e=k}}}if(i.getRecordCount()>0){e=Infinity;c=-e;i.eachRecord(function(j){if(g){d=0;b=0;i.eachYValue(j,h);if(d>c){c=d}if(b<e){e=b}}else{i.eachYValue(j,a)}})}else{e=c=0}return[e,c]},getAxesForXAndYFields:function(){var c=this,e=c.chart.axes,b=[].concat(c.axis),d,a;if(Ext.Array.indexOf(b,"top")>-1){d="top"}else{if(Ext.Array.indexOf(b,"bottom")>-1){d="bottom"}else{if(e.get("top")){d="top"}else{if(e.get("bottom")){d="bottom"}}}}if(Ext.Array.indexOf(b,"left")>-1){a="left"}else{if(Ext.Array.indexOf(b,"right")>-1){a="right"}else{if(e.get("left")){a="left"}else{if(e.get("right")){a="right"}}}}return{xAxis:d,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;Ext.apply(e,c,{__excludes:[],highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"}});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,p){var k=b.length,m=Math.floor(k/p),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=b[h];for(g=0;g<l;++g){a[g]+=n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var w=this,l=w.chart,h=l.getChartStore(),g=[].concat(w.yField),y=g.length,n=[],d=[],x=Infinity,u=x,s=x,t=-x,r=-x,c=Math,v=c.min,B=c.max,a,A,b,m,p,z,j,i,e,k,q;w.setBBox();a=w.bbox;if(w.axis){axis=l.axes.get(w.axis);if(axis){out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}}if(w.yField&&!Ext.isNumber(s)){axis=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(w.yField)});out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}if(!Ext.isNumber(s)){s=0}if(!Ext.isNumber(r)){r=0}h.each(function(C,D){m=C.get(w.xField);p=[];if(typeof m!="number"){m=D}n.push(m);j=0;for(z=0;z<y;z++){q=C.get(g[z]);if(typeof q=="number"){s=v(s,q);p.push(q);j+=q}}u=v(u,m);t=B(t,m);r=B(r,j);d.push(p)},w);A=a.width/((t-u)||1);b=a.height/((r-s)||1);i=n.length;if((i>a.width)&&w.areas){e=w.shrink(n,d,a.width);n=e.x;d=e.y}return{bbox:a,minX:u,minY:s,xValues:n,yValues:d,xScale:A,yScale:b,areasLen:y}},getPaths:function(){var w=this,l=w.chart,c=l.getChartStore(),d=true,e=w.getBounds(),a=e.bbox,m=w.items=[],v=[],b,p=[],s,h,j,g,q,t,k,z,r,u,n;h=e.xValues.length;for(s=0;s<h;s++){q=e.xValues[s];t=e.yValues[s];j=a.x+(q-e.minX)*e.xScale;k=0;for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[z];k+=u;g=a.y+a.height-(k-e.minY)*e.yScale;if(!p[z]){p[z]=["M",j,g];v[z].push(["L",j,g])}else{p[z].push("L",j,g);v[z].push(["L",j,g])}if(!m[z]){m[z]={pointsUp:[],pointsDown:[],series:w}}m[z].pointsUp.push([j,g])}}for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}n=p[z];if(z==0||d){d=false;n.push("L",j,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();n.push("L",j,b[0][2]);for(s=0;s<h;s++){n.push(b[s][0],b[s][1],b[s][2]);m[z].pointsDown[h-s-1]=[b[s][1],b[s][2]]}n.push("L",a.x,n[2],"Z")}r=z}return{paths:p,areasLen:e.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,p=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()){return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%p],fill:l[d%p]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,c,e){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],d,n,m;g.setAttributes({text:r(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,s,K,H,G,d,k){var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=(H==0)?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=K.point,B,g,O,L,q,r,b=m.label.getBBox(),J=30,D=10,C=3,h,e,j,z,v,F=N.clipRect,n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:z},true);m.label.setAttributes({x:n+(O[0]>0?C:-(b.width+C)),y:l},true);for(v in m){m[v].show(true)}},isItemInPoint:function(j,h,l,c){var g=this,b=l.pointsUp,d=l.pointsDown,n=Math.abs,e=Infinity,a,m,k;for(a=0,m=b.length;a<m;a++){k=[b[a][0],b[a][1]];if(e>n(j-k[0])){e=n(j-k[0])}else{k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){l.storeIndex=a-1;l.storeField=g.yField[c];l.storeItem=g.chart.store.getAt(a-1);l._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=Ext.create("Ext.fx.Anim",Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=Ext.create("Ext.fx.Anim",{target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=true;this.areas[this._index].hide(true);this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.areas[this._index].show(true);this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;Ext.apply(e,c,{__excludes:[],highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"}});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,p){var k=b.length,m=Math.floor(k/p),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=b[h];for(g=0;g<l;++g){a[g]+=n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var w=this,l=w.chart,h=l.getChartStore(),g=[].concat(w.yField),y=g.length,n=[],d=[],x=Infinity,u=x,s=x,t=-x,r=-x,c=Math,v=c.min,B=c.max,a,A,b,m,p,z,j,i,e,k,q;w.setBBox();a=w.bbox;if(w.axis){axis=l.axes.get(w.axis);if(axis){out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}}if(w.yField&&!Ext.isNumber(s)){axis=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(w.yField)});out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}if(!Ext.isNumber(s)){s=0}if(!Ext.isNumber(r)){r=0}h.each(function(C,D){m=C.get(w.xField);p=[];if(typeof m!="number"){m=D}n.push(m);j=0;for(z=0;z<y;z++){q=C.get(g[z]);if(typeof q=="number"){s=v(s,q);p.push(q);j+=q}}u=v(u,m);t=B(t,m);r=B(r,j);d.push(p)},w);A=a.width/((t-u)||1);b=a.height/((r-s)||1);i=n.length;if((i>a.width)&&w.areas){e=w.shrink(n,d,a.width);n=e.x;d=e.y}return{bbox:a,minX:u,minY:s,xValues:n,yValues:d,xScale:A,yScale:b,areasLen:y}},getPaths:function(){var w=this,l=w.chart,c=l.getChartStore(),d=true,e=w.getBounds(),a=e.bbox,m=w.items=[],v=[],b,p=[],s,h,j,g,q,t,k,z,r,u,n;h=e.xValues.length;for(s=0;s<h;s++){q=e.xValues[s];t=e.yValues[s];j=a.x+(q-e.minX)*e.xScale;k=0;for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[z];k+=u;g=a.y+a.height-(k-e.minY)*e.yScale;if(!p[z]){p[z]=["M",j,g];v[z].push(["L",j,g])}else{p[z].push("L",j,g);v[z].push(["L",j,g])}if(!m[z]){m[z]={pointsUp:[],pointsDown:[],series:w}}m[z].pointsUp.push([j,g])}}for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}n=p[z];if(z==0||d){d=false;n.push("L",j,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();n.push("L",j,b[0][2]);for(s=0;s<h;s++){n.push(b[s][0],b[s][1],b[s][2]);m[z].pointsDown[h-s-1]=[b[s][1],b[s][2]]}n.push("L",a.x,n[2],"Z")}r=z}return{paths:p,areasLen:e.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,p=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()){return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%p],fill:l[d%p]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,c,e){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],d,n,m;g.setAttributes({text:r(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,s,K,H,G,d,k){var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=(H==0)?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=K.point,B,g,O,L,q,r,b=m.label.getBBox(),J=30,D=10,C=3,h,e,j,z,v,F=N.clipRect,n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:z},true);m.label.setAttributes({x:n+(O[0]>0?C:-(b.width+C)),y:l},true);for(v in m){m[v].show(true)}},isItemInPoint:function(j,h,l,c){var g=this,b=l.pointsUp,d=l.pointsDown,n=Math.abs,e=Infinity,a,m,k;for(a=0,m=b.length;a<m;a++){k=[b[a][0],b[a][1]];if(e>n(j-k[0])){e=n(j-k[0])}else{k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){l.storeIndex=a-1;l.storeField=g.yField[c];l.storeItem=g.chart.store.getAt(a-1);l._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=Ext.create("Ext.fx.Anim",Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=Ext.create("Ext.fx.Anim",{target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=true;this.areas[this._index].hide(true);this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.areas[this._index].show(true);this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],requires:["Ext.chart.axis.Axis","Ext.fx.Anim"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;Ext.apply(e,c,{highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),e=d.gutter/100;return(d.chart.chartBBox[b?"width":"height"]-d[b?"xPadding":"yPadding"]*2)/(c*(e+1)-e)},getGutters:function(){var b=this,a=b.column,c=Math.ceil(b[a?"xPadding":"yPadding"]+b.getBarGirth()/2);return b.column?[c,0]:[0,c]},getBounds:function(){var B=this,r=B.chart,k=r.getChartStore(),s=[].concat(B.yField),c=s.length,l=c,i=B.groupGutter/100,g=B.column,p=B.xPadding,b=B.yPadding,y=B.stacked,q=B.getBarGirth(),h=Math,E=h.max,w=h.abs,A,a,z,x,e,u,C,n,D,m,t,v,d;B.setBBox(true);a=B.bbox;if(B.__excludes){for(t=0,D=B.__excludes.length;t<D;t++){if(B.__excludes[t]){l--}}}if(B.axis){e=r.axes.get(B.axis);if(e){u=e.calcEnds();z=u.from;x=u.to}}if(B.yField&&!Ext.isNumber(z)){e=Ext.create("Ext.chart.axis.Axis",{chart:r,fields:[].concat(B.yField)});u=e.calcEnds();z=u.from;x=u.to}if(!Ext.isNumber(z)){z=0}if(!Ext.isNumber(x)){x=0}C=(g?a.height-b*2:a.width-p*2)/(x-z);A=q/((y?1:l)*(i+1)-i);n=(g)?a.y+a.height-b:a.x+p;if(y){D=[[],[]];k.each(function(j,F){D[0][F]=D[0][F]||0;D[1][F]=D[1][F]||0;for(t=0;t<c;t++){if(B.__excludes&&B.__excludes[t]){continue}m=j.get(s[t]);D[+(m>0)][F]+=w(m)}});D[+(x>0)].push(w(x));D[+(z>0)].push(w(z));d=E.apply(h,D[0]);v=E.apply(h,D[1]);C=(g?a.height-b*2:a.width-p*2)/(v+d);n=n+d*C*(g?-1:1)}else{if(z/x<0){n=n-z*C*(g?-1:1)}}return{bars:s,bbox:a,barsLen:c,groupBarsLen:l,barWidth:q,groupBarWidth:A,scale:C,zero:n,xPadding:p,yPadding:b,signed:z/x<0,minY:z,maxY:x}},getPaths:function(){var v=this,Q=v.chart,b=Q.getChartStore(),E=v.bounds=v.getBounds(),z=v.items=[],k=v.gutter/100,c=v.groupGutter/100,O=Q.animate,J=v.column,x=v.group,l=Q.shadow,M=v.shadowGroups,L=v.shadowAttributes,q=M.length,y=E.bbox,m=v.xPadding,r=v.yPadding,N=v.stacked,w=E.barsLen,K=v.colorArrayStyle,h=K&&K.length||0,B=Math,n=B.max,G=B.min,u=B.abs,P,R,e,H,C,a,i,t,s,p,g,d,D,A,I,F;b.each(function(j,S,T){a=E.zero;i=E.zero;H=0;C=0;t=false;for(P=0,g=0;P<w;P++){if(v.__excludes&&v.__excludes[P]){continue}R=j.get(E.bars[P]);e=Math.round((R-n(E.minY,0))*E.scale);s={fill:K[(w>1?P:0)%h]};if(J){Ext.apply(s,{height:e,width:n(E.groupBarWidth,0),x:(y.x+m+S*E.barWidth*(1+k)+g*E.groupBarWidth*(1+c)*!N),y:a-e})}else{I=(T-1)-S;Ext.apply(s,{height:n(E.groupBarWidth,0),width:e+(a==E.zero),x:a+(a!=E.zero),y:(y.y+r+I*E.barWidth*(1+k)+g*E.groupBarWidth*(1+c)*!N+1)})}if(e<0){if(J){s.y=i;s.height=u(e)}else{s.x=i+e;s.width=u(e)}}if(N){if(e<0){i+=e*(J?-1:1)}else{a+=e*(J?-1:1)}H+=u(e);if(e<0){C+=u(e)}}s.x=Math.floor(s.x)+1;F=Math.floor(s.y);if(!Ext.isIE9&&s.y>F){F--}s.y=F;s.width=Math.floor(s.width);s.height=Math.floor(s.height);z.push({series:v,storeItem:j,value:[j.get(v.xField),R],attr:s,point:J?[s.x+s.width/2,R>=0?s.y:s.y+s.height]:[R>=0?s.x+s.width:s.x,s.y+s.height/2]});if(O&&Q.resizing){p=J?{x:s.x,y:E.zero,width:s.width,height:0}:{x:E.zero,y:s.y,width:0,height:s.height};if(l&&(N&&!t||!N)){t=true;for(d=0;d<q;d++){D=M[d].getAt(N?S:(S*w+P));if(D){D.setAttributes(p,true)}}}A=x.getAt(S*w+P);if(A){A.setAttributes(p,true)}}g++}if(N&&z.length){z[S*g].totalDim=H;z[S*g].totalNegDim=C}},v)},renderShadows:function(v,w,z,l){var A=this,q=A.chart,t=q.surface,g=q.animate,y=A.stacked,a=A.shadowGroups,x=A.shadowAttributes,p=a.length,h=q.getChartStore(),d=A.column,s=A.items,b=[],m=l.zero,e,r,k,B,n,u,c;if((y&&(v%l.groupBarsLen===0))||!y){u=v/l.groupBarsLen;for(e=0;e<p;e++){r=Ext.apply({},x[e]);k=a[e].getAt(y?u:v);Ext.copyTo(r,w,"x,y,width,height");if(!k){k=t.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},z,r)))}if(y){B=s[v].totalDim;n=s[v].totalNegDim;if(d){r.y=m-n;r.height=B}else{r.x=m-n;r.width=B}}if(g){if(!y){c=A.renderer(k,h.getAt(u),r,v,h);A.onAnimate(k,{to:c})}else{c=A.renderer(k,h.getAt(u),Ext.apply(r,{hidden:true}),v,h);k.setAttributes(c,true)}}else{c=A.renderer(k,h.getAt(u),Ext.apply(r,{hidden:false}),v,h);k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var D=this,s=D.chart,m=s.getChartStore(),w=s.surface,k=s.animate,B=D.stacked,d=D.column,b=s.shadow,a=D.shadowGroups,r=a.length,p=D.group,g=D.seriesStyle,t,q,z,y,C,u,c,e,h,n,l,A,v,x;if(!m||!m.getCount()){return}delete g.fill;l=Ext.apply(g,this.style);D.unHighlightItem();D.cleanHighlights();D.getPaths();n=D.bounds;t=D.items;C=d?{y:n.zero,height:0}:{x:n.zero,width:0};q=t.length;for(z=0;z<q;z++){u=p.getAt(z);A=t[z].attr;if(b){t[z].shadows=D.renderShadows(z,A,C,n)}if(!u){v=Ext.apply({},C,A);v=Ext.apply(v,l||{});u=w.add(Ext.apply({},{type:"rect",group:p},v))}if(k){c=D.renderer(u,m.getAt(z),A,z,m);u._to=c;x=D.onAnimate(u,{to:Ext.apply(c,l)});if(b&&B&&(z%n.barsLen===0)){y=z/n.barsLen;for(e=0;e<r;e++){x.on("afteranimate",function(){this.show(true)},a[e].getAt(y))}}}else{c=D.renderer(u,m.getAt(z),Ext.apply(A,{hidden:false}),z,m);u.setAttributes(Ext.apply(c,l),true)}t[z].sprite=u}q=p.getCount();for(y=z;y<q;y++){p.getAt(y).hide(true)}if(b){for(e=0;e<r;e++){h=a[e];q=h.getCount();for(y=z;y<q;y++){h.getAt(y).hide(true)}}}D.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(H,O,t,K,q,I,J,w){var m=this,n=m.bounds,d=n.groupBarWidth,G=m.column,M=m.chart,v=M.chartBBox,B=M.resizing,p=t.value[0],P=t.value[1],l=t.attr,A=m.label,L=A.orientation=="vertical",h=[].concat(A.field),u=A.renderer,s=u(O.get(h[w])),g=m.getLabelSize(s),a=g.width,c=g.height,b=n.zero,k="outside",r="insideStart",N="insideEnd",F=10,D=6,e=n.signed,E,C,z;H.setAttributes({text:s});H.isOutside=false;if(G){if(q==k){if(c+D+l.height>(P>=0?b-v.y:v.y+v.height-b)){q=N}}else{if(c+D>l.height){q=k;H.isOutside=true}}E=l.x+d/2;C=q==r?(b+((c/2+3)*(P>=0?-1:1))):(P>=0?(l.y+((c/2+3)*(q==k?-1:1))):(l.y+l.height+((c/2+3)*(q===k?1:-1))))}else{if(q==k){if(a+F+l.width>(P>=0?v.x+v.width-b:b-v.x)){q=N}}else{if(a+F>l.width){q=k;H.isOutside=true}}E=q==r?(b+((a/2+5)*(P>=0?1:-1))):(P>=0?(l.x+l.width+((a/2+5)*(q===k?1:-1))):(l.x+((a/2+5)*(q===k?-1:1))));C=l.y+d/2}z={x:E,y:C};if(L){z.rotate={x:E,y:C,degrees:270}}if(I&&B){if(G){E=l.x+l.width/2;C=b}else{E=b;C=l.y+l.height/2}H.setAttributes({x:E,y:C},true);if(L){H.setAttributes({rotate:{x:E,y:C,degrees:270}},true)}}if(I){m.onAnimate(H,{to:z})}else{H.setAttributes(Ext.apply(z,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=true;this.drawSeries();a.each(function(b){b.drawAxis()})}},showAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=false;this.drawSeries();a.each(function(b){b.drawAxis()})}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:"Ext.chart.series.Bar",type:"column",alias:"series.column",column:true,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:"Ext.chart.series.Series",type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(b){var D=this,C=D.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=D.centerX,i=D.centerY,z=0,w=0,v=0,t=0,h=0,g=0,e=0,c=0,A=0.01,m=b.endRho-b.startRho,s=b.startAngle,q=b.endAngle,j=(s+q)/2*C,l=b.margin||0,u=n(q-s)>180,E=Math.min(s,q)*C,B=Math.max(s,q)*C,p=false;k+=l*d(j);i+=l*a(j);z=k+b.startRho*d(E);h=i+b.startRho*a(E);w=k+b.endRho*d(E);g=i+b.endRho*a(E);v=k+b.startRho*d(B);e=i+b.startRho*a(B);t=k+b.endRho*d(B);c=i+b.endRho*a(B);if(n(z-v)<=A&&n(h-e)<=A){p=true}if(p){return{path:[["M",z,h],["L",w,g],["A",b.endRho,b.endRho,0,+u,1,t,c],["Z"]]}}else{return{path:[["M",z,h],["L",w,g],["A",b.endRho,b.endRho,0,+u,1,t,c],["L",v,e],["A",b.startRho,b.startRho,0,+u,0,z,h],["Z"]]}}},calcMiddle:function(q){var k=this,l=k.rad,p=q.slice,n=k.centerX,m=k.centerY,j=p.startAngle,e=p.endAngle,i=Math.max(("rho" in p)?p.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(q.endRho+q.startRho)/2*Math.cos(d),c=m-(q.endRho+q.startRho)/2*Math.sin(d);q.middle={x:g,y:c}},drawSeries:function(){var x=this,X=x.chart,b=X.getChartStore(),B=x.group,T=x.chart.animate,E=x.chart.axes.get(0),F=E&&E.minimum||x.minimum||0,J=E&&E.maximum||x.maximum||0,n=x.angleField||x.field||x.xField,N=X.surface,I=X.chartBBox,h=x.rad,c=+x.donut,Y={},C=[],m=x.seriesStyle,a=x.seriesLabelStyle,g=x.colorArrayStyle,A=g&&g.length||0,L=X.maxGutter[0],K=X.maxGutter[1],k=Math.cos,t=Math.sin,u,e,d,w,s,D,P,G,H,M,V,U,l,W,y,q,R,S,r,z,v,Q,O;Ext.apply(m,x.style||{});x.setBBox();z=x.bbox;if(x.colorSet){g=x.colorSet;A=g.length}if(!b||!b.getCount()){return}e=x.centerX=I.x+(I.width/2);d=x.centerY=I.y+I.height;x.radius=Math.min(e-I.x,d-I.y);x.slices=s=[];x.items=C=[];if(!x.value){M=b.getAt(0);x.value=M.get(n)}P=x.value;if(x.needle){Q={series:x,value:P,startAngle:-180,endAngle:0,rho:x.radius};v=-180*(1-(P-F)/(J-F));s.push(Q)}else{v=-180*(1-(P-F)/(J-F));Q={series:x,value:P,startAngle:-180,endAngle:v,rho:x.radius};O={series:x,value:x.maximum-P,startAngle:v,endAngle:0,rho:x.radius};s.push(Q,O)}for(V=0,H=s.length;V<H;V++){w=s[V];D=B.getAt(V);u=Ext.apply({segment:{startAngle:w.startAngle,endAngle:w.endAngle,margin:0,rho:w.rho,startRho:w.rho*+c/100,endRho:w.rho}},Ext.apply(m,g&&{fill:g[V%A]}||{}));G=Ext.apply({},u.segment,{slice:w,series:x,storeItem:M,index:V});C[V]=G;if(!D){r=Ext.apply({type:"path",group:B},Ext.apply(m,g&&{fill:g[V%A]}||{}));D=N.add(Ext.apply(r,u))}w.sprite=w.sprite||[];G.sprite=D;w.sprite.push(D);if(T){u=x.renderer(D,M,u,V,b);D._to=u;x.onAnimate(D,{to:u})}else{u=x.renderer(D,M,Ext.apply(u,{hidden:false}),V,b);D.setAttributes(u,true)}}if(x.needle){v=v*Math.PI/180;if(!x.needleSprite){x.needleSprite=x.chart.surface.add({type:"path",path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))],"stroke-width":4,stroke:"#222"})}else{if(T){x.onAnimate(x.needleSprite,{to:{path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))]}})}else{x.needleSprite.setAttributes({type:"path",path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))]})}}x.needleSprite.setAttributes({hidden:false},true)}delete x.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,c,b){return false},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;Ext.apply(e,c,{highlightCfg:{"stroke-width":3},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[b[0]],c=[k[0]];for(;g<h;++g){d+=b[g]||0;a+=k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var am=this,aw=am.chart,U=aw.axes,aq=aw.getChartStore(),X=aq.getCount(),w=am.chart.surface,ao={},T=am.group,M=am.showMarkers,aC=am.markerGroup,F=aw.shadow,E=am.shadowGroups,Z=am.shadowAttributes,Q=am.smooth,s=E.length,au=["M"],V=["M"],d=["M"],b=["M"],L=aw.markerIndex,ak=[].concat(am.axis),aj,ax=[],ai={},ac=[],z={},K=false,S=[],aB=am.markerStyle,ab=am.style,v=am.colorArrayStyle,R=v&&v.length||0,N=Ext.isNumber,ay=am.seriesIdx,h=am.getAxesForXAndYFields(),m=h.xAxis,aA=h.yAxis,ae,k,ad,af,C,c,ag,J,I,g,e,u,t,Y,P,O,av,n,H,G,aD,p,r,D,a,aa,ah,B,at,A,ar,q,az,ap,an,W,l,al;if(am.fireEvent("beforedraw",am)===false){return}if(!X||am.seriesIsHidden){al=this.items;if(al){for(P=0,av=al.length;P<av;++P){if(al[P].sprite){al[P].sprite.hide(true)}}}return}ap=Ext.apply(aB||{},am.markerConfig);W=ap.type;delete ap.type;an=ab;if(!an["stroke-width"]){an["stroke-width"]=0.5}if(L&&aC&&aC.getCount()){for(P=0;P<L;P++){G=aC.getAt(P);aC.remove(G);aC.add(G);aD=aC.getAt(aC.getCount()-2);G.setAttributes({x:0,y:0,translate:{x:aD.attr.translation.x,y:aD.attr.translation.y}},true)}}am.unHighlightItem();am.cleanHighlights();am.setBBox();ao=am.bbox;am.clipRect=[ao.x,ao.y,ao.width,ao.height];for(P=0,av=ak.length;P<av;P++){n=U.get(ak[P]);if(n){H=n.calcEnds();if(n.position=="top"||n.position=="bottom"){B=H.from;at=H.to}else{A=H.from;ar=H.to}}}if(am.xField&&!N(B)&&(m=="bottom"||m=="top")&&!U.get(m)){n=Ext.create("Ext.chart.axis.Axis",{chart:aw,fields:[].concat(am.xField)}).calcEnds();B=n.from;at=n.to}if(am.yField&&!N(A)&&(aA=="right"||aA=="left")&&!U.get(aA)){n=Ext.create("Ext.chart.axis.Axis",{chart:aw,fields:[].concat(am.yField)}).calcEnds();A=n.from;ar=n.to}if(isNaN(B)){B=0;aa=ao.width/((X-1)||1)}else{aa=ao.width/((at-B)||(X-1)||1)}if(isNaN(A)){A=0;ah=ao.height/((X-1)||1)}else{ah=ao.height/((ar-A)||(X-1)||1)}am.eachRecord(function(j,x){r=j.get(am.xField);if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)||m&&U.get(m)&&U.get(m).type=="Category"){if(r in ai){r=ai[r]}else{r=ai[r]=x}}D=j.get(am.yField);if(typeof D=="undefined"||(typeof D=="string"&&!D)){return}if(typeof D=="string"||typeof D=="object"&&!Ext.isDate(D)||aA&&U.get(aA)&&U.get(aA).type=="Category"){D=x}S.push(x);ax.push(r);ac.push(D)});av=ax.length;if(av>ao.width){a=am.shrink(ax,ac,ao.width);ax=a.x;ac=a.y}am.items=[];l=0;av=ax.length;for(P=0;P<av;P++){r=ax[P];D=ac[P];if(D===false){if(V.length==1){V=[]}K=true;am.items.push(false);continue}else{J=(ao.x+(r-B)*aa).toFixed(2);I=((ao.y+ao.height)-(D-A)*ah).toFixed(2);if(K){K=false;V.push("M")}V=V.concat([J,I])}if((typeof t=="undefined")&&(typeof I!="undefined")){t=I;u=J}if(!am.line||aw.resizing){au=au.concat([J,ao.y+ao.height/2])}if(aw.animate&&aw.resizing&&am.line){am.line.setAttributes({path:au},true);if(am.fillPath){am.fillPath.setAttributes({path:au,opacity:0.2},true)}if(am.line.shadows){ae=am.line.shadows;for(O=0,s=ae.length;O<s;O++){k=ae[O];k.setAttributes({path:au},true)}}}if(M){G=aC.getAt(l++);if(!G){G=Ext.chart.Shape[W](w,Ext.apply({group:[T,aC],x:0,y:0,translate:{x:+(g||J),y:e||(ao.y+ao.height/2)},value:'"'+r+", "+D+'"',zIndex:4000},ap));G._to={translate:{x:+J,y:+I}}}else{G.setAttributes({value:'"'+r+", "+D+'"',x:0,y:0,hidden:false},true);G._to={translate:{x:+J,y:+I}}}}am.items.push({series:am,value:[r,D],point:[J,I],sprite:G,storeItem:aq.getAt(S[P])});g=J;e=I}if(V.length<=1){return}if(am.smooth){b=Ext.draw.Draw.smooth(V,N(Q)?Q:am.defaultSmoothness)}d=Q?b:V;if(aw.markerIndex&&am.previousPath){af=am.previousPath;if(!Q){Ext.Array.erase(af,1,2)}}else{af=V}if(!am.line){am.line=w.add(Ext.apply({type:"path",group:T,path:au,stroke:an.stroke||an.fill},an||{}));if(F){am.line.setAttributes(Ext.apply({},am.shadowOptions),true)}am.line.setAttributes({fill:"none",zIndex:3000});if(!an.stroke&&R){am.line.setAttributes({stroke:v[ay%R]},true)}if(F){ae=am.line.shadows=[];for(ad=0;ad<s;ad++){aj=Z[ad];aj=Ext.apply({},aj,{path:au});k=w.add(Ext.apply({},{type:"path",group:E[ad]},aj));ae.push(k)}}}if(am.fill){c=d.concat([["L",J,ao.y+ao.height],["L",u,ao.y+ao.height],["L",u,t]]);if(!am.fillPath){am.fillPath=w.add({group:T,type:"path",opacity:an.opacity||0.3,fill:an.fill||v[ay%R],path:au})}}Y=M&&aC.getCount();if(aw.animate){C=am.fill;q=am.line;ag=am.renderer(q,false,{path:d},P,aq);Ext.apply(ag,an||{},{stroke:an.stroke||an.fill});delete ag.fill;q.show(true);if(aw.markerIndex&&am.previousPath){am.animation=az=am.onAnimate(q,{to:ag,from:{path:af}})}else{am.animation=az=am.onAnimate(q,{to:ag})}if(F){ae=q.shadows;for(O=0;O<s;O++){ae[O].show(true);if(aw.markerIndex&&am.previousPath){am.onAnimate(ae[O],{to:{path:d},from:{path:af}})}else{am.onAnimate(ae[O],{to:{path:d}})}}}if(C){am.fillPath.show(true);am.onAnimate(am.fillPath,{to:Ext.apply({},{path:c,fill:an.fill||v[ay%R],"stroke-width":0},an||{})})}if(M){l=0;for(P=0;P<av;P++){if(am.items[P]){p=aC.getAt(l++);if(p){ag=am.renderer(p,aq.getAt(P),p._to,P,aq);am.onAnimate(p,{to:Ext.apply(ag,ap||{})});p.show(true)}}}for(;l<Y;l++){p=aC.getAt(l);p.hide(true)}}}else{ag=am.renderer(am.line,false,{path:d,hidden:false},P,aq);Ext.apply(ag,an||{},{stroke:an.stroke||an.fill});delete ag.fill;am.line.setAttributes(ag,true);if(F){ae=am.line.shadows;for(O=0;O<s;O++){ae[O].setAttributes({path:d,hidden:false},true)}}if(am.fill){am.fillPath.setAttributes({path:c,hidden:false},true)}if(M){l=0;for(P=0;P<av;P++){if(am.items[P]){p=aC.getAt(l++);if(p){ag=am.renderer(p,aq.getAt(P),p._to,P,aq);p.setAttributes(Ext.apply(ap||{},ag||{}),true);p.show(true)}}}for(;l<Y;l++){p=aC.getAt(l);p.hide(true)}}}if(aw.markerIndex){if(am.smooth){Ext.Array.erase(V,1,2)}else{Ext.Array.splice(V,1,0,V[1],V[2])}am.previousPath=V}am.renderLabels();am.renderCallouts();am.fireEvent("draw",am)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,d){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],c=t.sprite.attr.radius,e,n,m;g.setAttributes({text:r(k.get(b)),hidden:true},true);if(p=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(p=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s&&v.animation){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=a.line.attr["stroke-width"]||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,s,K,H,G,d,k){if(!G){return}var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=H==0?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=[+K.point[0],+K.point[1]],B,g,O,L,q,r,J=M.offsetFromViz||30,D=M.offsetToSide||10,C=M.offsetBox||3,h,e,j,z,v,F=N.clipRect,b={width:M.styles.width||10,height:M.styles.height||10},n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(t.animate){N.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(v in m){m[v].show(true)}},isItemInPoint:function(j,g,B,r){var D=this,n=D.items,t=D.selectionTolerance,k=null,A,c,q,w,h,z,b,u,a,l,C,e,d,p,v,s,E=Math.sqrt,m=Math.abs;c=n[r];A=r&&n[r-1];if(r>=h){A=n[h-1]}q=A&&A.point;w=c&&c.point;z=A?q[0]:w[0]-t;b=A?q[1]:w[1];u=c?w[0]:q[0]+t;a=c?w[1]:q[1];e=E((j-z)*(j-z)+(g-b)*(g-b));d=E((j-u)*(j-u)+(g-a)*(g-a));p=Math.min(e,d);if(p<=t){return p==e?A:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:"Ext.chart.series.Series",type:"pie",alias:"series.pie",rad:Math.PI/180,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.applyIf(h,{highlightCfg:{segment:{margin:20}}});Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)};h.__excludes=h.__excludes||[]},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(d){var K=this,J=K.rad,i=Math.cos,a=Math.sin,q=K.centerX,n=K.centerY,F=0,E=0,D=0,B=0,l=0,k=0,j=0,g=0,z=0,c=0,w=0,b=0,H=0.01,A=d.startAngle,v=d.endAngle,p=(A+v)/2*J,s=d.margin||0,L=Math.min(A,v)*J,I=Math.max(A,v)*J,u=i(L),h=a(L),t=i(I),e=a(I),m=i(p),G=a(p),C=0,r=0.7071067811865476;if(I-L<H){return{path:""}}if(s!==0){q+=s*m;n+=s*G}E=q+d.endRho*u;k=n+d.endRho*h;B=q+d.endRho*t;g=n+d.endRho*e;if(Math.abs(E-B)+Math.abs(k-g)<H){m=r;G=-r;C=1}w=q+d.endRho*m;b=n+d.endRho*G;if(d.startRho!==0){F=q+d.startRho*u;l=n+d.startRho*h;D=q+d.startRho*t;j=n+d.startRho*e;z=q+d.startRho*m;c=n+d.startRho*G;return{path:[["M",E,k],["A",d.endRho,d.endRho,0,0,1,w,b],["L",w,b],["A",d.endRho,d.endRho,0,C,1,B,g],["L",B,g],["L",D,j],["A",d.startRho,d.startRho,0,C,0,z,c],["L",z,c],["A",d.startRho,d.startRho,0,0,0,F,l],["L",F,l],["Z"]]}}else{return{path:[["M",q,n],["L",E,k],["A",d.endRho,d.endRho,0,0,1,w,b],["L",w,b],["A",d.endRho,d.endRho,0,C,1,B,g],["L",B,g],["L",q,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var z=this,b=z.chart.getChartStore(),F=z.group,af=z.chart.animate,r=z.angleField||z.field||z.xField,I=[].concat(z.lengthField),ae=0,X=z.colorSet,ak=z.chart,U=ak.surface,P=ak.chartBBox,m=ak.shadow,ac=z.shadowGroups,ab=z.shadowAttributes,ao=ac.length,h=z.rad,V=I.length,J=0,d=+z.donut,am=[],an={},al,G=[],k=false,C=0,Y=0,l=9,ap=true,B=0,q=z.seriesStyle,a=z.seriesLabelStyle,g=z.colorArrayStyle,E=g&&g.length||0,S=ak.maxGutter[0],R=ak.maxGutter[1],N=Math.abs,w,ad,aj,K,Q,M,e,c,x,t=0,y,v,H,W,L,aq,O,T,ah,ag,n,ai,A,s,Z,aa,u,D;Ext.apply(q,z.style||{});z.setBBox();D=z.bbox;if(z.colorSet){g=z.colorSet;E=g.length}if(!b||!b.getCount()){return}z.unHighlightItem();z.cleanHighlights();e=z.centerX=P.x+(P.width/2);c=z.centerY=P.y+(P.height/2);z.radius=Math.min(e-P.x,c-P.y);z.slices=v=[];z.items=G=[];b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){return}C+=+j.get(r);if(I[0]){for(ag=0,ae=0;ag<V;ag++){ae+=+j.get(I[ag])}am[p]=ae;Y=Math.max(Y,ae)}},this);C=C||1;b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){W=0}else{W=j.get(r);if(t==0){t=1}}if(t==1){t=2;z.firstAngle=B=360*W/C/2;for(ag=0;ag<p;ag++){v[ag].startAngle=v[ag].endAngle=z.firstAngle}}ai=B-360*W/C;y={series:z,value:W,startAngle:B,endAngle:ai,storeItem:j};if(I[0]){aq=am[p];y.rho=z.radius*(aq/Y)}else{y.rho=z.radius}v[p]=y;B=ai},z);if(m){for(ah=0,O=v.length;ah<O;ah++){y=v[ah];y.shadowAttrs=[];for(ag=0,J=0,K=[];ag<V;ag++){H=F.getAt(ah*V+ag);x=I[ag]?b.getAt(ah).get(I[ag])/am[ah]*y.rho:y.rho;w={segment:{startAngle:y.startAngle,endAngle:y.endAngle,margin:0,rho:y.rho,startRho:J+(x*d/100),endRho:J+x},hidden:!y.value&&(y.startAngle%360)==(y.endAngle%360)};for(M=0,K=[];M<ao;M++){aj=ab[M];Q=ac[M].getAt(ah);if(!Q){Q=ak.surface.add(Ext.apply({},{type:"path",group:ac[M],strokeLinejoin:"round"},w,aj))}if(af){aj=z.renderer(Q,b.getAt(ah),Ext.apply({},w,aj),ah,b);z.onAnimate(Q,{to:aj})}else{aj=z.renderer(Q,b.getAt(ah),aj,ah,b);Q.setAttributes(aj,true)}K.push(Q)}y.shadowAttrs[ag]=K}}}for(ah=0,O=v.length;ah<O;ah++){y=v[ah];for(ag=0,J=0;ag<V;ag++){H=F.getAt(ah*V+ag);x=I[ag]?b.getAt(ah).get(I[ag])/am[ah]*y.rho:y.rho;w=Ext.apply({segment:{startAngle:y.startAngle,endAngle:y.endAngle,margin:0,rho:y.rho,startRho:J+(x*d/100),endRho:J+x},hidden:(!y.value&&(y.startAngle%360)==(y.endAngle%360))},Ext.apply(q,g&&{fill:g[(V>1?ag:ah)%E]}||{}));L=Ext.apply({},w.segment,{slice:y,series:z,storeItem:y.storeItem,index:ah});z.calcMiddle(L);if(m){L.shadows=y.shadowAttrs[ag]}G[ah]=L;if(!H){u=Ext.apply({type:"path",group:F,middle:L.middle},Ext.apply(q,g&&{fill:g[(V>1?ag:ah)%E]}||{}));H=U.add(Ext.apply(u,w))}y.sprite=y.sprite||[];L.sprite=H;y.sprite.push(H);y.point=[L.middle.x,L.middle.y];if(af){w=z.renderer(H,b.getAt(ah),w,ah,b);H._to=w;H._animating=true;z.onAnimate(H,{to:w,listeners:{afteranimate:{fn:function(){this._animating=false},scope:H}}})}else{w=z.renderer(H,b.getAt(ah),Ext.apply(w,{hidden:false}),ah,b);H.setAttributes(w,true)}J+=x}}O=F.getCount();for(ah=0;ah<O;ah++){if(!v[(ah/V)>>0]&&F.getAt(ah)){F.getAt(ah).hide(true)}}if(m){ao=ac.length;for(M=0;M<O;M++){if(!v[(M/V)>>0]){for(ag=0;ag<ao;ag++){if(ac[ag].getAt(M)){ac[ag].getAt(M).hide(true)}}}}}z.renderLabels();z.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,q,A,u,t,e,g){var C=this,r=C.chart,z=r.resizing,B=C.label,v=B.renderer,c=[].concat(B.field),m=C.centerX,l=C.centerY,D=A.middle,b={x:D.x,y:D.y},p=D.x-m,n=D.y-l,s={},d=1,j=Math.atan2(n,p||1),w=j*180/Math.PI,h;if(this.__excludes&&this.__excludes[u]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:v(q.get(c[g]))},true);switch(t){case"outside":d=Math.sqrt(p*p+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":w=a(w);w=(w>90&&w<270)?w+180:w;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-w)>180){if(w>h){w-=360}else{w+=360}w=w%360}else{w=a(w)}b.rotate={degrees:w,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!z&&(t!="rotate"||h!=null)){C.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=s},onPlaceCallout:function(l,q,B,w,v,d,e){var D=this,r=D.chart,z=r.resizing,C=D.callouts,j=D.centerX,h=D.centerY,E=B.middle,b={x:E.x,y:E.y},n=E.x-j,k=E.y-h,c=1,m,g=Math.atan2(k,n||1),a=l.label.getBBox(),A=20,u=10,t=10,s;c=B.endRho+A;m=(B.endRho+B.startRho)/2+(B.endRho-B.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;n=m*Math.cos(g);k=m*Math.sin(g);if(r.animate){D.onAnimate(l.lines,{to:{path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?u:-u,0,"z"]}});D.onAnimate(l.box,{to:{x:b.x+(n>0?u:-(u+a.width+2*t)),y:b.y+(k>0?(-a.height-t/2):(-a.height-t/2)),width:a.width+2*t,height:a.height+2*t}});D.onAnimate(l.label,{to:{x:b.x+(n>0?(u+t):-(u+a.width+t)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?u:-u,0,"z"]},true);l.box.setAttributes({x:b.x+(n>0?u:-(u+a.width+2*t)),y:b.y+(k>0?(-a.height-t/2):(-a.height-t/2)),width:a.width+2*t,height:a.height+2*t},true);l.label.setAttributes({x:b.x+(n>0?(u+t):-(u+a.width+t)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(s in l){l[s].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,q=Math.abs,p=q(l-d),m=q(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(p*p+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=360}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(){var e,b,h,g,d,a,c;if(!isNaN(this._index)){this.__excludes=this.__excludes||[];this.__excludes[this._index]=true;c=this.slices[this._index].sprite;for(d=0,a=c.length;d<a;d++){c[d].setAttributes({hidden:true},true)}if(this.slices[this._index].shadowAttrs){for(e=0,g=this.slices[this._index].shadowAttrs,b=g.length;e<b;e++){h=g[e];for(d=0,a=h.length;d<a;d++){h[d].setAttributes({hidden:true},true)}}}this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},highlightItem:function(t){var v=this,u=v.rad;t=t||this.items[this._index];this.unHighlightItem();if(!t||t.sprite&&t.sprite._animating){return}v.callParent([t]);if(!v.highlight){return}if("segment" in v.highlightCfg){var z=v.highlightCfg.segment,d=v.chart.animate,p,s,a,e,k,b,m,c;if(v.labelsGroup){var g=v.labelsGroup,q=v.label.display,h=g.getAt(t.index),w=(t.startAngle+t.endAngle)/2*u,n=z.margin||0,l=n*Math.cos(w),j=n*Math.sin(w);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:v.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(v.chart.shadow&&t.shadows){s=0;a=t.shadows;k=a.length;for(;s<k;s++){e=a[s];b={};m=t.sprite._from.segment;for(c in m){if(!(c in z)){b[c]=m[c]}}p={segment:Ext.applyIf(b,v.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:p,duration:v.highlightDuration})}else{e.setAttributes(p,true)}}}}},unHighlightItem:function(){var x=this;if(!x.highlight){return}if(("segment" in x.highlightCfg)&&x.items){var l=x.items,e=x.chart.animate,d=!!x.chart.shadow,k=x.labelsGroup,u=l.length,t=0,s=0,r=x.label.display,y,m,c,a,w,n,b,g,v,h,q;for(;t<u;t++){v=l[t];if(!v){continue}n=v.sprite;if(n&&n._highlighted){if(k){h=k.getAt(v.index);q=Ext.apply({translate:{x:0,y:0}},r=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:q,duration:x.highlightDuration})}else{h.setAttributes(q,true)}}if(d){b=v.shadows;y=b.length;for(;s<y;s++){c={};a=v.sprite._to.segment;w=v.sprite._from.segment;Ext.apply(c,w);for(m in a){if(!(m in w)){c[m]=a[m]}}g=b[s];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:x.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}x.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:"Ext.chart.series.Series",requires:["Ext.chart.Shape","Ext.fx.Anim"],type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var M=this,n=M.chart.getChartStore(),q=M.group,D,z=M.chart,m=z.animate,c=M.field||M.yField,F=z.surface,v=z.chartBBox,h,s,r,A,j,K=0,E=[],I=Math.max,e=Math.cos,a=Math.sin,C=Math.PI*2,G=n.getCount(),L,B,u,t,d,H,b,k=M.seriesStyle,J=M.seriesLabelStyle,p=z.resizing||!M.radar,g=z.axes&&z.axes.get(0),w=!(g&&g.maximum);M.setBBox();K=w?0:(g.maximum||0);Ext.apply(k,M.style||{});if(!n||!n.getCount()){return}M.unHighlightItem();M.cleanHighlights();s=M.centerX=v.x+(v.width/2);r=M.centerY=v.y+(v.height/2);M.radius=j=Math.min(v.width,v.height)/2;M.items=A=[];if(w){z.series.each(function(i){E.push(i.yField)});n.each(function(l,x){for(x=0,b=E.length;x<b;x++){K=I(+l.get(E[x]),K)}})}K=K||1;L=[];B=[];n.each(function(l,x){d=j*l.get(c)/K;u=d*e(x/G*C);t=d*a(x/G*C);if(x==0){B.push("M",u+s,t+r);L.push("M",0.01*u+s,0.01*t+r)}else{B.push("L",u+s,t+r);L.push("L",0.01*u+s,0.01*t+r)}A.push({sprite:false,point:[s+u,r+t],series:M})});B.push("Z");if(!M.radar){M.radar=F.add(Ext.apply({type:"path",group:q,path:L},k||{}))}if(z.resizing){M.radar.setAttributes({path:L},true)}if(z.animate){M.onAnimate(M.radar,{to:Ext.apply({path:B},k||{})})}else{M.radar.setAttributes(Ext.apply({path:B},k||{}),true)}if(M.showMarkers){M.drawMarkers()}M.renderLabels();M.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig),m=n.items,p=j.type,r=n.markerGroup,e=n.centerX,d=n.centerY,q,h,c,g;delete j.type;for(h=0,c=m.length;h<c;h++){q=m[h];g=r.getAt(h);if(!g){g=Ext.chart.Shape[p](a,Ext.apply({group:r,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:q.point[0],y:q.point[1]}};if(k.animate){n.onAnimate(g,{to:g._to})}else{g.setAttributes(Ext.apply(g._to,j||{}),true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(r,h,t,g,k,b){var m=this,l=m.chart,j=l.resizing,c=m.label,s=c.renderer,q=c.field,e=m.centerX,d=m.centerY,a={x:t.point[0],y:t.point[1]},p=a.x-e,n=a.y-d;r.setAttributes({text:s(h.get(q)),hidden:true},true);if(j){r.setAttributes({x:e,y:d},true)}if(b){r.show(true);m.onAnimate(r,{to:a})}else{r.setAttributes(a,true);r.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}}});Ext.define("Ext.chart.series.Scatter",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.fx.Anim"],type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var m=this,l=m.chart,p=l.getChartStore(),j=[].concat(m.axis),r,q,c,k,g,e,b,a,h,d,n;m.setBBox();r=m.bbox;for(h=0,k=j.length;h<k;h++){d=l.axes.get(j[h]);if(d){n=d.calcEnds();if(d.position=="top"||d.position=="bottom"){g=n.from;b=n.to}else{e=n.from;a=n.to}}}if(m.xField&&!Ext.isNumber(g)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.xField)}).calcEnds();g=d.from;b=d.to}if(m.yField&&!Ext.isNumber(e)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.yField)}).calcEnds();e=d.from;a=d.to}if(isNaN(g)){g=0;b=p.getCount()-1;q=r.width/(p.getCount()-1)}else{q=r.width/(b-g)}if(isNaN(e)){e=0;a=p.getCount()-1;c=r.height/(p.getCount()-1)}else{c=r.height/(a-e)}return{bbox:r,minX:g,minY:e,xScale:q,yScale:c}},getPaths:function(){var u=this,k=u.chart,b=k.shadow,d=k.getChartStore(),h=u.group,e=u.bounds=u.getBounds(),a=u.bbox,w=e.xScale,c=e.yScale,s=e.minX,r=e.minY,v=a.x,t=a.y,g=a.height,l=u.items=[],n=[],j,i,p,q,m;d.each(function(x,y){p=x.get(u.xField);q=x.get(u.yField);if(typeof q=="undefined"||(typeof q=="string"&&!q)){return}if(typeof p=="string"||typeof p=="object"&&!Ext.isDate(p)){p=y}if(typeof q=="string"||typeof q=="object"&&!Ext.isDate(q)){q=y}j=v+(p-s)*w;i=t+g-(q-r)*c;n.push({x:j,y:i});u.items.push({series:u,value:[p,q],point:[j,i],storeItem:x});if(k.animate&&k.resizing){m=h.getAt(y);if(m){u.resetPoint(m);if(b){u.resetShadow(m)}}}});return n},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,p=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(p.x+p.width)/2;e.translate.y+=(p.y+p.height)/2}else{Ext.apply(e,{translate:{x:(p.x+p.width)/2,y:(p.y+p.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var v=this,l=v.chart,h=l.getChartStore(),j=v.group,c=l.shadow,a=v.shadowGroups,r=v.shadowAttributes,s=a.length,m,n,p,k,q,u,e,g,b,d,t;u=Ext.apply(v.markerStyle,v.markerConfig);g=u.type;delete u.type;if(!h||!h.getCount()){return}v.unHighlightItem();v.cleanHighlights();n=v.getPaths();k=n.length;for(q=0;q<k;q++){p=n[q];m=j.getAt(q);Ext.apply(p,u);if(!m){m=v.createPoint(p,g);if(c){v.createShadow(m,u,g)}}b=m.shadows;if(l.animate){d=v.renderer(m,h.getAt(q),{translate:p},q,h);m._to=d;v.onAnimate(m,{to:d});for(e=0;e<s;e++){t=Ext.apply({},r[e]);d=v.renderer(b[e],h.getAt(q),Ext.apply({},{hidden:false,translate:{x:p.x+(t.translate?t.translate.x:0),y:p.y+(t.translate?t.translate.y:0)}},t),q,h);v.onAnimate(b[e],{to:d})}}else{d=v.renderer(m,h.getAt(q),{translate:p},q,h);m._to=d;m.setAttributes(d,true);for(e=0;e<s;e++){t=Ext.apply({},r[e]);d=v.renderer(b[e],h.getAt(q),Ext.apply({},{hidden:false,translate:{x:p.x+(t.translate?t.translate.x:0),y:p.y+(t.translate?t.translate.y:0)}},t),q,h);b[e].setAttributes(d,true)}}v.items[q].sprite=m}k=j.getCount();for(q=n.length;q<k;q++){j.getAt(q).hide(true)}v.renderLabels();v.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(g,k,u,r,q,d){var w=this,l=w.chart,t=l.resizing,v=w.label,s=v.renderer,b=v.field,a=w.bbox,j=u.point[0],h=u.point[1],c=u.sprite.attr.radius,e,n,m,p;g.setAttributes({text:s(k.get(b)),hidden:true},true);if(q=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(q=="under"||q=="over"){e=u.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(q=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(t){p=u.sprite.getActiveAnimation();if(p){p.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{w.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,C,A,z,c,h){var F=this,n=F.chart,v=n.surface,B=n.resizing,E=F.callouts,q=F.items,b=C.point,G,a=k.label.getBBox(),D=30,u=10,t=3,e,d,g,s,r,w=F.bbox,l,j;G=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+G[0]*D;j=b[1]+G[1]*D;e=l+(G[0]>0?0:-(a.width+2*t));d=j-a.height/2-t;g=a.width+2*t;s=a.height+2*t;if(e<w[0]||(e+g)>(w[0]+w[2])){G[0]*=-1}if(d<w[1]||(d+s)>(w[1]+w[3])){G[1]*=-1}l=b[0]+G[0]*D;j=b[1]+G[1]*D;e=l+(G[0]>0?0:-(a.width+2*t));d=j-a.height/2-t;g=a.width+2*t;s=a.height+2*t;if(n.animate){F.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);F.onAnimate(k.box,{to:{x:e,y:d,width:g,height:s}},true);F.onAnimate(k.label,{to:{x:l+(G[0]>0?t:-(a.width+t)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:s},true);k.label.setAttributes({x:l+(G[0]>0?t:-(a.width+t)),y:j},true)}for(r in k){k[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.chart.theme.Base",{requires:["Ext.chart.theme.Theme"],constructor:function(a){Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",fill:"#000",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#a61120",type:"plus"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})})(c[h])}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})})(d[h])}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",uses:["Ext.data.reader.Array"],constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"memory",reader:"array"}});this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,pauseOnException:true,constructor:function(a){var b=this;b.addEvents("complete","exception","operationcomplete");b.mixins.observable.constructor.call(b,a);b.operations=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a)},start:function(){this.hasException=false;this.isRunning=true;this.runNextOperation()},runNextOperation:function(){this.runOperation(this.current+1)},pause:function(){this.isRunning=false},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.fireEvent("exception",e,g)}else{e.fireEvent("operationcomplete",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}}});Ext.define("Ext.data.BelongsToAssociation",{extend:"Ext.data.Association",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var c=this,d=c.ownerModel,e=c.associatedModel,b=c.foreignKey,a=c.primaryKey;return function(i,g,h){this.set(b,i);if(typeof g=="function"){g={callback:g,scope:h||this}}if(Ext.isObject(g)){return this.save(g)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),i,j;if(k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}h.load(n,l);k[a]=h;return h}else{i=k[a];j=[i];m=m||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.data.BufferStore",{extend:"Ext.data.Store",alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.MixedCollection"],statics:{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"}},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=Ext.create("Ext.util.MixedCollection");a.providers=Ext.create("Ext.util.MixedCollection");a.mixins.observable.constructor.call(a)},addProvider:function(e){var d=this,b=arguments,c=0,a;if(b.length>1){for(a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return a.isTransaction?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b=0,a;if(Ext.isArray(d)){for(a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(a){var b=this;Ext.apply(b,a);if(Ext.isString(b.paramOrder)){b.paramOrder=b.paramOrder.split(b.paramOrderRe)}b.callParent(arguments)},doRequest:function(d,n,p){var l=this,b=l.getWriter(),e=l.buildRequest(d,n,p),m=l.api[e.action]||l.directFn,j=[],c=e.params,k=l.paramOrder,a,g=0,h;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=m.directCfg.method;if(a.ordered){if(a.len>0){if(k){for(h=k.length;g<h;++g){j.push(c[k[g]])}}else{if(l.paramsAsHash){j.push(c)}}}}else{j.push(c)}}else{j.push(e.jsonData)}Ext.apply(e,{args:j,directFn:m});j.push(l.createRequestCallback(e,d,n,p),l);m.apply(window,j)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.data.HasManyAssociation",{extend:"Ext.data.Association",requires:["Ext.util.Inflector"],alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=Ext.create("Ext.data.Store",k);if(b){m[c].load()}}return m[c]}},read:function(c,a,e){var d=c[this.name](),b;d.add(a.read(e).records);b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className});if(b){d.data.each(function(g){g[b.instanceName]=c})}}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.statics().requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=Ext.apply({},n.params),b=n.url,a=Ext.isSandboxed?Ext.getUniqueGlobalNamespace():"Ext",g,k;e[i]=a+".data.JsonP."+l;if(d){e[h]=new Date().getTime()}k=j.createScript(b,e);j.statics().requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);Ext.getHead().appendChild(k);return g},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(b,c){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(b,Ext.Object.toQueryString(c)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a}});Ext.define("Ext.data.JsonPStore",{extend:"Ext.data.Store",alias:"store.jsonp",constructor:function(a){this.callParent(Ext.apply(a,{reader:Ext.create("Ext.data.reader.Json",a),proxy:Ext.create("Ext.data.proxy.JsonP",a)}))}});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(c){if(!c.isNode){var j=Ext.ModelManager,e=c.modelName,h=j.getModel(e),k=h.prototype.idProperty,g=[],b,a,d;h.override(this.getPrototypeBody());g=this.applyFields(h,[{name:k,type:"string",defaultValue:null},{name:"parentId",type:"string",defaultValue:null},{name:"index",type:"int",defaultValue:null},{name:"depth",type:"int",defaultValue:0},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null},{name:"leaf",type:"bool",defaultValue:false,persist:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false}]);d=g.length;for(b=0;b<d;++b){a=g[b];if(c.get(a.name)===undefined){c.data[a.name]=a.defaultValue}}}Ext.applyIf(c,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});c.commit(true);c.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return c},applyFields:function(j,k){var c=j.prototype,e=c.fields,l=e.keys,h=k.length,b,d,a,g=[];for(d=0;d<h;d++){b=k[d];if(!Ext.Array.contains(l,b.name)){b=Ext.create("data.field",b);g.push(b);e.add(b)}}return g},getPrototypeBody:function(){return{isNode:true,createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.ModelManager.create(a,this.modelName)}return Ext.data.NodeInterface.decorate(a)},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(k){var l=this,b=l.isRoot(),h=l.parentNode,c=(!h?true:h.firstChild==l),g=(!h?true:h.lastChild==l),e=0,m=l,a=l.childNodes,j=a.length,d=0;while(m.parentNode){++e;m=m.parentNode}l.beginEdit();l.set({isFirst:c,isLast:g,depth:e,index:h?h.indexOf(l):0,parentId:h?h.getId():null});l.endEdit(k);if(k){l.commit()}for(d=0;d<j;d++){a[d].updateInfo(k)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,k,j){var g=this,c,e,d,h,a;if(Ext.isArray(b)){for(c=0,e=b.length;c<e;c++){g.appendChild(b[c])}}else{b=g.createNode(b);if(k!==true&&g.fireEvent("beforeappend",g,b)===false){return false}d=g.childNodes.length;h=b.parentNode;if(h){if(k!==true&&b.fireEvent("beforemove",b,h,g,d)===false){return false}h.removeChild(b,null,false,true)}d=g.childNodes.length;if(d===0){g.setFirstChild(b)}g.childNodes.push(b);b.parentNode=g;b.nextSibling=null;g.setLastChild(b);a=g.childNodes[d-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(j)}else{b.previousSibling=null}b.updateInfo(j);if(!g.isLoaded()){g.set("loaded",true)}else{if(g.childNodes.length===1){g.set("loaded",g.isLoaded())}}if(k!==true){g.fireEvent("append",g,b,d);if(h){b.fireEvent("move",b,h,g,d)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(e,b,c,g){var d=this,a=d.indexOf(e);if(a==-1||(c!==true&&d.fireEvent("beforeremove",d,e)===false)){return false}Ext.Array.erase(d.childNodes,a,1);if(d.firstChild==e){d.setFirstChild(e.nextSibling)}if(d.lastChild==e){d.setLastChild(e.previousSibling)}if(e.previousSibling){e.previousSibling.nextSibling=e.nextSibling;e.previousSibling.updateInfo(g)}if(e.nextSibling){e.nextSibling.previousSibling=e.previousSibling;e.nextSibling.updateInfo(g)}if(c!==true){d.fireEvent("remove",d,e)}if(!d.childNodes.length){d.set("loaded",d.isLoaded())}if(b){e.destroy(true)}else{e.clear()}return e},copy:function(d,c){var g=this,b=g.callOverridden(arguments),a=g.childNodes?g.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(g.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(a){var c=this,b=c.destroyOptions;if(a===true){c.clear(true);Ext.each(c.childNodes,function(d){d.destroy(true)});c.childNodes=null;delete c.destroyOptions;c.callOverridden([b])}else{c.destroyOptions=a;c.remove(true)}},insertBefore:function(g,a,d){var e=this,b=e.indexOf(a),c=g.parentNode,h=b,i;if(!a){return e.appendChild(g)}if(g==a){return false}g=e.createNode(g);if(d!==true&&e.fireEvent("beforeinsert",e,g,a)===false){return false}if(c==e&&e.indexOf(g)<b){h--}if(c){if(d!==true&&g.fireEvent("beforemove",g,c,e,b,a)===false){return false}c.removeChild(g)}if(h===0){e.setFirstChild(g)}Ext.Array.splice(e.childNodes,h,0,g);g.parentNode=e;g.nextSibling=a;a.previousSibling=g;i=e.childNodes[h-1];if(i){g.previousSibling=i;i.nextSibling=g;i.updateInfo()}else{g.previousSibling=null}g.updateInfo();if(!e.isLoaded()){e.set("loaded",true)}else{if(e.childNodes.length===1){e.set("loaded",e.isLoaded())}}if(d!==true){e.fireEvent("insert",e,g,a);if(c){g.fireEvent("move",g,c,e,h,a)}}return g},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c,true)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){g[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[g[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(g,b,a){var d=this.childNodes,e=d.length,c,h;if(e>0){Ext.Array.sort(d,g);for(c=0;c<e;c++){h=d[c];h.previousSibling=d[c-1];h.nextSibling=d[c+1];if(c===0){this.setFirstChild(h);h.updateInfo()}if(c==e-1){this.setLastChild(h);h.updateInfo()}if(b&&!h.isLeaf()){h.sort(g,true,true)}}if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireEvent("beforeexpand",c,function(){c.set("expanded",true);c.fireEvent("expand",c,c.childNodes,false);if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}}else{Ext.callback(d,b||c)}},expandChildren:function(d,j,k){var h=this,e=0,a=h.childNodes,g=a.length,c,b=0;for(;e<g;++e){c=a[e];if(!c.isLeaf()&&!c.isExpanded()){b++;a[e].expand(d,function(){b--;if(j&&!b){Ext.callback(j,k||h,[h.childNodes])}})}}if(!b&&j){Ext.callback(j,k||h,[h.childNodes])}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()){if(!c.collapsing&&c.isExpanded()){c.fireEvent("beforecollapse",c,function(){c.set("expanded",false);c.fireEvent("collapse",c,c.childNodes,false);if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.collapseChildren(true,d,b)}}}else{Ext.callback(d,b||c,[c.childNodes])}},collapseChildren:function(d,j,k){var h=this,e=0,b=h.childNodes,g=b.length,c,a=0;for(;e<g;++e){c=b[e];if(!c.isLeaf()&&c.isExpanded()){a++;b[e].collapse(d,function(){a--;if(j&&!a){Ext.callback(j,k||h,[h.childNodes])}})}}if(!a&&j){Ext.callback(j,k||h,[h.childNodes])}}}}}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);c.addEvents("expand","collapse","beforeexpand","beforecollapse");b=c.node;if(b){c.node=null;c.setNode(b)}},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b);a.removeAll();if(a.rootVisible){a.add(b)}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true)}},onNodeExpand:function(g,d,c){var j=this,a=j.indexOf(g)+1,h=d?d.length:0,e,b;if(!j.recursive&&g!==j.node){return}if(!j.isVisible(g)){return}if(!c&&j.fireEvent("beforeexpand",g,d,a)===false){return}if(h){j.insert(a,d);for(e=0;e<h;e++){b=d[e];if(b.isExpanded()){if(b.isLoaded()){j.onNodeExpand(b,b.childNodes,true)}else{b.set("expanded",false);b.expand()}}}}if(!c){j.fireEvent("expand",g,d)}},onNodeCollapse:function(g,c,b){var j=this,h=c.length,e=j.indexOf(g)+1,d,a;if(!j.recursive&&g!==j.node){return}if(!b&&j.fireEvent("beforecollapse",g,c,e)===false){return}for(d=0;d<h;d++){a=c[d];j.remove(a);if(a.isExpanded()){j.onNodeCollapse(a,a.childNodes,true)}}if(!b){j.fireEvent("collapse",g,c,e)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{g.set("expanded",false);g.expand()}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){c.onNodeCollapse(d,d.childNodes,true)}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&!this.rootVisible&&a.isExpanded()){return true}if(this.indexOf(a)===-1||!a.isExpanded()){return false}a=a.parentNode}return true}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;Ext.data.NodeInterface.decorate(b);if(a.fireEvent("beforeappend",null,b)!==false){b.set("root",true);b.updateInfo();a.relayEvents(b,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","rootchange"]);b.on({scope:a,insert:a.onNodeInsert,append:a.onNodeAppend,remove:a.onNodeRemove});a.nodeHash={};a.registerNode(b);a.fireEvent("append",null,b);a.fireEvent("rootchange",b)}return b},flatten:function(){var a=[],c=this.nodeHash,b;for(b in c){if(c.hasOwnProperty(b)){a.push(c[b])}}return a},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(b,a){this.nodeHash[b.getId()||b.internalId]=b;if(a===true){b.eachChild(function(c){this.registerNode(c,true)},this)}},unregisterNode:function(b,a){delete this.nodeHash[b.getId()||b.internalId];if(a===true){b.eachChild(function(c){this.unregisterNode(c,true)},this)}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.data.Tree","Ext.data.NodeInterface","Ext.data.NodeStore"],clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(c){var d=this,b,a;c=Ext.apply({},c);a=c.fields||d.fields;if(!a){c.fields=[{name:"text",type:"string"}]}d.callParent([c]);d.tree=Ext.create("Ext.data.Tree");d.relayEvents(d.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","rootchange"]);d.tree.on({scope:d,remove:d.onNodeRemove,beforeexpand:d.onBeforeNodeExpand,beforecollapse:d.onBeforeNodeCollapse,append:d.onNodeAdded,insert:d.onNodeAdded});d.onBeforeSort();b=d.root;if(b){delete d.root;d.setRootNode(b)}d.addEvents("sort");if(Ext.isDefined(d.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}d.nodeParam=d.nodeParameter;delete d.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(b,c,a){if(b.isLoaded()){Ext.callback(c,a||b,[b.childNodes])}else{if(b.isLoading()){this.on("load",function(){Ext.callback(c,a||b,[b.childNodes])},this,{single:true})}else{this.read({node:b,callback:function(){Ext.callback(c,a||b,[b.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(b,c,a){c.call(a||b,b.childNodes)},onNodeRemove:function(a,b){var c=this.removed;if(!b.isReplace&&Ext.Array.indexOf(c,b)==-1){c.push(b)}},onNodeAdded:function(d,e){var c=this.getProxy(),a=c.getReader(),g=e.raw||e.data,h,b;Ext.Array.remove(this.removed,e);if(!e.isLeaf()&&!e.isLoaded()){h=a.getRoot(g);if(h){this.fillNode(e,a.extractData(h));delete g[a.root]}}},setRootNode:function(a){var b=this;a=a||{};if(!a.isNode){Ext.applyIf(a,{id:b.defaultRootId,text:"Root",allowDrag:false});a=Ext.ModelManager.create(a,b.model)}Ext.data.NodeInterface.decorate(a);b.getProxy().getReader().buildExtractors(true);b.tree.setRootNode(a);if(!a.isLoaded()&&(b.autoLoad===true||a.isExpanded())){b.load({node:a})}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},load:function(b){b=b||{};b.params=b.params||{};var d=this,c=b.node||d.tree.getRootNode(),a;if(!c){c=d.setRootNode({expanded:true})}if(d.clearOnLoad){c.removeAll(true)}Ext.applyIf(b,{node:c});b.params[d.nodeParam]=c?c.getId():"root";if(c){c.set("loading",true)}return d.callParent([b])},fillNode:function(g,b){var e=this,d=b?b.length:0,c=0,a;if(d&&e.sortOnLoad&&!e.remoteSort&&e.sorters&&e.sorters.items){a=Ext.create("Ext.util.MixedCollection");a.addAll(b);a.sort(e.sorters.items);b=a.items}g.set("loaded",true);for(;c<d;c++){g.appendChild(b[c],undefined,true)}return b},onProxyLoad:function(b){var d=this,e=b.wasSuccessful(),a=b.getRecords(),c=b.node;d.loading=false;c.set("loading",false);if(e){a=d.fillNode(c,a)}d.fireEvent("read",d,b.node,a,e);d.fireEvent("load",d,b.node,a,e);Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(c,d,l){if(l){var e=0,a=c.length,k=d.records,h,g,b,j;for(;e<a;++e){g=c[e];b=k[e];if(b){h=b.parentNode;if(h){b.isReplace=true;h.replaceChild(g,b);delete b.isReplace}g.phantom=false}}}},onUpdateRecords:function(c,d,l){if(l){var k=this,g=0,a=c.length,e=k.data,b,j,h;for(;g<a;++g){h=c[g];b=k.tree.getNodeById(h.getId());j=b.parentNode;if(j){b.isReplace=true;j.replaceChild(h,b);b.isReplace=false}}}},onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},removeAll:function(){this.getRootNode().destroy(true);this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b)}b.fireEvent("sort",b)}});Ext.define("Ext.data.UuidGenerator",function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:"Ext.data.IdGenerator",alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}());Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alternateClassName:"Ext.data.XmlStore",alias:"store.xml",constructor:function(a){a=a||{};a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"xml",writer:"xml"}});this.callParent([a])}});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c<e.length;c++){d=e[c];if(d.value){b=Ext.urlAppend(b,d.property+"="+d.value)}}}a=h.records;if(Ext.isArray(a)&&a.length>0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent()},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].data)}return d}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),b,h,g;e.setStarted();for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=this.getNextId()}else{b=h.getId()}this.setRecord(h,b);a.push(b)}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},read:function(e,j,k){var d=[],a=this.getIds(),c=a.length,g,b,h;if(e.id){h=this.getRecord(e.id);if(h){d.push(h);e.setSuccessful()}}else{for(g=0;g<c;g++){d.push(this.getRecord(a[g]))}e.setSuccessful()}e.setCompleted();e.resultSet=Ext.create("Ext.data.ResultSet",{records:d,total:d.length,loaded:true});if(typeof j=="function"){j.call(k||this,e)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(b,j,e){var a=b.records,g=a.length,d=this.getIds(),h=[].concat(d),c;for(c=0;c<g;c++){Ext.Array.remove(h,a[c].getId());this.removeRecord(a[c],false)}this.setIds(h);b.setCompleted();b.setSuccessful();if(typeof j=="function"){j.call(e||this,b)}},getRecord:function(c){if(this.cache[c]===undefined){var a=Ext.decode(this.getStorageObject().getItem(this.getRecordKey(c))),g={},e=this.model,k=e.prototype.fields.items,d=k.length,h,l,b,j;for(h=0;h<d;h++){l=k[h];b=l.name;if(typeof l.decode=="function"){g[b]=l.decode(a[b])}else{g[b]=a[b]}}j=new e(g,c);j.phantom=false;this.cache[c]=j}return this.cache[c]},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,p;for(;g<d;g++){n=l[g];b=n.name;if(typeof n.encode=="function"){h[b]=n.encode(a[b],k)}else{h[b]=a[b]}}e=m.getStorageObject();p=m.getRecordKey(c);m.cache[c]=k;e.removeItem(p);e.setItem(p,Ext.encode(h))},removeRecord:function(d,c){var b=this,a;if(d.isModel){d=d.getId()}if(c!==false){a=b.getIds();Ext.Array.remove(a,d);b.setIds(a)}b.getStorageObject().removeItem(b.getRecordKey(d))},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getIds:function(){var b=(this.getStorageObject().getItem(this.id)||"").split(","),c=b.length,a;if(c==1&&b[0]===""){b=[]}else{for(a=0;a<c;a++){b[a]=parseInt(b[a],10)}}return b},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this.getStorageObject(),a=this.getRecordCounterKey(),c=d.getItem(a),b,e;if(c===null){b=this.getIds();c=b[b.length-1]||0}e=parseInt(c,10)+1;d.setItem(a,e);return e},initialize:function(){var a=this.getStorageObject();a.setItem(this.id,a.getItem(this.id)||"")},clear:function(){var d=this.getStorageObject(),c=this.getIds(),a=c.length,b;for(b=0;b<a;b++){this.removeRecord(c[b])}d.removeItem(this.getRecordCounterKey());d.removeItem(this.id)},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},read:function(c,g,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(g,d||e,[c])},clear:Ext.emptyFn});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&i){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}},function(){Ext.apply(this.prototype,{actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}})});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",buildExtractors:function(){this.callParent(arguments);var a=this.model.prototype.fields.items,b=0,c=a.length,e=[],d;for(;b<c;b++){d=a[b].mapping;e.push(function(g){return function(h){return h[g]}}(d!==null?d:b))}this.extractorFunctions=e}});Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var b=a.responseXML;return b},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],status:true,constructor:function(a){Ext.apply(this,a)},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",getTransaction:function(){return this.transaction||Ext.direct.Manager.getTransaction(this.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",status:false});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=null,d=[],g,c=0,a;try{h=this.parseResponse(b)}catch(j){g=Ext.create("Ext.direct.ExceptionEvent",{data:j,xhr:b,code:Ext.direct.Manager.self.exceptions.PARSE,message:"Error parsing json response: \n\n "+h});return[g]}if(Ext.isArray(h)){for(a=h.length;c<a;++c){d.push(this.createEvent(h[c]))}}else{d.push(this.createEvent(h))}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],interval:3000,constructor:function(a){this.callParent(arguments);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}}},interval:b.interval,scope:b});b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,h,b){var g=this,d=0,a,c;if(h){c=g.createEvents(b);for(a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{g.fireEvent("data",g,Ext.create("Ext.direct.ExceptionEvent",{data:null,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(b){var c=this,d=Ext.isDefined(b.params)?b.params:b.len,a;c.name=b.name;c.formHandler=b.formHandler;if(Ext.isNumber(d)){c.len=d;c.ordered=true}else{c.params=[];Ext.each(d,function(e){a=Ext.isObject(e)?e.name:e;c.params.push(a)})}},getCallData:function(c){var e=this,g=null,a=e.len,h=e.params,i,d,b;if(e.ordered){i=c[a];d=c[a+1];if(a!==0){g=c.slice(0,a)}}else{g=Ext.apply({},c[0]);i=c[1];d=c[2];for(b in g){if(g.hasOwnProperty(b)){if(!Ext.Array.contains(h,b)){delete g[b]}}}}return{data:g,callback:i,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||window;b.transactions=Ext.create("Ext.util.MixedCollection");b.callBuffer=[]},initAPI:function(){var h=this.actions,e=this.namespace,g,b,c,d,a,j;for(g in h){b=e[g];if(!b){b=e[g]={}}c=h[g];for(d=0,a=c.length;d<a;++d){j=Ext.create("Ext.direct.RemotingMethod",c[d]);b[j.name]=this.createHandler(g,j)}}},createHandler:function(c,d){var b=this,a;if(!d.formHandler){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(g,h,e){b.configureFormRequest(c,d,g,h,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{if(!a.url){}}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(d,b){var c=b.status?"success":"failure",e,a;if(d&&d.callback){e=d.callback;a=Ext.isDefined(b.result)?b.result:b.data;if(Ext.isFunction(e)){e(a,b)}else{Ext.callback(e[c],e.scope,[a,b]);Ext.callback(e.callback,e.scope,[a,b])}}},onData:function(l,j,c){var g=this,d=0,e,k,a,b,h;if(j){k=g.createEvents(c);for(e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=Ext.create("Ext.direct.ExceptionEvent",{data:null,transaction:b,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(d,a,g){var h=this,c=a.getCallData(g),e=c.data,i=c.callback,j=c.scope,b;b=Ext.create("Ext.direct.Transaction",{provider:h,args:g,action:d,method:a.name,data:e,callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i});if(h.fireEvent("beforecall",h,b,a)!==false){Ext.direct.Manager.addTransaction(b);h.queueTransaction(b);h.fireEvent("call",h,b,a)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout},b,d=g.enableUrlEncode,c=0,a,j;if(Ext.isArray(h)){b=[];for(a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=Ext.create("Ext.util.DelayedTask",b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var b=this.callBuffer,a=b.length;if(a>0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=Ext.create("Ext.direct.Transaction",{provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(t,q,m,k,i,h){var n=this,g=[[],[],[]],s=[[t,m,i],[q,k,h],[0,0,1]],r,p,l,j;for(r=0;r<3;r++){for(p=0;p<3;p++){j=0;for(l=0;l<3;l++){j+=n.matrix[r][l]*s[l][p]}g[r][p]=j}}n.matrix=g},prepend:function(t,q,m,k,i,h){var n=this,g=[[],[],[]],s=[[t,m,i],[q,k,h],[0,0,1]],r,p,l,j;for(r=0;r<3;r++){for(p=0;p<3;p++){j=0;for(l=0;l<3;l++){j+=s[r][l]*n.matrix[l][p]}g[r][p]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b,h);e.add(1,0,0,1,-b,-h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(){var a=this;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',FilterType=bilinear,M11="+a.get(0,0)+", M12="+a.get(0,1)+", M21="+a.get(1,0)+", M22="+a.get(1,1)+", Dx="+a.get(0,2)+", Dy="+a.get(1,2)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][0],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,p,n,u,a,k,h,s,q;q=j.sprite;s=q.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+s.width;p=m[1];n=p+s.height;return Ext.create("Ext.util.Region",p,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=a||{};b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=Ext.create("Ext.draw.SpriteDD",a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(k,n){var t=this,j=t.fontProperties,r=j.length,g=t.pathProperties,e=g.length,s=!!t.surface,a=s&&t.surface.customAttributes||{},b=t.attr,l,p,h,c,q,m,u,d;k=Ext.apply({},k);for(l in a){if(k.hasOwnProperty(l)&&typeof a[l]=="function"){Ext.apply(k,a[l].apply(t,[].concat(k[l])))}}if(!!k.hidden!==!!b.hidden){t.dirtyHidden=true}for(p=0;p<e;p++){l=g[p];if(l in k&&k[l]!==b[l]){t.dirtyPath=true;break}}if("zIndex" in k){t.zIndexDirty=true}for(p=0;p<r;p++){l=j[p];if(l in k&&k[l]!==b[l]){t.dirtyFont=true;break}}h=k.translate;c=b.translation;if(h){if((h.x&&h.x!==c.x)||(h.y&&h.y!==c.y)){Ext.apply(c,h);t.dirtyTransform=true}delete k.translate}q=k.rotate;m=b.rotation;if(q){if((q.x&&q.x!==m.x)||(q.y&&q.y!==m.y)||(q.degrees&&q.degrees!==m.degrees)){Ext.apply(m,q);t.dirtyTransform=true}delete k.rotate}u=k.scale;d=b.scaling;if(u){if((u.x&&u.x!==d.x)||(u.y&&u.y!==d.y)||(u.cx&&u.cx!==d.cx)||(u.cy&&u.cy!==d.cy)){Ext.apply(d,u);t.dirtyTransform=true}delete k.scale}Ext.apply(b,k);t.dirty=true;if(n===true&&s){t.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=Ext.create("Ext.draw.Matrix");a.bbox={plain:0,transform:0};a.fireEvent("render",a);return b},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(d){var h=this,a=Ext.create("Ext.draw.Matrix"),g=d.transformations,j=g.length,c=0,b,e;for(;c<j;c++){b=g[c];e=b.type;if(e=="translate"){a.translate(b.x,b.y)}else{if(e=="rotate"){a.rotate(b.degrees,b.x,b.y)}else{if(e=="scale"){a.scale(b.x,b.y,b.centerX,b.centerY)}}}}d.matrix=a;d.el.set({transform:a.toSvg()})},setSize:function(a,c){var d=this,b=d.el;a=+a||d.width;c=+c||d.height;d.width=a;d.height=c;b.setSize(a,c);b.set({width:a,height:c});d.callParent([a,c])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this;if(!g.el){var e=g.width||10,b=g.height||10,d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b}),a=g.getDefs(),h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0}),i;if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(j,k){var a=j.el.dom,b=[],m,h,l,d,e,c,g;if(k.hasOwnProperty("text")){b=this.setText(j,k.text)}if(b.length){m=this.getBBoxText(j).height;for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("dy",d?m*1.2:m/g)}j.dirty=true}},setText:function(l,d){var h=this,a=l.el.dom,k=a.getAttribute("x"),b=[],n,j,m,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){m=c[e];if(m){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(m)));j.setAttribute("x",k);a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);this.applyTransformations(a)}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(s){var m=this,c=s.el,r=s.group,j=s.attr,t=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,q,d,p,b,a,n;if(r){e=[].concat(r);l=e.length;for(h=0;h<l;h++){r=e[h];m.getGroup(r).add(s)}delete s.group}q=m.scrubAttrs(s)||{};s.bbox.plain=0;s.bbox.transform=0;if(s.type=="circle"||s.type=="ellipse"){q.cx=q.cx||q.x;q.cy=q.cy||q.y}else{if(s.type=="rect"){q.rx=q.ry=q.r}else{if(s.type=="path"&&q.d){q.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(q.d))}}}s.dirtyPath=false;if(q["clip-rect"]){m.setClip(s,q);delete q["clip-rect"]}if(s.type=="text"&&q.font&&s.dirtyFont){c.set({style:"font: "+q.font});s.dirtyFont=false}if(s.type=="image"){c.dom.setAttributeNS(m.xlink,"href",q.src)}Ext.applyIf(q,m.minDefaults[s.type]);if(s.dirtyHidden){(j.hidden)?m.hidePrim(s):m.showPrim(s);s.dirtyHidden=false}for(p in q){if(q.hasOwnProperty(p)&&q[p]!=null){if(k&&("color|stroke|fill".indexOf(p)>-1)&&(q[p] in g)){q[p]=g[q[p]]}if(p in t){c.dom.setAttribute(p,t[p](q[p],s,m))}else{c.dom.setAttribute(p,q[p])}}}if(s.type=="text"){m.tuneText(s,q)}b=j.style;if(b){c.setStyle(b)}s.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=Ext.create("Ext.draw.Sprite",a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",orderSpritesByZIndex:false,path2vml:function(u){var n=this,v=n.NonVmlPathRe,b=n.map,e=n.valRe,t=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,q,c,a,k,s,h,l;if(String(u).match(v)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(u).match(n.partialPathRe)){m=String(u).replace(d,function(r,x,j){var w=[],i=x.toLowerCase()=="m",p=b[x];j.replace(e,function(y){if(i&&w[length]==2){p+=w+b[x=="m"?"l":"L"];w=[]}w.push(Math.round(y*t))});return p+w});return m}}q=g(u);m=[];for(k=0,s=q.length;k<s;k++){c=q[k];a=q[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=Ext.create("Ext.draw.Matrix");h.bbox={plain:null,transform:null};h.fireEvent("render",h);return h.el},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(n){var u=this,d=n.vml,k=n.group,b=n.attr,c=n.el,q=c.dom,r,w,t,p,l,s,m,v,a;if(k){t=[].concat(k);l=t.length;for(p=0;p<l;p++){k=t[p];u.getGroup(k).add(n)}delete n.group}s=u.scrubAttrs(n)||{};if(n.zIndexDirty){u.setZIndex(n)}Ext.applyIf(s,u.minDefaults[n.type]);if(q.href){q.href=s.href}if(q.title){q.title=s.title}if(q.target){q.target=s.target}if(q.cursor){q.cursor=s.cursor}if(n.dirtyHidden){(s.hidden)?u.hidePrim(n):u.showPrim(n);n.dirtyHidden=false}if(n.dirtyPath){if(n.type=="circle"||n.type=="ellipse"){var g=s.x,e=s.y,j=s.rx||s.r||0,h=s.ry||s.r||0;q.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((g-j)*u.zoom),Math.round((e-h)*u.zoom),Math.round((g+j)*u.zoom),Math.round((e+h)*u.zoom),Math.round(g*u.zoom));n.dirtyPath=false}else{if(n.type!=="text"){n.attr.path=s.path=u.setPaths(n,s)||s.path;q.path=u.path2vml(s.path);n.dirtyPath=false}}}if("clip-rect" in s){u.setClip(n,s)}if(n.type=="text"){u.setTextAttributes(n,s)}if(n.type=="image"||s.opacity||s["fill-opacity"]||s.fill){u.setFill(n,s)}if(s.stroke||s["stroke-opacity"]||s.fill){u.setStroke(n,s)}r=b.style;if(r){c.setStyle(r)}n.dirty=false},setZIndex:function(a){if(a.el){if(a.attr.zIndex!=undefined){a.el.setStyle("zIndex",a.attr.zIndex)}a.zIndexDirty=false}},setPaths:function(b,c){var a=b.attr;b.bbox.plain=null;b.bbox.transform=null;if(b.type=="circle"){a.rx=a.ry=c.r;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="ellipse"){a.rx=c.rx;a.ry=c.ry;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="rect"||b.type=="image"){a.rx=a.ry=c.r;return Ext.draw.Draw.rectPath(b)}else{if(b.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,d){var h=this,b=k.el,e=b.dom,j=e.getElementsByTagName("fill")[0],g,i,a,l,c;if(j){e.removeChild(j)}else{j=h.createNode("fill")}if(Ext.isArray(d.fill)){d.fill=d.fill[0]}if(k.type=="image"){j.on=true;j.src=d.src;j.type="tile";j.rotate=true}else{if(d.fill=="none"){j.on=false}else{if(typeof d.opacity=="number"){j.opacity=d.opacity}if(typeof d["fill-opacity"]=="number"){j.opacity=d["fill-opacity"]}j.on=true;if(typeof d.fill=="string"){a=d.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=d.rotation;c=-(i.angle+270+(l?l.degrees:0))%360;if(c===0){c=180}j.angle=c;j.type="gradient";j.method="sigma";j.colors=i.colors}else{j.src=a;j.type="tile";j.rotate=true}}else{j.color=Ext.draw.Color.toHex(d.fill)||d.fill;j.src="";j.type="solid"}}}}e.appendChild(j)},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}c.applyViewBox();c.callParent(arguments)}},setViewBox:function(b,d,c,a){this.callParent(arguments);this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()},applyViewBox:function(){var d=this,l=d.viewBox,a=d.width,h=d.height,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;if(j*i<a){g-=(a-j*i)/2/i}if(b*c<h){e-=(h-b*c)/2/c}k=1/Math.max(j/a,b/h);d.viewBoxShift={dx:-g,dy:-e,scale:k};d.items.each(function(m){d.transform(m)})}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},createNode:(function(){try{var b=Ext.getDoc().dom;if(!b.namespaces.rvml){b.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}return function(c){return b.createElement("<rvml:"+c+' class="rvml">')}}catch(a){return function(c){return b.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}})(),render:function(a){var c=this,d=Ext.getDoc().dom;if(!c.el){var b=d.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=d.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=Ext.create("Ext.draw.Matrix");b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},extractTransform:function(k){var h=this,j=Ext.create("Ext.draw.Matrix"),e,c,a,d,g=0,b=h.viewBoxShift;for(c=k.transformations,a=c.length;g<a;g++){d=c[g];switch(d.type){case"translate":j.translate(d.x,d.y);break;case"rotate":j.rotate(d.degrees,d.x,d.y);break;case"scale":j.scale(d.x||d.scale,d.y||d.scale,d.centerX,d.centerY);break}}if(b){j.add(1,0,0,1,b.dx,b.dy);j.prepend(b.scale,0,0,b.scale,0,0)}return k.matrix=j},setSimpleCoords:function(n,l,k,r,q,e){var j=this,m=n.matrix,d=n.el.dom,a=d.style,c=1,g="",p=d.getElementsByTagName("fill")[0],i=j.zoom/l,h=j.zoom/k,b;if(!l||!k){return}d.coordsize=Math.abs(i)+" "+Math.abs(h);a.rotation=e*(l*k<0?-1:1);if(e){b=j.rotationCompensation(e,r,q);r=b.x;q=b.y}if(l<0){g+="x"}if(k<0){g+=" y";c=-1}a.flip=g;d.coordorigin=(r*-i)+" "+(q*-h);if(p){d.removeChild(p);b=j.rotationCompensation(e,m.x(n.x,n.y),m.y(n.x,n.y));p.position=b.x*c+" "+b.y*c;p.size=n.width*Math.abs(l)+" "+n.height*Math.abs(k);d.appendChild(p)}},transform:function(m){var j=this,b=m.el,r=m.skew,e=b.dom,g=e.style,l=j.extractTransform(m).clone(),k,q=j.zoom,p=e.getElementsByTagName("fill")[0],a=!String(m.fill).indexOf("url("),d,i;if(m.type!="image"&&r&&!a){r.matrix=l.toString();d=l.offset();if(d[0]>32767){d[0]=32767}else{if(d[0]<-32768){d[0]=-32768}}if(d[1]>32767){d[1]=32767}else{if(d[1]<-32768){d[1]=-32768}}r.offset=d}else{if(r){r.matrix="1 0 0 1";r.offset="0 0"}k=l.split();if(k.isSimple){g.filter="";j.setSimpleCoords(m,k.scaleX,k.scaleY,k.translateX,k.translateY,k.rotate/Math.PI*180)}else{g.filter=l.toFilter();var h=j.getBBox(m),s=h.x-m.x,n=h.y-m.y;e.coordorigin=(s*-q)+" "+(n*-q);if(p){e.removeChild(p);p.position=s+" "+n;p.size=m.width*m.scale.x+" "+m.height*1.1;e.appendChild(p)}}}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(d){var a=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),b=[],c=Ext.create("Ext.util.MixedCollection");c.addAll(d.stops);c.sortByKey("ASC",function(g,e){g=parseInt(g,10);e=parseInt(e,10);return g>e?1:(g<e?-1:0)});c.eachKey(function(g,e){b.push(g+"% "+e.color)});a.add(d.id,{colors:b.join(","),angle:d.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.layout.container.AbstractFit",{extend:"Ext.layout.container.Container",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit"});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.AbstractFit",alias:"layout.fit",alternateClassName:"Ext.layout.FitLayout",requires:["Ext.layout.container.Box"],defaultMargins:{top:0,right:0,bottom:0,left:0},onLayout:function(){var c=this,a,b,d;c.callParent();if(c.owner.items.length){b=c.owner.items.get(0);d=b.margins||c.defaultMargins;a=c.getLayoutTargetSize();a.width-=d.width;a.height-=d.height;c.setItemBox(b,a);if(d.left||d.top){b.setPosition(d.left,d.top)}}},getTargetBox:function(){return this.getLayoutTargetSize()},setItemBox:function(c,b){var a=this;if(c&&b.height>0){if(!a.owner.isFixedWidth()){b.width=undefined}if(!a.owner.isFixedHeight()){b.height=undefined}a.setItemSize(c,b.width,b.height)}},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}},function(){this.prototype.renderItem=Ext.layout.container.Box.prototype.renderItem});Ext.define("Ext.layout.container.AbstractCard",{extend:"Ext.layout.container.Fit",type:"card",sizeAllCards:false,hideInactive:true,deferredRender:false,beforeLayout:function(){var a=this;a.getActiveItem();if(a.activeItem&&a.deferredRender){a.renderItems([a.activeItem],a.getRenderTarget());return true}else{return this.callParent(arguments)}},renderChildren:function(){if(!this.deferredRender){this.getActiveItem();this.callParent()}},onLayout:function(){var g=this,h=g.activeItem,b=g.getVisibleItems(),e=b.length,a=g.getTargetBox(),c,d;for(c=0;c<e;c++){d=b[c];g.setItemBox(d,a)}if(!g.firstActivated&&h){if(h.fireEvent("beforeactivate",h)!==false){h.fireEvent("activate",h)}g.firstActivated=true}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var a=this;if(!a.activeItem&&a.owner){a.activeItem=a.parseActiveItem(a.owner.activeItem)}if(a.activeItem&&a.owner.items.indexOf(a.activeItem)!=-1){return a.activeItem}return null},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},configureItem:function(b,a){this.callParent([b,a]);if(this.hideInactive&&this.activeItem!==b){b.hide()}else{b.show()}},onRemove:function(a){if(a===this.activeItem){this.activeItem=null;if(this.owner.items.getCount()===0){this.firstActivated=false}}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0];var a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0];var a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=Ext.create("Ext.util.MixedCollection");b.callParent(arguments)},bind:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("add",c.onStoreAdd,c);c.store.un("clear",c.onStoreClear,c);c.store.un("remove",c.onStoreRemove,c);c.store.un("update",c.onStoreUpdate,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({add:c.onStoreAdd,clear:c.onStoreClear,remove:c.onStoreRemove,update:c.onStoreUpdate,scope:c})}c.store=a;if(a&&!b){c.refresh()}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case"MULTI":if(d.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!d.shiftKey&&!d.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}h.setLastFocused(e,k);h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked){return false}if(typeof a==="number"){a=[j.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected==e){j.lastSelected=b.last()}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;d.onLastFocusChanged(a,c,b)},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var h=this,b=[],g=h.getSelection(),a=g.length,e,j,d=0,c=this.getLastFocused();for(;d<a;d++){e=g[d];if(!this.pruneRemoved||h.store.indexOf(e)!==-1){b.push(e)}}if(h.selected.getCount()!=b.length){j=true}h.clearSelections();if(h.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){h.doSelect(b,false,true)}h.maybeFireSelectionChange(j)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bind(a.getStore());a.on(a.triggerEvent,b.onItemClick,b);a.on(a.triggerCtEvent,b.onContainerClick,b);a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create("Ext.util.KeyNav",a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.state.CookieProvider",{extend:"Ext.state.Provider",constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:"Ext.state.Provider",alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();a.state=a.readLocalStorage()},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){try{var a="localStorage" in window&&window.localStorage!==null;if(a){return window.localStorage}}catch(b){return false}}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",useMsg:true,disabled:false,baseCls:Ext.baseCSSPrefix+"mask-msg",renderTpl:'<div style="position:relative" class="{msgCls}"></div>',modal:true,floating:{shadow:"frame"},focusOnToFront:false,constructor:function(b,a){var c=this;if(b.isComponent){c.ownerCt=b;c.bindComponent(b)}else{c.ownerCt=new Ext.Component({el:Ext.get(b),rendered:true,componentLayoutCounter:1});c.container=b}c.callParent([a]);if(c.store){c.bindStore(c.store,true)}c.renderData={msgCls:c.msgCls};c.renderSelectors={msgEl:"div"}},bindComponent:function(a){this.mon(a,{resize:this.onComponentResize,scope:this})},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onComponentResize:function(){var a=this;if(a.rendered&&a.isVisible()){a.toFront();a.center()}},bindStore:function(a,b){var c=this;if(!b&&c.store){c.mun(c.store,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad});if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad})}c.store=a;if(a&&a.isLoading()){c.onBeforeLoad()}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},onBeforeLoad:function(){var c=this,a=c.ownerCt||c.floatParent,b;if(!this.disabled){if(a.componentLayoutCounter){Ext.Component.prototype.show.call(c)}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);if(c.loading){Ext.Component.prototype.show.call(c)}}}}},onHide:function(){var a=this;a.callParent(arguments);a.showOnParentShow=true},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},afterShow:function(){this.callParent(arguments);this.center()},onLoad:function(){this.loading=false;Ext.Component.prototype.hide.call(this)}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",alternateClassName:"Ext.view.AbstractView",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=Ext.create("Ext.XTemplate",d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=Ext.create("Ext.XTemplate",c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.all=new Ext.CompositeElementLite()},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=Ext.create("Ext.LoadMask",c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onMaskBeforeShow:function(){var a=this.loadingHeight;this.getSelectionModel().deselectAll();if(a){this.setCalculatedSize(undefined,a)}},onMaskHide:function(){var a=this;if(!a.destroying&&a.loadingHeight){a.setHeight(a.height)}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=Ext.create("Ext.selection.DataViewModel",a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,b,a;if(!c.rendered||c.isDestroyed){return}c.fireEvent("beforerefresh",c);b=c.getTargetEl();a=c.store.getRange();b.update("");if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){b.update(c.emptyText)}c.all.clear()}else{c.tpl.overwrite(b,c.collectData(a,0));c.all.fill(Ext.query(c.getItemSelector(),b.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}},prepareData:function(c,b,a){if(a){Ext.apply(c,a.getAssociatedData())}return c},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[e.length]=this.prepareData(b[b.persistenceProperty],g+d,b)}return e},bufferRender:function(a,b){var c=document.createElement("div");this.tpl.overwrite(c,this.collectData(a,b));return Ext.query(this.getItemSelector(),c)},onUpdate:function(e,a){var d=this,b=d.store.indexOf(a),c;if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();d.fireEvent("itemupdate",a,b,c)}}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent("itemadd",b,c,a)},doAdd:function(b,a,c){var d=this.all;if(c<d.getCount()){d.item(c).insertSibling(b,"before",true)}else{d.last().insertSibling(b,"after",true)}Ext.Array.insert(d.elements,c,b)},onRemove:function(d,a,b){var c=this;c.doRemove(a,b);c.updateIndexes(b);if(c.store.getCount()===0){c.refresh()}c.fireEvent("itemremove",a,b)},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var d=this,c;if(!b&&d.store){if(a!==d.store&&d.store.autoDestroy){d.store.destroyStore()}else{d.mun(d.store,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh})}if(!a){if(d.loadMask&&d.loadMask.bindStore){d.loadMask.bindStore(null)}d.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);d.mon(a,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh});if(d.loadMask&&d.loadMask.bindStore){if(Ext.Array.contains(a.alias,"store.node")){c=this.ownerCt.store}else{c=a}d.loadMask.bindStore(c)}}d.viewReady=false;d.store=a;d.getSelectionModel().bind(a);if(a){if(b&&d.deferInitialRefresh){Ext.Function.defer(function(){if(!d.isDestroyed){d.refresh(true)}},1)}else{d.refresh(true)}}},onDataChanged:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if(!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a instanceof Ext.data.Model){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,c){var b=this.items,d=0,a=b.length;for(;d<a;d++){b[d][e].apply(b[d],c)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.layout.component.Editor",{alias:["layout.editor"],extend:"Ext.layout.component.Component",onLayout:function(d,c){var e=this,b=e.owner,a=b.autoSize;if(a===true){a={width:"field",height:"field"}}if(a){d=e.getDimension(b,a.width,"Width",d);c=e.getDimension(b,a.height,"Height",c)}e.setTargetSize(d,c);b.field.setSize(d,c)},getDimension:function(a,b,c,e){var d="get"+c;switch(b){case"boundEl":return a.boundEl[d]();case"field":return a.field[d]();default:return e}}});Ext.define("Ext.Editor",{extend:"Ext.Component",alias:"widget.editor",requires:["Ext.layout.component.Editor"],componentLayout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onAutoSize,a,{delay:1})}a.floating={constrain:a.constrain};a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onAutoSize:function(){this.doComponentLayout()},onRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);e.render(c.el);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}},10)}this.fireEvent("specialkey",this,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:b.boundEl.dom.innerHTML;if(!b.rendered){b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.reset();d.setValue(c);b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.doComponentLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,d;if(c.editing){d=c.getValue();c.setValue(b);c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){var a=this;if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}b.blur();if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],src:"",getElConfig:function(){return{tag:"img",src:this.src}},initRenderTpl:Ext.emptyFn,setSrc:function(c){var b=this,a=b.el;b.src=c;if(a){a.dom.src=c}}});Ext.define("Ext.Layer",{uses:["Ext.Shadow"],statics:{shims:[]},extend:"Ext.Element",constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}c.position("absolute");if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=Ext.create("Ext.Shadow",{offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a;if(!j.updating&&j.isVisible()&&(n||j.useShim)){var d=j.getShim(),c=j.getLeft(true),p=j.getTop(true),m=j.dom.offsetWidth,g=j.dom.offsetHeight,k;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,p,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,p)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,p)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},setOpacity:function(a){if(this.shadow){this.shadow.setOpacity(a)}return this.callParent(arguments)}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Component",type:"progressbar",onLayout:function(d,b){var e=this,a=e.owner,c=a.textEl;e.setElementSize(a.el,d,b);c.setWidth(a.el.getWidth(true));e.callParent([d,b]);a.updateProgress(a.value)}});Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",config:{animate:false,text:""},waitTimer:null,renderTpl:['<div class="{baseCls}-text {baseCls}-text-back">',"<div>&#160;</div>","</div>",'<div id="{id}-bar" class="{baseCls}-bar">','<div class="{baseCls}-text">',"<div>&#160;</div>","</div>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addChildEls("bar");this.addEvents("update")},afterRender:function(){var a=this;a.textEl=a.textEl?Ext.get(a.textEl):a.el.select("."+a.baseCls+"-text");a.callParent(arguments);if(a.value){a.updateProgress(a.value,a.text)}else{a.updateText(a.text)}},updateProgress:function(d,e,a){var c=this,b;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(c.isVisible(true)){b=Math.floor(c.value*c.el.getWidth(true));if(Ext.isForcedBorderBox){b+=c.bar.getBorderWidth("lr")}if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({to:{width:b+"px"}},c.animate))}else{c.bar.setWidth(b)}}else{c.doComponentLayout()}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},wait:function(b){var a=this;if(!a.waitTimer){scope=a;b=b||{};a.updateText(b.text);a.waitTimer=Ext.TaskManager.start({run:function(c){var d=b.increment||10;c-=1;a.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||a)}a.reset()},scope:scope})}return a},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:function(){if(Ext.supports.CSS3BoxShadow){return'<div class="'+Ext.baseCSSPrefix+'css-shadow" role="presentation"></div>'}else{if(Ext.isIE){return'<div class="'+Ext.baseCSSPrefix+'ie-shadow" role="presentation"></div>'}else{return'<div class="'+Ext.baseCSSPrefix+'frame-shadow" role="presentation"><div class="xst" role="presentation"><div class="xstl" role="presentation"></div><div class="xstc" role="presentation"></div><div class="xstr" role="presentation"></div></div><div class="xsc" role="presentation"><div class="xsml" role="presentation"></div><div class="xsmc" role="presentation"></div><div class="xsmr" role="presentation"></div></div><div class="xsb" role="presentation"><div class="xsbl" role="presentation"></div><div class="xsbc" role="presentation"></div><div class="xsbr" role="presentation"></div></div></div>'}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d={h:0},e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d.w=d.h=-e;d.l=d.t=e}else{d.w=0;d.l=d.t=e;d.t-=1;if(Ext.isIE){d.l-=e+a;d.t-=e+a;d.w-=a;d.h-=a;d.t+=1}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d.h-=e;d.t=e;d.l=d.w=0}else{d.w=(e*2);d.l=-e;d.t=e-1;if(Ext.isIE){d.l-=(e-a);d.t-=e+a;d.l+=1;d.w-=(e-a)*2;d.w-=a+1;d.h-=1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d.l=d.w=d.t=0}else{d.w=d.h=(e*2);d.l=d.t=-e;d.t+=1;d.h-=2;if(Ext.isIE){d.l-=(e-a);d.t-=(e-a);d.l+=1;d.w-=(e+a+1);d.h-=(e+a);d.h+=1}break}}c.adjusts=d},offset:4,defaultMode:"drop",show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,q,m,h){if(!this.el){return}var a=this.adjusts,j=this.el.dom,k=j.style,c,g,n,e,i,p;k.left=(b+a.l)+"px";k.top=(q+a.t)+"px";c=Math.max(m+a.w,0);g=Math.max(h+a.h,0);i=c+"px";p=g+"px";if(k.width!=i||k.height!=p){k.width=i;k.height=p;if(Ext.supports.CSS3BoxShadow){k.boxShadow="0 0 "+this.offset+"px 0 #888"}else{if(!Ext.isIE){n=j.childNodes;e=Math.max(0,(c-12))+"px";n[0].childNodes[1].style.width=e;n[1].childNodes[1].style.width=e;n[2].childNodes[1].style.width=e;n[1].style.height=Math.max(0,(g-12))+"px"}}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:"Ext.button.Button",alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler()}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:"Ext.button.Split",alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var c=this,b=0,a;c.addEvents("change");if(c.changeHandler){c.on("change",c.changeHandler,c.scope||c);delete c.changeHandler}a=(c.menu.items||[]).concat(c.items||[]);c.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},c.menu);Ext.each(a,function(e,d){e=Ext.applyIf({group:c.id,itemIndex:d,checkHandler:c.checkHandler,scope:c,checked:e.checked||false},e);c.menu.items.push(e);if(e.checked){b=d}});c.itemCount=c.menu.items.length;c.callParent(arguments);c.on("click",c.toggleSelected,c);c.setActiveItem(b,c);if(c.width&&c.showText){c.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.container.ButtonGroup",{extend:"Ext.panel.Panel",alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){var a=this,b=a.columns;a.noTitleCls=a.baseCls+"-notitle";if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addCls(a.noTitleCls)}a.callParent(arguments)},afterLayout:function(){var b=this;b.callParent(arguments);if(b.layout.table&&(Ext.isIEQuirks||Ext.isIE6)&&!b.width){var a=b.getTargetEl();a.setWidth(b.layout.table.offsetWidth+a.getPadding("lr"))}if(Ext.isIE7){b.el.repaint()}},afterRender:function(){var a=this;if(a.header){delete a.header.items.items[0].flex;a.suspendLayout=true;a.header.insert(1,{xtype:"component",ui:a.ui,flex:1});a.header.insert(0,{xtype:"component",ui:a.ui,flex:1});a.suspendLayout=false}a.callParent(arguments)},onBeforeAdd:function(a){if(a.is("button")){a.ui=a.ui+"-toolbar"}this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b}});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",initComponent:function(){var c=this,a=Ext.fly(document.body.parentNode),b;c.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){a.setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;Ext.EventManager.onWindowResize(c.fireResize,c);c.renderTo=c.el;c.width=Ext.Element.getViewportWidth();c.height=Ext.Element.getViewportHeight()},fireResize:function(a,b){this.setSize(a,b)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=Ext.create("Ext.util.Region",0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,b)===false||this.fireEvent("beforedragstart",this,b)===false||this.onBeforeStart(b)===false){return}this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))>this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els;for(var b in g){var d=g[b],a=d._region;var j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false);var e=this.elements[g];if(e){delete this.elements[g];if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.flash.Component",{extend:"Ext.Component",alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},onRender:function(){var c=this,e,d,b,a=c.getSwfId();c.renderData.swfId=a;c.callParent(arguments);e=Ext.apply({allowScriptAccess:"always",bgcolor:c.backgroundColor,wmode:c.wmode},c.flashParams);d=Ext.apply({allowedDomain:document.location.hostname},c.flashVars);new swfobject.embedSWF(c.url,a,c.swfWidth,c.swfHeight,c.flashVersion,c.expressInstall?c.statics.EXPRESS_INSTALL_URL:b,d,e,c.flashAttributes,Ext.bind(c.swfCallback,c))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var c=[],d,e,b=this.form,h=this.getParams(),a=[];b.getFields().each(function(i){if(i.isFileUpload()){a.push(i)}});function g(i,j){c.push({tag:"input",type:"hidden",name:i,value:Ext.String.htmlEncode(j)})}Ext.iterate(h,function(i,j){if(Ext.isArray(j)){Ext.each(j,function(k){g(i,k)})}else{g(i,j)}});d={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:c};if(a.length){d.encoding=d.enctype="multipart/form-data"}e=Ext.DomHelper.append(Ext.getBody(),d);Ext.Array.each(a,function(i){if(i.rendered){e.appendChild(i.extractFileInput())}});return e},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.getPosition();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}},calculateConstrainRegion:function(){var d=this,a=d.comp,h=d.initialConstrainTo,e,g,b=a.el.shadow?a.el.shadow.offset:0;if(!(h instanceof Ext.util.Region)){h=Ext.fly(h).getViewRegion()}if(b){h.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();g=d.proxy?d.proxy.el.getRegion():a.el.getRegion();h.adjust(e.top-g.top,e.right-g.right,e.bottom-g.bottom,e.left-g.left)}return h},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(a){if(this.proxy&&!this.comp.liveDrag){this.comp.unghost()}}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],labelableRenderTpl:['<tpl if="!hideLabel && !(!fieldLabel && hideEmptyLabel)">','<label id="{id}-labelEl"<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>','<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"</label>","</tpl>",'<div class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation">{subTplMarkup}</div>','<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none"></div>','<div class="{clearCls}" role="presentation"><!-- --></div>',{compiled:true,disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",initLabelable:function(){this.addCls(this.formItemCls);this.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},getLabelableRenderData:function(){var e=this,b=e.labelAlign,g=e.labelCls,d=e.labelClsExtra,c=e.labelPad,a;if(b==="top"){a="margin-bottom:"+c+"px;"}else{a="margin-right:"+c+"px;";if(Ext.isBorderBox){a+="width:"+e.labelWidth+"px;"}}return Ext.copyTo({inputId:e.getInputId(),fieldLabel:e.getFieldLabel(),labelCls:d?g+" "+d:g,labelStyle:a+(e.labelStyle||""),subTplMarkup:e.getSubTplMarkup()},e,"hideLabel,hideEmptyLabel,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator",true)},onLabelableRender:function(){this.addChildEls("labelEl","bodyEl","errorEl")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.activeError=a;this.activeErrors=[a];this.renderActiveError()},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);c.errorEl.dom.innerHTML=b}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})},getBodyNaturalWidth:function(){return this.bodyEl.getWidth()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.Field",{alias:["layout.field"],extend:"Ext.layout.component.Component",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics"],type:"field",beforeLayout:function(b,a){var c=this;return c.callParent(arguments)||(!c.owner.preventMark&&c.activeError!==c.owner.getActiveError())},onLayout:function(a,m){var g=this,b=g.owner,e=g.getLabelStrategy(),l=g.getErrorStrategy(),j=Ext.isDefined,n=Ext.isNumber,i,h,k,c,d;i=g.lastComponentSize||{};if(!j(a)){a=i.width;if(a<0){a=d}}if(!j(m)){m=i.height;if(m<0){m=d}}h=!n(a);k=!n(m);c={autoWidth:h,autoHeight:k,width:h?b.getBodyNaturalWidth():a,height:m,setOuterWidth:false,insets:{top:0,right:0,bottom:0,left:0}};e.prepare(b,c);l.prepare(b,c);e.adjustHorizInsets(b,c);l.adjustHorizInsets(b,c);e.layoutHoriz(b,c);l.layoutHoriz(b,c);e.adjustVertInsets(b,c);l.adjustVertInsets(b,c);e.layoutVert(b,c);l.layoutVert(b,c);if(h&&k){g.setElementSize(b.el,(c.setOuterWidth?c.width:d),c.height)}else{g.setTargetSize((!h||c.setOuterWidth?c.width:d),c.height)}g.sizeBody(c);g.activeError=b.getActiveError()},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},sizeBody:function(i){var h=this,c=h.owner,d=i.insets,b=i.width,e=i.height,g=Ext.isNumber(b)?b-d.left-d.right:b,a=Ext.isNumber(e)?e-d.top-d.bottom:e;h.setElementSize(c.bodyEl,g,a);h.sizeBodyContents(g,a)},sizeBodyContents:Ext.emptyFn,getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var b=Ext.applyIf,a=Ext.emptyFn,c={prepare:function(e,i){var g=e.labelCls+"-"+e.labelAlign,h=e.labelEl;if(h&&!h.hasCls(g)){h.addCls(g)}},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a},d=b({prepare:function(e,g){c.prepare(e,g);if(g.autoWidth){g.width+=(!e.labelEl?0:e.labelWidth+e.labelPad)}g.setOuterWidth=true},adjustHorizInsets:function(e,g){if(e.labelEl){g.insets.left+=e.labelWidth+e.labelPad}},layoutHoriz:function(e,h){var g=e.labelEl;if(g&&!e.isLabelSized&&!Ext.isBorderBox){g.setWidth(e.labelWidth);e.isLabelSized=true}}},c);return{base:c,top:b({adjustVertInsets:function(e,h){var g=e.labelEl;if(g){h.insets.top+=Ext.util.TextMetrics.measure(g,e.fieldLabel,h.width).height+g.getFrameWidth("tb")+e.labelPad}}},c),left:d,right:d}})(),errorStrategies:(function(){function d(i,h){var j=i.getStyle("display")!=="none";if(h!==j){i.setDisplayed(h)}}function g(i,h,j){if(i.getStyle(h)!==j){i.setStyle(h,j)}}function c(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var b=Ext.applyIf,a=Ext.emptyFn,e={prepare:function(h){d(h.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a,onFocus:a};return{none:e,side:b({prepare:function(h){var i=h.errorEl;i.addCls(Ext.baseCSSPrefix+"form-invalid-icon");Ext.layout.component.field.Field.initTip();i.dom.setAttribute("data-errorqtip",h.getActiveError()||"");d(i,h.hasActiveError())},adjustHorizInsets:function(h,i){if(h.autoFitErrors&&h.hasActiveError()){i.insets.right+=h.errorEl.getWidth()}},layoutHoriz:function(h,i){if(h.hasActiveError()){g(h.errorEl,"left",i.width-i.insets.right+"px")}},layoutVert:function(h,i){if(h.hasActiveError()){g(h.errorEl,"top",i.insets.top+"px")}},onFocus:c},e),under:b({prepare:function(h){var j=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";if(!j.hasCls(i)){j.addCls(i)}d(j,h.hasActiveError())},adjustVertInsets:function(h,i){if(h.autoFitErrors){i.insets.bottom+=h.errorEl.getHeight()}},layoutHoriz:function(h,j){var k=h.errorEl,i=j.insets;g(k,"width",j.width-i.right-i.left+"px");g(k,"marginLeft",i.left+"px")}},e),qtip:b({prepare:function(h){d(h.errorEl,false);Ext.layout.component.field.Field.initTip();h.getActionEl().dom.setAttribute("data-errorqtip",h.getActiveError()||"")},onFocus:c},e),title:b({prepare:function(h){d(h.errorEl,false);h.el.dom.title=h.getActiveError()||""}},e),elementId:b({prepare:function(h){d(h.errorEl,false);var i=Ext.fly(h.msgTarget);if(i){i.dom.innerHTML=h.getActiveError()||"";i.setDisplayed(h.hasActiveError())}}},e)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip",renderTo:Ext.getBody()});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}})());Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",beforeLayout:function(d,b){var e=this,a=e.owner,c=this.lastValue,g=a.getRawValue();this.lastValue=g;return e.callParent(arguments)||(a.grow&&g!==c)},sizeBodyContents:function(c,a){var b=this.adjustForGrow(c,a);this.setElementSize(this.owner.inputEl,b[0],b[1])},adjustForGrow:function(e,c){var g=this,b=g.owner,i,h,d,a=[e,c];if(b.grow){i=b.inputEl;h=(i.dom.value||(b.hasFocus?"":b.emptyText)||"")+b.growAppend;d=i.getTextWidth(h)+i.getBorderWidth("lr")+i.getPadding("lr");a[0]=Ext.Number.constrain(d,b.growMin,Math.max(b.growMin,Math.min(b.growMax,Ext.isNumber(e)?e:Infinity)))}return a}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",adjustForGrow:function(a,k){var e=this,b=e.owner,i,h,g,d,c,j,l=[a,k];if(b.grow){i=b.inputEl;d=i.getWidth(true);c=i.getHeight();h=i.dom.value||"&#160;";h+=b.growAppend;h=h.replace(/\n/g,"<br>");j=Ext.util.TextMetrics.measure(i,h,d).height+i.getBorderWidth("tb")+i.getPadding("tb");g=b.growMax;if(Ext.isNumber(k)){g=Math.min(g,k)}l[1]=Ext.Number.constrain(j,b.growMin,g)}return l}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,onLayout:function(){this.callParent(arguments);var t=this,m=t.getLayoutTargetSize(),a=t.owner,v=t.getTarget(),u=m.width,k=m.height,n=v.getStyle("overflow"),l=t.getVisibleItems(a),r=l.length,e=[],h,p,j,g,c,d,q,b,s;if(u<20&&k<20){return}if(!t.clearEl){t.clearEl=v.createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}if(!Ext.supports.RightMargin){s=Ext.Element.getRightMarginFixCleaner(v);v.addCls(Ext.baseCSSPrefix+"inline-children")}for(q=0;q<r;q++){j=l[q];b=j.el;g=j.anchorSpec;if(g){if(g.right){c=t.adjustWidthAnchor(g.right(u)-b.getMargin("lr"),j)}else{c=undefined}if(g.bottom){d=t.adjustHeightAnchor(g.bottom(k)-b.getMargin("tb"),j)}else{d=undefined}e.push({component:j,anchor:true,width:c||undefined,height:d||undefined})}else{e.push({component:j,anchor:false})}}if(!Ext.supports.RightMargin){v.removeCls(Ext.baseCSSPrefix+"inline-children");s()}for(q=0;q<r;q++){h=e[q];t.setItemSize(h.component,h.width,h.height)}if(n&&n!="hidden"&&!t.adjustmentPass){p=t.getLayoutTargetSize();if(p.width!=m.width||p.height!=m.height){t.adjustmentPass=true;t.onLayout()}}delete t.adjustmentPass},parseAnchor:function(c,g,b){if(c&&c!="none"){var d;if(this.parseAnchorRE.test(c)){var e=b-g;return function(a){return a-e}}else{if(c.indexOf("%")!=-1){d=parseFloat(c.replace("%",""))*0.01;return function(a){return Math.floor(a*d)}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){return a+c}}}}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,i,c,h;if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec=i={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)};if(i.right){g.layoutManagedWidth=1}else{g.layoutManagedWidth=2}if(i.bottom){g.layoutManagedHeight=1}else{g.layoutManagedHeight=2}}else{g.layoutManagedWidth=2;g.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"visibility",floating:true,ariaRole:"alertdialog",itemCls:"x-window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,initComponent:function(){var a=this;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}},initStateEvents:function(){var a=this.stateEvents;Ext.each(["maximize","restore","resize","dragend"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:"el",scope:c}})}},afterRender:function(){var a=this,b=a.hidden,c;a.hidden=false;a.callParent();a.hidden=b;a.proxy=a.getProxy();a.mon(a.el,"mousedown",a.onMouseDown,a);a.el.set({tabIndex:-1});if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){c=a.getKeyMap();c.on(27,a.onEsc,a);c.disable()}if(!b){a.syncMonitorWindowResize();a.doConstrain()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=Ext.create("Ext.util.ComponentDragger",this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){var d=this,g=d.focusEl,e=d.defaultButton||d.defaultFocus,b=typeof db,c,a;if(Ext.isDefined(e)){if(Ext.isNumber(e)){g=d.query("button")[e]}else{if(Ext.isString(e)){g=d.down("#"+e)}else{g=e}}}return g||d.focusEl},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a=c||b.animateTarget;b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />',{compiled:true,disableFormats:true}],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:Ext.baseCSSPrefix+"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("focus","blur","specialkey");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=Ext.id())},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId();return Ext.applyIf(c.subTplData,{id:a,cmpId:c.id,name:c.name||a,type:b,size:c.size||20,cls:c.cls,fieldCls:c.fieldCls,tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)})},afterRender:function(){this.callParent();if(this.inputEl){this.inputEl.selectable()}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},onRender:function(){var b=this,a=b.fieldStyle;b.onLabelableRender();b.addChildEls({name:"inputEl",id:b.getInputId()});b.callParent(arguments);b.setRawValue(b.rawValue);if(b.readOnly){b.setReadOnly(true)}if(b.disabled){b.disable()}if(a){b.setFieldStyle(a)}b.renderActiveError()},initAria:function(){var a=this;a.callParent();a.getActionEl().dom.setAttribute("aria-describedby",Ext.id(a.errorEl))},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.readOnly=c;b.dom.setAttribute("aria-readonly",c)}a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,Ext.create("Ext.EventObjectImpl",a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);b.mon(c,"focus",b.onFocus,b);b.mon(c,"blur",b.onBlur,b,b.inEditor?{buffer:10}:null);a=Ext.create("Ext.util.DelayedTask",b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e==="propertychange"){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},preFocus:Ext.emptyFn,onFocus:function(){var b=this,a=b.focusCls,c=b.inputEl;b.preFocus();if(a&&c){c.addCls(a)}if(!b.hasFocus){b.hasFocus=true;b.componentLayout.onFocus();b.fireEvent("focus",b)}},beforeBlur:Ext.emptyFn,onBlur:function(){var b=this,a=b.focusCls,c=b.inputEl;if(b.destroying){return}b.beforeBlur();if(a&&c){c.removeCls(a)}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b);b.postBlur()},postBlur:Ext.emptyFn,onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var a=this;return a.disabled||a.validateValue(a.processRawValue(a.getRawValue()))},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.doComponentLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.doComponentLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",ariaRole:"textbox",componentLayout:"textfield",initComponent:function(){this.callParent();this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},afterRender:function(){var a=this;if(a.enforceMaxLength){a.inputEl.dom.maxLength=a.maxLength}a.applyEmptyText();a.autoSize();a.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,k=g.callParent(arguments),a=g.validator,d=g.emptyText,c=g.allowBlank,e=g.vtype,h=Ext.form.field.VTypes,i=g.regex,j=Ext.String.format,b;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){k.push(b)}}if(l.length<1||l===d){if(!c){k.push(g.blankText)}return k}if(l.length<g.minLength){k.push(j(g.minLengthText,g.minLength))}if(l.length>g.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",a);b.lastInputWidth=a}}},initAria:function(){this.callParent();this.getActionEl().dom.setAttribute("aria-required",this.allowBlank===false)},getBodyNaturalWidth:function(){return Math.round(this.size*6.5)+20}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea"],fieldSubTpl:['<textarea id="{id}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="rows">rows="{rows}" </tpl>','<tpl if="cols">cols="{cols}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" ','autocomplete="off">',"</textarea>",{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",onRender:function(b,a){var c=this;Ext.applyIf(c.subTplData,{cols:c.cols,rows:c.rows});c.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.grow){if(a.preventScrollbars){a.inputEl.setStyle("overflow","hidden")}a.inputEl.setHeight(a.growMin)}},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!==a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},getBodyNaturalWidth:function(){return Math.round(this.cols*6.5)+20}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"anchor"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return Ext.create("Ext.button.Button",{handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent()},initComponent:function(){var c=this,b,a;c.title="&#160;";c.topContainer=Ext.create("Ext.container.Container",{anchor:"100%",style:{padding:"10px",overflow:"hidden"},items:[c.iconComponent=Ext.create("Ext.Component",{cls:"ext-mb-icon",width:50,height:c.iconHeight,style:{"float":"left"}}),c.promptContainer=Ext.create("Ext.container.Container",{layout:{type:"anchor"},items:[c.msg=Ext.create("Ext.Component",{autoEl:{tag:"span"},cls:"ext-mb-text"}),c.textField=Ext.create("Ext.form.field.Text",{anchor:"100%",enableKeyEvents:true,listeners:{keydown:c.onPromptKey,scope:c}}),c.textArea=Ext.create("Ext.form.field.TextArea",{anchor:"100%",height:75})]})]});c.progressBar=Ext.create("Ext.ProgressBar",{anchor:"-10",style:"margin-left:10px"});c.items=[c.topContainer,c.progressBar];c.msgButtons=[];for(b=0;b<4;b++){a=c.makeButton(b);c.msgButtons[a.itemId]=a;c.msgButtons.push(a)}c.bottomTb=Ext.create("Ext.toolbar.Toolbar",{ui:"footer",dock:"bottom",layout:{pack:"center"},items:[c.msgButtons[0],c.msgButtons[1],c.msgButtons[2],c.msgButtons[3]]});c.dockedItems=[c.bottomTb];c.callParent()},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=a.buttons||0,g=true,e=d.maxWidth,b;a=a||{};d.cfg=a;if(a.width){e=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||"&#160;")}if(!d.rendered){d.width=e;d.render(Ext.getBody())}else{d.setSize(e,d.maxHeight)}d.setPosition(-10000,-10000);d.closable=a.closable&&!a.wait;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();g=false}else{d.msgButtons[b].hide()}}if(g){d.bottomTb.hide()}else{d.bottomTb.show()}},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);if(a.animateTarget){b.doAutoSize(true);b.callParent()}else{b.callParent();b.doAutoSize(true)}return b},afterShow:function(){if(this.animateTarget){this.center()}this.callParent(arguments)},doAutoSize:function(b){var e=this,d=e.iconComponent,g=e.iconHeight;if(!Ext.isDefined(e.frameWidth)){e.frameWidth=e.el.getWidth()-e.body.getWidth()}d.setHeight(g);e.minWidth=e.cfg.minWidth||Ext.getClass(this).prototype.minWidth;e.topContainer.doLayout();if(Ext.isIE6||Ext.isIEQuirks){e.textField.setCalculatedSize(9);e.textArea.setCalculatedSize(9)}var c=e.cfg.width||e.msg.getWidth()+d.getWidth()+25,a=(e.header.rendered?e.header.getHeight():0)+Math.max(e.promptContainer.getHeight(),d.getHeight())+e.progressBar.getHeight()+(e.bottomTb.rendered?e.bottomTb.getHeight():0)+20;d.setHeight(Math.max(g,e.msg.getHeight()));e.setSize(c+e.frameWidth,a+e.frameWidth);if(b){e.center()}return e},updateText:function(a){this.msg.update(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.iconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.iconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:"ext-mb-question",msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.checkValidityTask=Ext.create("Ext.util.DelayedTask",c.checkValidity,c);c.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,g){var d=this,e=!!g.ownerCt,b=g.isContainer;function a(h){d[e?"mon":"mun"](h,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(g.isFormField){a(g)}else{if(b){if(g.isDestroyed){delete d._fields}else{Ext.Array.forEach(g.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;a.batchLayouts(function(){b=a.getFields().filterBy(function(c){return !c.validate()})});return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+"mask-loading",d;this.getFields().each(function(e){if(e.isFormField&&e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,g){var e=a.findField(d);if(e){e.markInvalid(g)}}if(Ext.isArray(c)){Ext.each(c,function(d){b(d.id,d.msg)})}else{if(c instanceof Ext.data.Errors){c.each(function(d){b(d.field,d.message)})}else{Ext.iterate(c,b)}}return this},setValues:function(a){var b=this;function c(d,g){var e=b.findField(d);if(e){e.setValue(g);if(b.trackResetOnLoad){e.resetOriginalValue()}}}if(Ext.isArray(a)){Ext.each(a,function(d){c(d.id,d.value)})}else{Ext.iterate(a,c)}return this},getValues:function(e,b,d,a){var c={};this.getFields().each(function(h){if(!b||h.isDirty()){var g=h[a?"getModelData":"getSubmitData"](d);if(Ext.isObject(g)){Ext.iterate(g,function(j,k){if(d&&k===""){k=h.emptyText||""}if(j in c){var l=c[j],i=Ext.isArray;if(!i(l)){l=c[j]=[l]}if(i(k)){c[j]=l.concat(k)}else{l.push(k)}}else{c[j]=k}})}}});if(e){c=Ext.Object.toQueryString(c)}return c},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.clearInvalid()})});return a},reset:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.reset()})});return a},applyToFields:function(a){this.getFields().each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.getFields().each(function(b){Ext.applyIf(b,a)});return this},batchLayouts:function(b){var c=this,a=new Ext.util.HashMap();c.getFields().each(function(e){var d=e.ownerCt;if(!a.contains(d)){a.add(d);d.oldSuspendLayout=d.suspendLayout;d.suspendLayout=true}});b();a.each(function(e,d){d.suspendLayout=d.oldSuspendLayout;delete d.oldSuspendLayout});c.owner.doComponentLayout()}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(g){var h=g.isFieldLabelable,i=g.isFormField;if(h||i){if(h){c["onLabelable"+(d?"Added":"Removed")](g)}if(i){c["onField"+(d?"Added":"Removed")](g)}}else{if(g.isContainer){Ext.Array.forEach(g.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange()},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange()},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.layout.container.CheckboxGroup",{extend:"Ext.layout.container.Container",alias:["layout.checkboxgroup"],onLayout:function(){var b=this.getColCount(),c=this.getShadowCt(),a=this.owner,g=a.items,j=c.items,h=g.length,k=0,d,e;j.each(function(i){i.items.clear()});while(j.length>b){c.remove(j.last())}while(j.length<b){c.add({xtype:"container",cls:a.groupCls,flex:1})}if(a.vertical){e=Math.ceil(h/b);for(d=0;d<h;d++){if(d>0&&d%e===0){k++}j.getAt(k).items.add(g.getAt(d))}}else{for(d=0;d<h;d++){k=d%b;j.getAt(k).items.add(g.getAt(d))}}if(!c.rendered){c.render(this.getRenderTarget())}else{j.each(function(i){var l=i.getLayout();l.renderItems(l.getLayoutItems(),l.getRenderTarget())})}c.doComponentLayout()},renderItems:Ext.emptyFn,getShadowCt:function(){var j=this,d=j.shadowCt,a,h,k,c,g,b,e;if(!d){a=j.owner;c=a.columns;g=Ext.isArray(c);b=j.getColCount();h=[];for(e=0;e<b;e++){k={xtype:"container",cls:a.groupCls};if(g){if(c[e]<1){k.flex=c[e]}else{k.width=c[e]}}else{k.flex=1}h.push(k)}d=j.shadowCt=Ext.createWidget("container",{layout:"hbox",items:h,ownerCt:a})}return d},getColCount:function(){var a=this.owner,b=a.columns;return Ext.isArray(b)?b.length:(Ext.isNumber(b)?b:a.items.length)}});Ext.define("Ext.form.FieldContainer",{extend:"Ext.container.Container",mixins:{labelable:"Ext.form.Labelable",fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.fieldcontainer",componentLayout:"field",combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,initComponent:function(){var b=this,a=b.onSubCmpAddOrRemove;b.initLabelable();b.initFieldAncestor();b.callParent()},onLabelableAdded:function(a){var b=this;b.mixins.fieldAncestor.onLabelableAdded.call(this,a);b.updateLabel()},onLabelableRemoved:function(a){var b=this;b.mixins.fieldAncestor.onLabelableRemoved.call(this,a);b.updateLabel()},onRender:function(){var a=this;a.onLabelableRender();a.callParent(arguments)},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},updateLabel:function(){var b=this,a=b.labelEl;if(a){a.update(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(a){var b=Ext.Array.forEach,c=[];b(a,function(d){b(d.getActiveErrors(),function(g){var e=d.getFieldLabel();c.push((e?e+": ":"")+g)})});return c},getTargetEl:function(){return this.bodyEl||this.callParent()}});Ext.define("Ext.form.CheckboxGroup",{extend:"Ext.form.FieldContainer",mixins:{field:"Ext.form.field.Field"},alias:"widget.checkboxgroup",requires:["Ext.layout.container.CheckboxGroup","Ext.form.field.Base"],columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onFieldAdded:function(b){var a=this;if(b.isCheckbox){a.mon(b,"change",a.checkChange,a)}a.callParent(arguments)},onFieldRemoved:function(b){var a=this;if(b.isCheckbox){a.mun(b,"change",a.checkChange,a)}a.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(){return this.query("[isCheckbox]")},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return Ext.Array.filter(this.getBoxes(),function(a){return a.getValue()})},isDirty:function(){return Ext.Array.some(this.getBoxes(),function(a){return a.isDirty()})},setReadOnly:function(a){this.eachBox(function(b){b.setReadOnly(a)});this.readOnly=a},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){c.eachBox(function(d){d.reset()})});c.preventMark=a;c.unsetActiveError();if(b){c.doComponentLayout()}},resetOriginalValue:function(){Ext.defer(function(){this.callParent()},1,this)},setValue:function(b){var a=this;a.batchChanges(function(){a.eachBox(function(c){var d=c.getName(),e=false;if(b&&d in b){if(Ext.isArray(b[d])){e=Ext.Array.contains(b[d],c.inputValue)}else{e=b[d]}}c.setValue(e)})});return a},getValue:function(){var a={};this.eachBox(function(c){var d=c.getName(),b=c.inputValue,e;if(c.getValue()){if(d in a){e=a[d];if(!Ext.isArray(e)){e=a[d]=[e]}e.push(b)}else{a[d]=b}}});return a},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d=a.getErrors(),c=Ext.isEmpty(d),b=!a.hasActiveError();if(c){a.unsetActiveError()}else{a.setActiveError(d)}if(c!==b){a.fireEvent("validitychange",a,c);a.doComponentLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.filterBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.FieldSet",{extend:"Ext.container.Container",alias:"widget.fieldset",uses:["Ext.form.field.Checkbox","Ext.panel.Tool","Ext.layout.container.Anchor","Ext.layout.component.FieldSet"],collapsed:false,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",componentLayout:"fieldset",ariaRole:"",renderTpl:['<div id="{id}-body" class="{baseCls}-body"></div>'],maskOnDisable:false,getElConfig:function(){return{tag:"fieldset",id:this.id}},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.initLegend();b.addChildEls("body");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}},onRender:function(b,a){this.callParent(arguments);this.initLegend()},initLegend:function(){var c=this,a,b=c.legend;if(!b&&(c.title||c.checkboxToggle||c.collapsible)){a=[];if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());b=c.legend=Ext.create("Ext.container.Container",{baseCls:c.baseCls+"-header",ariaRole:"",ownerCt:this,getElConfig:function(){var d={tag:"legend",cls:this.baseCls};if(!Ext.isGecko3){d.children=[{cls:Ext.baseCSSPrefix+"clear"}]}return d},items:a})}if(b&&!b.rendered&&c.rendered){c.legend.render(c.el,c.body)}},createTitleCmp:function(){var a=this;a.titleCmp=Ext.create("Ext.Component",{html:a.title,getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",cls:a.titleCmp.cls,id:a.titleCmp.id}},cls:a.baseCls+"-header-text"});return a.titleCmp},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.create("Ext.form.field.Checkbox",{getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",id:a.checkboxCmp.id,cls:a.checkboxCmp.cls}},name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.create("Ext.panel.Tool",{getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",id:a.toggleCmp.id,cls:a.toggleCmp.cls}},type:"toggle",handler:a.toggle,scope:a});return a.toggleCmp},setTitle:function(b){var a=this;a.title=b;a.initLegend();a.titleCmp.update(b);return a},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(a){var b=this,c=b.checkboxCmp;a=!!a;if(c){c.setValue(a)}if(a){b.removeCls(b.baseCls+"-collapsed")}else{b.addCls(b.baseCls+"-collapsed")}b.collapsed=!a;if(a){b.getComponentLayout().childrenChanged=true}b.doComponentLayout();return b},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},beforeDestroy:function(){var a=this.legend;if(a){a.destroy()}this.callParent()}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],maskOnDisable:false,getElConfig:function(){var a=this;return{tag:"label",id:a.id,htmlFor:a.forId||"",html:a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"")}},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c}return this}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent();a.form.initialize()},createForm:function(){return Ext.create("Ext.form.Basic",this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(){return this.getForm().getValues()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},disable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.disable()})},enable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.enable()})},startPolling:function(b){this.stopPolling();var a=Ext.create("Ext.util.TaskRunner",b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){this.form.getFields().each(function(a){a.checkChange()})}});Ext.define("Ext.form.RadioGroup",{extend:"Ext.form.CheckboxGroup",alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(){return this.query("[isRadio]")},setValue:function(b){var a=this;if(Ext.isObject(b)){Ext.Object.each(b,function(c,e){var d=Ext.form.RadioManager.getWithValue(c,e);d.each(function(g){g.setValue(true)})})}return a}});Ext.define("Ext.form.RadioManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.findBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.action.DirectLoad",{extend:"Ext.form.action.Load",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){this.form.api.load.apply(window,this.getArgs())},getArgs:function(){var g=this,c=[],e=g.form,b=e.paramOrder,h=g.getParams(),d,a;if(b){for(d=0,a=b.length;d<a;d++){c.push(h[b[d]])}}else{if(e.paramsAsHash){c.push(h)}}c.push(g.onSuccess,g);return c},processResponse:function(a){return(this.result=a)},onSuccess:function(a,b){if(b.type==Ext.direct.Manager.self.exceptions.SERVER){a={}}this.callParent([a])}});Ext.define("Ext.form.action.DirectSubmit",{extend:"Ext.form.action.Submit",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var b=this,c=Ext.Function.bind(b.onSuccess,b),a=b.buildForm();b.form.api.submit(a,c,b);Ext.removeNode(a)},processResponse:function(a){return(this.result=a)},onSuccess:function(a,b){if(b.type===Ext.direct.Manager.self.exceptions.SERVER){a={}}this.callParent([a])}});Ext.define("Ext.form.action.StandardSubmit",{extend:"Ext.form.action.Submit",alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.submit();Ext.removeNode(a)}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">",'<label id="{cmpId}-boxLabelEl" class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',"</tpl>",'<input type="button" id="{id}" ','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">",'<label id="{cmpId}-boxLabelEl" class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',"</tpl>",{disableFormats:true,compiled:true}],isCheckbox:true,focusCls:Ext.baseCSSPrefix+"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",ariaRole:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},onRender:function(b,a){var c=this;c.addChildEls("boxLabelEl");Ext.applyIf(c.subTplData,{boxLabel:c.boxLabel,boxLabelCls:c.boxLabelCls,boxLabelAlign:c.boxLabelAlign});c.callParent(arguments)},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},setRawValue:function(d){var c=this,e=c.inputEl,a=c.inputValue,b=(d===true||d==="true"||d==="1"||d===1||(((Ext.isString(d)||Ext.isNumber(d))&&a)?d==a:c.onRe.test(d)));if(e){e.dom.setAttribute("aria-checked",b);c[b?"addCls":"removeCls"](c.checkedCls)}c.checked=c.rawValue=b;return b},setValue:function(b){var a=this;if(Ext.isArray(b)){a.getManager().getByName(a.name).each(function(c){c.setValue(Ext.Array.contains(b,c.inputValue))})}else{a.callParent(arguments)}return a},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=c||a.disabled}a.readOnly=c},getBodyNaturalWidth:function(){var d=this,b=d.bodyEl,a="white-space",c;b.setStyle(a,"nowrap");c=b.getWidth();b.setStyle(a,"");return c}});Ext.define("Ext.layout.component.field.Trigger",{alias:["layout.triggerfield"],extend:"Ext.layout.component.field.Field",type:"triggerfield",sizeBodyContents:function(d,b){var e=this,a=e.owner,h=a.inputEl,c=a.triggerWrap,g=a.getTriggerWidth();if(a.hideTrigger||a.readOnly||g>0){e.setElementSize(h,Ext.isNumber(d)?d-g:d);c.setWidth(g)}}});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect")},afterRender:function(){var b=this,a;b.callParent();a={scope:b,freezeEvent:true,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(h){var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,c,j=h.type,d=i.mouseOverItem,b;if(!k){if(j=="mouseover"&&i.stillOverItem(h,d)){k=d}if(j=="keydown"){c=i.getSelectionModel().getLastSelected();if(c){k=i.getNode(c)}}}if(k){g=i.indexOf(k);if(!c){c=i.getRecord(k)}if(i.processItemEvent(c,k,g,h)===false){return false}b=i.isNewItemEvent(k,h);if(b===false){return false}if((i["onBeforeItem"+a[b]](c,k,g,h)===false)||(i.fireEvent("beforeitem"+b,i,c,k,g,h)===false)||(i["onItem"+a[b]](c,k,g,h)===false)){return false}i.fireEvent("item"+b,i,c,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},isNewItemEvent:function(d,g){var c=this,a=c.mouseOverItem,b=g.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(g,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);delete b.highlightedItem}},refresh:function(){var a=this;a.clearHighlight();a.callParent(arguments);if(!a.isFixedHeight()){a.doComponentLayout()}}});Ext.define("Ext.layout.component.BoundList",{extend:"Ext.layout.component.Component",alias:"layout.boundlist",type:"component",beforeLayout:function(){return this.callParent(arguments)||this.owner.refreshed>0},onLayout:function(b,q){var k=this,c=k.owner,i=c.floating,d=c.el,s=d.getXY(),r=Ext.isNumber,a,n,p,m,h,l,g,j,e;if(i){d.setXY([-9999,-9999])}k.setTargetSize(b,q);if(!r(b)){a=c.minWidth;n=c.maxWidth;if(r(a)||r(n)){h=d.getWidth();if(h<a){g=a}else{if(h>n){g=n}}if(g){k.setTargetSize(g)}}}if(!r(q)){p=c.minHeight;m=c.maxHeight;if(r(p)||r(m)){l=d.getHeight();if(l<p){j=p}else{if(l>m){j=m}}if(j){k.setTargetSize(e,j)}}}if(i){d.setXY(s)}},afterLayout:function(){var b=this,a=b.owner.pagingToolbar;b.callParent();if(a){a.doComponentLayout()}},setTargetSize:function(d,b){var g=this,a=g.owner,c=null,e;if(Ext.isNumber(b)){c=b-a.el.getFrameWidth("tb");e=a.pagingToolbar;if(e){c-=e.getHeight()}}g.setElementSize(a.listEl,null,c);g.callParent(arguments)}});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",onRender:function(){Ext.apply(this.renderData,{text:this.text});this.callParent(arguments)},setText:function(a){if(this.rendered){this.el.update(a);this.ownerCt.doLayout()}else{this.text=a}}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],fieldSubTpl:['<input id="{id}" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />','<div id="{cmpId}-triggerWrap" class="{triggerWrapCls}" role="presentation">',"{triggerEl}",'<div class="{clearCls}" role="presentation"></div>',"</div>",{compiled:true,disableFormats:true}],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){this.wrapFocusCls=this.triggerWrapCls+"-focus";this.callParent(arguments)},onRender:function(d,a){var e=this,j,g=e.triggerBaseCls,h=e.triggerWrapCls,b=[],c;if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls}for(c=0;(j=e["trigger"+(c+1)+"Cls"])||c<1;c++){b.push({cls:[Ext.baseCSSPrefix+"trigger-index-"+c,g,j].join(" "),role:"button"})}b[c-1].cls+=" "+g+"-last";e.addChildEls("triggerWrap");Ext.applyIf(e.subTplData,{triggerWrapCls:h,triggerEl:Ext.DomHelper.markup(b),clearCls:e.clearCls});e.callParent(arguments);e.triggerEl=Ext.select("."+g,true,e.triggerWrap.dom);e.doc=Ext.getDoc();e.initTrigger()},onEnable:function(){this.callParent();this.triggerWrap.unmask()},onDisable:function(){this.callParent();this.triggerWrap.mask()},afterRender:function(){this.callParent();this.updateEditState();this.triggerEl.unselectable()},updateEditState:function(){var c=this,e=c.inputEl,a=c.triggerWrap,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.rendered){if(c.readOnly){e.addCls(d);g=true;b=false}else{if(c.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.hideTrigger}a.setDisplayed(b);e.dom.readOnly=g;c.doComponentLayout()}},getTriggerWidth:function(){var c=this,b=c.triggerWrap,a=0;if(b&&!c.hideTrigger&&!c.readOnly){c.triggerEl.each(function(d){a+=d.getWidth()});a+=c.triggerWrap.getFrameWidth("lr")}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},initTrigger:function(){var c=this,a=c.triggerWrap,b=c.triggerEl;if(c.repeatTriggerClick){c.triggerRepeater=Ext.create("Ext.util.ClickRepeater",a,{preventDefault:true,handler:function(d,g){c.onTriggerWrapClick(g)}})}else{c.mon(c.triggerWrap,"click",c.onTriggerWrapClick,c)}b.addClsOnOver(c.triggerBaseCls+"-over");b.each(function(e,g,d){e.addClsOnOver(c["trigger"+(d+1)+"Cls"]+"-over")});b.addClsOnClick(c.triggerBaseCls+"-click");b.each(function(e,g,d){e.addClsOnClick(c["trigger"+(d+1)+"Cls"]+"-click")})},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent();if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerWrapClick:function(h){var g=this,d=h&&h.getTarget("."+Ext.baseCSSPrefix+"form-trigger",null),c=d&&d.className.match(g.triggerIndexRe),a,b;if(c&&!g.readOnly){a=parseInt(c[1],10);b=g["onTrigger"+(a+1)+"Click"]||g.onTriggerClick;if(b){b.call(g,h)}}},onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.Picker",{extend:"Ext.form.field.Trigger",alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",requires:["Ext.util.KeyNav"],matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=Ext.create("Ext.util.KeyNav",a.inputEl,{down:function(){if(!a.isExpanded){a.onTriggerClick()}},esc:a.collapse,scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a;if(b.isExpanded){a=b.getPicker();if(b.matchFieldWidth){a.setSize(b.bodyEl.getWidth(),a.store&&a.store.getCount()?null:0)}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.inputEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()}});Ext.define("Ext.form.field.Spinner",{extend:"Ext.form.field.Trigger",alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.KeyNav"],trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=Ext.create("Ext.util.KeyNav",b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getTriggerWidth:function(){return this.hideTrigger||this.readOnly?0:this.spinUpEl.getWidth()+this.triggerWrap.getFrameWidth("lr")},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},onChange:function(){var b=this,c=b.getValue(),a=c===null;b.callParent(arguments);b.setSpinUpEnabled(a||c<b.maxValue);b.setSpinDownEnabled(a||c>b.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,selectOnFocus:true,submitValue:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("afterlayout",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g);e.doComponentLayout()}},onLoad:function(){var e=this,d,b,c,a;if(!e.rendered){return}d=e.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(e.afterPageText,isNaN(c)?1:c);e.child("#afterTextItem").setText(a);e.child("#inputItem").setValue(b);e.child("#first").setDisabled(b===1);e.child("#prev").setDisabled(b===1);e.child("#next").setDisabled(b===c);e.child("#last").setDisabled(b===c);e.child("#refresh").enable();e.updateInfo();e.fireEvent("change",e,d)},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGEUP||b==h.DOWN||b==h.PAGEDOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGEDOWN){a*=-1}g+=a;if(g>=1&&g<=c.pages){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(a){if(this.fireEvent("beforechange",this,o)!==false){this.store.load()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},bindStore:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("beforeload",c.beforeLoad,c);c.store.un("load",c.onLoad,c);c.store.un("exception",c.onLoadError,c)}if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:c,beforeload:c.beforeLoad,load:c.onLoad,exception:c.onLoadError})}c.store=a},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.bindStore(null);this.callParent()}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,autoScroll:true,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,ariaRole:"listbox",componentLayout:"boundlist",renderTpl:['<div id="{id}-listEl" class="list-ct"></div>'],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=Ext.create("Ext.XTemplate",'<ul><tpl for=".">','<li role="option" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=Ext.create("Ext.XTemplate",b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent();b.addChildEls("listEl")},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{pageSize:this.pageSize,store:this.store,border:false})},onRender:function(){var b=this,a=b.pagingToolbar;b.callParent(arguments);if(a){a.render(b.el)}},bindStore:function(a,b){var d=this,c=d.pagingToolbar;d.callParent(arguments);if(c){c.bindStore(a,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},refresh:function(){var a=this;a.callParent();if(a.isVisible()){a.refreshed++;a.doComponentLayout();a.refreshed--}},initAria:function(){this.callParent();var a=this.getSelectionModel(),c=a.getSelectionMode(),b=this.getActionEl();if(c!=="SINGLE"){b.dom.setAttribute("aria-multiselectable",true)}},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.form.field.ComboBox",{extend:"Ext.form.field.Picker",requires:["Ext.util.DelayedTask","Ext.EventObject","Ext.view.BoundList","Ext.view.BoundListKeyNav","Ext.data.StoreManager"],alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" ','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />','<div id="{cmpId}-triggerWrap" class="{triggerWrapCls}" role="presentation">',"{triggerEl}",'<div class="{clearCls}" role="presentation"></div>',"</div>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,defaultListConfig:{emptyText:"",loadingText:"Loading...",loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]});if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=Ext.create("Ext.XTemplate",'<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=Ext.create("Ext.XTemplate",e.displayTpl)}}e.callParent();e.doQueryTask=Ext.create("Ext.util.DelayedTask",e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:function(){},bindStore:function(a,b){var c=this,d=c.store;if(d&&!b){if(d!==a&&d.autoDestroy){d.destroyStore()}else{d.un({scope:c,load:c.onLoad,exception:c.collapse})}if(!a){c.store=null;if(c.picker){c.picker.bindStore(null)}}}if(a){if(!b){c.resetToDefault()}c.store=Ext.data.StoreManager.lookup(a);c.store.on({scope:c,load:c.onLoad,exception:c.collapse});if(c.picker){c.picker.bindStore(a)}}},onLoad:function(){var a=this,b=a.value;if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue("")}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(h,c,e){h=h||"";var d=this,b={query:h,forceAll:c,combo:d,cancel:false},a=d.store,g=d.queryMode==="local";if(d.fireEvent("beforequery",b)===false||b.cancel){return false}h=b.query;c=b.forceAll;if(c||(h.length>=d.minChars)){d.expand();if(!d.queryCaching||d.lastQuery!==h){d.lastQuery=h;if(g){if(c){a.clearFilter()}else{a.clearFilter(true);a.filter(d.displayField,h)}}else{d.rawQuery=e;if(d.pageSize){d.loadPage(1)}else{a.load({params:d.getParams(h)})}}}if(d.getRawValue()!==d.getDisplayValue()){d.ignoreSelection++;d.picker.getSelectionModel().deselectAll();d.ignoreSelection--}if(g){d.doAutoSelect()}if(d.typeAhead){d.doTypeAhead()}}return true},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=Ext.create("Ext.util.DelayedTask",this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},createPicker:function(){var c=this,a,d=Ext.baseCSSPrefix+"menu",b=Ext.apply({pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,ownerCt:c.ownerCt,cls:c.el.up("."+d)?d:"",store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);a=c.picker=Ext.create("Ext.view.BoundList",b);if(c.pageSize){a.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(a,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(a.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return a},alignPicker:function(){var b=this,a=b.picker,e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);b.callParent();if(a.getHeight()>c){a.setHeight(c-5);b.doAlign()}},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(d,a){var g=this,b=g.lastSelection,c=g.valueField,e;if(!g.multiSelect&&b){e=b[0];if(e&&(a.get(c)===e.get(c))){g.displayTplData=[a.data];g.setRawValue(g.getDisplayValue());g.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=Ext.create("Ext.view.BoundListKeyNav",this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(l,e){var k=this,c=k.valueNotFoundText,m=k.inputEl,g,j,h,b=[],a=[],d=[];if(k.store.loading){k.value=l;k.setHiddenValue(k.value);return k}l=Ext.Array.from(l);for(g=0,j=l.length;g<j;g++){h=l[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){b.push(h);a.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){a.push(l[g]);d.push(l[g])}else{if(Ext.isDefined(c)){a.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=a;k.lastSelection=k.valueModels=b;if(m&&k.emptyText&&!Ext.isEmpty(l)){m.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(c){var g=this,e;if(!g.hiddenDataEl){return}c=Ext.Array.from(c);var j=g.hiddenDataEl.dom,h=j.childNodes,b=h[0],a=c.length,d=h.length;if(!b&&a>0){g.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:g.name}));d=1;b=j.firstChild}while(d>a){j.removeChild(h[0]);--d}while(d<a){j.appendChild(b.cloneNode(true));++d}for(e=0;e<a;e++){h[e].value=c[e]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){return this.getValue()},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var d=this,e=Ext.Array,b=d.picker,c,a;if(b){c=[];e.forEach(d.valueModels||[],function(g){if(g&&g.isModel&&d.store.indexOf(g)>=0){c.push(g)}});d.ignoreSelection++;a=b.getSelectionModel();a.deselectAll();if(c.length){a.select(c)}d.ignoreSelection--}}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<button id="{id}-prevEl" class="{baseCls}-yearnav-prev"></button>','<button id="{id}-nextEl" class="{baseCls}-yearnav-next"></button>',"</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons"></div>',"</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);this.callParent()},onRender:function(e,c){var h=this,d=0,b=[],a=Ext.Date.getShortMonthName,g=h.monthOffset;for(;d<g;++d){b.push(a(d),a(d+g))}Ext.apply(h.renderData,{months:b,years:h.getYears(),showButtons:h.showButtons});h.addChildEls("bodyEl","prevEl","nextEl","buttonsEl");h.callParent(arguments)},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");if(b.showButtons){b.okBtn=Ext.create("Ext.button.Button",{text:b.okText,renderTo:c,handler:b.onOkClick,scope:b});b.cancelBtn=Ext.create("Ext.button.Button",{text:b.cancelText,renderTo:c,handler:b.onCancelClick,scope:b})}b.backRepeater=Ext.create("Ext.util.ClickRepeater",b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=Ext.create("Ext.util.ClickRepeater",b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody()},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var e=this,b=e.years,a=e.months,i=e.getYears(),j=e.selectedCls,g=e.getYear(null),c=e.value[0],h=e.monthOffset,d;if(e.rendered){b.removeCls(j);a.removeCls(j);b.each(function(m,l,k){d=i[k];m.dom.innerHTML=d;if(d==g){m.dom.className=j}});if(c!==null){if(c<h){c=c*2}else{c=(c-h)*2+1}a.item(c).addCls(j)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()}});Ext.define("Ext.picker.Date",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.button.Button","Ext.button.Split","Ext.util.ClickRepeater","Ext.util.KeyNav","Ext.EventObject","Ext.fx.Manager","Ext.picker.Month"],alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",renderTpl:['<div class="{cls}" id="{id}" role="grid" title="{ariaTitle} {value:this.longDay}">','<div role="presentation" class="{baseCls}-header">','<div class="{baseCls}-prev"><a id="{id}-prevEl" href="#" role="button" title="{prevText}"></a></div>','<div class="{baseCls}-month" id="{id}-middleBtnEl"></div>','<div class="{baseCls}-next"><a id="{id}-nextEl" href="#" role="button" title="{nextText}"></a></div>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" title="{.}"><span>{.:this.firstInitial}</span></th>',"</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" href="#" hidefocus="on" class="{parent.baseCls}-date" tabIndex="1">','<em role="presentation"><span role="presentation"></span></em>',"</a>","</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer"></div>',"</tpl>","</div>",{firstInitial:function(a){return a.substr(0,1)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},longDay:function(a){return Ext.Date.format(a,this.longDayFormat)}}],ariaTitle:"Date Picker",todayText:"Today",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},onRender:function(b,a){var d=this,e=new Array(d.numDays),c=Ext.Date.format(new Date(),d.format);Ext.applyIf(d,{renderData:{}});Ext.apply(d.renderData,{dayNames:d.dayNames,ariaTitle:d.ariaTitle,value:d.value,showToday:d.showToday,prevText:d.prevText,nextText:d.nextText,days:e});d.getTpl("renderTpl").longDayFormat=d.longDayFormat;d.addChildEls("eventEl","prevEl","nextEl","middleBtnEl","footerEl");this.callParent(arguments);d.el.unselectable();d.cells=d.eventEl.select("tbody td");d.textNodes=d.eventEl.query("tbody td span");d.monthBtn=Ext.create("Ext.button.Split",{text:"",tooltip:d.monthYearText,renderTo:d.middleBtnEl});d.todayBtn=Ext.create("Ext.button.Button",{renderTo:d.footerEl,text:Ext.String.format(d.todayText,c),tooltip:Ext.String.format(d.todayTip,c),handler:d.selectToday,scope:d})},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;this.callParent();c.prevRepeater=Ext.create("Ext.util.ClickRepeater",c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=Ext.create("Ext.util.ClickRepeater",c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=Ext.create("Ext.util.KeyNav",c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.mon(c.eventEl,"mousewheel",c.handleMouseWheel,c);c.mon(c.eventEl,"click",c.handleDateClick,c,{delegate:"a."+c.baseCls+"-date"});c.mon(c.monthBtn,"click",c.showMonthPicker,c);c.mon(c.monthBtn,"arrowclick",c.showMonthPicker,c);c.update(c.value)},initDisabledDays:function(){var d=this,b=d.disabledDates,c="(?:",a;if(!d.disabledDatesRE&&b){a=b.length-1;Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(g,d.format))+"$":b[e];if(e!=a){c+="|"}},d);d.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=Ext.create("Ext.picker.Month",{renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=new Date(c,g,1).getLastDateOfMonth()}d.update(a);d.hideMonthPicker()},onCancelClick:function(){this.hideMonthPicker()},showPrevMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.cancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.cancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(c,g){var e=this,d=c.getTime(),b=e.cells,a=e.selectedCls;b.removeCls(a);b.each(function(h){if(h.dom.firstChild.dateValue==d){e.el.dom.setAttribute("aria-activedescendent",h.dom.id);h.addCls(a);if(e.isVisible()&&!e.cancelFocus){Ext.fly(h.dom.firstChild).focus(50)}return false}},this)},fullUpdate:function(D,m){var G=this,g=G.cells.elements,d=G.textNodes,I=G.disabledCellCls,p=Ext.Date,y=0,F=0,e=G.isVisible(),w=+p.clearTime(D,true),B=+p.clearTime(new Date()),v=G.minDate?p.clearTime(G.minDate,true):Number.NEGATIVE_INFINITY,x=G.maxDate?p.clearTime(G.maxDate,true):Number.POSITIVE_INFINITY,E=G.disabledDatesRE,u=G.disabledDatesText,J=G.disabledDays?G.disabledDays.join(""):false,C=G.disabledDaysText,z=G.format,l=p.getDaysInMonth(D),r=p.getFirstDateOfMonth(D),h=r.getDay()-G.startDay,A=p.add(D,p.MONTH,-1),b=G.longDayFormat,k,s,a,H,n,q,c,j,t;if(h<0){h+=7}l+=h;k=p.getDaysInMonth(A)-h;s=new Date(A.getFullYear(),A.getMonth(),k,G.initHour);if(G.showToday){H=p.clearTime(new Date());a=(H<v||H>x||(E&&z&&E.test(p.dateFormat(H,z)))||(J&&J.indexOf(H.getDay())!=-1));if(!G.disabled){G.todayBtn.setDisabled(a);G.todayKeyListener.setDisabled(a)}}n=function(i){t=+p.clearTime(s,true);i.title=p.format(s,b);i.firstChild.dateValue=t;if(t==B){i.className+=" "+G.todayCls;i.title=G.todayText}if(t==w){i.className+=" "+G.selectedCls;G.el.dom.setAttribute("aria-activedescendant",i.id);if(e&&G.floating){Ext.fly(i.firstChild).focus(50)}}if(t<v){i.className=I;i.title=G.minText;return}if(t>x){i.className=I;i.title=G.maxText;return}if(J){if(J.indexOf(s.getDay())!=-1){i.title=C;i.className=I}}if(E&&z){j=p.dateFormat(s,z);if(E.test(j)){i.title=u.replace("%0",j);i.className=I}}};for(;y<G.numDays;++y){if(y<h){q=(++k);c=G.prevCls}else{if(y>=l){q=(++F);c=G.nextCls}else{q=y-h+1;c=G.activeCls}}d[y].innerHTML=q;g[y].className=c;s.setDate(s.getDate()+1);n(g[y])}G.monthBtn.setText(G.monthNames[D.getMonth()]+" "+D.getFullYear())},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var a=this.prototype;a.monthNames=Ext.Date.monthNames;a.dayNames=Ext.Date.dayNames;a.format=Ext.Date.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(g.dateFormat(this.format))+"$":b[e];if(e!==a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(r){var j=this,q=Ext.String.format,k=Ext.Date.clearTime,p=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;r=j.formatDate(r||j.processRawValue(j.getRawValue()));if(r===null||r.length<1){return p}a=r;r=j.parseDate(r);if(!r){p.push(q(j.invalidText,a,j.format));return p}c=r.getTime();if(m&&c<k(m).getTime()){p.push(q(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){p.push(q(j.maxText,j.formatDate(h)))}if(n){l=r.getDay();for(;e<g;e++){if(l===n[e]){p.push(j.disabledDaysText);break}}}b=j.formatDate(r);if(d&&d.test(b)){p.push(q(j.disabledDatesText,b))}return p},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsHourInfo(g)){a=b.parse(e,g)}else{c=b.parse(e+" "+d.initTime,g+" "+d.initTimeFormat);if(c){a=b.clearTime(c)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return Ext.create("Ext.picker.Date",{pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}" class="{fieldCls}"></div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return b},getContentTarget:function(){return this.inputEl}});Ext.define("Ext.form.field.File",{extend:"Ext.form.field.Text",alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],uses:["Ext.button.Button","Ext.layout.component.field.File"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,componentLayout:"filefield",onRender:function(){var a=this,b;a.callParent(arguments);a.createButton();a.createFileInput();if(a.disabled){a.disableItems()}b=a.inputEl;b.dom.removeAttribute("name");if(a.buttonOnly){b.setDisplayed(false)}},createButton:function(){var a=this;a.button=Ext.widget("button",Ext.apply({ui:a.ui,renderTo:a.bodyEl,text:a.buttonText,cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,style:a.buttonOnly?"":"margin-left:"+a.buttonMargin+"px"},a.buttonConfig))},createFileInput:function(){var a=this;a.fileInputEl=a.button.el.createChild({name:a.getName(),cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1}).on("change",a.onFileChange,a)},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var b=this.fileInputEl,a=this.button;if(b){b.dom.disabled=true}if(a){a.disable()}},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;a.button.enable()},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","button");this.callParent()}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.}" hidefocus="on">','<em><span style="background:#{.}" unselectable="on">&#160;</span></em>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},onRender:function(c,b){var d=this,a=d.clickEvent;Ext.apply(d.renderData,{itemCls:d.itemCls,colors:d.colors});d.callParent(arguments);d.mon(d.el,a,d.handleClick,d,{delegate:"a"});if(a!="click"){d.mon(d.el,"click",Ext.emptyFn,d,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",sizeBodyContents:function(a,i){var e=this,b=e.owner,j=b.bodyEl,g=b.getToolbar(),h=b.textareaEl,c=b.iframeEl,d;if(Ext.isNumber(a)){a-=j.getFrameWidth("lr")}g.setWidth(a);h.setWidth(a);c.setWidth(a);if(Ext.isNumber(i)){d=i-g.getHeight()-j.getFrameWidth("tb");h.setHeight(d);c.setHeight(d)}}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],fieldSubTpl:['<div id="{cmpId}-toolbarWrap" class="{toolbarWrapCls}"></div>','<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" class="{textareaCls}" ','style="{size}" autocomplete="off"></textarea>','<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',{compiled:true,disableFormats:true}],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",fieldBodyCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.initLabelable();a.initField()},createToolbar:function(e){var h=this,g=[],j=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),d=Ext.baseCSSPrefix,c,i,b;function a(m,k,l){return{itemId:m,cls:d+"btn-icon",iconCls:d+"edit-"+m,enableToggle:k!==false,scope:e,handler:l||e.relayBtnCmd,clickEvent:"mousedown",tooltip:j?e.buttonTips[m]||b:b,overflowText:e.buttonTips[m].title||b,tabIndex:-1}}if(h.enableFont&&!Ext.isSafari2){c=Ext.widget("component",{renderTpl:['<select id="{id}-selectEl" class="{cls}">','<tpl for="fonts">','<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',"</tpl>","</select>"],renderData:{cls:d+"font-select",fonts:h.fontFamilies,defaultFont:h.defaultFont},childEls:["selectEl"],onDisable:function(){var k=this.selectEl;if(k){k.dom.disabled=true}Ext.Component.superclass.onDisable.apply(this,arguments)},onEnable:function(){var k=this.selectEl;if(k){k.dom.disabled=false}Ext.Component.superclass.onEnable.apply(this,arguments)}});g.push(c,"-")}if(h.enableFormat){g.push(a("bold"),a("italic"),a("underline"))}if(h.enableFontSize){g.push("-",a("increasefontsize",false,h.adjustFont),a("decreasefontsize",false,h.adjustFont))}if(h.enableColors){g.push("-",{itemId:"forecolor",cls:d+"btn-icon",iconCls:d+"edit-forecolor",overflowText:e.buttonTips.forecolor.title,tooltip:j?e.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(l,k){h.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+k:k);h.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:d+"btn-icon",iconCls:d+"edit-backcolor",overflowText:e.buttonTips.backcolor.title,tooltip:j?e.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(l,k){if(Ext.isGecko){h.execCmd("useCSS",false);h.execCmd("hilitecolor",k);h.execCmd("useCSS",true);h.deferFocus()}else{h.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+k:k);h.deferFocus()}this.up("menu").hide()}}]})})}if(h.enableAlignments){g.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(h.enableLinks){g.push("-",a("createlink",false,h.createLink))}if(h.enableLists){g.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(h.enableSourceEdit){g.push("-",a("sourceedit",true,function(k){h.toggleSourceEdit(!h.sourceEditMode)}))}}i=Ext.widget("toolbar",{renderTo:h.toolbarWrap,enableOverflow:true,items:g});if(c){h.fontSelect=c.selectEl;h.mon(h.fontSelect,"change",function(){h.relayCmd("fontname",h.fontSelect.dom.value);h.deferFocus()})}h.mon(i.el,"click",function(k){k.preventDefault()});h.toolbar=i},onDisable:function(){this.bodyEl.mask();this.callParent(arguments)},onEnable:function(){this.bodyEl.unmask();this.callParent(arguments)},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2;return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},onRender:function(){var a=this;a.onLabelableRender();a.addChildEls("toolbarWrap","iframeEl","textareaEl");a.callParent(arguments);a.textareaEl.dom.value=a.value||"";a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100});a.createToolbar(a);a.disableItems(true)},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){var a=Ext.baseCSSPrefix;return{cmpId:this.id,id:this.getInputId(),toolbarWrapCls:a+"html-editor-tb",textareaCls:a+"hidden",iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;"}},getSubTplMarkup:function(){var a=this.getSubTplData();return this.getTpl("fieldSubTpl").apply(a)},getBodyNaturalWidth:function(){return 565},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(a){this.getToolbar().items.each(function(b){if(b.getItemId()!=="sourceedit"){b.setDisabled(a)}})},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus()}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus()}g.fireEvent("editmodechange",g,b);g.doComponentLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){var e=this,b,d,a,c;if(e.initialized){b=e.getEditorBody();d=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");c=a.match(/text-align:(.*?);/i);if(c&&c[1]){d='<div style="'+c[0]+'">'+d+"</div>"}}d=e.cleanHtml(d);if(e.fireEvent("beforesync",e,d)!==false){e.textareaEl.dom.value=d;e.fireEvent("sync",e,d)}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(c);for(g in c){if(c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"tb","toolbarWrap","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){Ext.Array.forEach(Ext.Array.toArray(arguments),function(h){d[h].toggle(g.queryCommandState(h))})}if(e.enableFormat){b("bold","italic","underline")}if(e.enableAlignments){b("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&e.enableLists){b("insertorderedlist","insertunorderedlist")}Ext.menu.Manager.hideAll();e.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;c.focus();c.execCmd(b,a);c.updateToolbar()},10,this)},execCmd:function(d,c){var b=this,e=b.getDoc(),a;e.execCommand(d,false,c===a?null:c);b.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),a,d;if(b===h.TAB){h.stopEvent();a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");c.deferFocus()}}else{if(b===h.ENTER){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();a.win.focus();a.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");a.deferFocus()}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey();if(a===c.TAB){c.stopEvent();b.execCmd("InsertText","\t");b.deferFocus()}else{if(a===c.ENTER){c.stopEvent();b.execCmd("InsertHtml","<br /><br />");b.deferFocus()}}}}return null}(),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",getGroupValue:function(){var a=this.getManager().getChecked(this.name);return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(b,a){var c=this;c.callParent(arguments);if(b){this.getManager().getByName(c.name).each(function(d){if(d!==c){d.setValue(false)}},c)}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.picker.Time",{extend:"Ext.view.BoundList",alias:"widget.timepicker",requires:["Ext.data.Store","Ext.Date"],increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.store.filterBy(function(d){var e=d.get("date");return e>=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return Ext.create("Ext.data.Store",{fields:["disp","date"],data:e})}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.Picker",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}this.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());a[g?"minValue":"maxValue"]=c}},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,b.format));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a=Ext.create("Ext.picker.Time",{pickerField:b,selModel:{mode:"SINGLE"},floating:true,hidden:true,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,ownerCt:this.ownerCt,renderTo:document.body,maxHeight:b.pickerMaxHeight,focusOnToFront:false});b.mon(a.getSelectionModel(),{selectionchange:b.onListSelect,scope:b});return a},onExpand:function(){var d=this,a=d.pickerKeyNav,c=d.selectOnTab,b=d.getPicker(),e=b.getSelectionModel().lastSelected,g;if(!a){a=d.pickerKeyNav=Ext.create("Ext.view.BoundListKeyNav",this.inputEl,{boundList:b,forceKeyDown:true,tab:function(h){if(c){if(d.picker.highlightedItem){this.selectHighlighted(h)}else{d.collapse()}d.triggerBlur()}return true}});if(c){d.ignoreMonitorTab=true}}Ext.defer(a.enable,1,a);if(e){g=b.getNode(e);if(g){b.highlightItem(g);b.el.scrollChildIntoView(g,false)}}},onCollapse:function(){var b=this,a=b.pickerKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},onChange:function(){var b=this,a=b.picker;b.callParent(arguments);if(a){a.clearHighlight()}},onListSelect:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;b.setValue(d);b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}});Ext.define("Ext.grid.CellEditor",{extend:"Ext.Editor",constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}if(!Ext.isDefined(a.autoSize)){a.autoSize={width:"boundEl"}}this.callParent([a])},onShow:function(){var a=this.boundEl.first();if(a){a.hide()}this.callParent(arguments)},onHide:function(){var a=this.boundEl.first();if(a){a.show()}this.callParent(arguments)},afterRender:function(){this.callParent(arguments);var a=this.field;if(a.isXType("checkboxfield")){a.mon(a.inputEl,"mousedown",this.onCheckBoxMouseDown,this);a.mon(a.inputEl,"click",this.onCheckBoxClick,this)}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"column",reserveOffset:false,shrinkToFit:false,clearInnerCtOnLayout:true,beforeLayout:function(){var h=this,c=0,b=h.getLayoutItems(),a=b.length,g,e,d;if(!Ext.isDefined(h.availableSpaceOffset)){d=h.owner.up("tablepanel").verticalScroller;h.availableSpaceOffset=d?d.width-1:0}e=h.callParent(arguments);h.innerCt.setHeight(23);for(;c<a;c++){g=b[c];g.el.setStyle({height:"auto"});g.titleContainer.setStyle({height:"auto",paddingTop:"0"});if(g.componentLayout&&g.componentLayout.lastComponentSize){g.componentLayout.lastComponentSize.height=g.el.dom.offsetHeight}}return e},calculateChildBoxes:function(l,c){var j=this,b=j.callParent(arguments),g=b.boxes,a=b.meta,h=g.length,d=0,e,k;if(c.width&&!j.isHeader){if(j.owner.forceFit){for(;d<h;d++){e=g[d];k=e.component;k.minWidth=Ext.grid.plugin.HeaderResizer.prototype.minColWidth;k.flex=e.width}b=j.callParent(arguments)}else{if(a.tooNarrow){c.width=a.desiredSize}}}return b},afterLayout:function(){var m=this,a=m.owner,l,n,h,b,g,c,e=0,k,j,d;m.callParent(arguments);if(!m.owner.hideHeaders){if(a.lockableInjected){l=a.up("tablepanel").up("tablepanel");n=l.query("headercontainer:not([isHeader])");h=(n[0]===a)?n[1]:n[0];if(!h.rendered){return}g=h.layout.getRenderTarget().getViewSize().height;if(!g){return}b=this.getRenderTarget().getViewSize().height;if(!b){return}l.componentLayout.layoutBusy=true;d=b;if(b>g){h.layout.align="stretch";h.setCalculatedSize(h.getWidth(),a.getHeight(),h.ownerCt);delete h.layout.align;c=h.up("tablepanel")}else{if(g>b){d=g;this.align="stretch";a.setCalculatedSize(a.getWidth(),h.getHeight(),a.ownerCt);delete this.align;c=a.up("tablepanel")}}l.componentLayout.layoutBusy=false;k=n[0].layout.getLayoutItems().concat(n[1].layout.getLayoutItems())}else{d=this.getRenderTarget().getViewSize().height;k=m.getLayoutItems()}j=k.length;for(;e<j;e++){k[e].setPadding(d)}if(c){setTimeout(function(){c.doLayout()},1)}}},updateInnerCtSize:function(b,d){var c=this,a;if(!c.isHeader){c.tooNarrow=d.meta.tooNarrow;a=(c.reserveOffset?c.availableSpaceOffset:0);if(d.meta.tooNarrow){b.width=d.meta.desiredSize+a}else{b.width+=a}}return c.callParent(arguments)},doOwnerCtLayouts:function(){var a=this.owner.ownerCt;if(!a.componentLayout.layoutBusy){a.doComponentLayout()}}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView"],syncRowHeight:true,spacerHidden:true,headerCounter:0,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,g;if(c.subGridXType){g=c.subGridXType}else{var d=this.getXTypes().split("/"),b=d.length,e=d[b-1],a=d[b-2];if(a!=="tablepanel"){g=a}else{g=e}}return g},injectLockable:function(){this.lockable=true;this.hasView=true;var k=this,a=k.determineXTypeToCreate(),h=k.getSelectionModel(),b={xtype:a,enableAnimations:false,scroll:false,scrollerOwner:false,selModel:h,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked"},j={xtype:a,enableAnimations:false,scrollerOwner:false,selModel:h,border:false},e=0,d,c,g;k.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(j,k,k.normalCfgCopy);Ext.copyTo(b,k,k.lockedCfgCopy);for(;e<k.normalCfgCopy.length;e++){delete k[k.normalCfgCopy[e]]}for(e=0;e<k.lockedCfgCopy.length;e++){delete k[k.lockedCfgCopy[e]]}k.addEvents("lockcolumn","unlockcolumn");k.addStateEvents(["lockcolumn","unlockcolumn"]);k.lockedHeights=[];k.normalHeights=[];d=k.processColumns(k.columns);b.width=d.lockedWidth+Ext.num(h.headerWidth,0);b.columns=d.locked;j.columns=d.normal;k.store=Ext.StoreManager.lookup(k.store);b.store=k.store;j.store=k.store;j.flex=1;b.viewConfig=k.lockedViewConfig||{};b.viewConfig.loadingUseMsg=false;j.viewConfig=k.normalViewConfig||{};Ext.applyIf(b.viewConfig,k.viewConfig);Ext.applyIf(j.viewConfig,k.viewConfig);k.normalGrid=Ext.ComponentManager.create(j);k.lockedGrid=Ext.ComponentManager.create(b);k.view=Ext.create("Ext.grid.LockingView",{locked:k.lockedGrid,normal:k.normalGrid,panel:k});if(k.syncRowHeight){k.lockedGrid.getView().on({refresh:k.onLockedGridAfterRefresh,itemupdate:k.onLockedGridAfterUpdate,scope:k});k.normalGrid.getView().on({refresh:k.onNormalGridAfterRefresh,itemupdate:k.onNormalGridAfterUpdate,scope:k})}c=k.lockedGrid.headerCt;g=k.normalGrid.headerCt;c.lockedCt=true;c.lockableInjected=true;g.lockableInjected=true;c.on({columnshow:k.onLockedHeaderShow,columnhide:k.onLockedHeaderHide,columnmove:k.onLockedHeaderMove,sortchange:k.onLockedHeaderSortChange,columnresize:k.onLockedHeaderResize,scope:k});g.on({columnmove:k.onNormalHeaderMove,sortchange:k.onNormalHeaderSortChange,scope:k});k.normalGrid.on({scrollershow:k.onScrollerShow,scrollerhide:k.onScrollerHide,scope:k});k.lockedGrid.on("afterlayout",k.onLockedGridAfterLayout,k,{single:true});k.modifyHeaderCt();k.items=[k.lockedGrid,k.normalGrid];k.relayHeaderCtEvents(c);k.relayHeaderCtEvents(g);k.layout={type:"hbox",align:"stretch"}},processColumns:function(g){var e=0,a=g.length,b=1,d=[],c=[],h;for(;e<a;++e){h=g[e];h.processed=true;if(h.locked){if(!h.hidden){b+=h.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(h)}else{c.push(h)}if(!h.headerId){h.headerId=(h.initialConfig||h).id||("L"+(++this.headerCounter))}}return{lockedWidth:b,locked:d,normal:c}},onLockedGridAfterLayout:function(){var b=this,a=b.lockedGrid.getView();a.on({beforerefresh:b.destroySpacer,scope:b})},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalGridAfterRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedGridAfterRefresh()}},getSpacerEl:function(){var d=this,b,a,c;if(!d.spacerEl){b=Ext.getScrollBarWidth()+(Ext.isIE?2:0);a=d.lockedGrid.getView();c=a.el;d.spacerEl=Ext.DomHelper.append(c,{cls:d.spacerHidden?(Ext.baseCSSPrefix+"hidden"):"",style:"height: "+b+"px;"},true)}return d.spacerEl},destroySpacer:function(){var a=this;if(a.spacerEl){a.spacerEl.destroy();delete a.spacerEl}},onLockedGridAfterRefresh:function(){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=g[b].clientHeight}e.syncRowHeights()},onNormalGridAfterRefresh:function(){var e=this,a=e.normalGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=g[b].clientHeight}e.syncRowHeights()},onLockedGridAfterUpdate:function(a,b,c){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()},onNormalGridAfterUpdate:function(a,b,c){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()},syncRowHeights:function(){var l=this,b=l.lockedHeights,m=l.normalHeights,a=[],k=b.length,h=0,n,d,e,j,g=l.getVerticalScroller(),c;if(b.length&&m.length){n=l.lockedGrid.getView();d=l.normalGrid.getView();e=n.el.query(n.getItemSelector());j=d.el.query(d.getItemSelector());for(;h<k;h++){if(!isNaN(b[h])&&!isNaN(m[h])){if(b[h]>m[h]){Ext.fly(j[h]).setHeight(b[h])}else{if(b[h]<m[h]){Ext.fly(e[h]).setHeight(m[h])}}}}l.normalGrid.invalidateScroller();if(g&&g.setViewScrollTop){g.setViewScrollTop(l.virtualScrollTop)}else{c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;n.el.dom.scrollTop=c}l.lockedHeights=[];l.normalHeights=[]}},onScrollerShow:function(a,b){if(b==="horizontal"){this.spacerHidden=false;this.getSpacerEl().removeCls(Ext.baseCSSPrefix+"hidden")}},onScrollerHide:function(a,b){if(b==="horizontal"){this.spacerHidden=true;if(this.spacerEl){this.spacerEl.addCls(Ext.baseCSSPrefix+"hidden")}}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var g=this,h=g.unlockText,i=g.lockText,c=Ext.baseCSSPrefix+"hmenu-unlock",e=Ext.baseCSSPrefix+"hmenu-lock",a=Ext.Function.bind(g.onUnlockMenuClick,g),d=Ext.Function.bind(g.onLockMenuClick,g);return function(){var j=Ext.grid.header.Container.prototype.getMenuItems.call(this);j.push("-",{cls:c,text:h,handler:a,disabled:!b});j.push({cls:e,text:i,handler:d,disabled:b});return j}},lock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;a=a||g.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}g.remove(a,false);b.suspendLayout=true;a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}b.suspendLayout=false;c.syncLockedSection();c.fireEvent("lockcolumn",c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var b=this,a=b.lockedGrid.headerCt.getFullWidth(true);b.lockedGrid.setWidth(a+1);b.doComponentLayout()},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;if(!Ext.isDefined(d)){d=0}a=a||b.getMenu().activeHeader;b.remove(a,false);c.syncLockedWidth();c.lockedGrid.getView().refresh();a.locked=false;g.insert(d,a);c.normalGrid.getView().refresh();c.fireEvent("unlockcolumn",c,a)},applyColumnsState:function(e){var l=this,c=l.lockedGrid,d=c.headerCt,j=l.normalGrid.headerCt,m=d.items,g=j.items,a,i=[],k=[],b,h=1;Ext.each(e,function(n){function p(q){return q.headerId==n.id}b=true;if(!(a=m.findBy(p))){a=g.findBy(p);b=false}if(a){if(a.applyColumnState){a.applyColumnState(n)}if(!Ext.isDefined(a.locked)){a.locked=b}if(a.locked){i.push(a);if(!a.hidden&&Ext.isNumber(a.width)){h+=a.width}}else{k.push(a)}}});if(i.length+k.length==m.getCount()+g.getCount()){d.removeAll(false);j.removeAll(false);d.add(i);j.add(k);c.setWidth(h)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){e.headerCt.suspendLayout=true;d.headerCt.suspendLayout=true;e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked);d.headerCt.add(b.normal)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}if(b){e.headerCt.suspendLayout=false;d.headerCt.suspendLayout=false;e.headerCt.forceComponentLayout();d.headerCt.forceComponentLayout()}}});Ext.define("Ext.grid.Scroller",{extend:"Ext.Component",alias:"widget.gridscroller",weight:110,baseCls:Ext.baseCSSPrefix+"scroller",focusable:false,reservedSpace:0,renderTpl:['<div class="'+Ext.baseCSSPrefix+'scroller-ct" id="{baseId}_ct">','<div class="'+Ext.baseCSSPrefix+'stretcher" id="{baseId}_stretch"></div>',"</div>"],initComponent:function(){var c=this,b=c.dock,a=Ext.baseCSSPrefix+"scroller-vertical";c.offsets={bottom:0};c.scrollProp="scrollTop";c.vertical=true;c.sizeProp="width";if(b==="top"||b==="bottom"){a=Ext.baseCSSPrefix+"scroller-horizontal";c.sizeProp="height";c.scrollProp="scrollLeft";c.vertical=false;c.weight+=5}c.cls+=(" "+a);Ext.applyIf(c.renderSelectors,{stretchEl:"."+Ext.baseCSSPrefix+"stretcher",scrollEl:"."+Ext.baseCSSPrefix+"scroller-ct"});c.callParent()},ensureDimension:function(){var a=this,b=a.sizeProp;a[b]=a.scrollerSize=Ext.getScrollbarSize()[b]},initRenderData:function(){var b=this,a=b.callParent(arguments)||{};a.baseId=b.id;return a},afterRender:function(){var a=this;a.callParent();a.mon(a.scrollEl,"scroll",a.onElScroll,a);Ext.cache[a.el.id].skipGarbageCollection=true},onAdded:function(a){this.ownerGrid=a;this.callParent(arguments)},getSizeCalculation:function(){var h=this,c=h.getPanel(),g=1,b=1,d,i;if(!h.vertical){var e=c.query("tableview"),a=e[1]||e[0];if(!a){return false}g=a.headerCt.getFullWidth();if(Ext.isIEQuirks){g--}}else{d=c.down("tableview:not([lockableInjected])");if(!d||!d.el){return false}i=d.el.child("table",true);if(!i){return false}b=i.offsetHeight}if(isNaN(g)){g=1}if(isNaN(b)){b=1}return{width:g,height:b}},invalidate:function(d){var g=this,e=g.stretchEl;if(!e||!g.ownerCt){return}var j=g.getSizeCalculation(),i=g.scrollEl,b=i.dom,c=g.reservedSpace,h,a=5;if(j){e.setSize(j);j=g.el.getSize(true);if(g.vertical){j.width+=a;j.height-=c;h="left"}else{j.width-=c;j.height+=a;h="top"}i.setSize(j);b.style[h]=(-a)+"px";b.scrollTop=b.scrollTop}},afterComponentLayout:function(){this.callParent(arguments);this.invalidate()},restoreScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;if(c._scrollPos!==null&&a){a[c.scrollProp]=c._scrollPos;c._scrollPos=null}},setReservedSpace:function(b){var a=this;if(a.reservedSpace!==b){a.reservedSpace=b;a.invalidate()}},saveScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;c._scrollPos=a?a[c.scrollProp]:null},setScrollTop:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollTop=Ext.Number.constrain(c,0,a.scrollHeight-a.clientHeight)}},setScrollLeft:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollLeft=Ext.Number.constrain(c,0,a.scrollWidth-a.clientWidth)}},scrollByDeltaY:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollTop(a.scrollTop+c)}},scrollByDeltaX:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollLeft(a.scrollLeft+c)}},scrollToTop:function(){this.setScrollTop(0)},onElScroll:function(a,b){this.fireEvent("bodyscroll",a,b)},getPanel:function(){var a=this;if(!a.panel){a.panel=this.up("[scrollerOwner]")}return a.panel}});Ext.define("Ext.grid.PagingScroller",{extend:"Ext.grid.Scroller",alias:"widget.paginggridscroller",percentageFromEdge:0.35,scrollToLoadBuffer:200,activePrefetch:true,chunkSize:50,snapIncrement:25,syncScroll:true,initComponent:function(){var a=this,b=a.store;b.on("guaranteedrange",a.onGuaranteedRange,a);a.callParent(arguments)},onGuaranteedRange:function(c,g,a){var d=this,e=d.store,b;if(c.length&&d.visibleStart<c[0].index){return}e.loadRecords(c);if(!d.firstLoad){if(d.rendered){d.invalidate()}else{d.on("afterrender",d.invalidate,d,{single:true})}d.firstLoad=true}else{if(d.scrollEl&&d.scrollEl.dom&&d.scrollEl.dom.scrollHeight){d.syncTo()}}},syncTo:function(){var i=this,b=i.getPanel(),j=b.store,h=this.scrollEl.dom,d=i.visibleStart-j.guaranteedStart,c=d*i.rowHeight,k=h.scrollHeight,e=h.clientHeight,a=h.scrollTop,g;if(Ext.isIE9&&Ext.isStrict){e=h.offsetHeight+2}g=(k-e-a<=0);this.setViewScrollTop(c,g)},getPageData:function(){var b=this.getPanel(),c=b.store,a=c.getTotalCount();return{total:a,currentPage:c.currentPage,pageCount:Math.ceil(a/c.pageSize),fromRecord:((c.currentPage-1)*c.pageSize)+1,toRecord:Math.min(c.currentPage*c.pageSize,a)}},onElScroll:function(y,m){var A=this,k=A.getPanel(),h=k.store,z=h.pageSize,c=h.guaranteedStart,w=h.guaranteedEnd,v=h.getTotalCount(),j=Math.ceil(A.percentageFromEdge*z),B=m.scrollTop,g=Math.floor(B/A.rowHeight),l=k.down("tableview"),i=l.el,n=i.getHeight(),b=Math.ceil(n/A.rowHeight),a=g+b,d=Math.floor(g/z),s=Math.floor(a/z)+2,x=Math.ceil(v/z),p=A.snapIncrement,u=Math.floor(g/p)*p,q=u+z-1,r=A.activePrefetch;A.visibleStart=g;A.visibleEnd=a;A.syncScroll=true;if(v>=z){if(q>v-1){A.cancelLoad();if(h.rangeSatisfied(v-z,v-1)){A.syncScroll=true}h.guaranteeRange(v-z,v-1)}else{if(g<=c||a>w){if(g<=c){u-=p;q-=p;if(u<0){u=0;q=z}}if(h.rangeSatisfied(u,q)){A.cancelLoad();h.guaranteeRange(u,q)}else{h.mask();A.attemptLoad(u,q)}A.syncScroll=false}else{if(r&&g<(c+j)&&d>0){A.syncScroll=true;h.prefetchPage(d)}else{if(r&&a>(w-j)&&s<x){A.syncScroll=true;h.prefetchPage(s)}}}}}if(A.syncScroll){A.syncTo()}},getSizeCalculation:function(){var i=this,b=i.ownerGrid,d=b.getView(),e=i.store,h=i.dock,c=i.el.dom,g=1,a=1;if(!i.rowHeight){i.rowHeight=d.el.down(d.getItemSelector()).getHeight(false,true)}a=e[(!e.remoteFilter&&e.isFiltered())?"getCount":"getTotalCount"]()*i.rowHeight;if(isNaN(g)){g=1}if(isNaN(a)){a=1}return{width:g,height:a}},attemptLoad:function(c,a){var b=this;if(!b.loadTask){b.loadTask=Ext.create("Ext.util.DelayedTask",b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(c,a){var b=this.getPanel().store;b.guaranteeRange(c,a)},setViewScrollTop:function(c,d){var n=this,b=n.getPanel(),m=b.query("tableview"),g=0,j=m.length,a,e,h,l,k=n.el.dom;b.virtualScrollTop=c;a=m[1]||m[0];e=a.el.dom;l=((b.store.pageSize*n.rowHeight)-e.clientHeight);h=(c%((b.store.pageSize*n.rowHeight)+1));if(d){h=l}if(h>l){return}for(;g<j;g++){m[g].el.dom.scrollTop=h}}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.Scroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scrollDelta:40,scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,verticalScrollDock:"right",verticalScrollerType:"gridscroller",horizontalScrollerPresentCls:Ext.baseCSSPrefix+"horizontal-scroller-present",verticalScrollerPresentCls:Ext.baseCSSPrefix+"vertical-scroller-present",scrollerOwner:true,invalidateScrollerOnRefresh:true,enableColumnMove:true,enableColumnResize:true,enableColumnHide:true,initComponent:function(){var h=this,a=h.scroll,d=false,c=false,j=h.columns||h.colModel,g=0,b,e=h.border;if(h.hideHeaders){e=false}h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");if(j instanceof Ext.grid.header.Container){h.headerCt=j;h.headerCt.border=e;h.columns=h.headerCt.items.items}else{if(Ext.isArray(j)){j={items:j,border:e}}Ext.apply(j,{forceFit:h.forceFit,sortable:h.sortableColumns,enableColumnMove:h.enableColumnMove,enableColumnResize:h.enableColumnResize,enableColumnHide:h.enableColumnHide,border:e});h.columns=j.items;if(h.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",h.columns).length){h.self.mixin("lockable",Ext.grid.Lockable);h.injectLockable()}}h.addEvents("reconfigure","viewready","scrollerhide","scrollershow");h.bodyCls=h.bodyCls||"";h.bodyCls+=(" "+h.extraBodyCls);h.cls=h.cls||"";h.cls+=(" "+h.extraBaseCls);delete h.autoScroll;if(!h.hasView){if(!h.headerCt){h.headerCt=Ext.create("Ext.grid.header.Container",j)}h.columns=h.headerCt.items.items;if(h.hideHeaders){h.headerCt.height=0;h.headerCt.border=false;h.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");h.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){h.headerCt.style={display:"none"}}}if(a===true||a==="both"){d=c=true}else{if(a==="horizontal"){c=true}else{if(a==="vertical"){d=true}else{h.headerCt.availableSpaceOffset=0}}}if(d){h.verticalScroller=Ext.ComponentManager.create(h.initVerticalScroller());h.mon(h.verticalScroller,{bodyscroll:h.onVerticalScroll,scope:h})}if(c){h.horizontalScroller=Ext.ComponentManager.create(h.initHorizontalScroller());h.mon(h.horizontalScroller,{bodyscroll:h.onHorizontalScroll,scope:h})}h.headerCt.on("resize",h.onHeaderResize,h);h.relayHeaderCtEvents(h.headerCt);h.features=h.features||[];if(!Ext.isArray(h.features)){h.features=[h.features]}h.dockedItems=h.dockedItems||[];h.dockedItems.unshift(h.headerCt);h.viewConfig=h.viewConfig||{};h.viewConfig.invalidateScrollerOnRefresh=h.invalidateScrollerOnRefresh;b=h.getView();b.on({afterrender:function(){b.el.scroll=Ext.Function.bind(h.elScroll,h);h.mon(b.el,{mousewheel:h.onMouseWheel,scope:h})},single:true});h.items=[b];h.hasView=true;h.mon(b.store,{load:h.onStoreLoad,scope:h});h.mon(b,{viewReady:h.onViewReady,resize:h.onViewResize,refresh:{fn:h.onViewRefresh,scope:h,buffer:50},scope:h});this.relayEvents(b,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"])}h.callParent(arguments)},onRender:function(){var a=this.verticalScroller,b=this.horizontalScroller;if(a){a.ensureDimension()}if(b){b.ensureDimension()}this.callParent(arguments)},initStateEvents:function(){var a=this.stateEvents;Ext.each(["columnresize","columnmove","columnhide","columnshow","sortchange"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},initHorizontalScroller:function(){var b=this,a={xtype:"gridscroller",dock:"bottom",section:b,store:b.store};return a},initVerticalScroller:function(){var b=this,a=b.verticalScroller||{};Ext.applyIf(a,{xtype:b.verticalScrollerType,dock:b.verticalScrollDock,store:b.store});return a},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b.columns=(a.headerCt||a).getColumnsState();if(c){b.sort={property:c.property,direction:c.direction}}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sorters.add(Ext.create("Ext.util.Sorter",{property:e.property,direction:e.direction}))}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=a.createComponent(Ext.apply({},a.viewConfig,{deferInitialRefresh:a.deferRowRender,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,elScroll:function(d,e,b){var c=this,a;if(d==="up"||d==="left"){e=-e}if(d==="down"||d==="up"){a=c.getVerticalScroller();if(a){a.scrollByDeltaY(e)}}else{a=c.getHorizontalScroller();if(a){a.scrollByDeltaX(e)}}},processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){if(this.determineScrollbarsRunning){return}this.determineScrollbarsRunning=true;var i=this,j=i.view,d,a,e,k,m,g,h=i.verticalScroller,c=i.horizontalScroller,l=(h&&h.ownerCt===i?1:0)|(c&&c.ownerCt===i?2:0),b=0;if(!i.collapsed&&j&&j.viewReady){d=j.el.getSize();k=d.width+((l&1)?h.width:0);g=d.height+((l&2)?c.height:0);e=(i.headerCt.query("[flex]").length&&!i.headerCt.layout.tooNarrow)?0:i.headerCt.getFullWidth();if(h&&h.el){m=h.getSizeCalculation().height}else{a=j.el.child("table",true);m=a?a.offsetHeight:0}if(m>g){b=1;if(c&&((k-e)<h.width)){b=3}}else{if(e>k){b=2;if(h&&((g-m)<c.height)){b=3}}}if(b!==l){i.suspendLayout=true;if(b&1){i.showVerticalScroller()}else{i.hideVerticalScroller()}if(b&2){i.showHorizontalScroller()}else{i.hideHorizontalScroller()}i.suspendLayout=false;i.doComponentLayout();i.getLayout().layout()}}delete i.determineScrollbarsRunning},onViewResize:function(){this.determineScrollbars()},afterComponentLayout:function(){this.callParent(arguments);this.determineScrollbars();this.invalidateScroller()},onHeaderResize:function(){if(!this.componentLayout.layoutBusy&&this.view&&this.view.rendered){this.determineScrollbars();this.invalidateScroller()}},afterCollapse:function(){var a=this;if(a.verticalScroller){a.verticalScroller.saveScrollPos()}if(a.horizontalScroller){a.horizontalScroller.saveScrollPos()}a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);if(a.verticalScroller){a.verticalScroller.restoreScrollPos()}if(a.horizontalScroller){a.horizontalScroller.restoreScrollPos()}},hideHorizontalScroller:function(){var a=this;if(a.horizontalScroller&&a.horizontalScroller.ownerCt===a){a.verticalScroller.setReservedSpace(0);a.removeDocked(a.horizontalScroller,false);a.removeCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollerhide",a.horizontalScroller,"horizontal")}},showHorizontalScroller:function(){var a=this;if(a.verticalScroller){a.verticalScroller.setReservedSpace(Ext.getScrollbarSize().height-1)}if(a.horizontalScroller&&a.horizontalScroller.ownerCt!==a){a.addDocked(a.horizontalScroller);a.addCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollershow",a.horizontalScroller,"horizontal")}},hideVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(false);if(a.verticalScroller&&a.verticalScroller.ownerCt===a){a.removeDocked(a.verticalScroller,false);a.removeCls(a.verticalScrollerPresentCls);a.fireEvent("scrollerhide",a.verticalScroller,"vertical")}},showVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(true);if(a.verticalScroller&&a.verticalScroller.ownerCt!==a){a.addDocked(a.verticalScroller);a.addCls(a.verticalScrollerPresentCls);a.fireEvent("scrollershow",a.verticalScroller,"vertical")}},setHeaderReserveOffset:function(a){var c=this.headerCt,b=c.layout;if(b&&b.reserveOffset!==a){b.reserveOffset=a;if(!this.suspendLayout){c.doLayout()}}},invalidateScroller:function(){var b=this,a=b.verticalScroller,c=b.horizontalScroller;if(a){a.invalidate()}if(c){c.invalidate()}},onHeaderMove:function(c,d,a,b){this.view.refresh()},onHeaderHide:function(a,b){this.invalidateScroller()},onHeaderShow:function(a,b){this.invalidateScroller()},getVerticalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock="+this.verticalScrollDock+"]")},getHorizontalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock=bottom]")},onMouseWheel:function(n){var p=this,k=p.getVerticalScroller(),q=p.getHorizontalScroller(),b=-p.scrollDelta,c=n.getWheelDeltas(),i=b*c.x,h=b*c.y,m,r,a,s,d,j,l,g;if(q){r=q.scrollEl;if(r){s=r.dom;j=s.scrollLeft!==s.scrollWidth-s.clientWidth;d=s.scrollLeft!==0}}if(k){m=k.scrollEl;if(m){a=m.dom;l=a.scrollTop!==a.scrollHeight-a.clientHeight;g=a.scrollTop!==0}}if(q){if((i<0&&d)||(i>0&&j)){n.stopEvent();q.scrollByDeltaX(i)}}if(k){if((h<0&&g)||(h>0&&l)){n.stopEvent();k.scrollByDeltaY(h)}}},onViewReady:function(){var a=this;a.fireEvent("viewready",a);if(a.deferRowRender){a.determineScrollbars();a.invalidateScroller()}},onViewRefresh:function(){var a=this;if(!a.rendering){this.determineScrollbars();if(this.invalidateScrollerOnRefresh){this.invalidateScroller()}}},setScrollTop:function(d){var c=this,b=c.getScrollerOwner(),a=c.getVerticalScroller();b.virtualScrollTop=d;if(a){a.setScrollTop(d)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},scrollByDeltaY:function(a){var b=this.getVerticalScroller();if(b){b.scrollByDeltaY(a)}},scrollByDeltaX:function(a){var b=this.getHorizontalScroller();if(b){b.scrollByDeltaX(a)}},getLhsMarker:function(){var a=this;if(!a.lhsMarker){a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.lhsMarker},getRhsMarker:function(){var a=this;if(!a.rhsMarker){a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.rhsMarker},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onVerticalScroll:function(e,g){var b=this.getScrollerOwner(),c=b.query("tableview"),d=0,a=c.length;for(;d<a;d++){c[d].el.dom.scrollTop=g.scrollTop}},onHorizontalScroll:function(d,e){var b=this.getScrollerOwner(),c=b.query("tableview"),a=c[1]||c[0];a.el.dom.scrollLeft=e.scrollLeft;this.headerCt.el.dom.scrollLeft=e.scrollLeft},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.horizontalScroller,this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{if(b){d.suspendLayout=true;d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}if(b){d.suspendLayout=false;c.forceComponentLayout()}}c.fireEvent("reconfigure",c)}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"."+Ext.baseCSSPrefix+"grid-row",cellSelector:"."+Ext.baseCSSPrefix+"grid-cell",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp("x-grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,initComponent:function(){var a=this;a.scrollState={};a.selModel.view=a;a.headerCt.view=a;a.initFeatures();a.tpl="<div></div>";a.callParent();a.mon(a.store,{load:a.onStoreLoad,scope:a})},onStoreLoad:function(){var a=this;if(a.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!a.scrollToTopTask){a.scrollToTopTask=Ext.create("Ext.util.DelayedTask",a.scrollToTop,a)}a.scrollToTopTask.delay(1)}else{a.scrollToTop()}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=Ext.create("Ext.util.MixedCollection");for(;b<a;b++){if(!c[b].isFeature){c[b]=Ext.create("feature."+c[b].ftype,c[b])}c[b].view=d;d.featuresMC.add(c[b])}},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();a.mon(a.el,{scroll:a.fireBodyScroll,scope:a});a.el.unselectable();a.attachEventsForFeatures()},fireBodyScroll:function(b,a){this.fireEvent("bodyscroll",b,a)},prepareData:function(c,k,e){var h=this,j=h.headerCt.prepareData(c,k,e,h,h.ownerCt),a=h.features,g=a.length,d=0,b,l;for(;d<g;d++){l=a[d];if(l.isFeature){Ext.apply(j,l.getAdditionalData(c,k,e,j,h))}}return j},collectData:function(d,n){var p=this.callParent(arguments),c=this.headerCt,m=c.getFullWidth(),b=this.features,k=b.length,a={rows:p,fullWidth:m},g=0,q,e=0,l,h;l=p.length;if(this.getRowClass){for(;e<l;e++){h={};p[e]["rowCls"]=this.getRowClass(d[e],e,h,this.store)}}for(;g<k;g++){q=b[g];if(q.isFeature&&q.collectData&&!q.disabled){a=q.collectData(d,p,n,m,a);break}}return a},onHeaderResize:function(e,a,d){var c=this,b=c.el;if(b){c.saveScrollState();if(Ext.isIE6||Ext.isIE7){if(e.el.hasCls(Ext.baseCSSPrefix+"column-header-first")){a+=1}}b.select("."+Ext.baseCSSPrefix+"grid-col-resizer-"+e.id).setWidth(a);b.select("."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(c.headerCt.getFullWidth());c.restoreScrollState();if(!c.ignoreTemplate){c.setNewTemplate()}if(!d){c.el.focus()}}},onHeaderShow:function(c,d,b){var a=this;a.ignoreTemplate=true;if(d.oldWidth){a.onHeaderResize(d,d.oldWidth,b);delete d.oldWidth}else{if(d.width&&!d.flex){a.onHeaderResize(d,d.width,b)}}delete a.ignoreTemplate;a.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({columns:a,features:b.features})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(b){var h=b.row,e=b.column,d=this.store,g=this.getNode(h),i=this.headerCt.getHeaderAtIndex(e),c,a=false;if(i&&g){c=i.getCellSelector();a=Ext.fly(g).down(c)}return a},onRowFocus:function(d,b,a){var c=this,e=c.getNode(d);if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var g=this,j=g.getNode(b),c=g.el,h=0,a=g.ownerCt,i,d,e;if(j&&c){d=c.getRegion();i=Ext.fly(j).getRegion();if(i.top<d.top){h=i.top-d.top}else{if(i.bottom>d.bottom){h=i.bottom-d.bottom}}e=g.getRecord(j);b=g.store.indexOf(e);if(h){a.scrollByDeltaY(h)}g.fireEvent("rowfocus",e,j,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;if(k){i=k.getRegion();if(i.top<c.top){d=i.top-c.top}else{if(i.bottom>c.bottom){d=i.bottom-c.bottom}}if(i.left<c.left){e=i.left-c.left}else{if(i.right>c.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(b,a){this.callParent(arguments)},saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState,c=this.headerCt.el.dom;c.scrollLeft=b.scrollLeft=a.left;b.scrollTop=a.top}},refresh:function(){this.setNewTemplate();this.callParent(arguments)},processItemEvent:function(b,m,j,d){var h=this,k=d.getTarget(h.cellSelector,m),i=k?k.cellIndex:-1,a=h.statics().EventMap,c=h.getSelectionModel(),g=d.type,l;if(g=="keydown"&&!k&&c.getCurrentPosition){k=h.getCellByPosition(c.getCurrentPosition());if(k){k=k.dom;i=k.cellIndex}}l=h.fireEvent("uievent",g,h,k,j,i,d);if(l===false||h.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}return !((h["onBeforeCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("beforecell"+g,h,k,i,b,m,j,d)===false)||(h["onCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("cell"+g,h,k,i,b,m,j,d)===false))},processSpecialEvent:function(k){var n=this,b=n.statics().EventMap,d=n.features,m=d.length,p=k.type,g,q,h,j,c,l,a=n.ownerCt;n.callParent(arguments);if(p=="mouseover"||p=="mouseout"){return}for(g=0;g<m;g++){q=d[g];if(q.hasFeatureEvent){j=k.getTarget(q.eventSelector,n.getTargetEl());if(j){h=q.eventPrefix;c=q.getFireEventArgs("before"+h+p,n,j,k);l=q.getFireEventArgs(h+p,n,j,k);if((n.fireEvent.apply(n,c)===false)||(a.fireEvent.apply(a,c)===false)||(n.fireEvent.apply(n,l)===false)||(a.fireEvent.apply(a,l)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(h){var a=h.getCellInnerSelector(),c=this.el.query(a),d=0,g=c.length,e=h.el.dom.scrollWidth,b;for(;d<g;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,p){var j=this,q=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:q,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||q===k-1){return false}if(!h.ctrlKey){i.row=q+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||q===0){return false}if(!h.ctrlKey){i.row=q-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(q===0){return false}else{if(!h.ctrlKey){i.row=q-1}else{i.row=0}}break;case"down":if(q===k-1){return false}else{if(!h.ctrlKey){i.row=q+1}else{i.row=k-1}}break}if(a&&a.call(p||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[0];return c.getHeaderIndex(b)},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[d.length-1];return c.getHeaderIndex(b)},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,invalidateScrollerOnRefresh:true,scrollToTop:function(){if(this.rendered){var b=this.ownerCt,a=b.verticalScroller;if(a){a.scrollToTop()}}},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onUpdate:function(d,a,b){var c=d.indexOf(a);this.callParent(arguments);this.doStripeRows(c,c)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),g=d.length,c=0,e;for(;c<g;c++){e=d[c];e.className=e.className.replace(this.rowClsRe," ");b++;if(b%2===0){e.className+=(" "+this.altRowCls)}}}},refresh:function(b){this.callParent(arguments);this.doStripeRows(0);var a=this.up("gridpanel");if(a&&this.invalidateScrollerOnRefresh){a.invalidateScroller()}}});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,normalCfgCopy:["invalidateScrollerOnRefresh","verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:["invalidateScrollerOnRefresh"],initComponent:function(){var a=this;if(a.columnLines){a.setColumnLines(a.columnLines)}a.callParent()},setColumnLines:function(a){var b=this,c=(a)?"addClsWithUI":"removeClsWithUI";b[c]("with-col-lines")}});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=Ext.create("Ext.util.HashMap");b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}if(c.floatingButtons){c.floatingButtons.child("#update").setDisabled(!a)}c.isValid=a},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){this.setField(a)},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){b.getEditor().setWidth(a-2);if(this.isVisible()){this.reposition()}},onColumnHide:function(a){a.getEditor().hide();if(this.isVisible()){this.reposition()}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();if(this.isVisible()){this.reposition()}},onColumnMove:function(b,a,c){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}},onFieldAdd:function(e,a,b){var c=this,g=c.editingPlugin.grid.headerCt.getHeaderIndex(b),d=b.getEditor({xtype:"displayfield"});c.insert(g,d)},onFieldRemove:function(g,a,b){var c=this,e=b.getEditor(),d=e.el;c.remove(e,false);if(d){d.remove()}},onFieldReplace:function(e,a,c,b){var d=this;d.onFieldRemove(e,a,b)},clearFields:function(){var a=this,b=a.columns;b.each(function(c){b.removeAtKey(c)})},getFloatingButtons:function(){var d=this,e=Ext.baseCSSPrefix,c=e+"grid-row-editor-buttons",b=d.editingPlugin,a;if(!d.floatingButtons){a=d.floatingButtons=Ext.create("Ext.Container",{renderTpl:['<div class="{baseCls}-ml"></div>','<div class="{baseCls}-mr"></div>','<div class="{baseCls}-bl"></div>','<div class="{baseCls}-br"></div>','<div class="{baseCls}-bc"></div>'],renderTo:d.el,baseCls:c,layout:{type:"hbox",align:"middle"},defaults:{margins:"0 1 0 1"},items:[{itemId:"update",flex:1,xtype:"button",handler:b.completeEdit,scope:b,text:d.saveBtnText,disabled:!d.isValid},{flex:1,xtype:"button",handler:b.cancelEdit,scope:b,text:d.cancelBtnText}]});d.mon(a.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return d.floatingButtons},reposition:function(s){var u=this,c=u.context,e=c&&Ext.get(c.row),q=u.getFloatingButtons(),r=q.el,a=u.editingPlugin.grid,g=a.view.el,t=a.verticalScroller,p=a.headerCt.getFullWidth(),v=a.getWidth(),l=Math.min(p,v),n=a.view.el.dom.scrollLeft,i=q.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){if(t){t.invalidate();r.scrollIntoView(g,false)}if(s&&s.callback){s.callback.call(s.scope||u)}};if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+10;if(Ext.isIE){m+=2}if(u.getHeight()!=m){u.setHeight(m);u.el.setLeft(0)}if(s){var b={to:{y:j},duration:s.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5;u.el.setY(j)}}};u.animate(b)}else{u.el.setY(j);k()}}if(u.getWidth()!=p){u.setWidth(p)}r.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a instanceof Ext.grid.column.Column){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeKey(b.id)},setField:function(a){var b=this,c;if(Ext.isArray(a)){Ext.Array.forEach(a,b.setField,b);return}c=a.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});c.margins="0 0 0 2";c.setWidth(a.getDesiredWidth()-2);b.mon(c,"change",b.onFieldChange,b);b.columns.add(c.id,a);if(a.hidden){b.onColumnHide(a)}if(b.isVisible()&&b.context){b.renderColumnData(c,b.context.record)}},loadRecord:function(a){var c=this,b=c.getForm();b.loadRecord(a);if(b.isValid()){c.hideToolTip()}else{c.showToolTip()}Ext.Array.forEach(c.query(">displayfield"),function(d){c.renderColumnData(d,a)},c)},renderColumnData:function(k,h){var i=this,a=i.editingPlugin.grid,d=a.headerCt,j=a.view,m=j.store,e=i.columns.get(k.id),l=h.get(e.dataIndex);if(e.renderer){var b={tdCls:"",style:""},c=m.indexOf(h),g=d.getHeaderIndex(e);l=e.renderer.call(e.scope||d.ownerCt,l,b,h,c,g,m,j)}k.setRawValue(l);k.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(b,h){var g=this,e=g.editingPlugin.grid,a=e.getView(),c=e.store,d=g.context=Ext.apply(g.editingPlugin.context,{view:e.getView(),store:c});d.grid.getSelectionModel().select(b);g.loadRecord(b);if(!g.isVisible()){g.show();g.focusContextCell()}else{g.reposition({callback:this.focusContextCell})}},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var b=this,a=b.getForm();b.hide();a.clearInvalid();a.reset()},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){var a=this;a.callParent(arguments);a.reposition()},onHide:function(){var a=this;a.callParent(arguments);a.hideToolTip();a.invalidateScroller();if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){var a=this,b;if(!a.tooltip){b=a.tooltip=Ext.createWidget("tooltip",{cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:a.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left"})}return a.tooltip},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var c=this,d=c.getToolTip(),a=c.context,e=Ext.get(a.row),b=a.grid.view.el;d.setTarget(e);d.showAt([-10000,-10000]);d.body.update(c.getErrors());d.mouseOffset=[b.getWidth()-e.getWidth()+c.lastScrollLeft+15,0];c.repositionTip();d.doLayout();d.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.show();i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var a=this,b=!a.autoCancel&&a.isDirty()?a.dirtyText+"<br />":"",c=[];Ext.Array.forEach(a.query(">[isFormField]"),function(d){c=c.concat(Ext.Array.map(d.getErrors(),function(g){return"<li>"+g+"</li>"}))},a);return b+"<ul>"+c.join("")+"</ul>"},invalidateScroller:function(){var c=this,b=c.context,a=b.grid.verticalScroller;if(a){a.invalidate()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",uses:["Ext.grid.ColumnLayout","Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=Ext.create("Ext.grid.plugin.HeaderResizer");a.reorderer=Ext.create("Ext.grid.plugin.HeaderReorderer");if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&&!a.items){a.layout="auto"}else{a.layout={type:"gridcolumn",availableSpaceOffset:a.availableSpaceOffset,align:"stretchmax",resetStretch:true}}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{width:a.defaultWidth,triStateSort:a.triStateSort,sortable:a.sortable});a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){Ext.destroy(this.resizer,this.reorderer);this.callParent()},applyDefaults:function(a){if(a&&!a.isComponent&&a.xtype=="rownumberer"){return a}return this.callParent([a])},applyColumnsState:function(d){if(!d||!d.length){return}var e=this,c=0,b,a;Ext.each(d,function(g){a=e.down("gridcolumn[headerId="+g.id+"]");if(a){b=e.items.indexOf(a);if(c!==b){e.moveHeader(b,c)}if(a.applyColumnState){a.applyColumnState(g)}++c}})},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},afterRender:function(){this.callParent();var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},afterLayout:function(){if(!this.isHeader){var e=this,d=e.query(">gridcolumn:not([hidden])"),c,b,a;e.callParent(arguments);if(d.length){b=d[0].el;if(b!==e.pastFirstHeaderEl){if(e.pastFirstHeaderEl){e.pastFirstHeaderEl.removeCls(e.firstHeaderCls)}b.addCls(e.firstHeaderCls);e.pastFirstHeaderEl=b}a=d[d.length-1].el;if(a!==e.pastLastHeaderEl){if(e.pastLastHeaderEl){e.pastLastHeaderEl.removeCls(e.lastHeaderCls)}a.addCls(e.lastHeaderCls);e.pastLastHeaderEl=a}}}},onHeaderShow:function(h,b){var l=this,m=l.ownerCt,d=l.getMenu(),e,c,j,a,k,g;if(d){j=d.down("menucheckitem[headerId="+h.id+"]");if(j){j.setChecked(true,true)}e=d.query("#columnItem>menucheckitem[checked]");c=e.length;if((l.getVisibleGridColumns().length>1)&&l.disabledMenuItems&&l.disabledMenuItems.length){if(c==1){Ext.Array.remove(l.disabledMenuItems,e[0])}for(g=0,k=l.disabledMenuItems.length;g<k;g++){a=l.disabledMenuItems[g];if(!a.isDestroyed){a[a.menu?"enableCheckChange":"enable"]()}}if(c==1){l.disabledMenuItems=e}else{l.disabledMenuItems=[]}}}if(!h.isGroupHeader){if(l.view){l.view.onHeaderShow(l,h,true)}if(m){m.onHeaderShow(l,h)}}l.fireEvent("columnshow",l,h);if(b!==true){l.doLayout()}},doComponentLayout:function(){var a=this;if(a.view&&a.view.saveScrollState){a.view.saveScrollState()}a.callParent(arguments);if(a.view&&a.view.restoreScrollState){a.view.restoreScrollState()}},onHeaderHide:function(g,c){var b=this,a=b.ownerCt,e=b.getMenu(),d;if(e){d=e.down("menucheckitem[headerId="+g.id+"]");if(d){d.setChecked(false,true)}b.setDisabledItems()}if(!g.isGroupHeader){if(b.view){b.view.onHeaderHide(b,g,true)}if(a){a.onHeaderHide(b,g)}if(!c){b.doLayout()}}b.fireEvent("columnhide",b,g)},setDisabledItems:function(){var d=this,g=d.getMenu(),b=0,a,e,c;e=g.query("#columnItem>menucheckitem[checked]");if((e.length===1)){if(!d.disabledMenuItems){d.disabledMenuItems=[]}if((d.getVisibleGridColumns().length===1)&&e[0].menu){e=e.concat(e[0].menu.query("menucheckitem[checked]"))}a=e.length;for(b=0;b<a;b++){c=e[b];if(!Ext.Array.contains(d.disabledMenuItems,c)){c.disabled=false;c[c.menu?"disableCheckChange":"disable"]();d.disabledMenuItems.push(c)}}}},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(c,a,b){this.tempLock();if(this.view&&this.view.rendered){this.view.onHeaderResize(c,a,b)}},onHeaderClick:function(c,b,a){this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(c,b,a){if(this.fireEvent("headertriggerclick",this,c,b,a)!==false){this.showMenuBy(a,c)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=g;d.setFloatParent(g);g.titleContainer.addCls(this.headerOpenCls);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleContainer.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.destroy();delete a.menu}},onHeaderMoved:function(e,b,d){var c=this,a=c.ownerCt;if(a&&a.onHeaderMove){a.onHeaderMove(c,e,b,d)}c.fireEvent("columnmove",c,e,b,d)},getMenu:function(){var a=this;if(!a.menu){a.menu=Ext.create("Ext.menu.Menu",{hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.setDisabledItems();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:c.onSortDescClick,scope:c}]}if(a&&a.length){b.push("-",{itemId:"columnItem",text:c.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=Ext.create("Ext.menu.CheckItem",{text:e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});if(h===1){d.disabled=true}c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),h=d.length,a=0,g,b;for(;a<h;a++){g=d[a];if(g.hidden||g.up("headercontainer[hidden=true]")){b=0}else{b=g.getDesiredWidth();if((a===0)&&(Ext.isIE6||Ext.isIE7)){b+=1}}c.push({dataIndex:g.dataIndex,align:g.align,width:b,id:g.id,cls:g.tdCls,columnId:g.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),e=b.length,a=0;for(;a<e;a++){if(!isNaN(b[a].width)){if(b[a].getDesiredWidth){c+=b[a].getDesiredWidth()}else{c+=b[a].getWidth()}}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),e=c.length,b=0,d;for(;b<e;b++){if(c[b]!==a){d=c[b].sortState;c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query("[hideable]")}return a},getHeaderIndex:function(b){var a=this.getGridColumns();return Ext.Array.indexOf(a,b)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b[a]},prepareData:function(i,c,k,m,a){var h={},d=this.gridDataColumns||this.getGridColumns(),e=d.length,g=0,j,q,l,p,b,n=a.store;for(;g<e;g++){b={tdCls:"",style:""};j=d[g];q=j.id;l=j.renderer;p=i[j.dataIndex];if(typeof l==="string"){j.renderer=l=Ext.util.Format[l]}if(typeof l==="function"){p=l.call(j.scope||this.ownerCt,p,b,k,c,g,n,m)}h[q+"-modified"]=k.isModified(j.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":"";h[q+"-tdCls"]=b.tdCls;h[q+"-tdAttr"]=b.tdAttr;h[q+"-style"]=b.style;if(p===undefined||p===null||p===""){p="&#160;"}h[q]=p}return h},expandToFit:function(a){if(this.view){this.view.expandToFit(a)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],renderTpl:'<div id="{id}-titleContainer" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!values.menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>',dataIndex:null,text:"&#160;",sortable:true,hideable:true,menuDisabled:false,renderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,initComponent:function(){var d=this,b,a,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{d.minWidth=d.width}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;d.items=d.columns;delete d.columns;delete d.flex;d.width=0;for(b=0,a=d.items.length;b<a;b++){c=d.items[b];if(!c.hidden){d.width+=c.width||Ext.grid.header.Container.prototype.defaultWidth}}d.minWidth=d.width;d.cls=(d.cls||"")+" "+Ext.baseCSSPrefix+"group-header";d.sortable=false;d.resizable=false;d.align="center"}d.addChildEls("titleContainer","triggerEl","textEl");d.callParent(arguments)},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var a=this;Ext.applyIf(a.renderData,{text:a.text,menuDisabled:a.menuDisabled});return a.callParent(arguments)},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var b=this,a=[],c={id:b.headerId};b.savePropsToState(["hidden","sortable","locked","flex","width"],c);if(b.isGroupHeader){b.items.each(function(d){a.push(d.getColumnState())});if(a.length){c.columns=a}}else{if(b.isSubHeader&&b.ownerCt.hidden){delete b.hidden}}if("width" in c){delete c.flex}return c},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},onRender:function(){var b=this,a=b.up("tablepanel");if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}b.callParent(arguments)},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"column-header-align-"+b.align).addClsOnOver(b.overCls);b.mon(a,{click:b.onElClick,dblclick:b.onElDblClick,scope:b});if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.mon(b.titleContainer,{mouseenter:b.onTitleMouseOver,mouseleave:b.onTitleMouseOut,scope:b});b.keyNav=Ext.create("Ext.util.KeyNav",a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},setWidth:function(b,a){var j=this,c=j.ownerCt,k,h,g,d=j.getWidth(),e=0,l;if(b!==d){j.oldWidth=d;j.minWidth=j.width=b;if(c.isGroupHeader){k=c.items.items;h=k.length;for(g=0;g<h;g++){l=k[g];if(!l.hidden){e+=(l===j)?b:l.getWidth()}}c.setWidth(e,a)}else{if(a!==false){c.doLayout()}}}},afterComponentLayout:function(c,a){var d=this,b=this.getOwnerHeaderCt();d.callParent(arguments);if(c&&!d.isGroupHeader&&b){b.onHeaderResize(d,c,true)}if(d.oldWidth&&(c!==d.oldWidth)){b.fireEvent("columnresize",b,this,c)}delete d.oldWidth},setPadding:function(a){var c=this,b=Ext.util.TextMetrics.measure(c.textEl.dom,c.text).height;if(!c.isGroupHeader){if(c.titleContainer.getHeight()<a){c.titleContainer.dom.style.height=a+"px"}}a=c.titleContainer.getViewSize().height;if(b){c.titleContainer.setStyle({paddingTop:Math.max(((a-b)/2),0)+"px"})}if(Ext.isIE&&c.triggerEl){c.triggerEl.setHeight(a)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleContainer.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleContainer.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,k,g){var h=this,i=Ext.baseCSSPrefix+"column-header-sort-",j=i+"ASC",c=i+"DESC",b=i+"null",e=h.getOwnerHeaderCt(),d=h.sortState;if(d!==a&&h.getSortParam()){h.addCls(i+a);if(a&&!g){h.doSort(a)}switch(a){case"DESC":h.removeCls([j,b]);break;case"ASC":h.removeCls([c,b]);break;case null:h.removeCls([j,c]);break}if(e&&!h.triStateSort&&!k){e.clearOtherSortStates(h)}h.sortState=a;e.fireEvent("sortchange",e,h,a)}},hide:function(){var g=this,c,a,d,h,e=0,b=g.getOwnerHeaderCt();g.oldWidth=g.getWidth();if(g.isGroupHeader){c=g.items.items;g.callParent(arguments);b.onHeaderHide(g);for(d=0,a=c.length;d<a;d++){c[d].hidden=true;b.onHeaderHide(c[d],true)}return}h=g.ownerCt.componentLayout.layoutBusy;g.ownerCt.componentLayout.layoutBusy=true;g.callParent(arguments);g.ownerCt.componentLayout.layoutBusy=h;b.onHeaderHide(g);if(g.ownerCt.isGroupHeader){c=g.ownerCt.query(">:not([hidden])");if(!c.length){g.ownerCt.hide()}else{for(d=0,a=c.length;d<a;d++){e+=c[d].getWidth()}g.ownerCt.minWidth=e;g.ownerCt.setWidth(e)}}},show:function(){var l=this,b=l.ownerCt,g=b.componentLayout,c=g.layoutBusy,a=b.layout,h=a.layoutBusy,k,j,e,m,d=0;g.layoutBusy=a.layoutBusy=true;l.callParent(arguments);g.layoutBusy=c;a.layoutBusy=h;if(l.isSubHeader){if(!b.isVisible()){b.show()}}if(l.isGroupHeader&&!l.query(":not([hidden])").length){k=l.query(">*");for(e=0,j=k.length;e<j;e++){m=k[e];m.preventLayout=true;m.show();d+=m.getWidth();delete m.preventLayout}l.setWidth(d)}if(b.isGroupHeader&&l.preventLayout!==true){k=b.query(">:not([hidden])");for(e=0,j=k.length;e<j;e++){d+=k[e].getWidth()}b.minWidth=d;b.setWidth(d)}b=l.getOwnerHeaderCt();if(b){b.onHeaderShow(l,l.preventLayout)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.RowNumberer",{extend:"Ext.grid.column.Column",alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,align:"right",constructor:function(a){this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,g,c){if(this.rowspan){b.cellAttr='rowspan="'+this.rowspan+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return c.indexOfTotal(a)+1}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="x-grid-drop-indicator-left"></div><div class="x-grid-drop-indicator-right"></div>',indicatorCls:"x-grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=Ext.createWidget("component",{html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),l=i.getRecord(b),a=c.records,j,k;if(!Ext.Array.contains(a,l)&&(h=="before"&&!g.containsRecordAtOffset(a,l,-1)||h=="after"&&!g.containsRecordAtOffset(a,l,1))){g.valid=true;if(g.overRecord!=l||g.currentPosition!=h){k=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){k+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,k);g.overRecord=l;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(d,a,h,g){var c=this,j=false,b=function(){c.invalidateDrop();c.handleNodeDrop(g,c.overRecord,c.currentPosition);j=true;c.fireViewEvent("drop",d,g,c.overRecord,c.currentPosition)},i=false;if(c.valid){i=c.fireViewEvent("beforedrop",d,g,c.overRecord,c.currentPosition,b);if(i!==false){if(!j){b()}}}return i},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="x-grid-drop-indicator-left"></div><div class="x-grid-drop-indicator-right"></div>',indicatorCls:"x-grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy(a[c].getId()))}}else{b.view.store.remove(b.records,b.view===j)}h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records);j.getSelectionModel().select(b.records)}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",header:"&#160;",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",sortable:false,constructor:function(d){var h=this,b=Ext.apply({},d),c=b.items||[h],a=c.length,e,g;delete b.items;h.callParent([b]);h.items=c;h.renderer=function(i,j){i=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";j.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(e=0;e<a;e++){g=c[e];g.disable=Ext.Function.bind(h.disableAction,h,[e]);g.enable=Ext.Function.bind(h.enableAction,h,[e]);i+='<img alt="'+(g.altText||h.altText)+'" src="'+(g.icon||Ext.BLANK_IMAGE_URL)+'" class="'+Ext.baseCSSPrefix+"action-col-icon "+Ext.baseCSSPrefix+"action-col-"+String(e)+" "+(g.disabled?Ext.baseCSSPrefix+"item-disabled":" ")+(g.iconCls||"")+" "+(Ext.isFunction(g.getClass)?g.getClass.apply(g.scope||h.scope||h,arguments):(h.iconCls||""))+'"'+((g.tooltip)?' data-qtip="'+g.tooltip+'"':"")+" />"}return i}},enableAction:function(a){var b=this;if(!a){a=0}else{if(!Ext.isNumber(a)){a=Ext.Array.indexOf(b.items,a)}}b.items[a].disabled=false;b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+a).removeCls(b.disabledCls)},disableAction:function(a){var b=this;if(!a){a=0}else{if(!Ext.isNumber(a)){a=Ext.Array.indexOf(b.items,a)}}b.items[a].disabled=true;b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+a).addCls(b.disabledCls)},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(g,j,k,a,h,c){var d=this,b=c.getTarget().className.match(d.actionIdRe),l,i;if(b){l=d.items[parseInt(b[1],10)];if(l){if(g=="click"){i=l.handler||d.handler;if(i&&!l.disabled){i.call(l.scope||d.scope||d,j,a,h,l,c)}}else{if(g=="mousedown"&&l.stopSelection!==false){return false}}}}return d.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){this.callParent(arguments);var b=this.trueText,c=this.falseText,d=this.undefinedText;this.renderer=function(e){if(e===undefined){return d}if(!e||e==="false"){return c}return b}}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){var a=this;a.callParent(arguments);if(!a.format){a.format=Ext.Date.defaultFormat}a.renderer=Ext.util.Format.dateRenderer(a.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",constructor:function(a){this.callParent(arguments);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",constructor:function(a){var c=this,b;c.callParent(arguments);b=c.tpl=(!Ext.isPrimitive(c.tpl)&&c.tpl.compile)?c.tpl:Ext.create("Ext.XTemplate",c.tpl);c.renderer=function(g,h,d){var e=Ext.apply({},d.data,d.getAssociatedData());return b.apply(e)}}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:function(){return},mutateMetaRowTpl:function(a){},getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=Ext.create("Ext.XTemplate",a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){var b=this.view.up("gridpanel"),a=b.down("gridscroller[dock=right]");a.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,j){var c={fullWidth:j.fullWidth,chunks:[]},e=j.rows.length,b=0,g=0,a=this.visibleChunk,h,p,n;for(;b<e;b+=this.chunkSize,g++){if(b+this.chunkSize>e){n=e-b}else{n=this.chunkSize}if(g>=a-1&&g<=a+1){p=j.rows.slice(b,b+this.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*this.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'<tpl for="chunks"><div class="'+Ext.baseCSSPrefix+'grid-chunk" style="height: {chunkHeight}px;">'},closeTableWrap:function(){return"</div></tpl>"}}}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"Group: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){b.group(c.lastGroupIndex)}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);if(!g){a.refresh()}},refreshIf:function(){if(this.blockRefresh!==true){this.view.refresh()}},getFeatureTpl:function(b,c,a,e){var d=this;return["<tpl if=\"typeof rows !== 'undefined'\">",'<tr class="'+Ext.baseCSSPrefix+"grid-group-hd "+(d.startCollapsed?d.hdCollapsedCls:"")+' {hdCollapsedCls}"><td class="'+Ext.baseCSSPrefix+'grid-cell" colspan="'+c.columns.length+'" {[this.indentByDepth(values)]}><div class="'+Ext.baseCSSPrefix+'grid-cell-inner"><div class="'+Ext.baseCSSPrefix+'grid-group-title">{collapsed}'+d.groupHeaderTpl+"</div></div></td></tr>",'<tr id="{viewId}-gp-{name}" class="'+Ext.baseCSSPrefix+"grid-group-body "+(d.startCollapsed?d.collapsedCls:"")+' {collapsedCls}"><td colspan="'+c.columns.length+'">{[this.recurse(values)]}</td></tr>',"</tpl>"].join("")},getFragmentTpl:function(){return{indentByDepth:this.indentByDepth,depthToIndent:this.depthToIndent}},indentByDepth:function(a){var b=a.depth||0;return'style="padding-left:'+b*this.depthToIndent+'px;"'},destroy:function(){var a=this;delete a.view;delete a.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.store.on("groupchange",b.onGroupChange,b);b.pruneGroupedHeader();if(b.enableGroupingMenu){b.injectGroupingMenu()}b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},injectGroupingMenu:function(){var b=this,a=b.view,c=a.headerCt;c.showMenuBy=b.showMenuBy;c.getMenuItems=b.getMenuItems()},showMenuBy:function(b,e){var d=this.getMenu(),c=d.down("#groupMenuItem"),a=e.groupable===false?"disable":"enable";c[a]();Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var e=this,b=e.groupByText,d=e.disabled,a=e.showGroupsText,c=e.enableNoGroups,h=Ext.Function.bind(e.onGroupMenuItemClick,e),g=Ext.Function.bind(e.onGroupToggleMenuItemClick,e);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:b,handler:h});if(c){i.push({itemId:"groupToggleMenuItem",text:a,checked:!d,checkHandler:g})}return i}},onGroupMenuItemClick:function(c,h){var d=this,i=c.parentMenu,j=i.activeHeader,a=d.view,b=a.store,g=b.remoteGroup;delete d.lastGroupIndex;d.block();d.enable();b.group(j.dataIndex);d.pruneGroupedHeader();d.unblock();if(!g){a.refresh()}},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var d=this,b=d.view,c=b.store,a=d.getGroupField(),e=b.headerCt,g=e.down("header[dataIndex="+a+"]");if(g){if(d.prunedHeader){d.prunedHeader.show()}d.prunedHeader=g;g.hide()}},getGroupField:function(){var a=this.view.store.groupers.first();if(a){return a.property}return""},onRowFocus:function(c){var b=this.view.getNode(c),a=Ext.fly(b).up("."+this.collapsedCls);if(a){this.expand(a)}},expand:function(c){var e=this,b=e.view,d=b.up("gridpanel"),a=Ext.getDom(c);e.collapsedState[a.id]=false;c.removeCls(e.collapsedCls);c.prev().removeCls(e.hdCollapsedCls);d.determineScrollbars();d.invalidateScroller();b.fireEvent("groupexpand")},collapse:function(c){var e=this,b=e.view,d=b.up("gridpanel"),a=Ext.getDom(c);e.collapsedState[a.id]=true;c.addCls(e.collapsedCls);c.prev().addCls(e.hdCollapsedCls);d.determineScrollbars();d.invalidateScroller();b.fireEvent("groupcollapse")},onGroupChange:function(){var b=this,c=b.getGroupField(),a;if(b.hideGroupedHeader){if(b.lastGroupField){a=b.getMenuItem(b.lastGroupField);if(a){a.setChecked(true)}}if(c){a=b.getMenuItem(c);if(a){a.setChecked(false)}}}if(b.blockRefresh!==true){b.view.refresh()}b.lastGroupField=c},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return c.down("menuitem[headerId="+d.id+"]")},onGroupClick:function(c,i,a,j,h){var g=this,d=g.toggleCls,b=Ext.fly(i.nextSibling,"_grouping");if(b.hasCls(g.collapsedCls)){g.expand(b)}else{g.collapse(b)}},getMetaRowTplFragments:function(){return{isRow:this.isRow,closeRow:this.closeRow}},isRow:function(){return"<tpl if=\"typeof rows === 'undefined'\">"},closeRow:function(){return"</tpl>"},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";return b},getGroupRows:function(h,c,b,i){var e=this,d=h.children,g=h.rows=[],a=e.view;h.viewId=a.id;Ext.Array.each(c,function(k,j){if(Ext.Array.indexOf(d,k)!=-1){g.push(Ext.apply(b[j],{depth:1}))}});delete h.children;h.fullWidth=i;if(e.collapsedState[a.id+"-gp-"+h.name]){h.collapsedCls=e.collapsedCls;h.hdCollapsedCls=e.hdCollapsedCls}return h},collectData:function(d,c,i,h,g){var e=this,b=e.view.store,a;if(!e.disabled&&b.isGrouped()){a=b.getGroups();Ext.Array.each(a,function(k,j){e.getGroupRows(k,d,c,h)},e);return{rows:a,fullWidth:h}}return g},getFireEventArgs:function(g,h,d,c){var j=[g,h,d],i=Ext.fly(d.nextSibling,"_grouping"),a=Ext.getDom(i).id,b=h.id+"-gp-",k=a.substr(b.length);j.push(k,c);return j}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:"Ext.grid.feature.Grouping",alias:"feature.groupingsummary",mixins:{summary:"Ext.grid.feature.AbstractSummary"},getFeatureTpl:function(){var a=this.callParent(arguments);if(this.showSummaryRow){a=a.replace("</tpl>","");a+="{[this.printSummaryRow(xindex)]}</tpl>"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h<b;++h){c=e[h];c.gridSummaryValue=this.getColumnValue(c,d);g.push(c)}return g},generateSummaryData:function(){var m=this,j={},p={},q=m.view.store,a=this.getGroupField(),l=q.proxy.reader,d=m.summaryGroups,g=m.view.headerCt.getColumnsForTpl(),b,h,c,e,n,r,k;for(h=0,c=d.length;h<c;++h){j[d[h].name]={}}if(m.remoteRoot&&l.rawData){n=l.root;l.root=m.remoteRoot;l.buildExtractors(true);Ext.Array.each(l.getRoot(l.rawData),function(i){p[i[a]]=i});l.root=n;l.buildExtractors(true)}for(h=0,c=g.length;h<c;++h){k=Ext.getCmp(g[h].id);e=m.getSummary(q,k.summaryType,k.dataIndex,true);for(r in e){if(e.hasOwnProperty(r)){j[r][k.id]=e[r]}}for(r in p){if(p.hasOwnProperty(r)){b=p[r][k.dataIndex];if(b!==undefined&&j[r]!==undefined){j[r][k.id]=b}}}}return j}});Ext.define("Ext.grid.feature.RowBody",{extend:"Ext.grid.feature.Feature",alias:"feature.rowbody",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTrCls:Ext.baseCSSPrefix+"grid-rowbody-tr",rowBodyTdCls:Ext.baseCSSPrefix+"grid-cell-rowbody",rowBodyDivCls:Ext.baseCSSPrefix+"grid-rowbody",eventPrefix:"rowbody",eventSelector:"."+Ext.baseCSSPrefix+"grid-rowbody-tr",getRowBody:function(a){return['<tr class="'+this.rowBodyTrCls+' {rowBodyCls}">','<td class="'+this.rowBodyTdCls+'" colspan="{rowBodyColspan}">','<div class="'+this.rowBodyDivCls+'">{rowBody}</div>',"</td>","</tr>"].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,mutateMetaRowTpl:function(a){a[0]=a[0].replace(Ext.baseCSSPrefix+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');a.unshift('<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="'+Ext.baseCSSPrefix+'grid-rowwrap-div">');a.push("</table>");a.push("</div></td></tr>")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g<q;g++){a=l[g].id;j=a+"-tdCls";e=Ext.baseCSSPrefix+"grid-col-resizer-"+a;b[j]=e+" "+(m[j]?m[j]:"");b[a+"-tdAttr"]=' style="width: '+(l[g].hidden?0:l[g].getDesiredWidth())+'px;" ';if(m[a+"-tdAttr"]){b[a+"-tdAttr"]+=m[a+"-tdAttr"]}}return b},getMetaRowTplFragments:function(){return{embedFullWidth:this.embedFullWidth,embedColSpan:this.embedColSpan}}});Ext.define("Ext.grid.feature.Summary",{extend:"Ext.grid.feature.AbstractSummary",alias:"feature.summary",getFragmentTpl:function(){this.summaryData=this.generateSummaryData();return this.getSummaryFragments()},getTableFragments:function(){if(this.showSummaryRow){return{closeRows:this.closeRows}}},closeRows:function(){return"</tpl>{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;b<e;++b){d=c[b];d.gridSummaryValue=this.getColumnValue(d,j);h.push(d)}return h},generateSummaryData:function(){var h=this,d={},j=h.view.store,c=h.view.headerCt.getColumnsForTpl(),e=0,a=c.length,b,k,g;for(e=0,a=c.length;e<a;++e){g=Ext.getCmp(c[e].id);d[g.id]=h.getSummary(j,g.summaryType,g.dataIndex,false)}return d}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){var c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(y,q,w){var a=this.getLocation(w,q),s=a.header,h=a.pos,g=y.nextSibling("gridcolumn:not([hidden])"),v=y.previousSibling("gridcolumn:not([hidden])"),d,m,t,u,b,c,l,n,z,x;if(!s.draggable&&s.getIndex()==0){return false}this.lastLocation=a;if((y!==s)&&((h==="before"&&g!==s)||(h==="after"&&v!==s))&&!s.isDescendantOf(y)){var p=Ext.dd.DragDropManager.getRelated(this),k=p.length,r=0,j;for(;r<k;r++){j=p[r];if(j!==this&&j.invalidateDrop){j.invalidateDrop()}}this.valid=true;m=this.getTopIndicator();t=this.getBottomIndicator();if(h==="before"){u="tl";b="bl"}else{u="tr";b="br"}c=s.el.getAnchorXY(u);l=s.el.getAnchorXY(b);n=this.headerCt.el;z=n.getLeft();x=n.getRight();c[0]=Ext.Number.constrain(c[0],z,x);l[0]=Ext.Number.constrain(l[0],z,x);c[0]-=4;c[1]-=9;l[0]-=4;m.setXY(c);t.setXY(l);m.show();t.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,a,d,c){if(c.header.el.dom!==b){this.positionIndicator(c.header,b,d)}return this.valid?this.dropAllowed:this.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(d,l,k,g){if(this.valid){this.invalidateDrop();var i=g.header,h=this.lastLocation,n=i.ownerCt,a=n.items.indexOf(i),j=h.header.ownerCt,p=j.items.indexOf(h.header),c=this.headerCt,m,b;if(h.pos==="after"){p++}if(n!==j&&n.lockableInjected&&j.lockableInjected&&j.lockedCt){b=n.up("[scrollerOwner]");b.lock(i,p)}else{if(n!==j&&n.lockableInjected&&j.lockableInjected&&n.lockedCt){b=n.up("[scrollerOwner]");b.unlock(i,p)}else{if((n===j)&&(p>n.items.indexOf(i))){p--}if(n!==j){n.suspendLayout=true;n.remove(i,false);n.suspendLayout=false}if(n.isGroupHeader){if(!n.items.getCount()){m=n.ownerCt;m.suspendLayout=true;m.remove(n,false);n.el.dom.parentNode.removeChild(n.el.dom);m.suspendLayout=false}else{n.minWidth=n.getWidth()-i.getWidth();n.setWidth(n.minWidth)}}j.suspendLayout=true;if(n===j){j.move(a,p)}else{j.insert(p,i)}j.suspendLayout=false;if(j.isGroupHeader){i.savedFlex=i.flex;delete i.flex;i.width=i.getWidth();j.minWidth=j.getWidth()+i.getWidth()-(i.savedFlex?1:0);j.setWidth(j.minWidth)}else{if(i.savedFlex){i.flex=i.savedFlex;delete i.width}}c.purgeCache();c.doLayout();c.onHeaderMoved(i,a,p);if(!n.items.getCount()){n.destroy()}}}}}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",requires:["Ext.grid.column.Column","Ext.util.KeyNav"],mixins:{observable:"Ext.util.Observable"},clicksToEdit:2,defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("beforeedit","edit","validateedit");b.mixins.observable.constructor.call(b);b.relayEvents(b,["afteredit"],"after")},init:function(a){var b=this;b.grid=a;b.view=a.view;b.initEvents();b.mon(a,"reconfigure",b.onReconfigure,b);b.onReconfigure();a.relayEvents(b,["beforeedit","edit","validateedit"]);a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){this.initFieldAccessors(this.view.getGridColumns())},destroy:function(){var c=this,b=c.grid,d=b.headerCt,a=b.events;Ext.destroy(c.keyNav);c.removeFieldAccessors(b.getView().getGridColumns());c.clearListeners();delete c.grid.editingPlugin;delete c.grid.view.editingPlugin;delete c.grid;delete c.view;delete c.editor;delete c.keyNav},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.initFieldAccessors,b);return}Ext.applyIf(a,{getEditor:function(c,d){return b.getColumnField(this,d)},setEditor:function(c){b.setColumnField(this,c)}})},removeFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.removeFieldAccessors,b);return}delete a.getEditor;delete a.setEditor},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(Ext.isObject(c)&&!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType);b.field=c}Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var c=this,b=c.view,a=c.clicksToEdit===1?"click":"dblclick";c.mon(b,"cell"+a,c.startEditByClick,c);b.on("render",function(){c.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:c.onEnterKey,esc:c.onEscKey,scope:c})},c,{single:true})},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){pos=b.getCurrentPosition();a=c.store.getAt(pos.row);g=c.headerCt.getHeaderAtIndex(pos.column)}else{a=b.getLastSelected()}d.startEdit(a,g)},onEscKey:function(a){this.cancelEdit()},startEditByClick:function(c,a,i,b,h,d,g){this.startEdit(b,c.getHeaderAtIndex(i))},beforeEdit:Ext.emptyFn,startEdit:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.beforeEdit(b)===false||c.fireEvent("beforeedit",b)===false||b.cancel){return false}c.context=b;c.editing=true},getEditingContext:function(e,c){var g=this,a=g.grid,j=a.store,b,d,h=a.getView(),i;if(Ext.isNumber(e)){b=e;e=j.getAt(b)}else{b=j.indexOf(e)}if(Ext.isNumber(c)){d=c;c=a.headerCt.getHeaderAtIndex(d)}else{d=c.getIndex()}i=e.get(c.dataIndex);return{grid:a,record:e,field:c.dataIndex,value:i,row:h.getNode(b),column:c,rowIdx:b,colIdx:d}},cancelEdit:function(){this.editing=false},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a.context)}delete a.context;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:"Ext.grid.plugin.Editing",requires:["Ext.grid.CellEditor","Ext.util.DelayedTask"],constructor:function(){this.callParent(arguments);this.editors=Ext.create("Ext.util.MixedCollection",false,function(a){return a.editorId});this.editTask=Ext.create("Ext.util.DelayedTask")},onReconfigure:function(){this.editors.clear();this.callParent()},destroy:function(){var a=this;a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear();a.callParent(arguments)},onBodyScroll:function(){var a=this.getActiveEditor();if(a&&a.field){if(a.field.triggerBlur){a.field.triggerBlur()}else{a.field.blur()}}},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;a.addElListener("mousewheel",c.cancelEdit,c);c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},startEdit:function(a,g){var d=this,e=a.get(g.dataIndex),c=d.getEditingContext(a,g),b;a=c.record;g=c.column;d.completeEdit();c.originalValue=c.value=e;if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",c)===false||c.cancel){return false}if(g&&!g.getEditor(a)){return false}b=d.getEditor(a,g);if(b){d.context=c;d.setActiveEditor(b);d.setActiveRecord(a);d.setActiveColumn(g);d.editTask.delay(15,b.startEdit,b,[d.getCell(a,g),e])}else{d.grid.getView().getEl(g).focus((Ext.isWebKit||Ext.isIE)?10:false)}},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit()}},setActiveEditor:function(a){this.activeEditor=a},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,d){var g=this,e=g.editors,c=d.getItemId(),b=e.getByKey(c);if(b){return b}else{b=d.getEditor(a);if(!b){return false}if(!(b instanceof Ext.grid.CellEditor)){b=Ext.create("Ext.grid.CellEditor",{editorId:c,field:b})}b.parentEl=g.grid.getEditorParent();b.on({scope:g,specialkey:g.onSpecialKey,complete:g.onEditComplete,canceledit:g.cancelEdit});e.add(b);return b}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,d,c){var b=this.grid,g;if(c.getKey()===c.TAB){c.stopEvent();g=b.getSelectionModel();if(g.onEditorTab){g.onEditorTab(this,c)}}},onEditComplete:function(b,h,a){var g=this,d=g.grid,i=d.getSelectionModel(),e=g.getActiveColumn(),c;if(e){c=e.dataIndex;g.setActiveEditor(null);g.setActiveColumn(null);g.setActiveRecord(null);delete i.wasEditing;if(!g.validateEdit()){return}if(h!==a){g.context.record.set(c,h)}else{d.getView().getEl(e).focus()}g.context.value=h;g.fireEvent("edit",g,g.context)}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus()}},startEditByPosition:function(a){var d=this,c=d.grid,g=c.getSelectionModel(),b=c.store.getAt(a.row),e=c.headerCt.getHeaderAtIndex(a.column);if(g.selectByPosition){g.selectByPosition(a)}d.startEdit(b,e)}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=Ext.create("Ext.view.DragZone",{view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText})}if(b.enableDrop){b.dropZone=Ext.create("Ext.grid.ViewDropZone",{view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on("render",this.onHeaderCtRender,this)},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){this.dragZone=Ext.create("Ext.grid.header.DragZone",this.headerCt);this.dropZone=Ext.create("Ext.grid.header.DropZone",this.headerCt);if(this.disabled){this.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,configs:{dynamic:true},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=Ext.create("Ext.dd.DragTracker",{disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(c,a){if(this.headerCt.dragging){if(this.activeHd){this.activeHd.el.dom.style.cursor="";delete this.activeHd}}else{var g=c.getTarget("."+this.colHeaderCls,3,true),b,d;if(g){b=Ext.getCmp(g.id);if(b.isOnLeftEdge(c)){d=b.previousNode("gridcolumn:not([hidden])")}else{if(b.isOnRightEdge(c)){d=b}else{d=null}}if(d){if(d.isGroupHeader){d=d.down(":not([isGroupHeader]):not([hidden]):last")}if(d&&!(d.fixed||(d.resizable===false)||this.disabled)){this.activeHd=d;b.el.dom.style.cursor=this.eResizeCursor}}else{b.el.dom.style.cursor="";delete this.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls("x-column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var a=this.dragHd.el,b=Ext.util.Region.getRegion(a);return b.adjust(0,this.maxColWidth-a.getWidth(),0,this.minColWidth)},onStart:function(v){var w=this,h=w.dragHd,b=h.el,p=b.getWidth(),j=w.headerCt,l=v.getTarget();if(w.dragHd&&!Ext.fly(l).hasCls("x-column-header-trigger")){j.dragging=true}w.origWidth=p;if(!w.dynamic){var d=b.getXY(),s=j.up("[scrollerOwner]"),g=w.dragHd.up(":not([isGroupHeader])"),k=g.up(),c=s.getLhsMarker(),n=s.getRhsMarker(),a=n.parent(),i=a.getLeft(true),u=a.getTop(true),r=a.translatePoints(d),q=k.body.getHeight()+j.getHeight(),m=r.top-u;c.setTop(m);n.setTop(m);c.setHeight(q);n.setHeight(q);c.setLeft(r.left-i);n.setLeft(r.left+p-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLeft(true);i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(h){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var g=this.dragHd,c=this.headerCt.up("[scrollerOwner]"),d=c.getLhsMarker(),j=c.getRhsMarker(),a=g.getWidth(),i=this.tracker.getOffset("point"),b=-9999;d.setLeft(b);j.setLeft(b)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}this.headerCt.suspendLayout=true;b.setWidth(this.origWidth+c[0],false);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0],false)}}this.headerCt.suspendLayout=false;this.headerCt.doComponentLayout(this.headerCt.getFullWidth())}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.grid.plugin.RowEditing",{extend:"Ext.grid.plugin.Editing",alias:"plugin.rowediting",requires:["Ext.grid.RowEditor"],editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},destroy:function(){var a=this;Ext.destroy(a.editor);a.callParent(arguments)},startEdit:function(a,d){var c=this,b=c.getEditor();if(c.callParent(arguments)===false){return false}if(b.beforeEdit()!==false){b.startEdit(c.context.record,c.context.column)}},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments);a.fireEvent("canceledit",a.context)}},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a.context)}},validateEdit:function(){var g=this,e=g.editor,d=g.context,a=d.record,c={},h={},b;e.items.each(function(i){b=i.name;c[b]=i.getValue();h[b]=a.get(b)});Ext.apply(d,{newValues:c,originalValues:h});return g.callParent(arguments)&&g.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){var c=this,b=c.grid,a=c.view,d=b.headerCt;return Ext.create("Ext.grid.RowEditor",{autoCancel:c.autoCancel,errorSummary:c.errorSummary,fields:d.getGridColumns(),hidden:true,editingPlugin:c,renderTo:a.el})},initEditTriggers:function(){var c=this,b=c.grid,a=c.view,e=b.headerCt,d=c.clicksToMoveEditor===1?"click":"dblclick";c.callParent(arguments);if(c.clicksToMoveEditor!==c.clicksToEdit){c.mon(a,"cell"+d,c.moveEditorByClick,c)}a.on("render",function(){c.mon(e,{add:c.onColumnAdd,remove:c.onColumnRemove,columnresize:c.onColumnResize,columnhide:c.onColumnHide,columnshow:c.onColumnShow,columnmove:c.onColumnMove,scope:c})},c,{single:true})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.startEditByClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.getEditor();if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g)}},setColumnField:function(a,c){var b=this;b.callParent(arguments);b.getEditor().setField(a.field,a)}});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(Ext.create("Ext.grid.plugin.CellEditing",{clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=Ext.create("Ext.grid.property.Store",a,a.source)}a.store.sort("name","ASC");a.columns=Ext.create("Ext.grid.property.HeaderContainer",a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Date",{selectOnFocus:true})}),string:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Text",{selectOnFocus:true})}),number:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Number",{selectOnFocus:true})}),"boolean":Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.ComboBox",{editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=Ext.create("Ext.grid.CellEditor",{field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:true,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=Ext.create("Ext.data.proxy.Memory",{model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=Ext.create("Ext.data.reader.Reader",{model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return Ext.create("Ext.data.ResultSet",a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Component",uses:["Ext.layout.container.Container"],type:"body",onLayout:function(c,b){var d=this,a=d.owner;d.setTargetSize(c,b);d.setBodySize.apply(d,arguments);if(a&&a.layout&&a.layout.isLayout){if(!Ext.isNumber(a.height)||!Ext.isNumber(a.width)){a.layout.bindToOwnerCtComponent=true}else{a.layout.bindToOwnerCtComponent=false}}d.callParent(arguments)},setBodySize:function(e,b){var g=this,a=g.owner,c=a.frameSize,d=Ext.isNumber;if(d(e)){e-=a.el.getFrameWidth("lr")-c.left-c.right}if(d(b)){b-=a.el.getFrameWidth("tb")-c.top-c.bottom}g.setElementSize(a.body,e,b)}});Ext.define("Ext.layout.component.FieldSet",{extend:"Ext.layout.component.Body",alias:["layout.fieldset"],type:"fieldset",doContainerLayout:function(){if(!this.owner.collapsed){this.callParent()}}});Ext.define("Ext.layout.component.Tab",{alias:["layout.tab"],extend:"Ext.layout.component.Button",beforeLayout:function(){var b=this,a=b.lastClosable!==b.owner.closable;if(a){delete b.adjWidth}return this.callParent(arguments)||a},onLayout:function(){var a=this;a.callParent(arguments);a.lastClosable=a.owner.closable}});Ext.define("Ext.layout.component.field.File",{alias:["layout.filefield"],extend:"Ext.layout.component.field.Field",type:"filefield",sizeBodyContents:function(c,b){var d=this,a=d.owner;if(!a.buttonOnly){d.setElementSize(a.inputEl,Ext.isNumber(c)?c-a.button.getWidth()-a.buttonMargin:c)}}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:"Ext.layout.component.field.Field",type:"sliderfield",sizeBodyContents:function(a,k){var b=this.owner,g=b.thumbs,c=g.length,j=b.inputEl,h=b.innerEl,e=b.endEl,d=0;for(;d<c;++d){g[d].el.stopAnimation()}if(b.vertical){j.setHeight(k);h.setHeight(Ext.isNumber(k)?k-j.getPadding("t")-e.getPadding("b"):k)}else{j.setWidth(a);h.setWidth(Ext.isNumber(a)?a-j.getPadding("l")-e.getPadding("r"):a)}b.syncThumbs()}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:"Ext.layout.container.Anchor",alternateClassName:"Ext.layout.AbsoluteLayout",itemCls:Ext.baseCSSPrefix+"abs-layout-item",type:"absolute",onLayout:function(){var b=this,c=b.getTarget(),a=c.dom===document.body;if(!a){c.position()}b.paddingLeft=c.getPadding("l");b.paddingTop=c.getPadding("t");b.callParent(arguments)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]:b}});Ext.define("Ext.layout.container.Accordion",{extend:"Ext.layout.container.VBox",alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",itemCls:Ext.baseCSSPrefix+"box-item "+Ext.baseCSSPrefix+"accordion-item",align:"stretch",fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:true,activeOnTop:false,multi:false,constructor:function(){var a=this;a.callParent(arguments);a.initialAnimate=a.animate;a.animate=false;if(a.fill===false){a.itemCls=Ext.baseCSSPrefix+"accordion-item"}},beforeLayout:function(){var a=this;a.callParent(arguments);if(a.fill){if(!(a.owner.el.dom.style.height||a.getLayoutTargetSize().height)){return false}}else{a.owner.componentLayout.monitorChildren=false;a.autoSize=true;a.owner.setAutoScroll(true)}},renderItems:function(c,j){var h=this,g=c.length,d=0,b,e=h.getLayoutTargetSize(),a=[];for(;d<g;d++){b=c[d];if(!b.rendered){a.push(b);if(h.collapseFirst){b.collapseFirst=h.collapseFirst}if(h.hideCollapseTool){b.hideCollapseTool=h.hideCollapseTool;b.titleCollapse=true}else{if(h.titleCollapse){b.titleCollapse=h.titleCollapse}}delete b.hideHeader;b.collapsible=true;b.title=b.title||"&#160;";b.width=e.width;if(h.fill){delete b.height;delete b.flex;if(h.expandedItem!==undefined){b.collapsed=true}else{if(b.hasOwnProperty("collapsed")&&b.collapsed===false){b.flex=1;h.expandedItem=d}else{b.collapsed=true}}h.owner.mon(b,{show:h.onComponentShow,beforeexpand:h.onComponentExpand,beforecollapse:h.onComponentCollapse,scope:h})}else{delete b.flex;b.animCollapse=h.initialAnimate;b.autoHeight=true;b.autoScroll=false}b.border=b.collapsed}}if(g&&h.expandedItem===undefined){h.expandedItem=0;b=c[0];b.collapsed=b.border=false;if(h.fill){b.flex=1}}h.callParent(arguments);g=a.length;for(d=0;d<g;d++){b=a[d];delete b.width;b.header.addCls(Ext.baseCSSPrefix+"accordion-hd");b.body.addCls(Ext.baseCSSPrefix+"accordion-body")}},onLayout:function(){var g=this;if(g.fill){g.callParent(arguments)}else{var e=g.getLayoutTargetSize(),c=g.getVisibleItems(),a=c.length,d=0,b;for(;d<a;d++){b=c[d];if(b.collapsed){c[d].setWidth(e.width)}else{c[d].setSize(null,null)}}}g.updatePanelClasses();return g},updatePanelClasses:function(){var c=this.getLayoutItems(),d=c.length,a=true,b,e;for(b=0;b<d;b++){e=c[b];if(Ext.isWindows){e.el.dom.scrollTop=0}if(a){e.header.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{e.header.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(b+1==d&&e.collapsed){e.header.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{e.header.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}a=e.collapsed}},animCallback:function(){Ext.Array.forEach(this.toCollapse,function(a){a.fireEvent("collapse",a)});Ext.Array.forEach(this.toExpand,function(a){a.fireEvent("expand",a)})},setupEvents:function(){this.toCollapse=[];this.toExpand=[]},onComponentExpand:function(g){var e=this,d=e.owner.items.items,a=d.length,c=0,b;e.setupEvents();for(;c<a;c++){b=d[c];if(b===g&&b.collapsed){e.setExpanded(b)}else{if(!e.multi&&(b.rendered&&b.header.rendered&&b!==g&&!b.collapsed)){e.setCollapsed(b)}}}e.animate=e.initialAnimate;if(e.activeOnTop){e.owner.insert(0,g)}else{e.layout()}e.animate=false;return false},onComponentCollapse:function(b){var c=this,d=b.next()||b.prev(),a=c.multi?c.owner.query(">panel:not([collapsed])"):[];c.setupEvents();if(c.multi){c.setCollapsed(b);if(a.length===1&&a[0]===b){c.setExpanded(d)}c.animate=c.initialAnimate;c.layout();c.animate=false}else{if(d){c.onComponentExpand(d)}}return false},onComponentShow:function(a){this.onComponentExpand(a)},setCollapsed:function(b){var e=b.getDockedItems(),d,a=e.length,c=0;b.hiddenDocked=[];for(;c<a;c++){d=e[c];if((d!==b.header)&&!d.hidden){d.hidden=true;b.hiddenDocked.push(d)}}b.addCls(b.collapsedCls);b.header.addCls(b.collapsedHeaderCls);b.height=b.header.getHeight();b.el.setHeight(b.height);b.collapsed=true;delete b.flex;if(this.initialAnimate){this.toCollapse.push(b)}else{b.fireEvent("collapse",b)}if(b.collapseTool){b.collapseTool.setType("expand-"+b.getOppositeDirection(b.collapseDirection))}},setExpanded:function(b){var d=b.hiddenDocked,a=d?d.length:0,c=0;for(;c<a;c++){d[c].show()}if(!b.body.isVisible()){b.body.show()}delete b.collapsed;delete b.height;delete b.componentLayout.lastComponentSize;b.suspendLayout=false;b.flex=1;b.removeCls(b.collapsedCls);b.header.removeCls(b.collapsedHeaderCls);if(this.initialAnimate){this.toExpand.push(b)}else{b.fireEvent("expand",b)}if(b.collapseTool){b.collapseTool.setType("collapse-"+b.collapseDirection)}b.setAutoScroll(b.initialConfig.autoScroll)}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}">&nbsp;</div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",onRender:function(){var a=this,b=a.getCollapseTarget(),c=a.getCollapseDirection();Ext.applyIf(a.renderData,{collapseDir:c,collapsible:a.collapsible||b.collapsible});a.addChildEls("collapseEl");this.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(b,"collapse",a.onTargetCollapse,a);a.mon(b,"expand",a.onTargetExpand,a);a.el.addCls(a.baseCls+"-"+a.orientation);a.el.unselectable();a.tracker=Ext.create("Ext.resizer.SplitterTracker",{el:a.el});a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var c=this,a,b=c.ownerCt.layout.type;if(c.collapseTarget.isComponent){a=Number(c.ownerCt.items.indexOf(c.collapseTarget)==c.ownerCt.items.indexOf(c)-1)<<1|Number(b=="hbox")}else{a=Number(c.collapseTarget=="prev")<<1|Number(b=="hbox")}c.orientation=["horizontal","vertical"][a&1];return["bottom","right","top","left"][a]},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(c,a){var b=this.getCollapseTarget();if(b.isVisible()){if(b.collapsed){b.expand(b.animCollapse)}else{b.collapse(this.renderData.collapseDir,b.animCollapse)}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE){a.el.repaint()}}});Ext.define("Ext.layout.container.Border",{alias:["layout.border"],extend:"Ext.layout.container.Container",requires:["Ext.resizer.Splitter","Ext.container.Container","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:Ext.baseCSSPrefix+"border-item",bindToOwnerCtContainer:true,percentageRe:/(\d+)%/,slideDirection:{north:"t",south:"b",west:"l",east:"r"},constructor:function(a){this.initialConfig=a;this.callParent(arguments)},onLayout:function(){var a=this;if(!a.borderLayoutInitialized){a.initializeBorderLayout()}a.fixHeightConstraints();a.shadowLayout.onLayout();if(a.embeddedContainer){a.embeddedContainer.layout.onLayout()}if(!a.initialCollapsedComplete){Ext.iterate(a.regions,function(b,c){if(c.borderCollapse){a.onBeforeRegionCollapse(c,c.collapseDirection,false,0)}});a.initialCollapsedComplete=true}},isValidParent:function(b,c,a){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}return this.shadowLayout.isValidParent(b,c,a)},beforeLayout:function(){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}this.shadowLayout.beforeLayout()},renderItems:function(a,b){},renderItem:function(a){},renderChildren:function(){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}this.shadowLayout.renderChildren()},getVisibleItems:function(){return Ext.ComponentQuery.query(":not([slideOutAnim])",this.callParent(arguments))},initializeBorderLayout:function(){var k=this,c=0,j=k.getLayoutItems(),h=j.length,b=(k.regions={}),e=[],g=[],a=0,m=0,d,l;k.splitters={};for(;c<h;c++){d=j[c];b[d.region]=d;if(d.region!="center"&&d.collapsible&&d.collapseMode!="header"){d.borderCollapse=d.collapsed;d.collapsed=false;d.on({beforecollapse:k.onBeforeRegionCollapse,beforeexpand:k.onBeforeRegionExpand,destroy:k.onRegionDestroy,scope:k});k.setupState(d)}}d=b.center;if(!d.flex){d.flex=1}delete d.width;d.maintainFlex=true;d=b.west;if(d){d.collapseDirection=Ext.Component.DIRECTION_LEFT;g.push(d);if(d.split){g.push(k.splitters.west=k.createSplitter(d))}l=Ext.isString(d.width)&&d.width.match(k.percentageRe);if(l){a+=(d.flex=parseInt(l[1],10)/100);delete d.width}}d=b.north;if(d){d.collapseDirection=Ext.Component.DIRECTION_TOP;e.push(d);if(d.split){e.push(k.splitters.north=k.createSplitter(d))}l=Ext.isString(d.height)&&d.height.match(k.percentageRe);if(l){m+=(d.flex=parseInt(l[1],10)/100);delete d.height}}if(b.north||b.south){if(b.east||b.west){e.push(k.embeddedContainer=Ext.create("Ext.container.Container",{xtype:"container",region:"center",id:k.owner.id+"-embedded-center",cls:Ext.baseCSSPrefix+"border-item",flex:b.center.flex,maintainFlex:true,layout:{type:"hbox",align:"stretch",getVisibleItems:k.getVisibleItems}}));g.push(b.center)}else{e.push(b.center)}}else{g.push(b.center)}d=b.south;if(d){d.collapseDirection=Ext.Component.DIRECTION_BOTTOM;if(d.split){e.push(k.splitters.south=k.createSplitter(d))}l=Ext.isString(d.height)&&d.height.match(k.percentageRe);if(l){m+=(d.flex=parseInt(l[1],10)/100);delete d.height}e.push(d)}d=b.east;if(d){d.collapseDirection=Ext.Component.DIRECTION_RIGHT;if(d.split){g.push(k.splitters.east=k.createSplitter(d))}l=Ext.isString(d.width)&&d.width.match(k.percentageRe);if(l){a+=(d.flex=parseInt(l[1],10)/100);delete d.width}g.push(d)}if(b.north||b.south){k.shadowContainer=Ext.create("Ext.container.Container",{ownerCt:k.owner,el:k.getTarget(),layout:Ext.applyIf({type:"vbox",align:"stretch",getVisibleItems:k.getVisibleItems},k.initialConfig)});k.createItems(k.shadowContainer,e);if(k.splitters.north){k.splitters.north.ownerCt=k.shadowContainer}if(k.splitters.south){k.splitters.south.ownerCt=k.shadowContainer}if(k.embeddedContainer){k.embeddedContainer.ownerCt=k.shadowContainer;k.createItems(k.embeddedContainer,g);if(k.splitters.east){k.splitters.east.ownerCt=k.embeddedContainer}if(k.splitters.west){k.splitters.west.ownerCt=k.embeddedContainer}Ext.each([k.splitters.north,k.splitters.south],function(i){if(i){i.on("beforedragstart",k.fixHeightConstraints,k)}});if(a){b.center.flex-=a}if(m){k.embeddedContainer.flex-=m}}else{if(m){b.center.flex-=m}}}else{k.shadowContainer=Ext.create("Ext.container.Container",{ownerCt:k.owner,el:k.getTarget(),layout:Ext.applyIf({type:(g.length==1)?"fit":"hbox",align:"stretch"},k.initialConfig)});k.createItems(k.shadowContainer,g);if(k.splitters.east){k.splitters.east.ownerCt=k.shadowContainer}if(k.splitters.west){k.splitters.west.ownerCt=k.shadowContainer}if(a){b.center.flex-=m}}for(c=0,j=k.shadowContainer.items.items,h=j.length;c<h;c++){j[c].shadowOwnerCt=k.shadowContainer}if(k.embeddedContainer){for(c=0,j=k.embeddedContainer.items.items,h=j.length;c<h;c++){j[c].shadowOwnerCt=k.embeddedContainer}}k.shadowLayout=k.shadowContainer.getLayout();k.borderLayoutInitialized=true},setupState:function(b){var a=b.getState;b.getState=function(){var c=a.call(b)||{},d=b.region;c.collapsed=!!b.collapsed;if(d=="west"||d=="east"){c.width=b.getWidth()}else{c.height=b.getHeight()}return c};b.addStateEvents(["collapse","expand","resize"])},createItems:function(a,b){delete a.items;a.initItems();a.items.addAll(b)},createSplitter:function(a){var b=this,c=(a.collapseMode!="header"),d;d=Ext.create("Ext.resizer.Splitter",{hidden:!!a.hidden,collapseTarget:a,performCollapse:!c,listeners:c?{click:{fn:Ext.Function.bind(b.onSplitterCollapseClick,b,[a]),element:"collapseEl"}}:null});if(a.collapseMode=="mini"){a.placeholder=d;d.collapsedCls=a.collapsedCls}a.on({hide:b.onRegionVisibilityChange,show:b.onRegionVisibilityChange,scope:b});return d},fixHeightConstraints:function(){var c=this,a=c.embeddedContainer,b=1e+99,d=-1;if(!a){return}a.items.each(function(e){if(Ext.isNumber(e.maxHeight)){b=Math.max(b,e.maxHeight)}if(Ext.isNumber(e.minHeight)){d=Math.max(d,e.minHeight)}});a.maxHeight=b;a.minHeight=d},onRegionVisibilityChange:function(a){this.splitters[a.region][a.hidden?"hide":"show"]();this.layout()},onSplitterCollapseClick:function(a){if(a.collapsed){this.onPlaceHolderToolClick(null,null,null,{client:a})}else{a.collapse()}},getPlaceholder:function(c){var d=this,g=c.placeholder,b=c.shadowOwnerCt,e=b.layout,a=Ext.panel.Panel.prototype.getOppositeDirection(c.collapseDirection),h=(c.region=="north"||c.region=="south");if(c.collapseMode=="header"){return}if(!g){if(c.collapseMode=="mini"){g=Ext.create("Ext.resizer.Splitter",{id:"collapse-placeholder-"+c.id,collapseTarget:c,performCollapse:false,listeners:{click:{fn:Ext.Function.bind(d.onSplitterCollapseClick,d,[c]),element:"collapseEl"}}});g.addCls(g.collapsedCls)}else{g={id:"collapse-placeholder-"+c.id,margins:c.initialConfig.margins||Ext.getClass(c).prototype.margins,xtype:"header",orientation:h?"horizontal":"vertical",title:c.title,textCls:c.headerTextCls,iconCls:c.iconCls,baseCls:c.baseCls+"-header",ui:c.ui,indicateDrag:c.draggable,cls:Ext.baseCSSPrefix+"region-collapsed-placeholder "+Ext.baseCSSPrefix+"region-collapsed-"+c.collapseDirection+"-placeholder "+c.collapsedCls,listeners:c.floatable?{click:{fn:function(i){d.floatCollapsedPanel(i,c)},element:"el"}}:null};if((Ext.isIE6||Ext.isIE7||(Ext.isIEQuirks))&&!h){g.width=25}if(!c.hideCollapseTool){g[h?"tools":"items"]=[{xtype:"tool",client:c,type:"expand-"+a,handler:d.onPlaceHolderToolClick,scope:d}]}}g=d.owner.createComponent(g);if(c.isXType("panel")){c.on({titlechange:d.onRegionTitleChange,iconchange:d.onRegionIconChange,scope:d})}}c.placeholder=g;g.comp=c;return g},onRegionTitleChange:function(a,b){a.placeholder.setTitle(b)},onRegionIconChange:function(b,a){b.placeholder.setIconCls(a)},calculateChildBox:function(a){var b=this;if(b.shadowContainer.items.contains(a)){return b.shadowContainer.layout.calculateChildBox(a)}else{if(b.embeddedContainer&&b.embeddedContainer.items.contains(a)){return b.embeddedContainer.layout.calculateChildBox(a)}}},onBeforeRegionCollapse:function(h,k,d){if(h.collapsedChangingLayout){return false}h.collapsedChangingLayout=true;var j=this,p=h.el,c,b=h.collapseMode=="mini",i=h.shadowOwnerCt,a=i.layout,m=h.placeholder,g=j.owner.suspendLayout,l=i.suspendLayout,n=(h.region=="north"||h.region=="west");j.owner.suspendLayout=true;i.suspendLayout=true;a.layoutBusy=true;if(i.componentLayout){i.componentLayout.layoutBusy=true}j.shadowContainer.layout.layoutBusy=true;j.layoutBusy=true;j.owner.componentLayout.layoutBusy=true;if(!m){m=j.getPlaceholder(h)}if(m.shadowOwnerCt===i){m.show()}else{i.insert(i.items.indexOf(h)+(n?0:1),m);m.shadowOwnerCt=i;m.ownerCt=j.owner}h.hidden=true;if(!m.rendered){a.renderItem(m,a.innerCt);if(h.region=="north"||h.region=="south"){m.setCalculatedSize(h.getWidth())}else{m.setCalculatedSize(undefined,h.getHeight())}}function e(){j.owner.suspendLayout=g;i.suspendLayout=l;delete a.layoutBusy;if(i.componentLayout){delete i.componentLayout.layoutBusy}delete j.shadowContainer.layout.layoutBusy;delete j.layoutBusy;delete j.owner.componentLayout.layoutBusy;delete h.collapsedChangingLayout;h.collapsed=true;h.fireEvent("collapse",h)}if(h.animCollapse&&j.initialCollapsedComplete){a.layout();p.dom.style.zIndex=100;if(!b){m.el.hide()}p.slideOut(j.slideDirection[h.region],{duration:Ext.Number.from(h.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){p.show().setLeftTop(-10000,-10000);p.dom.style.zIndex="";if(!b){m.el.slideIn(j.slideDirection[h.region],{easing:"linear",duration:100})}e()}}})}else{p.setLeftTop(-10000,-10000);a.layout();e()}return false},onBeforeRegionExpand:function(b,a){this.onPlaceHolderToolClick(null,null,null,{client:b,shouldFireBeforeexpand:false});return false},onPlaceHolderToolClick:function(n,u,a,c){var t=this,q=c.client,i=(q.collapseMode!="mini")||!q.split,s=q.el,k,d=q.placeholder,l=d.el,r=q.shadowOwnerCt,b=r.layout,j,p=t.owner.suspendLayout,m=r.suspendLayout,h;if(q.collapsedChangingLayout){return false}if(c.shouldFireBeforeexpand!==false&&q.fireEvent("beforeexpand",q,true)===false){return false}q.collapsedChangingLayout=true;if(q.getActiveAnimation()){q.stopAnimation()}if(q.slideOutAnim){s.un(q.panelMouseMon);l.un(q.placeholderMouseMon);delete q.slideOutAnim;delete q.panelMouseMon;delete q.placeholderMouseMon;h=true}t.owner.suspendLayout=true;r.suspendLayout=true;b.layoutBusy=true;if(r.componentLayout){r.componentLayout.layoutBusy=true}t.shadowContainer.layout.layoutBusy=true;t.layoutBusy=true;t.owner.componentLayout.layoutBusy=true;q.hidden=false;q.collapsed=false;if(i){d.hidden=true}k=b.calculateChildBox(q);if(q.collapseTool){q.collapseTool.show()}if(q.animCollapse&&!h){s.setStyle("visibility","hidden")}s.setLeftTop(k.left,k.top);j=q.getSize();if(j.height!=k.height||j.width!=k.width){t.setItemSize(q,k.width,k.height)}function g(){t.owner.suspendLayout=p;r.suspendLayout=m;delete b.layoutBusy;if(r.componentLayout){delete r.componentLayout.layoutBusy}delete t.shadowContainer.layout.layoutBusy;delete t.layoutBusy;delete t.owner.componentLayout.layoutBusy;delete q.collapsedChangingLayout;q.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");q.fireEvent("expand",q)}if(i){d.el.hide()}if(q.animCollapse&&!h){s.dom.style.zIndex=100;s.slideIn(t.slideDirection[q.region],{duration:Ext.Number.from(q.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){s.dom.style.zIndex="";q.hidden=false;b.onLayout();g()}}})}else{b.onLayout();g()}},floatCollapsedPanel:function(j,h){if(h.floatable===false){return}var k=this,q=h.el,n=h.placeholder,p=n.el,i=h.shadowOwnerCt,b=i.layout,g=b.getChildBox(n),m=i.suspendLayout,a,d,l;if(j.getTarget("."+Ext.baseCSSPrefix+"tool")){return}if(q.getActiveAnimation()){return}if(h.slideOutAnim){k.slideOutFloatedComponent(h);return}function c(s){var r=q.getRegion().union(p.getRegion()).adjust(1,-1,-1,1);if(!r.contains(s.getPoint())){k.slideOutFloatedComponent(h)}}h.placeholderMouseMon=p.monitorMouseLeave(500,c);i.suspendLayout=true;k.layoutBusy=true;k.owner.componentLayout.layoutBusy=true;if(h.collapseTool){h.collapseTool.hide()}h.hidden=false;h.collapsed=false;n.hidden=true;d=b.calculateChildBox(h);n.hidden=false;if(h.region=="north"||h.region=="west"){d[b.parallelBefore]+=g[b.parallelPrefix]-1}else{d[b.parallelBefore]-=(g[b.parallelPrefix]-1)}q.setStyle("visibility","hidden");q.setLeftTop(d.left,d.top);a=h.getSize();if(a.height!=d.height||a.width!=d.width){k.setItemSize(h,d.width,d.height)}l={listeners:{afteranimate:function(){i.suspendLayout=m;delete k.layoutBusy;delete k.owner.componentLayout.layoutBusy;l.listeners={afterAnimate:function(){q.show().removeCls(Ext.baseCSSPrefix+"border-region-slide-in").setLeftTop(-10000,-10000);h.hidden=true;h.collapsed=true;delete h.slideOutAnim;delete h.panelMouseMon;delete h.placeholderMouseMon}};h.slideOutAnim=l}},duration:500};q.addCls(Ext.baseCSSPrefix+"border-region-slide-in");q.slideIn(k.slideDirection[h.region],l);h.panelMouseMon=q.monitorMouseLeave(500,c)},slideOutFloatedComponent:function(a){var c=a.el,b;c.un(a.panelMouseMon);a.placeholder.el.un(a.placeholderMouseMon);c.slideOut(this.slideDirection[a.region],a.slideOutAnim);delete a.slideOutAnim;delete a.panelMouseMon;delete a.placeholderMouseMon},onRegionDestroy:function(a){var b=a.placeholder;if(b){delete b.ownerCt;b.destroy()}},onDestroy:function(){var b=this,a=b.shadowContainer,c=b.embeddedContainer;if(a){delete a.ownerCt;Ext.destroy(a)}if(c){delete c.ownerCt;Ext.destroy(c)}delete b.regions;delete b.splitters;delete b.shadowContainer;delete b.embeddedContainer;b.callParent(arguments)}});Ext.define("Ext.layout.container.Card",{alias:["layout.card"],alternateClassName:"Ext.layout.CardLayout",extend:"Ext.layout.container.AbstractCard",setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;a.add(b)}if(b&&d!=b){if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length);e.configureItem(b,0)}e.activeItem=b;if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}if(e.sizeAllCards){e.onLayout()}else{e.setItemBox(b,e.getTargetBox())}e.owner.suspendLayout=true;if(d){if(e.hideInactive){d.hide()}d.fireEvent("deactivate",d,b)}e.owner.suspendLayout=false;if(b.hidden){b.show()}else{e.onLayout()}b.fireEvent("activate",b,d);return b}return false},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}});Ext.define("Ext.layout.container.Column",{extend:"Ext.layout.container.Auto",alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",scrollOffset:0,bindToOwnerCtComponent:false,getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:Ext.baseCSSPrefix+"column-inner"});this.clearEl=this.innerCt.createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}return this.innerCt},onLayout:function(){var h=this,e=h.getTarget(),g=h.getLayoutItems(),d=g.length,k,c,l=[],b,m,j,a;m=h.getLayoutTargetSize();if(m.width<d*10){return}if(h.adjustmentPass){if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){m.width=h.adjustedWidth}}else{c=e.getStyle("overflow");if(c&&c!="hidden"){h.autoScroll=true;if(!(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)){e.setStyle("overflow","hidden");m=h.getLayoutTargetSize()}}}j=m.width-h.scrollOffset;h.innerCt.setWidth(j);for(c=0;c<d;c++){k=g[c];b=l[c]=k.getEl().getMargin("lr");if(!k.columnWidth){j-=(k.getWidth()+b)}}j=j<0?0:j;for(c=0;c<d;c++){k=g[c];if(k.columnWidth){a=Math.floor(k.columnWidth*j)-l[c];h.setItemSize(k,a,k.height)}else{h.layoutItem(k)}}if(!h.adjustmentPass&&h.autoScroll){e.setStyle("overflow","auto");h.adjustmentPass=(e.dom.scrollHeight>m.height);if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){h.adjustedWidth=m.width-Ext.getScrollBarWidth()}else{e.setStyle("overflow","auto")}if(h.adjustmentPass){h.onLayout()}}delete h.adjustmentPass},configureItem:function(a){this.callParent(arguments);if(a.columnWidth){a.layoutManagedWidth=1}}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Auto",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",autoSize:true,clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,renderItems:function(h){var e=this.getTable().tBodies[0],p=e.rows,d=0,g=h.length,n,l,c,a,m,k,j,b;n=this.calculateCells(h);for(;d<g;d++){l=n[d];c=l.rowIdx;a=l.cellIdx;m=h[d];k=p[c];if(!k){k=e.insertRow(c);if(this.trAttrs){k.set(this.trAttrs)}}b=j=Ext.get(k.cells[a]||k.insertCell(a));if(this.needsDivWrap()){b=j.first()||j.createChild({tag:"div"});b.setWidth(null)}if(!m.rendered){this.renderItem(m,b,0)}else{if(!this.isValidParent(m,b,0)){this.moveItem(m,b,0)}}if(this.tdAttrs){j.set(this.tdAttrs)}j.set({colSpan:m.colspan||1,rowSpan:m.rowspan||1,id:m.cellId||"",cls:this.cellCls+" "+(m.cellCls||"")});if(!n[d+1]||n[d+1].rowIdx!==c){a++;while(k.cells[a]){k.deleteCell(a)}}}c++;while(e.rows[c]){e.deleteRow(c)}},afterLayout:function(){this.callParent();if(this.needsDivWrap()){Ext.Array.forEach(this.getLayoutItems(),function(a){Ext.fly(a.el.dom.parentNode).setWidth(a.getWidth())})}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getTable:function(){var a=this.table;if(!a){a=this.table=this.getTarget().createChild(Ext.apply({tag:"table",role:"presentation",cls:this.tableCls,cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}return a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,renderTpl:['<tpl if="plain">',"{text}","</tpl>",'<tpl if="!plain">','<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="menu">style="margin-right: 17px;"</tpl> >{text}</span>','<tpl if="menu">','<img id="{id}-arrowEl" src="{blank}" class="'+Ext.baseCSSPrefix+'menu-item-arrow" />',"</tpl>","</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},blur:function(){this.$focused=false;this.callParent(arguments)},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){clearTimeout(b.hideMenuTimer);if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},focus:function(){this.$focused=true;this.callParent(arguments)},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"];b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){b.menu=Ext.menu.Manager.get(b.menu)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);clearTimeout(a.hideMenuTimer);clearTimeout(a.deferHideParentMenusTimer);if(a.menu){delete a.menu.parentItem;delete a.menu.parentMenu;delete a.menu.ownerCt;if(a.destroyMenu!==false){a.menu.destroy()}}a.callParent(arguments)},onRender:function(a,d){var b=this,c=Ext.BLANK_IMAGE_URL;Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||c,iconCls:b.iconCls+(b.checkChangeDisabled?" "+b.disabledCls:""),menu:Ext.isDefined(b.menu),plain:b.plain,text:b.text,blank:c});b.addChildEls("itemEl","iconEl","textEl","arrowEl");b.callParent(arguments)},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIconCls:function(a){var b=this;if(b.iconEl){if(b.iconCls){b.iconEl.removeCls(b.iconCls)}if(a){b.iconEl.addCls(a)}}b.iconCls=a},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.redoComponentLayout()}}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,afterRender:function(){var a=this;this.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true)},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var a=this;if(a.iconEl){a.iconEl.addCls(a.disabledCls)}a.checkChangeDisabled=true},enableCheckChange:function(){var a=this;a.iconEl.removeCls(a.disabledCls);a.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}var e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",onRender:function(b,d){var c=this,a=c.separatorCls;c.cls+=" "+a;c.callParent(arguments)}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[];b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");b.layout={type:"vbox",align:"stretchmax",autoSize:true,clearInnerCtOnLayout:true,overflowHandler:"Scroller"};if(b.floating===false&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var e=!!b.items.length;if(e&&b.rendered){b.el.setStyle("visibility",null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c="&#160;";b.callParent(arguments);if(b.showSeparator){b.iconSepEl=b.layout.getRenderTarget().insertFirst({cls:d+"menu-icon-separator",html:c})}b.focusEl=b.el.createChild({cls:d+"menu-focus",tabIndex:"-1",html:c});b.mon(b.el,{click:b.onClick,mouseover:b.onMouseOver,scope:b});b.mouseMonitor=b.el.monitorMouseLeave(100,b.onMouseLeave,b);if(b.showSeparator&&((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)){b.iconSepEl.setHeight(b.el.getHeight())}b.keyNav=Ext.create("Ext.menu.KeyNav",b)},afterLayout:function(){var k=this;k.callParent(arguments);if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){var a=k.layout.getRenderTarget(),c=0,b=k.dockedItems,d=b.length,g=0,h,j,e;c=a.getWidth();e=c+k.body.getBorderWidth("lr")+k.body.getPadding("lr");k.body.setWidth(e);for(;g<d,h=b.getAt(g);g++){if(h.dock=="left"||h.dock=="right"){e+=h.getWidth()}}k.el.setWidth(e)}},getBubbleTarget:function(){return this.parentMenu||this.callParent()},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(){var a=this;if(a.activeItem){a.activeItem.deactivate();if(!a.activeItem.activated){delete a.activeItem}}if(a.focusedItem&&!a.filtered){a.focusedItem.blur();if(!a.focusedItem.$focused){delete a.focusedItem}}},clearStretch:function(){if(this.rendered){this.items.each(function(a){if(a.componentLayout){delete a.componentLayout.lastComponentSize}if(a.el){a.el.setWidth(null)}})}},onAdd:function(){var a=this;a.clearStretch();a.callParent(arguments);if(Ext.isIE6||Ext.isIE7){Ext.Function.defer(a.doComponentLayout,10,a)}},onRemove:function(){this.clearStretch();this.callParent(arguments)},redoComponentLayout:function(){if(this.rendered){this.clearStretch();this.doComponentLayout()}},getFocusEl:function(){return this.focusEl},hide:function(){this.deactivateActiveItem();this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(Ext.isString(b)){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a,e;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];e=Ext.Function.createInterceptor;c.focus=e(c.focus,function(){this.$focused=true},c);c.blur=e(c.blur,function(){this.$focused=false},c);if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}c.isMenuItem=true}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?Ext.createWidget("menuseparator"):Ext.createWidget("menuitem",{canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}if((c.getTarget()==b.focusEl.dom)||c.within(b.layout.getRenderTarget())){a=b.getItemFromEvent(c)||b.activeItem;if(a){if(a.getXTypes().indexOf("menuitem")>=0){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}}b.fireEvent("click",b,a,c)}},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(d){var c=this,g=d.getRelatedTarget(),a=!c.el.contains(g),b=c.getItemFromEvent(d);if(a&&c.parentMenu){c.parentMenu.setActiveItem(c.parentItem);c.parentMenu.mouseMonitor.mouseenter()}if(c.disabled){return}if(b){c.setActiveItem(b);if(b.activated&&b.expandMenu){b.expandMenu()}}if(a){c.fireEvent("mouseenter",c,d)}c.fireEvent("mouseover",c,b,d)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem&&b!=a.focusedItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,g,e){var a=this,d,c;if(a.floating&&b){a.layout.autoSize=true;a.doAutoRender();delete a.needsLayout;b=b.el||b;d=a.el.getAlignToXY(b,g||a.defaultAlign,e);if(a.floatParent){c=a.floatParent.getTargetEl().getViewRegion();d[0]-=c.x;d[1]-=c.y}a.showAt(d)}return a},doConstrain:function(){var g=this,h=g.el.getY(),i,e,b,j=h,k,d,a,c;delete g.height;g.setSize();e=g.getHeight();if(g.floating){d=Ext.fly(g.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;k=h-a;i=g.maxHeight?g.maxHeight:c-k;if(e>c){i=c;j=h-k}else{if(i<e){j=h-(e-i);i=e}}}else{i=g.getHeight()}if(g.maxHeight){i=Math.min(g.maxHeight,i)}if(e>i&&i>0){g.layout.autoSize=false;g.setHeight(i);if(g.showSeparator){g.iconSepEl.setHeight(g.layout.getRenderTarget().dom.scrollHeight)}}b=g.getConstrainVector(g.el.getScopeParent());if(b){g.setPosition(g.getPosition()[0]+b[0])}g.el.setY(j)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var a=this;Ext.apply(a,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:a.pickerId,xtype:"datepicker"},a.initialConfig)});a.callParent(arguments);a.picker=a.down("datepicker");a.relayEvents(a.picker,["select"]);if(a.hideOnClick){a.on("select",a.hidePickerOnSelect,a)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.addChildEls("toolEl");a.tooltip=a.tooltip||a.qtip;a.callParent()},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}b.mon(b.toolEl,{click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.resizer.Handle",{extend:"Ext.Component",handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",onRender:function(){this.addCls(this.baseHandleCls,this.baseHandleCls+"-"+this.region,this.handleCls);this.callParent(arguments);this.el.unselectable()}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(a){var h=this,g,m,l=h.handles,b,k,e,c=0,j;this.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(a)||Ext.isElement(a)||a.dom){g=a;a=arguments[1]||{};a.target=g}h.mixins.observable.constructor.call(h,a);g=h.target;if(g){if(g.isComponent){h.el=g.getEl();if(g.minWidth){h.minWidth=g.minWidth}if(g.minHeight){h.minHeight=g.minHeight}if(g.maxWidth){h.maxWidth=g.maxWidth}if(g.maxHeight){h.maxHeight=g.maxHeight}if(g.floating){if(!this.hasOwnProperty("handles")){this.handles="n ne e se s sw w nw"}}}else{h.el=h.target=Ext.get(g)}}else{h.target=h.el=Ext.get(h.el)}m=h.el.dom.tagName;if(m=="TEXTAREA"||m=="IMG"){h.originalTarget=h.target;h.target=h.el=h.el.wrap({cls:h.wrapCls,id:h.el.id+"-rzwrap"});h.el.setPositioning(h.originalTarget.getPositioning());h.originalTarget.clearPositioning();var d=h.originalTarget.getBox();h.el.setBox(d)}h.el.position();if(h.pinned){h.el.addCls(h.pinnedCls)}h.resizeTracker=Ext.create("Ext.resizer.ResizeTracker",{disabled:h.disabled,target:h.target,constrainTo:h.constrainTo,overCls:h.overCls,throttle:h.throttle,originalTarget:h.originalTarget,delegate:"."+h.handleCls,dynamic:h.dynamic,preserveRatio:h.preserveRatio,heightIncrement:h.heightIncrement,widthIncrement:h.widthIncrement,minHeight:h.minHeight,maxHeight:h.maxHeight,minWidth:h.minWidth,maxWidth:h.maxWidth});h.resizeTracker.on("mousedown",h.onBeforeResize,h);h.resizeTracker.on("drag",h.onResize,h);h.resizeTracker.on("dragend",h.onResizeEnd,h);if(h.handles=="all"){h.handles="n s e w ne nw se sw"}l=h.handles=h.handles.split(/ |\s*?[,;]\s*?/);k=h.possiblePositions;e=l.length;b=h.handleCls+" "+(this.target.isComponent?(h.target.baseCls+"-handle "):"")+h.handleCls+"-";for(;c<e;c++){if(l[c]&&k[l[c]]){j=k[l[c]];h[j]=Ext.create("Ext.Component",{owner:this,region:j,cls:b+j,renderTo:h.el});h[j].el.unselectable();if(h.transparent){h[j].el.setOpacity(0)}}}if(Ext.isNumber(h.width)){h.width=Ext.Number.constrain(h.width,h.minWidth,h.maxWidth)}if(Ext.isNumber(h.height)){h.height=Ext.Number.constrain(h.height,h.minHeight,h.maxHeight)}if(h.width!=null||h.height!=null){if(h.originalTarget){h.originalTarget.setWidth(h.width);h.originalTarget.setHeight(h.height)}h.resizeTo(h.width,h.height)}h.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(c,d){var a=this.target.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,d)},onResize:function(d,g){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resizedrag",c,a.width,a.height,g)},onResizeEnd:function(d,g){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resize",c,a.width,a.height,g)},resizeTo:function(b,a){this.target.setSize(b,a);this.fireEvent("resize",this,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var c;for(var b=0,a=this.handles.length;b<a;b++){c=this[this.possiblePositions[this.handles[b]]];delete c.owner;Ext.destroy(c)}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.getCmp(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(t,m){var u=this,c=u.activeResizeHandle.region,g=u.getOffset(u.constrainTo?"dragTarget":null),k=u.startBox,h,q=0,v=0,j,r,a=0,x=0,w,n=g[0]<0?"right":"left",s=g[1]<0?"down":"up",i,b;switch(c){case"south":v=g[1];b=2;break;case"north":v=-g[1];x=-v;b=2;break;case"east":q=g[0];b=1;break;case"west":q=-g[0];a=-q;b=1;break;case"northeast":v=-g[1];x=-v;q=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":v=g[1];q=g[0];i=[k.x,k.y];b=3;break;case"southwest":q=-g[0];a=-q;v=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":v=-g[1];x=-v;q=-g[0];a=-q;i=[k.x+k.width,k.y+k.height];b=3;break}var d={width:k.width+q,height:k.height+v,x:k.x+a,y:k.y+x};j=Ext.Number.snap(d.width,u.widthIncrement);r=Ext.Number.snap(d.height,u.heightIncrement);if(j!=d.width||r!=d.height){switch(c){case"northeast":d.y-=r-d.height;break;case"north":d.y-=r-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=r-d.height}d.width=j;d.height=r}if(d.width<u.minWidth||d.width>u.maxWidth){d.width=Ext.Number.constrain(d.width,u.minWidth,u.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{u.lastX=d.x}if(d.height<u.minHeight||d.height>u.maxHeight){d.height=Ext.Number.constrain(d.height,u.minHeight,u.maxHeight);if(x){d.y=k.y+(k.height-d.height)}}else{u.lastY=d.y}if(u.preserveRatio||t.shiftKey){var p,l;h=u.startBox.width/u.startBox.height;p=Math.min(Math.max(u.minHeight,d.width/h),u.maxHeight);l=Math.min(Math.max(u.minWidth,d.height*h),u.maxWidth);if(b==1){d.height=p}else{if(b==2){d.width=l}else{w=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(w>h){d.height=p}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(v===0){s="none"}if(q===0){n="none"}u.resize(d,{horizontal:n,vertical:s},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){if(c.floating){c.setPagePosition(b.x,b.y)}c.setSize(b.width,b.height)}else{c.setBox(b);if(this.originalTarget){this.originalTarget.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(h){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,b;if(c&&(h.getTarget()===d.getSplitter().collapseEl.dom)){return false}if(a.collapsed||g.collapsed){return false}b=d.overlay=Ext.getBody().createChild({cls:d.overlayCls,html:"&#160;"});b.unselectable();b.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));b.show();d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=d.calculateConstrainRegion()},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=Ext.create("Ext.util.Region",d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=Ext.create("Ext.util.Region",c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=Ext.create("Ext.util.Region",d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=Ext.create("Ext.util.Region",(e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(h){var j=this,c=j.getOffset("dragTarget"),a=j.getSplitter(),d=a.orientation,k=j.getPrevCmp(),i=j.getNextCmp(),b=a.ownerCt,g=b.getLayout();b.suspendLayout=true;if(d==="vertical"){if(k){if(!k.maintainFlex){delete k.flex;k.setSize(j.prevBox.width+c[0],k.getHeight())}}if(i){if(!i.maintainFlex){delete i.flex;i.setSize(j.nextBox.width-c[0],i.getHeight())}}}else{if(k){if(!k.maintainFlex){delete k.flex;k.setSize(k.getWidth(),j.prevBox.height+c[1])}}if(i){if(!i.maintainFlex){delete i.flex;i.setSize(k.getWidth(),j.nextBox.height-c[1])}}}delete b.suspendLayout;g.onLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize()},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return Ext.getCmp(this.getDragCt().id)}});Ext.define("Ext.selection.CellModel",{extend:"Ext.selection.Model",alias:"selection.cellmodel",requires:["Ext.util.KeyNav"],enableKeyNav:true,preventWrap:false,constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.primaryView=a;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({cellmousedown:b.onMouseDown,refresh:b.onViewRefresh,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create("Ext.util.KeyNav",a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){return this.primaryView.headerCt},onKeyUp:function(b,a){this.move("up",b)},onKeyDown:function(b,a){this.move("down",b)},onKeyLeft:function(b,a){this.move("left",b)},onKeyRight:function(b,a){this.move("right",b)},move:function(a,c){var b=this,d=b.primaryView.walkCells(b.getCurrentPosition(),a,c,b.preventWrap);if(d){b.setCurrentPosition(d)}return d},getCurrentPosition:function(){return this.position},setCurrentPosition:function(b){var a=this;if(a.position){a.onCellDeselect(a.position)}if(b){a.onCellSelect(b)}a.position=b},onMouseDown:function(c,a,d,b,h,i,g){this.setCurrentPosition({row:i,column:d})},onCellSelect:function(a){var d=this,c=d.view.getStore(),b=c.getAt(a.row);d.doSelect(b);d.primaryView.onCellSelect(a);d.primaryView.onCellFocus(a);d.fireEvent("select",d,b,a.row,a.column)},onCellDeselect:function(a){var d=this,c=d.view.getStore(),b=c.getAt(a.row);d.doDeselect(b);d.primaryView.onCellDeselect(a);d.fireEvent("deselect",d,b,a.row,a.column)},onKeyTab:function(h,c){var d=this,g=h.shiftKey?"left":"right",b=d.view.editingPlugin,a=d.move(g,h);if(b&&a&&d.wasEditing){b.startEditByPosition(a)}delete d.wasEditing},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){b.startEditByPosition(a);c.wasEditing=true}},refresh:function(){var a=this.getCurrentPosition();if(a){this.onCellSelect(a)}},onViewRefresh:function(){var a=this.getCurrentPosition();if(a){this.onCellDeselect(a);this.setCurrentPosition(null)}},selectByPosition:function(a){this.setCurrentPosition(a)}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:true,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(d,a){var c=this,b=c.store.getAt(c.store.getCount()-1);if(b){if(d.shiftKey){c.selectRange(b,c.lastFocused||0);c.setLastFocused(b)}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyHome:function(c,a){var b=this,d=b.store.getAt(0);if(d){if(c.shiftKey){b.selectRange(d,b.lastFocused||0);b.setLastFocused(d)}else{if(c.ctrlKey){b.setLastFocused(d)}else{b.doSelect(d,false)}}}},onKeyPageUp:function(i,d){var h=this,j=h.getRowsVisible(),b,c,a,g;if(j){b=h.lastFocused?h.store.indexOf(h.lastFocused):0;c=b-j;if(c<0){c=0}a=h.store.getAt(c);if(i.shiftKey){g=h.store.getAt(b);h.selectRange(a,g,i.ctrlKey,"up");h.setLastFocused(a)}else{if(i.ctrlKey){i.preventDefault();h.setLastFocused(a)}else{h.doSelect(a)}}}},onKeyPageDown:function(i,b){var g=this,j=g.getRowsVisible(),a,h,d,c;if(j){a=g.lastFocused?g.store.indexOf(g.lastFocused):0;h=a+j;if(h>=g.store.getCount()){h=g.store.getCount()-1}d=g.store.getAt(h);if(i.shiftKey){c=g.store.getAt(a);g.selectRange(d,c,i.ctrlKey,"down");g.setLastFocused(d)}else{if(i.ctrlKey){i.preventDefault();g.setLastFocused(d)}else{g.doSelect(d)}}}},onKeyPress:function(d,b){if(d.getKey()===d.SPACE){d.stopEvent();var c=this,a=c.lastFocused;if(a){if(c.isSelected(a)){c.doDeselect(a,false)}else{c.doSelect(a,true)}}}},onKeyUp:function(h,d){var g=this,c=g.views[0],a=g.store.indexOf(g.lastFocused),b;if(a>0){b=g.store.getAt(a-1);if(h.shiftKey&&g.lastFocused){if(g.isSelected(g.lastFocused)&&g.isSelected(b)){g.doDeselect(g.lastFocused,true);g.setLastFocused(b)}else{if(!g.isSelected(g.lastFocused)){g.doSelect(g.lastFocused,true);g.doSelect(b,true)}else{g.doSelect(b,true)}}}else{if(h.ctrlKey){g.setLastFocused(b)}else{g.doSelect(b)}}}},onKeyDown:function(h,d){var g=this,c=g.views[0],a=g.store.indexOf(g.lastFocused),b;if(a+1<g.store.getCount()){b=g.store.getAt(a+1);if(g.selected.getCount()===0){g.doSelect(b)}else{if(h.shiftKey&&g.lastFocused){if(g.isSelected(g.lastFocused)&&g.isSelected(b)){g.doDeselect(g.lastFocused,true);g.setLastFocused(b)}else{if(!g.isSelected(g.lastFocused)){g.doSelect(g.lastFocused,true);g.doSelect(b,true)}else{g.doSelect(b,true)}}}else{if(h.ctrlKey){g.setLastFocused(b)}else{g.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(b,a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b,a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,g){b.el.focus();if(!this.allowRightMouseSelection(g)){return}this.selectWithEvent(a,g)},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,l,a){var j=this,m=j.views,d=m.length,k=j.store,b=k.indexOf(g),h=c?"select":"deselect",e=0;if((l||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){m[e].onRowSelect(b,l)}else{m[e].onRowDeselect(b,l)}}if(!l){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(j,d,b){var a=this.views,h=a.length,c=this.store,g,e=0;if(j){g=c.indexOf(j);if(g!=-1){for(;e<h;e++){a[e].onRowFocus(g,false)}}}if(d){g=c.indexOf(d);if(g!=-1){for(e=0;e<h;e++){a[e].onRowFocus(g,true,b)}}}},onEditorTab:function(i,g){var h=this,j=h.views[0],c=i.getActiveRecord(),b=i.getActiveColumn(),d=j.getPosition(c,b),k=g.shiftKey?"left":"right",a=j.walkCells(d,k,g,this.preventWrap);if(a){i.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:"Ext.selection.RowModel",mode:"MULTI",injectCheckbox:0,checkOnly:false,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments);if(!b.hasLockedHeader()||a.headerCt.lockedCt){a.headerCt.on("headerclick",b.onHeaderClick,b);b.addCheckbox(true);b.mon(a.ownerCt,"reconfigure",b.addCheckbox,b)}},hasLockedHeader:function(){var a=false;Ext.each(this.views,function(b){if(b.headerCt.lockedCt){a=true;return false}});return a},addCheckbox:function(b){var c=this,d=c.injectCheckbox,a=c.views[0],e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}e.add(d,c.getHeaderConfig())}if(b!==true){a.refresh()}},toggleUiHeader:function(d){var a=this.views[0],c=a.headerCt,b=c.child("gridcolumn[isCheckerHd]");if(b){if(d){b.el.addCls(this.checkerOnCls)}else{b.el.removeCls(this.checkerOnCls)}}},onHeaderClick:function(b,d,a){if(d.isCheckerHd){a.stopEvent();var c=d.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");if(c){this.deselectAll(true)}else{this.selectAll(true)}}},getHeaderConfig:function(){var a=this;return{isCheckerHd:true,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"column-header-checkbox ",renderer:Ext.Function.bind(a.renderer,a),locked:a.hasLockedHeader()}},renderer:function(g,c,b,h,e,d,a){c.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return'<div class="'+Ext.baseCSSPrefix+'grid-row-checker">&#160;</div>'},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker");if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){var j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){this.callParent(arguments);var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(!c.isLeaf()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeyPress:function(g,b){var a=g.getKey(),c,d;if(a===g.SPACE||a===g.ENTER){g.stopEvent();c=this.getLastSelected();if(c){this.view.onCheckChange(c)}}else{this.callParent(arguments)}}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a]);if(b.slider.vertical){Ext.apply(b,Ext.slider.Thumb.Vertical)}},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst({cls:a.cls});if(a.disabled){a.disable()}a.initEvents()},move:function(b,a){if(!a){this.el.setLeft(b)}else{Ext.create("Ext.fx.Anim",{target:this.el,duration:350,to:{left:b}})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=Ext.create("Ext.dd.DragTracker",{onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getNewValue(),a,i;if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)},statics:{Vertical:{getNewValue:function(){var b=this.slider,c=b.innerEl,d=c.translatePoints(this.tracker.getXY()),a=c.getHeight()-d.top;return Ext.util.Format.round(b.reverseValue(a),b.decimalPrecision)},move:function(b,a){if(!a){this.el.setBottom(b)}else{Ext.create("Ext.fx.Anim",{target:this.el,duration:350,to:{bottom:b}})}}}}});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:[0,-10],isSliderTip:true,init:function(b){var a=this;b.on({scope:a,dragstart:a.onSlide,drag:a.onSlide,dragend:a.hide,destroy:a.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.doComponentLayout();b.el.alignTo(a.el,"b-t?",b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+'slider {fieldCls} {vertical}" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">','<a id="{cmpId}-focusEl" class="'+Ext.baseCSSPrefix+'slider-focus" href="#" tabIndex="-1" hidefocus="on" role="presentation"></a>',"</div>","</div>","</div>",{disableFormats:true,compiled:true}],vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var c=this,a,b;c.thumbs=[];c.keyIncrement=Math.max(c.increment,c.keyIncrement);c.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(c.vertical){Ext.apply(c,Ext.slider.Multi.Vertical)}c.callParent();if(c.useTips){a=c.tipText?{getText:c.tipText}:{};c.plugins=c.plugins||[];Ext.each(c.plugins,function(d){if(d.isSliderTip){b=true;return false}});if(!b){c.plugins.push(Ext.create("Ext.slider.Tip",a))}}},addThumb:function(c){var b=this,a=Ext.create("Ext.slider.Thumb",{value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},onRender:function(){var e=this,d=0,b=e.thumbs,a=b.length,c;Ext.applyIf(e.subTplData,{vertical:e.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:e.minValue,maxValue:e.maxValue,value:e.value});e.addChildEls("endEl","innerEl","focusEl");e.callParent(arguments);for(;d<a;d++){b[d].render()}c=e.innerEl.down("."+Ext.baseCSSPrefix+"slider-thumb");e.halfThumb=(e.vertical?c.getHeight():c.getWidth())/2},onChange:function(b,a){this.setValue(a,undefined,true)},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown,change:a.onChange});a.focusEl.swallowEvent("click",true)},onMouseDown:function(j){var g=this,h=false,d=0,b=g.thumbs,a=b.length,c;if(g.disabled){return}for(;d<a;d++){h=h||j.target==b[d].el.dom}if(g.clickToChange&&!h){c=g.innerEl.translatePoints(j.getXY());g.onClickChange(c)}g.focus()},onClickChange:function(c){var d=this,a,b;if(c.top>d.clickRange[0]&&c.top<d.clickRange[1]){a=d.getNearest(c,"left");if(!a.disabled){b=a.index;d.setValue(b,Ext.util.Format.round(d.reverseValue(c.left),d.decimalPrecision),undefined,true)}}},getNearest:function(n,b){var l=this,q=b=="top"?l.innerEl.getHeight()-n[b]:n[b],j=l.reverseValue(q),m=(l.maxValue-l.minValue)+5,g=0,c=null,h=l.thumbs,d=0,e=h.length,a,p,k;for(;d<e;d++){a=l.thumbs[d];p=a.value;k=Math.abs(p-j);if(Math.abs(k<=m)){c=a;g=d;m=k}}return c},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},afterRender:function(){var g=this,e=0,b=g.thumbs,a=b.length,d,c;g.callParent(arguments);for(;e<a;e++){d=b[e];if(d.value!==undefined){c=g.normalizeValue(d.value);if(c!==d.value){g.setValue(e,c,false)}else{d.move(g.translateValue(c),false)}}}},getRatio:function(){var a=this.innerEl.getWidth(),b=this.maxValue-this.minValue;return b===0?a:(a/b)},normalizeValue:function(a){var b=this;a=Ext.Number.snap(a,this.increment,this.minValue,this.maxValue);a=Ext.util.Format.round(a,b.decimalPrecision);a=Ext.Number.constrain(a,b.minValue,b.maxValue);return a},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.translateValue(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);if(e){d.fireEvent("changecomplete",d,g,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},focus:function(){this.focusEl.focus(10)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.translateValue(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var b=this,a=Ext.Array;a.forEach(a.from(b.originalValue),function(d,c){b.setValue(c,d)});b.clearInvalid();delete b.wasValid},beforeDestroy:function(){var a=this;Ext.destroy(a.innerEl,a.endEl,a.focusEl);Ext.each(a.thumbs,function(b){Ext.destroy(b)},a);a.callParent()},statics:{Vertical:{getRatio:function(){var b=this.innerEl.getHeight(),a=this.maxValue-this.minValue;return b/a},onClickChange:function(d){var e=this,b,c,a;if(d.left>e.clickRange[0]&&d.left<e.clickRange[1]){b=e.getNearest(d,"top");if(!b.disabled){c=b.index;a=e.reverseValue(e.innerEl.getHeight()-d.top);e.setValue(c,Ext.util.Format.round(e.minValue+a,e.decimalPrecision),undefined,true)}}}}}});Ext.define("Ext.slider.Single",{extend:"Ext.slider.Multi",alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=Ext.toArray(arguments),a=c.length;if(a==1||(a<=3&&typeof arguments[1]!="number")){c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}},onRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.addClsWithUI(b.position);b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}b.callParent(arguments);if(b.active){b.activate(true)}b.syncClosableElements();b.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:b.onEnterKey,del:b.onDeleteKey,scope:b})},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;if(a.closeEl){a.closeEl.un("click",Ext.EventManager.preventDefault);a.closeEl=null}Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.doComponentLayout();if(b.ownerCt){b.ownerCt.doLayout()}}}},syncClosableElements:function(){var a=this;if(a.closable){if(!a.closeEl){a.closeEl=a.el.createChild({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText}).on("click",Ext.EventManager.preventDefault)}}else{var b=a.closeEl;if(b){b.un("click",Ext.EventManager.preventDefault);b.remove();a.closeEl=null}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireEvent("close",a)}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(b){var a=this;if(a.closable){a.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab","Ext.FocusManager"],isTabBar:true,defaultType:"tab",plain:false,renderTpl:['<div id="{id}-body" class="{baseCls}-body <tpl if="bodyCls"> {bodyCls}</tpl> <tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>','<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var b=this,a;if(b.plain){b.setUI(b.ui+"-plain")}b.addClsWithUI(b.dock);b.addEvents("change");b.addChildEls("body","strip");b.callParent(arguments);b.layout.align=(b.orientation=="vertical")?"left":"top";b.layout.overflowHandler=Ext.create("Ext.layout.container.boxOverflow.Scroller",b.layout);b.remove(b.titleCmp);delete b.titleCmp;a=b.orientation=="vertical"?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a});Ext.apply(b.renderData,{bodyCls:b.bodyCls})},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}if(b.items.getCount()===0){b.activeTab=null}b.callParent(arguments)},afterRender:function(){var a=this;a.mon(a.el,{scope:a,click:a.onClick,delegate:"."+Ext.baseCSSPrefix+"tab"});a.callParent(arguments)},afterComponentLayout:function(){var a=this;a.callParent(arguments);a.strip.setWidth(a.el.getWidth())},onClick:function(c,b){var a=Ext.getCmp(b.id),d=this.tabPanel;b=c.getTarget();if(a&&a.isDisabled&&!a.isDisabled()){if(a.closable&&b===a.closeEl.dom){a.onCloseClick()}else{if(d){d.setActiveTab(a.card)}else{this.setActiveTab(a)}a.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}if(c.active&&d.items.getCount()>1){a=d.previousTab||c.next("tab")||d.items.first();d.setActiveTab(a);if(e){e.setActiveTab(a.card)}}c.fireClose();d.remove(c);if(e&&b){b.fireEvent("close",b);e.remove(b)}if(a){a.focus()}},setActiveTab:function(a){if(a.disabled){return}var b=this;if(b.activeTab){b.previousTab=b.activeTab;b.activeTab.deactivate()}a.activate();if(b.rendered){b.layout.layout();a.el&&a.el.scrollIntoView(b.layout.getRenderTarget())}b.activeTab=a;b.fireEvent("change",b,a,a.card)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:"x-tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=c.dockedItems||[],a=c.activeTab||0;c.layout=Ext.create("Ext.layout.container.Card",Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls},c.layout));c.tabBar=Ext.create("Ext.tab.Bar",Ext.apply({},c.tabBar,{dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c}));if(b&&!Ext.isArray(b)){b=[b]}b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.setActiveTab(a);c.on("afterlayout",c.afterInitialLayout,c,{single:true})},afterInitialLayout:function(){var b=this,a=b.getComponent(b.activeTab);if(a){b.layout.setActiveItem(a)}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b&&b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}c.tabBar.setActiveTab(a.tab);c.activeTab=a;if(c.rendered){c.layout.setActiveItem(a)}if(b&&b!==a){c.fireEvent("tabchange",c,a,b)}}},getActiveTab:function(){return this.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden,tabBar:d.tabBar};if(e.closeText){a.closeText=e.closeText}b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){e.preventHeader=true;if(e.rendered){e.updateHeader()}}if(e.isPanel&&d.border){e.setBorder(false)}}if(this.rendered&&d.items.getCount()===1){d.setActiveTab(0)}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIconCls(a);this.getTabBar().doLayout()},onItemTitleChange:function(a,b){a.tab.setText(b);this.getTabBar().doLayout()},doRemove:function(d,b){var c=this,a=c.items,e=a.getCount()>1;if(c.destroying||!e){c.activeTab=null}else{if(d===c.activeTab){c.setActiveTab(d.next()||a.getAt(0))}}c.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(c,a){var b=this;c.un({scope:b,enable:b.onItemEnable,disable:b.onItemDisable,beforeshow:b.onItemBeforeShow});if(!b.destroying&&c.tab.ownerCt==b.tabBar){b.tabBar.remove(c.tab)}}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",initComponent:function(){var a=this.renderer||this.defaultRenderer,b=this.scope||window;this.renderer=function(m,p,e,d,l,h,k){var t=[],r=Ext.String.format,v=e.getDepth(),s=Ext.baseCSSPrefix+"tree-",g=s+"elbow-",n=s+"expander",j='<img src="{1}" class="{0}" />',w='<input type="button" role="checkbox" class="{0}" {1} />',i=a.apply(b,arguments),q=e.get("href"),u=e.get("hrefTarget"),c=e.get("cls");while(e){if(!e.isRoot()||(e.isRoot()&&k.rootVisible)){if(e.getDepth()===v){t.unshift(r(j,s+"icon "+s+"icon"+(e.get("icon")?"-inline ":(e.isLeaf()?"-leaf ":"-parent "))+(e.get("iconCls")||""),e.get("icon")||Ext.BLANK_IMAGE_URL));if(e.get("checked")!==null){t.unshift(r(w,(s+"checkbox")+(e.get("checked")?" "+s+"checkbox-checked":""),e.get("checked")?'aria-checked="true"':""));if(e.get("checked")){p.tdCls+=(" "+s+"checked")}}if(e.isLast()){if(e.isExpandable()){t.unshift(r(j,(g+"end-plus "+n),Ext.BLANK_IMAGE_URL))}else{t.unshift(r(j,(g+"end"),Ext.BLANK_IMAGE_URL))}}else{if(e.isExpandable()){t.unshift(r(j,(g+"plus "+n),Ext.BLANK_IMAGE_URL))}else{t.unshift(r(j,(s+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(e.isLast()||e.getDepth()===0){t.unshift(r(j,(g+"empty"),Ext.BLANK_IMAGE_URL))}else{if(e.getDepth()!==0){t.unshift(r(j,(g+"line"),Ext.BLANK_IMAGE_URL))}}}}e=e.parentNode}if(q){t.push('<a href="',q,'" target="',u,'">',i,"</a>")}else{t.push(i)}if(c){p.tdCls+=" "+c}return t.join("")};this.callParent(arguments)},defaultRenderer:function(a){return a}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,initComponent:function(){var a=this;if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=Ext.create("Ext.data.NodeStore",{recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.callParent(arguments)},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b;if(!a.rootVisible){b.expand()}},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;a.on({scope:b,delegate:b.expanderSelector,mouseover:b.onExpanderMouseOver,mouseout:b.onExpanderMouseOut});a.on({scope:b,delegate:b.checkboxSelector,click:b.onCheckboxChange})},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h<l;h++){m=b[h];g+='<th style="width: '+(m.hidden?0:m.getDesiredWidth())+'px; height: 0px;"></th>'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['<td colspan="'+e.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+e.getFullWidth()+'px;"><tbody>',g,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(a){if(!this.animate){return null}while(a){if(a.animWrap){return a.animWrap}a=a.parentNode}return null},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){j.resetScrollers();return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){var b=this,a=b.ownerCt;b.bulkUpdate=false;b.ownerCt.changingScrollbars=true;b.resetScrollers()},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}},doRemove:function(a,c){var h=this,e=a.parentNode,d=h.all,b=h.getAnimWrap(a),g=d.item(c).dom;if(!b||!b.collapsing){h.resetScrollers();return h.callParent(arguments)}b.targetEl.appendChild(g);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=d.animWrap=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(c){var d=this,a=d.animQueue,i=c.getId(),b,e,g,h;if(d.singleExpand){d.ensureSingleExpand(c)}b=d.getAnimWrap(c);if(!b){d.resetScrollers();return}e=b.animateEl;g=b.targetEl;e.stopAnimation();a[i]=true;e.slideIn("t",{duration:d.expandDuration,listeners:{scope:d,lastframe:function(){b.el.insertSibling(g.query(d.itemSelector),"before");b.el.remove();d.resetScrollers();delete b.record.animWrap;delete a[i]}}});b.isAnimating=true},resetScrollers:function(){if(!this.bulkUpdate){var a=this.panel;a.determineScrollbars();a.invalidateScroller()}},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=d.animWrap=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(c){var d=this,a=d.animQueue,h=c.getId(),b=d.getAnimWrap(c),e,g;if(!b){d.resetScrollers();return}e=b.animateEl;g=b.targetEl;a[h]=true;e.stopAnimation();e.slideOut("t",{duration:d.collapseDuration,listeners:{scope:d,lastframe:function(){b.el.remove();delete b.record.animWrap;d.resetScrollers();delete a[h]}}});b.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d<a;d++){h=e[d];b=c[d];if(b.get("qtip")){h.rowAttr='data-qtip="'+b.get("qtip")+'"';if(b.get("qtitle")){h.rowAttr+=' data-qtitle="'+b.get("qtitle")+'"'}}if(b.isExpanded()){h.rowCls=(h.rowCls||"")+" "+this.expandedCls}if(b.isLoading()){h.rowCls=(h.rowCls||"")+" "+this.loadingCls}}return g},expand:function(b,a,d,c){return b.expand(a,d,c)},collapse:function(b,a,d,c){return b.collapse(a,d,c)},toggle:function(a){this[a.isExpanded()?"collapse":"expand"](a)},onItemDblClick:function(a,c,b){this.callParent(arguments);if(this.toggleOnDblClick){this.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){this.toggle(a);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var b=this,a=[b.treeCls];if(b.useArrows){a.push(Ext.baseCSSPrefix+"tree-arrows");b.lines=false}if(b.lines){a.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!b.useArrows){a.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(b.store)){b.store=Ext.StoreMgr.lookup(b.store)}else{if(!b.store||Ext.isObject(b.store)&&!b.store.isStore){b.store=Ext.create("Ext.data.TreeStore",Ext.apply({},b.store||{},{root:b.root,fields:b.fields,model:b.model,folderSort:b.folderSort}))}else{if(b.root){b.store=Ext.data.StoreManager.lookup(b.store);b.store.setRootNode(b.root);if(b.folderSort!==undefined){b.store.folderSort=b.folderSort;b.store.sort()}}}}b.viewConfig=Ext.applyIf(b.viewConfig||{},{rootVisible:b.rootVisible,animate:b.enableAnimations,singleExpand:b.singleExpand,node:b.store.getRootNode(),hideHeaders:b.hideHeaders});b.mon(b.store,{scope:b,rootchange:b.onRootChange,clear:b.onClear});b.relayEvents(b.store,["beforeload","load"]);b.store.on({append:b.createRelayer("itemappend"),remove:b.createRelayer("itemremove"),move:b.createRelayer("itemmove"),insert:b.createRelayer("iteminsert"),beforeappend:b.createRelayer("beforeitemappend"),beforeremove:b.createRelayer("beforeitemremove"),beforemove:b.createRelayer("beforeitemmove"),beforeinsert:b.createRelayer("beforeiteminsert"),expand:b.createRelayer("itemexpand"),collapse:b.createRelayer("itemcollapse"),beforeexpand:b.createRelayer("beforeitemexpand"),beforecollapse:b.createRelayer("beforeitemcollapse")});if(!b.columns){if(b.initialConfig.hideHeaders===undefined){b.hideHeaders=true}b.columns=[{xtype:"treecolumn",text:"Name",flex:1,dataIndex:b.displayField}]}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");b.callParent();b.relayEvents(b.getView(),["checkchange"]);if(!b.getView().rootVisible&&!b.getRootNode()){b.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}b.expand(true,e,d);if(!c){a.endBulkUpdate()}}},collapseAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}if(a.rootVisible){b.collapse(true,e,d)}else{b.collapseChildren(true,e,d)}if(!c){a.endBulkUpdate()}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(h,g,e,i,a){var d=this,c,b;g=g||d.getRootNode().idProperty;e=e||"/";c=h.split(e);b=c.pop();d.expandPath(c.join(e),g,e,function(l,k){var j=false;if(l&&k){k=k.findChild(g,b);if(k){d.getSelectionModel().select(k);Ext.callback(i,a||d,[true,k]);j=true}}else{if(k===d.getRootNode()){j=true}}Ext.callback(i,a||d,[j,k])},d)}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el.dom.parentNode]);b.ddel=Ext.get(document.createElement("div"));b.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(h){var c=this.view,g=h.getTarget(c.getItemSelector()),b,a,d;if(g){b=c.getRecord(g);a=c.getSelectionModel();d=a.getSelection();return{copy:this.view.copy||(this.view.allowCopy&&h.ctrlKey),event:new Ext.EventObjectImpl(h),view:c,ddel:this.ddel,item:g,records:d,fromPosition:Ext.fly(g).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)||i.hasModifier()){a.selectWithEvent(c,i,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var d=this,a=d.view,e=a.selectedItemCls,b=d.dragData.records,c=Ext.fly;if(Ext.enableFx&&d.repairHighlight){Ext.Array.forEach(b,function(g){var h=a.getNode(g);c(h.firstChild).highlight(d.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(h)){c(h).removeCls(e)}},afteranimate:function(){if(a.isSelected(h)){c(h).addCls(e)}}}})})}d.dragging=false}});Ext.define("Ext.tree.ViewDropZone",{extend:"Ext.view.DropZone",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:"x-tree-ddindicator",expandNode:function(b){var a=this.view;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInsert){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var p=this.view,l=p.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return true},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),m=0,l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(d,l,e){var n=this,p=n.view,g=l.parentNode,q=p.getStore(),s=[],a,c,k,b,j,m,r,h;if(d.copy){a=d.records;d.records=[];for(c=0,k=a.length;c<k;c++){d.records.push(Ext.apply({},a[c].data))}}n.cancelExpand();if(e=="before"){b=g.insertBefore;j=[null,l];l=g}else{if(e=="after"){if(l.nextSibling){b=g.insertBefore;j=[null,l.nextSibling]}else{b=g.appendChild;j=[null]}l=g}else{if(!l.isExpanded()){m=true}b=l.appendChild;j=[null]}}r=function(){var i;for(c=0,k=d.records.length;c<k;c++){j[0]=d.records[c];i=b.apply(l,j);if(Ext.enableFx&&n.dropHighlight){s.push(p.getNode(i))}}if(Ext.enableFx&&n.dropHighlight){Ext.Array.forEach(s,function(t){if(t){Ext.fly(t.firstChild?t.firstChild:t).highlight(n.dropHighlightColor)}})}};if(m){l.expand(false,r)}else{r()}}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.treeviewdragdrop",uses:["Ext.tree.ViewDragZone","Ext.tree.ViewDropZone"],dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=Ext.create("Ext.tree.ViewDragZone",{view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair})}if(b.enableDrop){b.dropZone=Ext.create("Ext.tree.ViewDropZone",{view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop})}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.CSS",function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(i,l){var h,g=c.getElementsByTagName("head")[0],k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=document.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(i,e){var h=document;this.removeStyleSheet(i);var g=h.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",i);g.setAttribute("href",e);h.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(l){if(!d){d={}}try{var p=l.cssRules||l.rules,m,k=p.length-1,g,h;for(;k>=0;--k){m=p[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g<h;g++){d[Ext.String.trim(m[g]).toLowerCase()]=p[k]}}}}catch(n){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets,j=0,g=k.length;for(;j<g;j++){try{if(!k[j].disabled){this.cacheStyleSheet(k[j])}}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}());Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},constructor:function(){var a=this;a.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>";try{var d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}var e=b.document,c=e.getElementById("state"),a=c?c.innerText:null,g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);window.top.location.hash=h;g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{var b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",init:function(c,a){var b=this;if(b.ready){Ext.callback(c,a,[b]);return}if(!Ext.isReady){Ext.onReady(function(){b.init(c,a)});return}b.hiddenField=Ext.getDom(b.fieldId);if(b.oldIEMode){b.iframe=Ext.getDom(b.iframeId)}b.addEvents("ready","change");if(c){b.on("ready",c,a,{single:true})}b.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{window.top.location.hash=a;return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{[this.openTableWrap()]}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth()]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{[this.closeTableWrap()]}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(){return'style="width: {fullWidth}px;"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div unselectable="on" class="'+Ext.baseCSSPrefix+"grid-cell-inner "+Ext.baseCSSPrefix+'unselectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',"</tpl>","</tr>"],firstOrLastCls:function(b,c){var a="";if(b===1){a=Ext.baseCSSPrefix+"grid-cell-first"}else{if(b===c){a=Ext.baseCSSPrefix+"grid-cell-last"}}return a},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:function(){return""},closeTableWrap:function(){return""},getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<m;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(l,c[e].getMetaRowTplFragments());Ext.apply(g,c[e].getFragmentTpl());Ext.apply(h,c[e].getTableFragments())}}d=Ext.create("Ext.XTemplate",d.join(""),l);k.row=d.applyTemplate(k);a=Ext.create("Ext.XTemplate",this.metaTableTpl.join(""),h);j=a.applyTemplate(k);if(!b){j=Ext.create("Ext.XTemplate",j,g)}return j}});