/*
This file is part of Ext JS 3.4 (without the flash based components)

Copyright (c) 2011-2013 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.

Build date: 2020-10-28 16:35:00
*/
!function(){var y=Ext.util,i=Ext.each,l=!0,h=!1;y.Observable=function(){var t=this,e=t.events;t.listeners&&(t.on(t.listeners),delete t.listeners),t.events=e||{}},y.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var t,e,i,s=Array.prototype.slice.call(arguments,0),n=s[0].toLowerCase(),r=this,o=l,a=r.events[n];if(r.eventsSuspended===l)(e=r.eventQueue)&&e.push(s);else if("object"==typeof a)if(a.bubble){if(a.fire.apply(a,s.slice(1))===h)return h;if((i=r.getBubbleTarget&&r.getBubbleTarget())&&i.enableBubble)return(t=i.events[n])&&"object"==typeof t&&t.bubble||i.enableBubble(n),i.fireEvent.apply(i,s)}else s.shift(),o=a.fire.apply(a,s);return o},addListener:function(t,e,i,s){var n,r,o,a=this;if("object"==typeof t)for(n in s=t)r=s[n],a.filterOptRe.test(n)||a.addListener(n,r.fn||r,r.scope||s.scope,r.fn?r:s);else t=t.toLowerCase(),"boolean"==typeof(o=a.events[t]||l)&&(a.events[t]=o=new y.Event(a,t)),o.addListener(e,i,"object"==typeof s?s:{})},removeListener:function(t,e,i){var s=this.events[t.toLowerCase()];"object"==typeof s&&s.removeListener(e,i)},purgeListeners:function(){var t,e,i=this.events;for(e in i)"object"==typeof(t=i[e])&&t.clearListeners()},addEvents:function(t){var e=this;if(e.events=e.events||{},"string"==typeof t)for(var i=arguments,s=i.length;s--;)e.events[i[s]]=e.events[i[s]]||l;else Ext.applyIf(e.events,t)},hasListener:function(t){var e=this.events[t.toLowerCase()];return"object"==typeof e&&0<e.listeners.length},suspendEvents:function(t){this.eventsSuspended=l,t&&!this.eventQueue&&(this.eventQueue=[])},resumeEvents:function(){var e=this,t=e.eventQueue||[];e.eventsSuspended=h,delete e.eventQueue,i(t,function(t){e.fireEvent.apply(e,t)})}};var e=y.Observable.prototype;e.on=e.addListener,e.un=e.removeListener,y.Observable.releaseCapture=function(t){t.fireEvent=e.fireEvent},y.Event=function(t,e){this.name=e,this.obj=t,this.listeners=[]},y.Event.prototype={addListener:function(t,e,i){var s,n=this;e=e||n.obj,n.isListening(t,e)||(s=n.createListener(t,e,i),n.firing&&(n.listeners=n.listeners.slice(0)),n.listeners.push(s))},createListener:function(t,e,i){i=i||{};var s,n,r,o,a,l,h,d,c,u,f,p,g,m,x,E={fn:t,scope:e=e||this.obj,options:i},v=t;return i.target&&(s=v,n=i,r=e,v=function(){n.target==arguments[0]&&s.apply(r,Array.prototype.slice.call(arguments,0))}),i.delay&&(o=v,a=i,l=E,h=e,v=function(){var t=new y.DelayedTask,e=Array.prototype.slice.call(arguments,0);l.tasks||(l.tasks=[]),l.tasks.push(t),t.delay(a.delay||10,function(){l.tasks.remove(t),o.apply(h,e)},h)}),i.single&&(d=v,c=this,u=t,f=e,v=function(){return c.removeListener(u,f),d.apply(f,arguments)}),i.buffer&&(p=v,g=i,x=e,(m=E).task=new y.DelayedTask,v=function(){m.task.delay(g.buffer,p,x,Array.prototype.slice.call(arguments,0))}),E.fireFn=v,E},findListener:function(t,e){var i,s=this.listeners,n=s.length;for(e=e||this.obj;n--;)if((i=s[n])&&i.fn==t&&i.scope==e)return n;return-1},isListening:function(t,e){return-1!=this.findListener(t,e)},removeListener:function(t,e){var i,s,n,r=this,o=h;if(-1!=(i=r.findListener(t,e))){if(r.firing&&(r.listeners=r.listeners.slice(0)),(s=r.listeners[i]).task&&(s.task.cancel(),delete s.task),n=s.tasks&&s.tasks.length){for(;n--;)s.tasks[n].cancel();delete s.tasks}r.listeners.splice(i,1),o=l}return o},clearListeners:function(){for(var t=this.listeners,e=t.length;e--;)this.removeListener(t[e].fn,t[e].scope)},fire:function(){var t,e=this,i=e.listeners,s=i.length,n=0;if(0<s){e.firing=l;for(var r=Array.prototype.slice.call(arguments,0);n<s;n++)if((t=i[n])&&t.fireFn.apply(t.scope||e.obj||window,r)===h)return e.firing=h}return e.firing=h,l}}}(),Ext.DomHelper=function(){var r,d=null,a=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,c=/^table|tbody|tr|td$/i,l=/tag|children|cn|html$/i,u=/td|tr|tbody/i,s=/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,f=/end/i,p="afterbegin",g="afterend",m="beforebegin",x="beforeend",E="<table>",v="</table>",y=E+"<tbody>",b="</tbody>"+v;function n(t,e,i,s){var n=r.insertHtml(s,Ext.getDom(t),h(e));return i?Ext.get(n,!0):n}function h(t){var e,i,s,n,r="";if("string"==typeof t)r=t;else if(Ext.isArray(t))for(var o=0;o<t.length;o++)t[o]&&(r+=h(t[o]));else{for(e in r+="<"+(t.tag=t.tag||"div"),t)if(i=t[e],!l.test(e))if("object"==typeof i){for(s in r+=" "+e+'="',i)r+=s+":"+i[s]+";";r+='"'}else r+=" "+({cls:"class",htmlFor:"for"}[e]||e)+'="'+i+'"';a.test(t.tag)?r+="/>":(r+=">",(n=t.children||t.cn)?r+=h(n):t.html&&(r+=t.html),r+="</"+t.tag+">")}return r}function C(t,e,i,s){d.innerHTML=[e,i,s].join("");for(var n,r=-1,o=d;++r<t;)o=o.firstChild;if(n=o.nextSibling){for(var a=document.createDocumentFragment();o;)n=o.nextSibling,a.appendChild(o),o=n;o=a}return o}function w(t){var e,i,s=document.createElement("div"),n=document.createDocumentFragment(),r=0;for(s.innerHTML=t,e=(i=s.childNodes).length;r<e;r++)n.appendChild(i[r].cloneNode(!0));return n}return r={markup:h,applyStyles:function(t,e){var i;if(e)if(t=Ext.fly(t),"function"==typeof e&&(e=e.call()),"string"==typeof e)for(s.lastIndex=0;i=s.exec(e);)t.setStyle(i[1],i[2]);else"object"==typeof e&&t.setStyle(e)},insertHtml:function(t,e,i){var s,n,r,o,a,l,h={};if(t=t.toLowerCase(),h[m]=["BeforeBegin","previousSibling"],h[g]=["AfterEnd","nextSibling"],!e.insertAdjacentHTML)return n=e.ownerDocument.createRange(),o="setStart"+(f.test(t)?"After":"Before"),h[t]?(n[o](e),a=n.createContextualFragment?n.createContextualFragment(i):w(i),e.parentNode.insertBefore(a,t==m?e:e.nextSibling),e[(t==m?"previous":"next")+"Sibling"]):(r=(t==p?"first":"last")+"Child",e.firstChild?(n[o](e[r]),a=n.createContextualFragment?n.createContextualFragment(i):w(i),t==p?e.insertBefore(a,e.firstChild):e.appendChild(a)):e.innerHTML=i,e[r]);if(c.test(e.tagName)&&(l=function(t,e,i,s){var n,r;if(d=d||document.createElement("div"),("td"!=t||e!=p&&e!=x)&&(u.test(t)||e!=m&&e!=g))return r=e==m?i:e==g?i.nextSibling:e==p?i.firstChild:null,e!=m&&e!=g||(i=i.parentNode),n="td"==t||"tr"==t&&(e==x||e==p)?C(4,"<table><tbody><tr>",s,"</tr></tbody></table>"):"tbody"==t&&(e==x||e==p)||"tr"==t&&(e==m||e==g)?C(3,y,s,b):C(2,E,s,v),i.insertBefore(n,r),n}(e.tagName.toLowerCase(),t,e,i)))return l;if(h[p]=["AfterBegin","firstChild"],h[x]=["BeforeEnd","lastChild"],s=h[t])return e.insertAdjacentHTML(s[0],i),e[s[1]];throw'Illegal insertion point -> "'+t+'"'},insertBefore:function(t,e,i){return n(t,e,i,m)},insertAfter:function(t,e,i){return n(t,e,i,g)},insertFirst:function(t,e,i){return n(t,e,i,p)},append:function(t,e,i){return n(t,e,i,x)},overwrite:function(t,e,i){return(t=Ext.getDom(t)).innerHTML=h(e),i?Ext.get(t.firstChild):t.firstChild},createHtml:h}}(),Ext.Template=function(t){var e,i=arguments,s=[];if(Ext.isArray(t))t=t.join("");else if(1<i.length){for(var n=0,r=i.length;n<r;n++)"object"==typeof(e=i[n])?Ext.apply(this,e):s.push(e);t=s.join("")}this.html=t,this.compiled&&this.compile()},Ext.Template.prototype={re:/\{([\w\-]+)\}/g,applyTemplate:function(i){return this.compiled?this.compiled(i):this.html.replace(this.re,function(t,e){return void 0!==i[e]?i[e]:""})},set:function(t,e){return this.html=t,this.compiled=null,e?this.compile():this},compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(t,e){return"'"+sep+"("+(e="values['"+e+"']")+" == undefined ? '' : "+e+")"+sep+"'"}return eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};")),me},insertFirst:function(t,e,i){return this.doInsert("afterBegin",t,e,i)},insertBefore:function(t,e,i){return this.doInsert("beforeBegin",t,e,i)},insertAfter:function(t,e,i){return this.doInsert("afterEnd",t,e,i)},append:function(t,e,i){return this.doInsert("beforeEnd",t,e,i)},doInsert:function(t,e,i,s){e=Ext.getDom(e);var n=Ext.DomHelper.insertHtml(t,e,this.applyTemplate(i));return s?Ext.get(n,!0):n},overwrite:function(t,e,i){return(t=Ext.getDom(t)).innerHTML=this.applyTemplate(e),i?Ext.get(t.firstChild,!0):t.firstChild}},Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate,Ext.Template.from=function(t,e){return t=Ext.getDom(t),new Ext.Template(t.value||t.innerHTML,e||"")},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/,isIE=!!window.ActiveXObject,key=30803;function child(t,e){for(var i=0,s=t.firstChild;s;){if(1==s.nodeType&&++i==e)return s;s=s.nextSibling}}function next(t){for(;(t=t.nextSibling)&&1!=t.nodeType;);return t}function prev(t){for(;(t=t.previousSibling)&&1!=t.nodeType;);return t}function children(t){for(var e,i=t.firstChild,s=-1;i;)e=i.nextSibling,3!=i.nodeType||nonSpace.test(i.nodeValue)?i.nodeIndex=++s:t.removeChild(i),i=e;return this}function byClassName(t,e){if(!e)return t;for(var i,s=[],n=-1,r=0;i=t[r];r++)-1!=(" "+i.className+" ").indexOf(e)&&(s[++n]=i);return s}function attrValue(t,e){return t.tagName||void 0===t.length||(t=t[0]),t&&("for"==e?t.htmlFor:"class"==e||"className"==e?t.className:t.getAttribute(e)||t[e])}function getNodes(t,e,i){var s,n=[],r=-1;if(!t)return n;if(i=i||"*",void 0!==t.getElementsByTagName&&(t=[t]),e){if("/"==e||">"==e)for(var o,a=i.toUpperCase(),l=0;u=t[l];l++){o=u.childNodes;for(var h,d=0;h=o[d];d++)h.nodeName!=a&&h.nodeName!=i&&"*"!=i||(n[++r]=h)}else if("+"==e)for(a=i.toUpperCase(),l=0;c=t[l];l++){for(;(c=c.nextSibling)&&1!=c.nodeType;);!c||c.nodeName!=a&&c.nodeName!=i&&"*"!=i||(n[++r]=c)}else if("~"==e)for(var c,a=i.toUpperCase(),l=0;c=t[l];l++)for(;c=c.nextSibling;)c.nodeName!=a&&c.nodeName!=i&&"*"!=i||(n[++r]=c)}else for(var u,l=0;u=t[l];l++){s=u.getElementsByTagName(i);for(var f,d=0;f=s[d];d++)n[++r]=f}return n}function concat(t,e){if(e.slice)return t.concat(e);for(var i=0,s=e.length;i<s;i++)t[t.length]=e[i];return t}function byTag(t,e){if(!t.tagName&&t!=document||(t=[t]),!e)return t;var i=[],s=-1;e=e.toLowerCase();for(var n,r=0;n=t[r];r++)1==n.nodeType&&n.tagName.toLowerCase()==e&&(i[++s]=n);return i}function byId(t,e){if(!t.tagName&&t!=document||(t=[t]),!e)return t;for(var i,s=[],n=-1,r=0;i=t[r];r++)if(i&&i.id==e)return s[++n]=i,s;return s}function byAttribute(t,e,i,s,n){for(var r,o,a,l,h=[],d=-1,c="{"==n,u=Ext.DomQuery.operators[s],f=0;l=t[f];f++)1==l.nodeType&&(a||(o=Ext.DomQuery.isXml(l),a=!0),r=o?l.getAttribute(e):c?Ext.DomQuery.getStyle(l,e):"class"==e||"className"==e?l.className:"for"==e?l.htmlFor:"href"==e?l.getAttribute("href",2):l.getAttribute(e),(u&&u(r,i)||!u&&r)&&(h[++d]=l));return h}function byPseudo(t,e,i){return Ext.DomQuery.pseudos[e](t,i)}function nodupIEXml(t){var e,i=++key;t[0].setAttribute("_nodup",i),e=[t[0]];for(var s=1,n=t.length;s<n;s++){var r=t[s];!r.getAttribute("_nodup")!=i&&(r.setAttribute("_nodup",i),e[e.length]=r)}for(s=0,n=t.length;s<n;s++)t[s].removeAttribute("_nodup");return e}function nodup(t){if(!t)return[];var e,i,s,n=t.length,r=t,o=-1;if(!n||void 0!==t.nodeType||1==n)return t;if(isIE&&void 0!==t[0].selectSingleNode)return nodupIEXml(t);var a=++key;for(t[0]._nodup=a,i=1;e=t[i];i++){if(e._nodup==a){r=[];for(var l=0;l<i;l++)r[++o]=t[l];for(l=i+1;s=t[l];l++)s._nodup!=a&&(s._nodup=a,r[++o]=s);return r}e._nodup=a}return r}function quickDiffIEXml(t,e){for(var i=++key,s=[],n=0,r=t.length;n<r;n++)t[n].setAttribute("_qdiff",i);for(n=0,r=e.length;n<r;n++)e[n].getAttribute("_qdiff")!=i&&(s[s.length]=e[n]);for(n=0,r=t.length;n<r;n++)t[n].removeAttribute("_qdiff");return s}function quickDiff(t,e){var i=t.length,s=++key,n=[];if(!i)return e;if(isIE&&void 0!==t[0].selectSingleNode)return quickDiffIEXml(t,e);for(var r=0;r<i;r++)t[r]._qdiff=s;for(var r=0,o=e.length;r<o;r++)e[r]._qdiff!=s&&(n[n.length]=e[r]);return n}function quickId(t,e,i,s){return t==i?(i.ownerDocument||i).getElementById(s):byId(t=getNodes(t,e,"*"),s)}return eval("var batch = 30803;"),{getStyle:function(t,e){return Ext.fly(t).getStyle(e)},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);for(lmode&&lmode[1]&&(fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";',path=path.replace(lmode[1],""));"/"==path.substr(0,1);)path=path.substr(1);for(;path&&lastPath!=path;){lastPath=path;var tokenMatch=path.match(tagTokenRe);for("select"==type?tokenMatch?("#"==tokenMatch[1]?fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");':fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");',path=path.replace(tokenMatch[0],"")):"@"!=path.substr(0,1)&&(fn[fn.length]='n = getNodes(n, mode, "*");'):tokenMatch&&("#"==tokenMatch[1]?fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");':fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");',path=path.replace(tokenMatch[0],""));!(modeMatch=path.match(modeRe));){for(var matched=!1,j=0;j<matchersLn;j++){var t=matchers[j],m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(t,e){return m[e]}),path=path.replace(m[0],""),matched=!0;break}}if(!matched)throw'Error parsing selector, parsing failed at "'+path+'"'}modeMatch[1]&&(fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";',path=path.replace(modeMatch[1],""))}return fn[fn.length]="return nodup(n);\n}",eval(fn.join("")),f},jsSelect:function(t,e,i){"string"==typeof(e=e||document)&&(e=document.getElementById(e));for(var s=t.split(","),n=[],r=0,o=s.length;r<o;r++){var a=s[r].replace(trimRe,"");if(!cache[a]&&(cache[a]=Ext.DomQuery.compile(a),!cache[a]))throw a+" is not a valid selector";var l=cache[a](e);l&&l!=document&&(n=n.concat(l))}return 1<s.length?nodup(n):n},isXml:function(t){var e=(t?t.ownerDocument||t:0).documentElement;return!!e&&"HTML"!==e.nodeName},select:document.querySelectorAll?function(t,e,i){if(e=e||document,!Ext.DomQuery.isXml(e))try{var s=e.querySelectorAll(t);return Ext.toArray(s)}catch(t){}return Ext.DomQuery.jsSelect.call(this,t,e,i)}:function(t,e,i){return Ext.DomQuery.jsSelect.call(this,t,e,i)},selectNode:function(t,e){return Ext.DomQuery.select(t,e)[0]},selectValue:function(t,e,i){t=t.replace(trimRe,""),valueCache[t]||(valueCache[t]=Ext.DomQuery.compile(t,"select"));var s,n=valueCache[t](e);return"function"==typeof(n=n[0]?n[0]:n).normalize&&n.normalize(),null==(s=n&&n.firstChild?n.firstChild.nodeValue:null)||""===s?i:s},selectNumber:function(t,e,i){var s=Ext.DomQuery.selectValue(t,e,i||0);return parseFloat(s)},is:function(t,e){"string"==typeof t&&(t=document.getElementById(t));var i=Ext.isArray(t),s=Ext.DomQuery.filter(i?t:[t],e);return i?s.length==t.length:0<s.length},filter:function(t,e,i){e=e.replace(trimRe,""),simpleCache[e]||(simpleCache[e]=Ext.DomQuery.compile(e,"simple"));var s=simpleCache[e](t);return i?quickDiff(s,t):s},matchers:[{re:/^\.([\w\-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");'},{re:/^#([\w\-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(t,e){return t==e},"!=":function(t,e){return t!=e},"^=":function(t,e){return t&&t.substr(0,e.length)==e},"$=":function(t,e){return t&&t.substr(t.length-e.length)==e},"*=":function(t,e){return t&&-1!==t.indexOf(e)},"%=":function(t,e){return t%e==0},"|=":function(t,e){return t&&(t==e||t.substr(0,e.length+1)==e+"-")},"~=":function(t,e){return t&&-1!=(" "+t+" ").indexOf(" "+e+" ")}},pseudos:{"first-child":function(t){for(var e,i,s=[],n=-1,r=0;i=e=t[r];r++){for(;(e=e.previousSibling)&&1!=e.nodeType;);e||(s[++n]=i)}return s},"last-child":function(t){for(var e,i,s=[],n=-1,r=0;i=e=t[r];r++){for(;(e=e.nextSibling)&&1!=e.nodeType;);e||(s[++n]=i)}return s},"nth-child":function(t,e){for(var i,s=[],n=-1,r=nthRe.exec(("even"==e?"2n":"odd"==e&&"2n+1")||!nthRe2.test(e)&&"n+"+e||e),o=+(r[1]||1),a=+r[2],l=0;i=t[l];l++){var h=i.parentNode;if(batch!=h._batch){for(var d=0,c=h.firstChild;c;c=c.nextSibling)1==c.nodeType&&(c.nodeIndex=++d);h._batch=batch}1==o?0!=a&&i.nodeIndex!=a||(s[++n]=i):(i.nodeIndex+a)%o==0&&(s[++n]=i)}return s},"only-child":function(t){for(var e,i=[],s=-1,n=0;e=t[n];n++)prev(e)||next(e)||(i[++s]=e);return i},empty:function(t){for(var e,i=[],s=-1,n=0;e=t[n];n++){for(var r,o=e.childNodes,a=0,l=!0;r=o[a];)if(++a,1==r.nodeType||3==r.nodeType){l=!1;break}l&&(i[++s]=e)}return i},contains:function(t,e){for(var i,s=[],n=-1,r=0;i=t[r];r++)-1!=(i.textContent||i.innerText||"").indexOf(e)&&(s[++n]=i);return s},nodeValue:function(t,e){for(var i,s=[],n=-1,r=0;i=t[r];r++)i.firstChild&&i.firstChild.nodeValue==e&&(s[++n]=i);return s},checked:function(t){for(var e,i=[],s=-1,n=0;e=t[n];n++)1==e.checked&&(i[++s]=e);return i},not:function(t,e){return Ext.DomQuery.filter(t,e,!0)},any:function(t,e){for(var i,s,n=e.split("|"),r=[],o=-1,a=0;s=t[a];a++)for(var l=0;i=n[l];l++)if(Ext.DomQuery.is(s,i)){r[++o]=s;break}return r},odd:function(t){return this["nth-child"](t,"odd")},even:function(t){return this["nth-child"](t,"even")},nth:function(t,e){return t[e-1]||[]},first:function(t){return t[0]||[]},last:function(t){return t[t.length-1]||[]},has:function(t,e){for(var i,s=Ext.DomQuery.select,n=[],r=-1,o=0;i=t[o];o++)0<s(e,i).length&&(n[++r]=i);return n},next:function(t,e){for(var i,s=Ext.DomQuery.is,n=[],r=-1,o=0;i=t[o];o++){var a=next(i);a&&s(a,e)&&(n[++r]=i)}return n},prev:function(t,e){for(var i,s=Ext.DomQuery.is,n=[],r=-1,o=0;i=t[o];o++){var a=prev(i);a&&s(a,e)&&(n[++r]=i)}return n}}}}(),Ext.query=Ext.DomQuery.select,Ext.util.DelayedTask=function(n,r,o){function a(){clearInterval(l),l=null,n.apply(r,o||[])}var l,h=this;h.delay=function(t,e,i,s){h.cancel(),n=e||n,r=i||r,o=s||o,l=setInterval(a,t)},h.cancel=function(){l&&(clearInterval(l),l=null)}},function(){var r=document;Ext.Element=function(t,e){var i,s="string"==typeof t?r.getElementById(t):t;return s?(i=s.id,!e&&i&&Ext.elCache[i]?Ext.elCache[i].el:(this.dom=s,void(this.id=i||Ext.id(s)))):null};var o=Ext.DomHelper,a=Ext.Element,l=Ext.elCache;a.prototype={set:function(t,e){var i,s,n=this.dom,e=!1!==e&&!!n.setAttribute;for(i in t)t.hasOwnProperty(i)&&(s=t[i],"style"==i?o.applyStyles(n,s):"cls"==i?n.className=s:e?n.setAttribute(i,s):n[i]=s);return this},defaultUnit:"px",is:function(t){return Ext.DomQuery.is(this.dom,t)},focus:function(t,e){e=e||this.dom;try{Number(t)?this.focus.defer(t,null,[null,e]):e.focus()}catch(t){}return this},blur:function(){try{this.dom.blur()}catch(t){}return this},getValue:function(t){var e=this.dom.value;return t?parseInt(e,10):e},addListener:function(t,e,i,s){return Ext.EventManager.on(this.dom,t,e,i||this,s),this},removeListener:function(t,e,i){return Ext.EventManager.removeListener(this.dom,t,e,i||this),this},removeAllListeners:function(){return Ext.EventManager.removeAll(this.dom),this},purgeAllListeners:function(){return Ext.EventManager.purgeElement(this,!0),this},addUnits:function(t){return""===t||"auto"==t||void 0===t?t=t||"":isNaN(t)&&i.test(t)||(t+=this.defaultUnit||"px"),t},load:function(t,e,i){return Ext.Ajax.request(Ext.apply({params:e,url:t.url||t,callback:i,el:this.dom,indicatorText:t.indicatorText||""},Ext.isObject(t)?t:{})),this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||s[(this.dom.tagName||"").toLowerCase()]},remove:function(){var t=this.dom;t&&(delete this.dom,Ext.removeNode(t))},hover:function(t,e,i,s){var n=this;return n.on("mouseenter",t,i||n.dom,s),n.on("mouseleave",e,i||n.dom,s),n},contains:function(t){return!!t&&Ext.lib.Dom.isAncestor(this.dom,t.dom?t.dom:t)},getAttributeNS:function(t,e){return this.getAttribute(e,t)},getAttribute:function(){var t=document.createElement("table"),n=!1,r=/undefined|unknown/;if("getAttribute"in t){try{t.getAttribute("ext:qtip")}catch(t){n=!0}return function(t,e){var i,s=this.dom;if(s.getAttributeNS&&(i=s.getAttributeNS(e,t)||null),null==i)if(e)if(n&&"TABLE"==s.tagName.toUpperCase())try{i=s.getAttribute(e+":"+t)}catch(t){i=""}else i=s.getAttribute(e+":"+t);else i=s.getAttribute(t)||s[t];return i||""}}return function(t,e){var i,s=this.om,n=e?(i=s[e+":"+t],r.test(typeof i)?void 0:i):s[t];return n||""}}(),update:function(t){return this.dom&&(this.dom.innerHTML=t),this}};var e=a.prototype;a.addMethods=function(t){Ext.apply(e,t)},e.on=e.addListener,e.un=e.removeListener,e.autoBoxAdjust=!0;var h,i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;a.get=function(t){var e,i,s,n;return t?"string"==typeof t?(i=r.getElementById(t))?(l[t]&&l[t].el?(e=l[t].el).dom=i:e=a.addToCache(new a(i)),e):null:t.tagName?((s=t.id)||(s=Ext.id(t)),l[s]&&l[s].el?(e=l[s].el).dom=t:e=a.addToCache(new a(t)),e):t instanceof a?(t!=h&&(!Ext.isIE||null!=t.id&&""!=t.id?t.dom=r.getElementById(t.id)||t.dom:t.dom),t):t.isComposite?t:Ext.isArray(t)?a.select(t):t==r?(h||((n=function(){}).prototype=a.prototype,(h=new n).dom=r),h):null:null},a.addToCache=function(t,e){return e=e||t.id,l[e]={el:t,data:{},events:{}},t},a.data=function(t,e,i){if(!(t=a.get(t)))return null;var s=l[t.id].data;return 2==arguments.length?s[e]:s[e]=i},a.collectorThreadId=setInterval(function(){if(Ext.enableGarbageCollector){var t,e,i;for(t in l)(i=l[t]).skipGC?Ext.EventManager.removeFromSpecialCache(i.el):(e=i.el.dom)&&e.parentNode&&(e.offsetParent||r.getElementById(t))||(Ext.enableListenerCollection&&Ext.EventManager.removeAll(e),delete l[t]);if(Ext.isIE){var s={};for(t in l)s[t]=l[t];l=Ext.elCache=s}}else clearInterval(a.collectorThreadId)},3e4);function t(){}t.prototype=a.prototype,a.Flyweight=function(t){this.dom=t},a.Flyweight.prototype=new t,a.Flyweight.prototype.isFlyweight=!0,a._flyweights={},a.fly=function(t,e){var i=null;return e=e||"_global",(t=Ext.getDom(t))&&((a._flyweights[e]=a._flyweights[e]||new a.Flyweight).dom=t,i=a._flyweights[e]),i},Ext.get=a.get,Ext.fly=a.fly;var s=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};(Ext.isIE||Ext.isGecko)&&(s.button=1)}(),Ext.Element.addMethods(function(){var i="parentNode",s="nextSibling",n="previousSibling",a=Ext.DomQuery,l=Ext.get;return{findParent:function(t,e,i){var s,n=this.dom,r=document.body,o=0;if(Ext.isGecko&&"[object XULElement]"==Object.prototype.toString.call(n))return null;for(e=e||50,isNaN(e)&&(s=Ext.getDom(e),e=Number.MAX_VALUE);n&&1==n.nodeType&&o<e&&n!=r&&n!=s;){if(a.is(n,t))return i?l(n):n;o++,n=n.parentNode}return null},findParentNode:function(t,e,i){var s=Ext.fly(this.dom.parentNode,"_internal");return s?s.findParent(t,e,i):null},up:function(t,e){return this.findParentNode(t,e,!0)},select:function(t){return Ext.Element.select(t,this.dom)},query:function(t){return a.select(t,this.dom)},child:function(t,e){var i=a.selectNode(t,this.dom);return e?i:l(i)},down:function(t,e){var i=a.selectNode(" > "+t,this.dom);return e?i:l(i)},parent:function(t,e){return this.matchNode(i,i,t,e)},next:function(t,e){return this.matchNode(s,s,t,e)},prev:function(t,e){return this.matchNode(n,n,t,e)},first:function(t,e){return this.matchNode(s,"firstChild",t,e)},last:function(t,e){return this.matchNode(n,"lastChild",t,e)},matchNode:function(t,e,i,s){for(var n=this.dom[e];n;){if(1==n.nodeType&&(!i||a.is(n,i)))return s?n:l(n);n=n[t]}return null}}}()),Ext.Element.addMethods(function(){var i=Ext.getDom,s=Ext.get,n=Ext.DomHelper;return{appendChild:function(t){return s(t).appendTo(this)},appendTo:function(t){return i(t).appendChild(this.dom),this},insertBefore:function(t){return(t=i(t)).parentNode.insertBefore(this.dom,t),this},insertAfter:function(t){return(t=i(t)).parentNode.insertBefore(this.dom,t.nextSibling),this},insertFirst:function(t,e){return(t=t||{}).nodeType||t.dom||"string"==typeof t?(t=i(t),this.dom.insertBefore(t,this.dom.firstChild),e?t:s(t)):this.createChild(t,this.dom.firstChild,e)},replace:function(t){return t=s(t),this.insertBefore(t),t.remove(),this},replaceWith:function(t){var e=this;return t.nodeType||t.dom||"string"==typeof t?(t=i(t),e.dom.parentNode.insertBefore(t,e.dom)):t=n.insertBefore(e.dom,t),delete Ext.elCache[e.id],Ext.removeNode(e.dom),e.id=Ext.id(e.dom=t),Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e),e},createChild:function(t,e,i){return t=t||{tag:"div"},e?n.insertBefore(e,t,!0!==i):n[this.dom.firstChild?"append":"overwrite"](this.dom,t,!0!==i)},wrap:function(t,e){var i=n.insertBefore(this.dom,t||{tag:"div"},!e);return i.dom?i.dom.appendChild(this.dom):i.appendChild(this.dom),i},insertHtml:function(t,e,i){var s=n.insertHtml(t,this.dom,e);return i?Ext.get(s):s}}}()),Ext.Element.addMethods(function(){var o=Ext.supports,e={},i=/(-[a-z])/gi,a=document.defaultView,l=/alpha\(opacity=(.*)\)/i,h=/^\s+|\s+$/g,d=(Ext.Element,/\s+/),c=/\w/g,t="padding",s="margin",n="border",r="-left",u="-right",f="-top",p="-bottom",g="-width",m=Math,x="hidden",E="isClipped",v="overflow",y="overflow-x",b="overflow-y",C="originalClip",w={l:n+r+g,r:n+u+g,t:n+f+g,b:n+p+g},T={l:t+r,r:t+u,t:t+f,b:t+p},S={l:s+r,r:s+u,t:s+f,b:s+p},D=Ext.Element.data;function k(t,e){return e.charAt(1).toUpperCase()}function M(t){return e[t]||(e[t]="float"==t?o.cssFloat?"cssFloat":"styleFloat":t.replace(i,k))}return{adjustWidth:function(t){var e="number"==typeof t;return e&&this.autoBoxAdjust&&!this.isBorderBox()&&(t-=this.getBorderWidth("lr")+this.getPadding("lr")),e&&t<0?0:t},adjustHeight:function(t){var e="number"==typeof t;return e&&this.autoBoxAdjust&&!this.isBorderBox()&&(t-=this.getBorderWidth("tb")+this.getPadding("tb")),e&&t<0?0:t},addClass:function(t){var e,i,s,n=[];if(Ext.isArray(t)){for(e=0,i=t.length;e<i;e++)"string"==typeof(s=t[e])&&-1==(" "+this.dom.className+" ").indexOf(" "+s+" ")&&n.push(s);n.length&&(this.dom.className+=" "+n.join(" "))}else"string"!=typeof t||this.hasClass(t)||(this.dom.className+=" "+t);return this},removeClass:function(t){var e,i,s,n,r,o=this;if(Ext.isArray(t)||(t=[t]),o.dom&&o.dom.className){for(r=o.dom.className.replace(h,"").split(d),e=0,s=t.length;e<s;e++)"string"==typeof(n=t[e])&&(n=n.replace(h,""),-1!=(i=r.indexOf(n))&&r.splice(i,1));o.dom.className=r.join(" ")}return o},radioClass:function(t){var e,i,s,n=this.dom.parentNode.childNodes;for(t=Ext.isArray(t)?t:[t],i=0,s=n.length;i<s;i++)(e=n[i])&&1==e.nodeType&&Ext.fly(e,"_internal").removeClass(t);return this.addClass(t)},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},hasClass:function(t){return t&&-1!=(" "+this.dom.className+" ").indexOf(" "+t+" ")},replaceClass:function(t,e){return this.removeClass(t).addClass(e)},isStyle:function(t,e){return this.getStyle(t)==e},getStyle:a&&a.getComputedStyle?function(t){var e,i,s,n,r=this.dom;return r==document?null:(t=M(t),s=(e=r.style[t])?e:(i=a.getComputedStyle(r,""))?i[t]:null,"marginRight"!=t||"0px"==s||o.correctRightMargin||(n=r.style.display,r.style.display="inline-block",s=a.getComputedStyle(r,"").marginRight,r.style.display=n),"backgroundColor"!=t||"rgba(0, 0, 0, 0)"!=s||o.correctTransparentColor||(s="transparent"),s)}:function(t){var e,i,s=this.dom;if(s==document)return null;if("opacity"!=t)return t=M(t),s.style[t]||((i=s.currentStyle)?i[t]:null);if(s.style.filter.match&&(e=s.style.filter.match(l))){var n=parseFloat(e[1]);if(!isNaN(n))return n?n/100:0}return 1},getColor:function(t,e,i){var s,n=this.getStyle(t),r=void 0!==i?i:"#";return!n||/transparent|inherit/.test(n)?e:(/^r/.test(n)?Ext.each(n.slice(4,n.length-1).split(","),function(t){s=parseInt(t,10),r+=(s<16?"0":"")+s.toString(16)}):(n=n.replace("#",""),r+=3==n.length?n.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):n),5<r.length?r.toLowerCase():e)},setStyle:function(t,e){var i,s;for(s in"object"!=typeof t&&((i={})[t]=e,t=i),t)e=t[s],"opacity"==s?this.setOpacity(e):this.dom.style[M(s)]=e;return this},setOpacity:function(t,e){var i,s,n=this,r=n.dom.style;return e&&n.anim?n.anim({opacity:{to:t}},n.preanim(arguments,1),null,.35,"easeIn"):Ext.isIE9m?(i=t<1?"alpha(opacity="+100*t+")":"",s=r.filter.replace(l,"").replace(h,""),r.zoom=1,r.filter=s+(0<s.length?" ":"")+i):r.opacity=t,n},clearOpacity:function(){var t=this.dom.style;return Ext.isIE9m?Ext.isEmpty(t.filter)||(t.filter=t.filter.replace(l,"").replace(h,"")):t.opacity=t["-moz-opacity"]=t["-khtml-opacity"]="",this},getHeight:function(t){var e=this.dom,i=Ext.isIE9m&&this.isStyle("display","none"),s=m.max(e.offsetHeight,i?0:e.clientHeight)||0;return(s=t?s-this.getBorderWidth("tb")-this.getPadding("tb"):s)<0?0:s},getWidth:function(t){var e=this.dom,i=Ext.isIE9m&&this.isStyle("display","none"),s=m.max(e.offsetWidth,i?0:e.clientWidth)||0;return(s=t?s-this.getBorderWidth("lr")-this.getPadding("lr"):s)<0?0:s},setWidth:function(t,e){var i=this;return t=i.adjustWidth(t),e&&i.anim?i.anim({width:{to:t}},i.preanim(arguments,1)):i.dom.style.width=i.addUnits(t),i},setHeight:function(t,e){var i=this;return t=i.adjustHeight(t),e&&i.anim?i.anim({height:{to:t}},i.preanim(arguments,1)):i.dom.style.height=i.addUnits(t),i},getBorderWidth:function(t){return this.addStyles(t,w)},getPadding:function(t){return this.addStyles(t,T)},clip:function(){var t=this,e=t.dom;return D(e,E)||(D(e,E,!0),D(e,C,{o:t.getStyle(v),x:t.getStyle(y),y:t.getStyle(b)}),t.setStyle(v,x),t.setStyle(y,x),t.setStyle(b,x)),t},unclip:function(){var t,e=this,i=e.dom;return D(i,E)&&(D(i,E,!1),(t=D(i,C)).o&&e.setStyle(v,t.o),t.x&&e.setStyle(y,t.x),t.y&&e.setStyle(b,t.y)),e},addStyles:function(t,e){for(var i,s,n=0,r=t.match(c),o=r.length,a=0;a<o;a++)(s=(i=r[a])&&parseInt(this.getStyle(e[i]),10))&&(n+=m.abs(s));return n},margins:S}}()),function(){var s=Ext.lib.Dom,a="left",l="top",h="position",d="relative",r="z-index";Ext.Element.addMethods({getX:function(){return s.getX(this.dom)},getY:function(){return s.getY(this.dom)},getXY:function(){return s.getXY(this.dom)},getOffsetsTo:function(t){var e=this.getXY(),i=Ext.fly(t,"_internal").getXY();return[e[0]-i[0],e[1]-i[1]]},setX:function(t,e){return this.setXY([t,this.getY()],this.animTest(arguments,e,1))},setY:function(t,e){return this.setXY([this.getX(),t],this.animTest(arguments,e,1))},setLeft:function(t){return this.setStyle(a,this.addUnits(t)),this},setTop:function(t){return this.setStyle(l,this.addUnits(t)),this},setRight:function(t){return this.setStyle("right",this.addUnits(t)),this},setBottom:function(t){return this.setStyle("bottom",this.addUnits(t)),this},setXY:function(t,e){var i=this;return e&&i.anim?i.anim({points:{to:t}},i.preanim(arguments,1),"motion"):s.setXY(i.dom,t),i},setLocation:function(t,e,i){return this.setXY([t,e],this.animTest(arguments,i,2))},moveTo:function(t,e,i){return this.setXY([t,e],this.animTest(arguments,i,2))},getLeft:function(t){return t?parseInt(this.getStyle(a),10)||0:this.getX()},getRight:function(t){return t?this.getLeft(!0)+this.getWidth()||0:this.getX()+this.getWidth()},getTop:function(t){return t?parseInt(this.getStyle(l),10)||0:this.getY()},getBottom:function(t){return t?this.getTop(!0)+this.getHeight()||0:this.getY()+this.getHeight()},position:function(t,e,i,s){var n=this;!t&&n.isStyle(h,"static")?n.setStyle(h,d):t&&n.setStyle(h,t),e&&n.setStyle(r,e),(i||s)&&n.setXY([i||!1,s||!1])},clearPositioning:function(t){return t=t||"",this.setStyle({left:t,right:t,top:t,bottom:t,"z-index":"",position:"static"}),this},getPositioning:function(){var t=this.getStyle(a),e=this.getStyle(l);return{position:this.getStyle(h),left:t,right:t?"":this.getStyle("right"),top:e,bottom:e?"":this.getStyle("bottom"),"z-index":this.getStyle(r)}},setPositioning:function(t){var e=this.dom.style;return this.setStyle(t),"auto"==t.right&&(e.right=""),"auto"==t.bottom&&(e.bottom=""),this},translatePoints:function(t,e){e=isNaN(t[1])?e:t[1],t=isNaN(t[0])?t:t[0];var i=this,s=i.isStyle(h,d),n=i.getXY(),r=parseInt(i.getStyle(a),10),o=parseInt(i.getStyle(l),10),r=isNaN(r)?s?0:i.dom.offsetLeft:r,o=isNaN(o)?s?0:i.dom.offsetTop:o;return{left:t-n[0]+r,top:e-n[1]+o}},animTest:function(t,e,i){return!(!e||!this.preanim)&&this.preanim(t,i)}})}(),Ext.Element.addMethods({isScrollable:function(){var t=this.dom;return t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth},scrollTo:function(t,e){return this.dom["scroll"+(/top/i.test(t)?"Top":"Left")]=e,this},getScroll:function(){var t,e,i=this.dom,s=document,n=s.body,r=s.documentElement,o=i==s||i==n?(e=Ext.isIE&&Ext.isStrict?(t=r.scrollLeft,r.scrollTop):(t=window.pageXOffset,window.pageYOffset),{left:t||(n?n.scrollLeft:0),top:e||(n?n.scrollTop:0)}):{left:i.scrollLeft,top:i.scrollTop};return o}}),Ext.Element.VISIBILITY=1,Ext.Element.DISPLAY=2,Ext.Element.OFFSETS=3,Ext.Element.ASCLASS=4,Ext.Element.visibilityCls="x-hide-nosize",Ext.Element.addMethods(function(){function e(t){var e=c(t,i);return void 0===e&&c(t,i,e=""),e}function r(t){var e=c(t,n);return void 0===e&&c(t,n,e=1),e}var o=Ext.Element,a="visibility",l="display",h="hidden",s="none",i="originalDisplay",n="visibilityMode",d="isVisible",c=o.data;return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(t){return c(this.dom,n,t),this},animate:function(t,e,i,s,n){return this.anim(t,{duration:e,callback:i,easing:s},n),this},anim:function(t,e,i,s,n,r){i=i||"run",e=e||{};var o=this,a=Ext.lib.Anim[i](o.dom,t,e.duration||s||.35,e.easing||n||"easeOut",function(){r&&r.call(o),e.callback&&e.callback.call(e.scope||o,o,e)},o);return e.anim=a},preanim:function(t,e){return!!t[e]&&("object"==typeof t[e]?t[e]:{duration:t[e+1],callback:t[e+2],easing:t[e+3]})},isVisible:function(){var t=this,e=t.dom,i=c(e,d);return"boolean"==typeof i||(i=!(t.isStyle(a,h)||t.isStyle(l,s)||r(e)==o.ASCLASS&&t.hasClass(t.visibilityCls||o.visibilityCls)),c(e,d,i)),i},setVisible:function(t,e){var i=this,s=i.dom,n=r(s);if("string"==typeof e){switch(e){case l:n=o.DISPLAY;break;case a:n=o.VISIBILITY;break;case"offsets":n=o.OFFSETS;break;case"nosize":case"asclass":n=o.ASCLASS}i.setVisibilityMode(n),e=!1}if(e&&i.anim)t&&(i.setOpacity(.01),i.setVisible(!0)),i.anim({opacity:{to:t?1:0}},i.preanim(arguments,1),null,.35,"easeIn",function(){t||i.setVisible(!1).setOpacity(1)});else if(n==o.ASCLASS)i[t?"removeClass":"addClass"](i.visibilityCls||o.visibilityCls);else{if(n==o.DISPLAY)return i.setDisplayed(t);n==o.OFFSETS?t?(i.applyStyles(i.hideModeStyles||{position:"",top:"",left:""}),delete i.hideModeStyles):(i.hideModeStyles={position:i.getStyle("position"),top:i.getStyle("top"),left:i.getStyle("left")},i.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})):(i.fixDisplay(),s.style.visibility=t?"visible":h)}return c(s,d,t),i},hasMetrics:function(){var t=this.dom;return this.isVisible()||r(t)==o.VISIBILITY},toggle:function(t){return this.setVisible(!this.isVisible(),this.preanim(arguments,0)),this},setDisplayed:function(t){return"boolean"==typeof t&&(t=t?e(this.dom):s),this.setStyle(l,t),this},fixDisplay:function(){var t=this;t.isStyle(l,s)&&(t.setStyle(a,h),t.setStyle(l,e(this.dom)),t.isStyle(l,s)&&t.setStyle(l,"block"))},hide:function(t){return"string"==typeof t?this.setVisible(!1,t):this.setVisible(!1,this.preanim(arguments,0)),this},show:function(t){return"string"==typeof t?this.setVisible(!0,t):this.setVisible(!0,this.preanim(arguments,0)),this}}}()),function(){function u(t){return t||{}}function f(t){return e.dom=t,e.id=Ext.id(t),e}function n(t){return i[t]||(i[t]=[]),i[t]}function s(t,e){i[t]=e}var p=null,g="left",m="bottom",x="top",E="right",d="height",c="width",v="points",y="absolute",b="visible",C="motion",w="easeOut",e=new Ext.Element.Flyweight,i={};Ext.enableFx=!0,Ext.Fx={switchStatements:function(t,e,i){return e.apply(this,i[t])},slideIn:function(t,e){e=u(e);var i,s,n,r,o,a,l,h,d=this.dom,c=d.style;return t=t||"t",this.queueFx(e,function(){i=f(d).getXY(),f(d).fixDisplay(),s=f(d).getFxRestore(),(n={x:i[0],y:i[1],0:i[0],1:i[1],width:d.offsetWidth,height:d.offsetHeight}).right=n.x+n.width,n.bottom=n.y+n.height,f(d).setWidth(n.width).setHeight(n.height),r=f(d).fxWrap(s.pos,e,"hidden"),c.visibility=b,c.position=y,a={to:[n.x,n.y]},l={to:n.width},h={to:n.height},o=f(d).switchStatements(t.toLowerCase(),function(t,e,i,s,n,r,o,a,l,h,d){var c={};return f(t).setWidth(i).setHeight(s),f(t)[n]&&f(t)[n](r),e[o]=e[a]="0",l&&(c.width=l),h&&(c.height=h),d&&(c.points=d),c},{t:[r,c,n.width,0,p,p,g,m,p,h,p],l:[r,c,0,n.height,p,p,E,x,l,p,p],r:[r,c,n.width,n.height,"setX",n.right,g,x,p,p,a],b:[r,c,n.width,n.height,"setY",n.bottom,g,x,p,h,a],tl:[r,c,0,0,p,p,E,m,l,h,a],bl:[r,c,0,0,"setY",n.y+n.height,E,x,l,h,a],br:[r,c,0,0,"setXY",[n.right,n.bottom],g,x,l,h,a],tr:[r,c,0,0,"setX",n.x+n.width,g,m,l,h,a]}),c.visibility=b,f(r).show(),arguments.callee.anim=f(r).fxanim(o,e,C,.5,w,function(){f(d).fxUnwrap(r,s.pos,e),c.width=s.width,c.height=s.height,f(d).afterFx(e)})}),this},slideOut:function(t,e){e=u(e);var i,s,n,r,o=this.dom,a=o.style,l=this.getXY(),h={to:0};return t=t||"t",this.queueFx(e,function(){s=f(o).getFxRestore(),(n={x:l[0],y:l[1],0:l[0],1:l[1],width:o.offsetWidth,height:o.offsetHeight}).right=n.x+n.width,n.bottom=n.y+n.height,f(o).setWidth(n.width).setHeight(n.height),i=f(o).fxWrap(s.pos,e,b),a.visibility=b,a.position=y,f(i).setWidth(n.width).setHeight(n.height),r=f(o).switchStatements(t.toLowerCase(),function(t,e,i,s,n,r,o,a,l){var h={};return t[e]=t[i]="0",h[s]=n,r&&(h[r]=o),a&&(h[a]=l),h},{t:[a,g,m,d,h],l:[a,E,x,c,h],r:[a,g,x,c,h,v,{to:[n.right,n.y]}],b:[a,g,x,d,h,v,{to:[n.x,n.bottom]}],tl:[a,E,m,c,h,d,h],bl:[a,E,x,c,h,d,h,v,{to:[n.x,n.bottom]}],br:[a,g,x,c,h,d,h,v,{to:[n.x+n.width,n.bottom]}],tr:[a,g,m,c,h,d,h,v,{to:[n.right,n.y]}]}),arguments.callee.anim=f(i).fxanim(r,e,C,.5,w,function(){e.useDisplay?f(o).setDisplayed(!1):f(o).hide(),f(o).fxUnwrap(i,s.pos,e),a.width=s.width,a.height=s.height,f(o).afterFx(e)})}),this},puff:function(t){t=u(t);var e,i,s,n=this.dom,r=n.style;return this.queueFx(t,function(){e=f(n).getWidth(),i=f(n).getHeight(),f(n).clearOpacity(),f(n).show(),s=f(n).getFxRestore(),arguments.callee.anim=f(n).fxanim({width:{to:f(n).adjustWidth(2*e)},height:{to:f(n).adjustHeight(2*i)},points:{by:[.5*-e,.5*-i]},opacity:{to:0},fontSize:{to:200,unit:"%"}},t,C,.5,w,function(){t.useDisplay?f(n).setDisplayed(!1):f(n).hide(),f(n).clearOpacity(),f(n).setPositioning(s.pos),r.width=s.width,r.height=s.height,r.fontSize="",f(n).afterFx(t)})}),this},switchOff:function(e){e=u(e);var i,s=this.dom,n=s.style;return this.queueFx(e,function(){function t(){e.useDisplay?f(s).setDisplayed(!1):f(s).hide(),f(s).clearOpacity(),f(s).setPositioning(i.pos),n.width=i.width,n.height=i.height,f(s).afterFx(e)}f(s).clearOpacity(),f(s).clip(),i=f(s).getFxRestore(),f(s).fxanim({opacity:{to:.3}},p,p,.1,p,function(){f(s).clearOpacity(),function(){f(s).fxanim({height:{to:1},points:{by:[0,.5*f(s).getHeight()]}},e,C,.3,"easeIn",t)}.defer(100)})}),this},highlight:function(t,e){e=u(e);var i,s=this.dom,n=e.attr||"backgroundColor",r={};return this.queueFx(e,function(){f(s).clearOpacity(),f(s).show(),i=s.style[n],r[n]={from:t||"ffff9c",to:e.endColor||f(s).getColor(n)||"ffffff"},arguments.callee.anim=f(s).fxanim(r,e,"color",1,"easeIn",function(){s.style[n]=i,f(s).afterFx(e)})}),this},frame:function(n,r,o){o=u(o);var a,l,h=this.dom;return this.queueFx(o,function(){6==(n=n||"#C3DAF9").length&&(n="#"+n),r=r||1,f(h).show();var t=f(h).getXY(),e={x:t[0],y:t[1],0:t[0],1:t[1],width:h.offsetWidth,height:h.offsetHeight},i=function(){return(a=f(document.body||document.documentElement).createChild({style:{position:y,"z-index":35e3,border:"0px solid "+n}})).queueFx({},s)};function s(){var t=Ext.isBorderBox?2:1;l=a.anim({top:{from:e.y,to:e.y-20},left:{from:e.x,to:e.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:e.height,to:e.height+20*t},width:{from:e.width,to:e.width+20*t}},{duration:o.duration||1,callback:function(){a.remove(),0<--r?i():f(h).afterFx(o)}}),arguments.callee.anim={isAnimated:!0,stop:function(){l.stop()}}}arguments.callee.anim={isAnimated:!0,stop:function(){r=0,a.stopFx()}},i()}),this},pause:function(t){var e,i=this.dom;return this.queueFx({},function(){e=setTimeout(function(){f(i).afterFx({})},1e3*t),arguments.callee.anim={isAnimated:!0,stop:function(){clearTimeout(e),f(i).afterFx({})}}}),this},fadeIn:function(t){t=u(t);var e=this.dom,i=t.endOpacity||1;return this.queueFx(t,function(){f(e).setOpacity(0),f(e).fixDisplay(),e.style.visibility=b,arguments.callee.anim=f(e).fxanim({opacity:{to:i}},t,p,.5,w,function(){1==i&&f(e).clearOpacity(),f(e).afterFx(t)})}),this},fadeOut:function(t){t=u(t);var e=this.dom,i=e.style,s=t.endOpacity||0;return this.queueFx(t,function(){arguments.callee.anim=f(e).fxanim({opacity:{to:s}},t,p,.5,w,function(){0==s&&(Ext.Element.data(e,"visibilityMode")==Ext.Element.DISPLAY||t.useDisplay?i.display="none":i.visibility="hidden",f(e).clearOpacity()),f(e).afterFx(t)})}),this},scale:function(t,e,i){return this.shift(Ext.apply({},i,{width:t,height:e})),this},shift:function(e){e=u(e);var i=this.dom,s={};return this.queueFx(e,function(){for(var t in e)null!=e[t]&&(s[t]={to:e[t]});s.width&&(s.width.to=f(i).adjustWidth(e.width)),s.height&&(s.height.to=f(i).adjustWidth(e.height)),(s.x||s.y||s.xy)&&(s.points=s.xy||{to:[s.x?s.x.to:f(i).getX(),s.y?s.y.to:f(i).getY()]}),arguments.callee.anim=f(i).fxanim(s,e,C,.35,w,function(){f(i).afterFx(e)})}),this},ghost:function(t,e){e=u(e);var i,s,n,r=this.dom,o=r.style,a={opacity:{to:0},points:{}},l=a.points;return t=t||"b",this.queueFx(e,function(){i=f(r).getFxRestore(),s=f(r).getWidth(),n=f(r).getHeight(),l.by=f(r).switchStatements(t.toLowerCase(),function(t,e){return[t,e]},{t:[0,-n],l:[-s,0],r:[s,0],b:[0,n],tl:[-s,-n],bl:[-s,n],br:[s,n],tr:[s,-n]}),arguments.callee.anim=f(r).fxanim(a,e,C,.5,w,function(){e.useDisplay?f(r).setDisplayed(!1):f(r).hide(),f(r).clearOpacity(),f(r).setPositioning(i.pos),o.width=i.width,o.height=i.height,f(r).afterFx(e)})}),this},syncFx:function(){return this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:!1,concurrent:!0,stopFx:!1}),this},sequenceFx:function(){return this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:!1,concurrent:!1,stopFx:!1}),this},nextFx:function(){var t=n(this.dom.id)[0];t&&t.call(this)},hasActiveFx:function(){return n(this.dom.id)[0]},stopFx:function(t){var e,i=this.dom.id;return!this.hasActiveFx()||(e=n(i)[0])&&e.anim&&(e.anim.isAnimated?(s(i,[e]),e.anim.stop(void 0===t||t)):s(i,[])),this},beforeFx:function(t){return!(this.hasActiveFx()&&!t.concurrent)||!!t.stopFx&&(this.stopFx(),!0)},hasFxBlock:function(){var t=n(this.dom.id);return t&&t[0]&&t[0].block},queueFx:function(t,e){var i,s=f(this.dom);return s.hasFxBlock()||(Ext.applyIf(t,s.fxDefaults),t.concurrent?e.call(s):(i=s.beforeFx(t),e.block=t.block,n(s.dom.id).push(e),i&&s.nextFx())),s},fxWrap:function(t,e,i){var s,n,r,o=this.dom;return e.wrap&&(s=Ext.getDom(e.wrap))||(e.fixPosition&&(n=f(o).getXY()),(r=document.createElement("div")).style.visibility=i,s=o.parentNode.insertBefore(r,o),f(s).setPositioning(t),f(s).isStyle("position","static")&&f(s).position("relative"),f(o).clearPositioning("auto"),f(s).clip(),s.appendChild(o),n&&f(s).setXY(n)),s},fxUnwrap:function(t,e,i){var s=this.dom;f(s).clearPositioning(),f(s).setPositioning(e),i.wrap||(f(t).dom.parentNode.insertBefore(s,t),f(t).remove())},getFxRestore:function(){var t=this.dom.style;return{pos:this.getPositioning(),width:t.width,height:t.height}},afterFx:function(t){var e=this.dom,i=e.id;t.afterStyle&&f(e).setStyle(t.afterStyle),t.afterCls&&f(e).addClass(t.afterCls),1==t.remove&&f(e).remove(),t.callback&&t.callback.call(t.scope,f(e)),t.concurrent||(n(i).shift(),f(e).nextFx())},fxanim:function(t,e,i,s,n,r){i=i||"run",e=e||{};var o=Ext.lib.Anim[i](this.dom,t,e.duration||s||.35,e.easing||n||w,r,this);return e.anim=o}},Ext.Fx.resize=Ext.Fx.scale,Ext.Element.addMethods(Ext.Fx)}(),Ext.CompositeElementLite=function(t,e){this.elements=[],this.add(t,e),this.el=new Ext.Element.Flyweight},Ext.CompositeElementLite.prototype={isComposite:!0,getElement:function(t){var e=this.el;return e.dom=t,e.id=t.id,e},transformElement:function(t){return Ext.getDom(t)},getCount:function(){return this.elements.length},add:function(t,e){var i=this.elements;if(!t)return this;"string"==typeof t?t=Ext.Element.selectorFunction(t,e):t.isComposite?t=t.elements:Ext.isIterable(t)||(t=[t]);for(var s=0,n=t.length;s<n;++s)i.push(this.transformElement(t[s]));return this},invoke:function(t,e){for(var i,s=this.elements,n=s.length,r=0;r<n;r++)(i=s[r])&&Ext.Element.prototype[t].apply(this.getElement(i),e);return this},item:function(t){var e=this.elements[t],i=null;return e&&(i=this.getElement(e)),i},addListener:function(t,e,i,s){for(var n,r=this.elements,o=r.length,a=0;a<o;a++)(n=r[a])&&Ext.EventManager.on(n,t,e,i||n,s);return this},each:function(t,e){for(var i,s=this.elements,n=s.length,r=0;r<n&&(!(i=s[r])||(i=this.getElement(i),!1!==t.call(e||i,i,this,r)));r++);return this},fill:function(t){return this.elements=[],this.add(t),this},filter:function(e){var s=[],n=this,r=Ext.isFunction(e)?e:function(t){return t.is(e)};return n.each(function(t,e,i){!1!==r(t,i)&&(s[s.length]=n.transformElement(t))}),n.elements=s,n},indexOf:function(t){return this.elements.indexOf(this.transformElement(t))},replaceElement:function(t,e,i){var s,n=isNaN(t)?this.indexOf(t):t;return-1<n&&(e=Ext.getDom(e),i&&((s=this.elements[n]).parentNode.insertBefore(e,s),Ext.removeNode(s)),this.elements.splice(n,1,e)),this},clear:function(){this.elements=[]}},Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener,Ext.CompositeElementLite.importElementMethods=function(){var t,e=Ext.Element.prototype,i=Ext.CompositeElementLite.prototype;for(t in e)"function"==typeof e[t]&&function(t){i[t]=i[t]||function(){return this.invoke(t,arguments)}}.call(i,t)},Ext.CompositeElementLite.importElementMethods(),Ext.DomQuery&&(Ext.Element.selectorFunction=Ext.DomQuery.select),Ext.Element.select=function(t,e){var i;if("string"==typeof t)i=Ext.Element.selectorFunction(t,e);else{if(void 0===t.length)throw"Invalid selector";i=t}return new Ext.CompositeElementLite(i)},Ext.select=Ext.Element.select,function(){var h="beforerequest",c="requestcomplete",s="requestexception",u=window;Ext.data.Connection=function(t){Ext.apply(this,t),this.addEvents(h,c,s),Ext.data.Connection.superclass.constructor.call(this)},Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:3e4,autoAbort:!1,disableCaching:!0,disableCachingParam:"_dc",request:function(e){var t=this;if(t.fireEvent(h,t,e)){e.el&&(Ext.isEmpty(e.indicatorText)||(t.indicatorText='<div class="loading-indicator">'+e.indicatorText+"</div>"),t.indicatorText&&(Ext.getDom(e.el).innerHTML=t.indicatorText),e.success=(Ext.isFunction(e.success)?e.success:function(){}).createInterceptor(function(t){Ext.getDom(e.el).innerHTML=t.responseText}));var i,s,n,r,o=e.params,a=e.url||t.url,l={success:t.handleResponse,failure:t.handleFailure,scope:t,argument:{options:e},timeout:Ext.num(e.timeout,t.timeout)};if(Ext.isFunction(o)&&(o=o.call(e.scope||u,e)),o=Ext.urlEncode(t.extraParams,Ext.isObject(o)?Ext.urlEncode(o):o),Ext.isFunction(a)&&(a=a.call(e.scope||u,e)),s=Ext.getDom(e.form)){if(a=a||s.action,e.isUpload||/multipart\/form-data/i.test(s.getAttribute("enctype")))return t.doFormUpload.call(t,e,o,a);n=Ext.lib.Ajax.serializeForm(s),o=o?o+"&"+n:n}return("GET"===(i=e.method||t.method||(o||e.xmlData||e.jsonData?"POST":"GET"))&&t.disableCaching&&!1!==e.disableCaching||!0===e.disableCaching)&&(r=e.disableCachingParam||t.disableCachingParam,a=Ext.urlAppend(a,r+"="+(new Date).getTime())),e.headers=Ext.applyIf(e.headers||{},t.defaultHeaders||{}),!0!==e.autoAbort&&!t.autoAbort||t.abort(),("GET"==i||e.xmlData||e.jsonData)&&o&&(a=Ext.urlAppend(a,o),o=""),t.transId=Ext.lib.Ajax.request(i,a,l,o,e)}return e.callback?e.callback.apply(e.scope,[e,void 0,void 0]):null},isLoading:function(t){return t?Ext.lib.Ajax.isCallInProgress(t):!!this.transId},abort:function(t){(t||this.isLoading())&&Ext.lib.Ajax.abort(t||this.transId)},handleResponse:function(t){this.transId=!1;var e=t.argument.options;t.argument=e?e.argument:null,this.fireEvent(c,this,t,e),e.success&&e.success.call(e.scope,t,e),e.callback&&e.callback.call(e.scope,e,!0,t)},handleFailure:function(t,e){this.transId=!1;var i=t.argument.options;t.argument=i?i.argument:null,this.fireEvent(s,this,t,i,e),i.failure&&i.failure.call(i.scope,t,i),i.callback&&i.callback.call(i.scope,i,!1,t)},doFormUpload:function(r,t,e){var i,o=Ext.id(),s=document,a=s.createElement("iframe"),n=Ext.getDom(r.form),l=[],h="multipart/form-data",d={target:n.target,method:n.method,encoding:n.encoding,enctype:n.enctype,action:n.action};Ext.fly(a).set({id:o,name:o,cls:"x-hidden",src:Ext.SSL_SECURE_URL}),s.body.appendChild(a),Ext.isIE&&(document.frames[o].name=o),Ext.fly(n).set({target:o,method:"POST",enctype:h,encoding:h,action:e||d.action}),Ext.iterate(Ext.urlDecode(t,!1),function(t,e){i=s.createElement("input"),Ext.fly(i).set({type:"hidden",value:e,name:t}),n.appendChild(i),l.push(i)}),Ext.EventManager.on(a,"load",function t(){var e,i,s={responseText:"",responseXML:null,argument:r.argument};try{(e=a.contentWindow.document||a.contentDocument||u.frames[o].document)&&(e.body&&(/textarea/i.test((i=e.body.firstChild||{}).tagName)?s.responseText=i.value:s.responseText=e.body.innerHTML),s.responseXML=e.XMLDocument||e)}catch(t){}function n(t,e,i){Ext.isFunction(t)&&t.apply(e,i)}Ext.EventManager.removeListener(a,"load",t,this),this.fireEvent(c,this,s,r),n(r.success,r.scope,[s,r]),n(r.callback,r.scope,[r,!0,s]),this.debugUploads||setTimeout(function(){Ext.removeNode(a)},100)},this),n.submit(),Ext.fly(n).set(d),Ext.each(l,function(t){Ext.removeNode(t)})}})}(),Ext.Ajax=new Ext.data.Connection({autoAbort:!1,serializeForm:function(t){return Ext.lib.Ajax.serializeForm(t)}}),Ext.util.JSON=new function(){var useHasOwn=!!{}.hasOwnProperty,isNative=(Wu=null,function(){return null===Wu&&(Wu=Ext.USE_NATIVE_JSON&&window.JSON&&"[object JSON]"==JSON.toString()),Wu}),pad=function(t){return t<10?"0"+t:t},doDecode=function(json){return json?eval("("+json+")"):""},doEncode=function(t){if(Ext.isDefined(t)&&null!==t){if(Ext.isArray(t))return encodeArray(t);if(Ext.isDate(t))return Ext.util.JSON.encodeDate(t);if(Ext.isString(t))return encodeString(t);if("number"==typeof t)return isFinite(t)?String(t):"null";if(Ext.isBoolean(t))return String(t);var e,i,s,n=["{"];for(i in t)if(!t.getElementsByTagName&&(!useHasOwn||t.hasOwnProperty(i)))switch(typeof(s=t[i])){case"undefined":case"function":case"unknown":break;default:e&&n.push(","),n.push(doEncode(i),":",null===s?"null":doEncode(s)),e=!0}return n.push("}"),n.join("")}return"null"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(t){return/["\\\x00-\x1f]/.test(t)?'"'+t.replace(/([\x00-\x1f\\"])/g,function(t,e){var i=m[e];return i||(i=e.charCodeAt(),"\\u00"+Math.floor(i/16).toString(16)+(i%16).toString(16))})+'"':'"'+t+'"'},encodeArray=function(t){for(var e,i,s=["["],n=t.length,r=0;r<n;r+=1)switch(typeof(i=t[r])){case"undefined":case"function":case"unknown":break;default:e&&s.push(","),s.push(null===i?"null":Ext.util.JSON.encode(i)),e=!0}return s.push("]"),s.join("")},Wu,mv,ov;this.encodeDate=function(t){return'"'+t.getFullYear()+"-"+pad(t.getMonth()+1)+"-"+pad(t.getDate())+"T"+pad(t.getHours())+":"+pad(t.getMinutes())+":"+pad(t.getSeconds())+'"'},this.encode=function(t){return(mv=mv||(isNative()?JSON.stringify:doEncode))(t)},this.decode=function(t){return(ov=ov||(isNative()?JSON.parse:doDecode))(t)}},Ext.encode=Ext.util.JSON.encode,Ext.decode=Ext.util.JSON.decode,Ext.EventManager=function(){var s,e,i,n=!1,r=Ext.isGecko||Ext.isWebKit||Ext.isSafari||Ext.isIE10p,F=Ext.lib.Event,N=(Ext.lib.Dom,document),P=window,o="DOMContentLoaded",a="complete",l=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,h=[];function L(t){var e,i=!1,s=0,n=h.length,r=!1;if(t){if(t.getElementById||t.navigator){for(;s<n;++s)if((e=h[s]).el===t){i=e.id;break}i||(i=Ext.id(t),h.push({id:i,el:t}),r=!0)}else i=Ext.id(t);Ext.elCache[i]||(Ext.Element.addToCache(new Ext.Element(t),i),r&&(Ext.elCache[i].skipGC=!0))}return i}function d(t){return!(!Ext.isIE9m||!function(){if(window==top){try{N.documentElement.doScroll("left")}catch(t){return}return f(),1}}())||(N.readyState==a?(f(),!0):(n||(e=setTimeout(arguments.callee,2)),!1))}function c(t){if((i=i||Ext.query("style, link[rel=stylesheet]")).length==N.styleSheets.length)return f(),1;n||(e=setTimeout(arguments.callee,2))}function u(t){N.removeEventListener(o,arguments.callee,!1),c()}function f(t){n||(n=!0,e&&clearTimeout(e),r&&N.removeEventListener(o,f,!1),Ext.isIE9m&&d.bindIE&&N.detachEvent("onreadystatechange",d),F.un(P,"load",arguments.callee)),s&&!Ext.isReady&&(Ext.isReady=!0,s.fire(),s.listeners=[])}function p(t,e,i,s,n){var r,o,a,l,h,d,c,u,f,p,g,m,x,E,v,y,b,C,w,T,S,D,k,M,I=i&&"boolean"!=typeof i?i:{},R=Ext.getDom(t);if(s=s||I.fn,n=n||I.scope,!R)throw'Error listening for "'+e+'". Element "'+t+"\" doesn't exist.";function A(t){if(Ext){var e;if(t=Ext.EventObject.setEvent(t),I.delegate){if(!(e=t.getTarget(I.delegate,R)))return}else e=t.target;I.stopEvent&&t.stopEvent(),I.preventDefault&&t.preventDefault(),I.stopPropagation&&t.stopPropagation(),!1===I.normalized&&(t=t.browserEvent),s.call(n||R,t,e,I)}}return I.target&&(o=A,a=I,A=function(){var t=Ext.toArray(arguments);a.target==Ext.EventObject.setEvent(t[0]).target&&o.apply(this,t)}),I.delay&&(l=A,h=I,d=s,A=function(t){var e=new Ext.util.DelayedTask(l);d.tasks||(d.tasks=[]),d.tasks.push(e),e.delay(h.delay||10,l,null,[new Ext.EventObjectImpl(t)])}),I.single&&(c=A,u=R,f=e,p=s,g=n,A=function(t){Ext.EventManager.removeListener(u,f,p,g),c(t)}),I.buffer&&(r=new Ext.util.DelayedTask(A),m=A,x=I,E=r,A=function(t){E.delay(x.buffer,m,null,[new Ext.EventObjectImpl(t)])}),v=R,y=e,b=s,C=r,w=A,T=n,D=L(v=Ext.getDom(v)),k=Ext.elCache[D].events,M=F.on(v,y,w),k[y]=k[y]||[],k[y].push([b,w,T,M,C]),v.addEventListener&&"mousewheel"==y&&(S=["DOMMouseScroll",w,!1],v.addEventListener.apply(v,S),Ext.EventManager.addListener(P,"unload",function(){v.removeEventListener.apply(v,S)})),v==N&&"mousedown"==y&&Ext.EventManager.stoppedMouseDownEvent.addListener(w),A}var t={addListener:function(t,e,i,s,n){if("object"==typeof e){var r,o,a=e;for(r in a)o=a[r],l.test(r)||(Ext.isFunction(o)?p(t,r,a,o,a.scope):p(t,r,o))}else p(t,e,n,i,s)},removeListener:function(t,e,i,s){for(var n,r,o,a=L(t=Ext.getDom(t)),l=t&&Ext.elCache[a].events[e]||[],h=0,d=l.length;h<d;h++)if(Ext.isArray(o=l[h])&&o[0]==i&&(!s||o[2]==s)){if(o[4]&&o[4].cancel(),r=i.tasks&&i.tasks.length){for(;r--;)i.tasks[r].cancel();delete i.tasks}for(r in n=o[1],F.un(t,e,F.extAdapter?o[3]:n),n&&t.addEventListener&&"mousewheel"==e&&t.removeEventListener("DOMMouseScroll",n,!1),n&&t==N&&"mousedown"==e&&Ext.EventManager.stoppedMouseDownEvent.removeListener(n),l.splice(h,1),0===l.length&&delete Ext.elCache[a].events[e],Ext.elCache[a].events)return!1;return!(Ext.elCache[a].events={})}},removeAll:function(t){var e,i,s,n,r,o,a,l=L(t=Ext.getDom(t)),h=(Ext.elCache[l]||{}).events||{};for(n in h)if(h.hasOwnProperty(n))for(i=0,s=(e=h[n]).length;i<s;i++){if((r=e[i])[4]&&r[4].cancel(),r[0].tasks&&(o=r[0].tasks.length)){for(;o--;)r[0].tasks[o].cancel();delete r.tasks}a=r[1],F.un(t,n,F.extAdapter?r[3]:a),t.addEventListener&&a&&"mousewheel"==n&&t.removeEventListener("DOMMouseScroll",a,!1),a&&t==N&&"mousedown"==n&&Ext.EventManager.stoppedMouseDownEvent.removeListener(a)}Ext.elCache[l]&&(Ext.elCache[l].events={})},getListeners:function(t,e){var i=L(t=Ext.getDom(t)),s=(Ext.elCache[i]||{}).events||{};return s&&s[e]?s[e]:null},removeFromSpecialCache:function(t){for(var e=0,i=h.length;e<i;++e)h[e].el==t&&h.splice(e,1)},purgeElement:function(t,e,i){var s,n,r,o=L(t=Ext.getDom(t)),a=(Ext.elCache[o]||{}).events||{};if(i){if(a&&a.hasOwnProperty(i))for(s=0,r=(n=a[i]).length;s<r;s++)Ext.EventManager.removeListener(t,i,n[s][0])}else Ext.EventManager.removeAll(t);if(e&&t&&t.childNodes)for(s=0,r=t.childNodes.length;s<r;s++)Ext.EventManager.purgeElement(t.childNodes[s],e,i)},_unload:function(){var t;for(t in Ext.elCache)Ext.EventManager.removeAll(t);delete Ext.elCache,delete Ext.Element._flyweights;var e,i,s=Ext.lib.Ajax,n="object"==typeof s.conn?s.conn:{};for(i in n)(e=n[i])&&s.abort({conn:e,tId:i})},onDocumentReady:function(t,e,i){Ext.isReady?((s=s||new Ext.util.Event).addListener(t,e,i),s.fire(),s.listeners=[]):(s||(s=s||new Ext.util.Event,r&&N.addEventListener(o,f,!1),Ext.isIE9m?d()||(d.bindIE=!0,N.attachEvent("onreadystatechange",d)):Ext.isOpera?N.readyState==a&&c()||N.addEventListener(o,u,!1):Ext.isWebKit&&d(),F.on(P,"load",f)),(i=i||{}).delay=i.delay||1,s.addListener(t,e,i))},fireDocReady:f};return t.on=t.addListener,t.un=t.removeListener,t.stoppedMouseDownEvent=new Ext.util.Event,t}(),Ext.onReady=Ext.EventManager.onDocumentReady,function(){function t(){var t=document.body||document.getElementsByTagName("body")[0];if(!t)return!1;var e,i=[];return Ext.isIE&&(Ext.isIE10p||i.push("ext-ie"),Ext.isIE6?i.push("ext-ie6"):Ext.isIE7?i.push("ext-ie7","ext-ie7m"):Ext.isIE8?i.push("ext-ie8","ext-ie8m"):Ext.isIE9?i.push("ext-ie9","ext-ie9m"):Ext.isIE10&&i.push("ext-ie10")),Ext.isGecko&&(Ext.isGecko2?i.push("ext-gecko2"):i.push("ext-gecko3")),Ext.isOpera&&i.push("ext-opera"),Ext.isWebKit&&i.push("ext-webkit"),Ext.isSafari?i.push("ext-safari "+(Ext.isSafari2?"ext-safari2":Ext.isSafari3?"ext-safari3":"ext-safari4")):Ext.isChrome&&i.push("ext-chrome"),Ext.isMac&&i.push("ext-mac"),Ext.isLinux&&i.push("ext-linux"),!Ext.isStrict&&!Ext.isBorderBox||(e=t.parentNode)&&(Ext.isStrict||(Ext.fly(e,"_internal").addClass("x-quirks"),Ext.isIE9m&&!Ext.isStrict&&(Ext.isIEQuirks=!0)),Ext.fly(e,"_internal").addClass(Ext.isStrict&&Ext.isIE||!Ext.enableForcedBoxModel&&!Ext.isIE?" ext-strict":" ext-border-box")),Ext.enableForcedBoxModel&&!Ext.isIE&&(Ext.isForcedBorderBox=!0,i.push("ext-forced-border-box")),Ext.fly(t,"_internal").addClass(i),!0}t()||Ext.onReady(t)}(),function(){function t(){var t,e,i=document.createElement("div"),s=document;i.innerHTML='<div style="height:30px;width:50px;"><div style="height:20px;width:20px;"></div></div><div style="float:left;background-color:transparent;">',s.body.appendChild(i),e=i.lastChild,(t=s.defaultView)&&("0px"!=t.getComputedStyle(i.firstChild.firstChild,null).marginRight&&(n.correctRightMargin=!1),"transparent"!=t.getComputedStyle(e,null).backgroundColor&&(n.correctTransparentColor=!1)),n.cssFloat=!!e.style.cssFloat,s.body.removeChild(i)}var n=Ext.apply(Ext.supports,{correctRightMargin:!0,correctTransparentColor:!0,cssFloat:!0});Ext.isReady?t():Ext.onReady(t)}(),Ext.EventObject=function(){var i=Ext.lib.Event,s=/(dbl)?click/,e={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},n=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};return Ext.EventObjectImpl=function(t){t&&this.setEvent(t.browserEvent||t)},Ext.EventObjectImpl.prototype={setEvent:function(t){var e=this;return t==e||t&&t.browserEvent?t:((e.browserEvent=t)?(e.button=t.button?n[t.button]:t.which?t.which-1:-1,s.test(t.type)&&-1==e.button&&(e.button=0),e.type=t.type,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey||t.metaKey||!1,e.altKey=t.altKey,e.keyCode=t.keyCode,e.charCode=t.charCode,e.target=i.getTarget(t),e.xy=i.getXY(t)):(e.button=-1,e.shiftKey=!1,e.ctrlKey=!1,e.altKey=!1,e.keyCode=0,e.charCode=0,e.target=null,e.xy=[0,0]),e)},stopEvent:function(){this.browserEvent&&("mousedown"==this.browserEvent.type&&Ext.EventManager.stoppedMouseDownEvent.fire(this),i.stopEvent(this.browserEvent))},preventDefault:function(){this.browserEvent&&i.preventDefault(this.browserEvent)},stopPropagation:function(){this.browserEvent&&("mousedown"==this.browserEvent.type&&Ext.EventManager.stoppedMouseDownEvent.fire(this),i.stopPropagation(this.browserEvent))},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(t){return Ext.isSafari&&e[t]||t},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(t,e,i){return t?Ext.fly(this.target).findParent(t,e,i):i?Ext.get(this.target):this.target},getRelatedTarget:function(){return this.browserEvent?i.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var t=this.browserEvent,e=0;return t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e},within:function(t,e,i){if(t){var s=this[e?"getRelatedTarget":"getTarget"]();return s&&(!!i&&s==Ext.getDom(t)||Ext.fly(t).contains(s))}return!1}},new Ext.EventObjectImpl}(),Ext.Loader=Ext.apply({},{load:function(e,t,i,s){function n(t){r.appendChild(h.buildScriptTag(e[t],d))}var i=i||this,r=document.getElementsByTagName("head")[0],o=document.createDocumentFragment(),a=e.length,l=0,h=this,d=function(){a==++l&&"function"==typeof t?t.call(i):!0===s&&n(l)};!0===s?n.call(this,0):(Ext.each(e,function(t,e){o.appendChild(this.buildScriptTag(t,d))},this),r.appendChild(o))},buildScriptTag:function(t,e){var i=document.createElement("script");return i.type="text/javascript",i.src=t,i.readyState?i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(i.onreadystatechange=null,e())}:i.onload=e,i}}),Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout.boxOverflow","Ext.app","Ext.ux","Ext.direct","Ext.slider"),Ext.apply(Ext,function(){var t=Ext,r=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(t,e){return Ext.extend(t,e(t.prototype))},getDoc:function(){return Ext.get(document)},num:function(t,e){return t=Number(Ext.isEmpty(t)||Ext.isArray(t)||"boolean"==typeof t||"string"==typeof t&&0==t.trim().length?NaN:t),isNaN(t)?e:t},value:function(t,e,i){return Ext.isEmpty(t,i)?e:t},escapeRe:function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(t,e,i,s){t[e]=t[e].createSequence(i,s)},addBehaviors:function(t){if(Ext.isReady){var e,i,s,n={};for(i in t)(e=i.split("@"))[1]&&(n[s=e[0]]||(n[s]=Ext.select(s)),n[s].on(e[1],t[i]));n=null}else Ext.onReady(function(){Ext.addBehaviors(t)})},getScrollBarWidth:function(t){return Ext.isReady?(!0!==t&&null!==r||(s=(i=(e=Ext.getBody().createChild('<div class="x-hide-offsets" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>')).child("div",!0)).offsetWidth,e.setStyle("overflow",Ext.isWebKit||Ext.isGecko?"auto":"scroll"),n=i.offsetWidth,e.remove(),r=s-n+2),r):0;var e,i,s,n},combine:function(){for(var t=arguments,e=t.length,i=[],s=0;s<e;s++){var n=t[s];Ext.isArray(n)?i=i.concat(n):void 0===n.length||n.substr?i.push(n):i=i.concat(Array.prototype.slice.call(n,0))}return i},copyTo:function(e,i,t){return"string"==typeof t&&(t=t.split(/[,;\s]/)),Ext.each(t,function(t){i.hasOwnProperty(t)&&(e[t]=i[t])},this),e},destroy:function(){Ext.each(arguments,function(t){t&&(Ext.isArray(t)?this.destroy.apply(this,t):"function"==typeof t.destroy?t.destroy():t.dom&&t.remove())},this)},destroyMembers:function(t,e,i,s){for(var n=1,r=arguments,o=r.length;n<o;n++)Ext.destroy(t[r[n]]),delete t[r[n]]},clean:function(t){var e=[];return Ext.each(t,function(t){t&&e.push(t)}),e},unique:function(t){var e=[],i={};return Ext.each(t,function(t){i[t]||e.push(t),i[t]=!0}),e},flatten:function(t){var i=[];return function e(t){return Ext.each(t,function(t){Ext.isArray(t)?e(t):i.push(t)}),i}(t)},min:function(t,e){var i=t[0];return e=e||function(t,e){return t<e?-1:1},Ext.each(t,function(t){i=-1==e(i,t)?i:t}),i},max:function(t,e){var i=t[0];return e=e||function(t,e){return e<t?1:-1},Ext.each(t,function(t){i=1==e(i,t)?i:t}),i},mean:function(t){return 0<t.length?Ext.sum(t)/t.length:void 0},sum:function(t){var e=0;return Ext.each(t,function(t){e+=t}),e},partition:function(t,s){var n=[[],[]];return Ext.each(t,function(t,e,i){n[s&&s(t,e,i)||!s&&t?0:1].push(t)}),n},invoke:function(t,i){var s=[],n=Array.prototype.slice.call(arguments,2);return Ext.each(t,function(t,e){t&&"function"==typeof t[i]?s.push(t[i].apply(t,n)):s.push(void 0)}),s},pluck:function(t,e){var i=[];return Ext.each(t,function(t){i.push(t[e])}),i},zip:function(){for(var t=Ext.partition(arguments,function(t){return"function"!=typeof t}),e=t[0],i=t[1][0],s=Ext.max(Ext.pluck(e,"length")),n=[],r=0;r<s;r++)if(n[r]=[],i)n[r]=i.apply(i,Ext.pluck(e,r));else for(var o=0,a=e.length;o<a;o++)n[r].push(e[o][r]);return n},getCmp:function(t){return Ext.ComponentMgr.get(t)},useShims:t.isIE6||t.isMac&&t.isGecko2,type:function(t){if(null==t)return!1;if(t.htmlElement)return"element";var e=typeof t;if("object"==e&&t.nodeName)switch(t.nodeType){case 1:return"element";case 3:return/\S/.test(t.nodeValue)?"textnode":"whitespace"}if("object"==e||"function"==e){switch(t.constructor){case Array:return"array";case RegExp:return"regexp";case Date:return"date"}if("number"==typeof t.length&&"function"==typeof t.item)return"nodelist"}return e},intercept:function(t,e,i,s){t[e]=t[e].createInterceptor(i,s)},callback:function(t,e,i,s){"function"==typeof t&&(s?t.defer(s,e,i||[]):t.apply(e,i||[]))}}}()),Ext.apply(Function.prototype,{createSequence:function(e,i){var s=this;return"function"!=typeof e?this:function(){var t=s.apply(this||window,arguments);return e.apply(i||this||window,arguments),t}}}),Ext.applyIf(String,{escape:function(t){return t.replace(/('|\\)/g,"\\$1")},leftPad:function(t,e,i){var s=String(t);for(i=i||" ";s.length<e;)s=i+s;return s}}),String.prototype.toggle=function(t,e){return this==t?e:t},String.prototype.trim=function(){var t=/^\s+|\s+$/g;return function(){return this.replace(t,"")}}(),Date.prototype.getElapsed=function(t){return Math.abs((t||new Date).getTime()-this.getTime())},Ext.applyIf(Number.prototype,{constrain:function(t,e){return Math.min(Math.max(this,t),e)}}),Ext.lib.Dom.getRegion=function(t){return Ext.lib.Region.getRegion(t)},Ext.lib.Region=function(t,e,i,s){var n=this;n.top=t,n[1]=t,n.right=e,n.bottom=i,n.left=s,n[0]=s},Ext.lib.Region.prototype={contains:function(t){return t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom},getArea:function(){return(this.bottom-this.top)*(this.right-this.left)},intersect:function(t){var e=Math.max(this.top,t.top),i=Math.min(this.right,t.right),s=Math.min(this.bottom,t.bottom),n=Math.max(this.left,t.left);if(e<=s&&n<=i)return new Ext.lib.Region(e,i,s,n)},union:function(t){var e=Math.min(this.top,t.top),i=Math.max(this.right,t.right),s=Math.max(this.bottom,t.bottom),n=Math.min(this.left,t.left);return new Ext.lib.Region(e,i,s,n)},constrainTo:function(t){var e=this;return e.top=e.top.constrain(t.top,t.bottom),e.bottom=e.bottom.constrain(t.top,t.bottom),e.left=e.left.constrain(t.left,t.right),e.right=e.right.constrain(t.left,t.right),e},adjust:function(t,e,i,s){var n=this;return n.top+=t,n.left+=e,n.right+=s,n.bottom+=i,n}},Ext.lib.Region.getRegion=function(t){var e=Ext.lib.Dom.getXY(t),i=e[1],s=e[0]+t.offsetWidth,n=e[1]+t.offsetHeight,r=e[0];return new Ext.lib.Region(i,s,n,r)},Ext.lib.Point=function(t,e){Ext.isArray(t)&&(e=t[1],t=t[0]);var i=this;i.x=i.right=i.left=i[0]=t,i.y=i.top=i.bottom=i[1]=e},Ext.lib.Point.prototype=new Ext.lib.Region,Ext.apply(Ext.DomHelper,function(){var a,d=/tag|children|cn|html$/i;function s(t,e,i,s,n,r){var o;return t=Ext.getDom(t),a.useDom?(o=c(e,null),r?t.appendChild(o):("firstChild"==n?t:t.parentNode).insertBefore(o,t[n]||t)):o=Ext.DomHelper.insertHtml(s,t,Ext.DomHelper.createHtml(e)),i?Ext.get(o,!0):o}function c(t,e){var i,s,n,r,o=document;if(Ext.isArray(t)){i=o.createDocumentFragment();for(var a=0,l=t.length;a<l;a++)c(t[a],i)}else if("string"==typeof t)i=o.createTextNode(t);else{for(var h in s=!!(i=o.createElement(t.tag||"div")).setAttribute,t)d.test(h)||(n=t[h],"cls"==h?i.className=n:s?i.setAttribute(h,n):i[h]=n);Ext.DomHelper.applyStyles(i,t.style),(r=t.children||t.cn)?c(r,i):t.html&&(i.innerHTML=t.html)}return e&&e.appendChild(i),i}return a={createTemplate:function(t){var e=Ext.DomHelper.createHtml(t);return new Ext.Template(e)},useDom:!1,insertBefore:function(t,e,i){return s(t,e,i,"beforebegin")},insertAfter:function(t,e,i){return s(t,e,i,"afterend","nextSibling")},insertFirst:function(t,e,i){return s(t,e,i,"afterbegin","firstChild")},append:function(t,e,i){return s(t,e,i,"beforeend","",!0)},createDom:c}}()),Ext.apply(Ext.Template.prototype,{disableFormats:!1,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,argsRe:/^\s*['"](.*)["']\s*$/,compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,applyTemplate:function(a){var l=this,h=!0!==l.disableFormats,d=Ext.util.Format,c=l;if(l.compiled)return l.compiled(a);return l.html.replace(l.re,function(t,e,i,s){if(i&&h){if("this."==i.substr(0,5))return c.call(i.substr(5),a[e],a);if(s){for(var n=l.argsRe,r=0,o=(s=s.split(",")).length;r<o;r++)s[r]=s[r].replace(n,"$1");s=[a[e]].concat(s)}else s=[a[e]];return d[i].apply(d,s)}return void 0!==a[e]?a[e]:""})},compile:function(){var me=this,fm=Ext.util.Format,useF=!0!==me.disableFormats,sep=Ext.isGecko?"+":",",body;function fn(t,e,i,s){return i&&useF?(s=s?","+s:"","this."!=i.substr(0,5)?i="fm."+i+"(":(i='this.call("'+i.substr(5)+'", ',s=", values")):(s="",i="(values['"+e+"'] == undefined ? '' : "),"'"+sep+i+"values['"+e+"']"+s+")"+sep+"'"}return body=Ext.isGecko?"this.compiled = function(values){ return '"+me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn)+"';};":(body=["this.compiled = function(values){ return ['"],body.push(me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn)),body.push("'].join('');};"),body.join("")),eval(body),me},call:function(t,e,i){return this[t](e,i)}}),Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate,Ext.util.Functions={createInterceptor:function(e,i,s){return Ext.isFunction(i)?function(){var t=arguments;return i.target=this,i.method=e,!1!==i.apply(s||this||window,t)?e.apply(this||window,t):null}:e},createDelegate:function(i,s,n,r){return Ext.isFunction(i)?function(){var t,e=n||arguments;return!0===r?e=(e=Array.prototype.slice.call(arguments,0)).concat(n):Ext.isNumber(r)&&(e=Array.prototype.slice.call(arguments,0),t=[r,0].concat(n),Array.prototype.splice.apply(e,t)),i.apply(s||window,e)}:i},defer:function(t,e,i,s,n){return t=Ext.util.Functions.createDelegate(t,i,s,n),0<e?setTimeout(t,e):(t(),0)},createSequence:function(e,i,s){return Ext.isFunction(i)?function(){var t=e.apply(this||window,arguments);return i.apply(s||this||window,arguments),t}:e}},Ext.defer=Ext.util.Functions.defer,Ext.createInterceptor=Ext.util.Functions.createInterceptor,Ext.createSequence=Ext.util.Functions.createSequence,Ext.createDelegate=Ext.util.Functions.createDelegate,Ext.apply(Ext.util.Observable.prototype,function(){function s(t){var n,r,o,a,l=(this.methodEvents=this.methodEvents||{})[t],h=this;return l||(this.methodEvents[t]=l={},l.originalFn=this[t],l.methodName=t,l.before=[],l.after=[],a=function(t,e,i){void 0!==(r=t.apply(e||h,i))&&("object"==typeof r?(n=void 0!==r.returnValue?r.returnValue:r,o=!!r.cancel):!1===r?o=!0:n=r)},this[t]=function(){var t,e=Array.prototype.slice.call(arguments,0);n=r=void 0,o=!1;for(var i=0,s=l.before.length;i<s;i++)if(t=l.before[i],a(t.fn,t.scope,e),o)return n;void 0!==(r=l.originalFn.apply(h,e))&&(n=r);for(i=0,s=l.after.length;i<s;i++)if(t=l.after[i],a(t.fn,t.scope,e),o)return n;return n}),l}return{beforeMethod:function(t,e,i){s.call(this,t).before.push({fn:e,scope:i})},afterMethod:function(t,e,i){s.call(this,t).after.push({fn:e,scope:i})},removeMethodListener:function(t,e,i){for(var s=this.getMethodEvent(t),n=0,r=s.before.length;n<r;n++)if(s.before[n].fn==e&&s.before[n].scope==i)return void s.before.splice(n,1);for(n=0,r=s.after.length;n<r;n++)if(s.after[n].fn==e&&s.after[n].scope==i)return void s.after.splice(n,1)},relayEvents:function(t,e){var i=this;for(var s=0,n=e.length;s<n;s++){var r=e[s];i.events[r]=i.events[r]||!0,t.on(r,function(t){return function(){return i.fireEvent.apply(i,[t].concat(Array.prototype.slice.call(arguments,0)))}}(r),i)}},enableBubble:function(t){if(!Ext.isEmpty(t))for(var e=0,i=(t=Ext.isArray(t)?t:Array.prototype.slice.call(arguments,0)).length;e<i;e++){var s=(s=t[e]).toLowerCase(),n=this.events[s]||!0;"boolean"==typeof n&&(n=new Ext.util.Event(this,s),this.events[s]=n),n.bubble=!0}}}}()),Ext.util.Observable.capture=function(t,e,i){t.fireEvent=t.fireEvent.createInterceptor(e,i)},Ext.util.Observable.observeClass=function(t,e){if(t)return t.fireEvent||(Ext.apply(t,new Ext.util.Observable),Ext.util.Observable.capture(t.prototype,t.fireEvent,t)),"object"==typeof e&&t.on(e),t},Ext.apply(Ext.EventManager,function(){var s,n,r,o,i=Ext.lib.Dom,t=Ext.EventManager._unload,a=0,l=0,e=Ext.isWebKit?525<=Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]):!(Ext.isGecko&&!Ext.isWindows||Ext.isOpera);return{_unload:function(){Ext.EventManager.un(window,"resize",this.fireWindowResize,this),t.call(Ext.EventManager)},doResizeEvent:function(){var t=i.getViewHeight(),e=i.getViewWidth();l==t&&a==e||s.fire(a=e,l=t)},onWindowResize:function(t,e,i){s||(s=new Ext.util.Event,n=new Ext.util.DelayedTask(this.doResizeEvent),Ext.EventManager.on(window,"resize",this.fireWindowResize,this)),s.addListener(t,e,i)},fireWindowResize:function(){s&&n.delay(100)},onTextResize:function(t,e,i){var s;r||(r=new Ext.util.Event,(s=new Ext.Element(document.createElement("div"))).dom.className="x-text-resize",s.dom.innerHTML="X",s.appendTo(document.body),o=s.dom.offsetHeight,setInterval(function(){s.dom.offsetHeight!=o&&r.fire(o,o=s.dom.offsetHeight)},this.textResizeInterval)),r.addListener(t,e,i)},removeResizeListener:function(t,e){s&&s.removeListener(t,e)},fireResize:function(){s&&s.fire(i.getViewWidth(),i.getViewHeight())},textResizeInterval:50,ieDeferSrc:!1,getKeyEvent:function(){return e?"keydown":"keypress"},useKeydown:e}}()),Ext.EventManager.on=Ext.EventManager.addListener,Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN: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,isNavKeyPress:function(){var t=this.normalizeKey(this.keyCode);return 33<=t&&t<=40||t==this.RETURN||t==this.TAB||t==this.ESC},isSpecialKey:function(){var t=this.normalizeKey(this.keyCode);return"keypress"==this.type&&this.ctrlKey||this.isNavKeyPress()||t==this.BACKSPACE||16<=t&&t<=20||44<=t&&t<=46},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey}}),Ext.Element.addMethods({swallowEvent:function(t,e){var i=this;function s(t){t.stopPropagation(),e&&t.preventDefault()}return Ext.isArray(t)?Ext.each(t,function(t){i.on(t,s)}):i.on(t,s),i},relayEvent:function(e,i){this.on(e,function(t){i.fireEvent(e,t)})},clean:function(t){var e=this.dom,i=e.firstChild,s=-1;if(Ext.Element.data(e,"isCleaned")&&!0!==t)return this;for(;i;){var n=i.nextSibling;3!=i.nodeType||/\S/.test(i.nodeValue)?i.nodeIndex=++s:e.removeChild(i),i=n}return Ext.Element.data(e,"isCleaned",!0),this},load:function(){var t=this.getUpdater();return t.update.apply(t,arguments),this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(c,t,u){if(!this.dom)return this;if(c=c||"",!0!==t)return this.dom.innerHTML=c,"function"==typeof u&&u(),this;var f=Ext.id(),e=this.dom;return c+='<span id="'+f+'"></span>',Ext.lib.Event.onAvailable(f,function(){for(var t,e,i,s,n,r,o=document,a=o.getElementsByTagName("head")[0],l=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/gi,h=/\ssrc=([\'\"])(.*?)\1/i,d=/\stype=([\'\"])(.*?)\1/i;t=l.exec(c);)(i=!!(e=t[1])&&e.match(h))&&i[2]?((r=o.createElement("script")).src=i[2],(s=e.match(d))&&s[2]&&(r.type=s[2]),a.appendChild(r)):t[2]&&0<t[2].length&&(window.execScript?window.execScript(t[2]):window.eval(t[2]));(n=o.getElementById(f))&&Ext.removeNode(n),"function"==typeof u&&u()}),e.innerHTML=c.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/gi,""),this},removeAllListeners:function(){return this.removeAnchor(),Ext.EventManager.removeAll(this.dom),this},createProxy:function(t,e,i){t="object"==typeof t?t:{tag:"div",cls:t};var s=e?Ext.DomHelper.append(e,t,!0):Ext.DomHelper.insertBefore(this.dom,t,!0);return i&&this.setBox&&this.getBox&&s.setBox(this.getBox()),s}}),Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater,Ext.Element.addMethods({getAnchorXY:function(t,e,i){t=(t||"tl").toLowerCase(),i=i||{};var s=this,n=s.dom==document.body||s.dom==document,r=i.width||n?Ext.lib.Dom.getViewWidth():s.getWidth(),o=i.height||n?Ext.lib.Dom.getViewHeight():s.getHeight(),a=Math.round,l=s.getXY(),h=s.getScroll(),d=n?h.left:e?0:l[0],c=n?h.top:e?0:l[1],u={c:[a(.5*r),a(.5*o)],t:[a(.5*r),0],l:[0,a(.5*o)],r:[r,a(.5*o)],b:[a(.5*r),o],tl:[0,0],bl:[0,o],br:[r,o],tr:[r,0]}[t];return[u[0]+d,u[1]+c]},anchorTo:function(t,e,i,s,n,r){function o(){Ext.fly(a).alignTo(t,e,i,s),Ext.callback(r,Ext.fly(a))}var a=this.dom,l=!Ext.isEmpty(n),h=this.getAnchor();return this.removeAnchor(),Ext.apply(h,{fn:o,scroll:l}),Ext.EventManager.onWindowResize(o,null),l&&Ext.EventManager.on(window,"scroll",o,null,{buffer:isNaN(n)?50:n}),o.call(this),this},removeAnchor:function(){var t=this.getAnchor();return t&&t.fn&&(Ext.EventManager.removeResizeListener(t.fn),t.scroll&&Ext.EventManager.un(window,"scroll",t.fn),delete t.fn),this},getAnchor:function(){var t=Ext.Element.data,e=this.dom;if(e)return t(e,"_anchor")||t(e,"_anchor",{})},getAlignToXY:function(t,e,i){if(!(t=Ext.get(t))||!t.dom)throw"Element.alignToXY with an element that doesn't exist";i=i||[0,0],e=(e&&"?"!=e?/-/.test(e)||""===e?e||"tl-bl":"tl-"+e:"tl-bl?").toLowerCase();this.dom;var s,n,r,o,a,l,h,d,c,u,f,p,g,m,x=Ext.lib.Dom.getViewWidth()-10,E=Ext.lib.Dom.getViewHeight()-10,v=document,y=v.documentElement,b=v.body,C=(y.scrollLeft||b.scrollLeft||0)+5,w=(y.scrollTop||b.scrollTop||0)+5,T="",S="",D=e.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!D)throw"Element.alignTo with an invalid alignment "+e;return T=D[1],S=D[2],m=!!D[3],s=this.getAnchorXY(T,!0),r=(n=t.getAnchorXY(S,!1))[0]-s[0]+i[0],o=n[1]-s[1]+i[1],m&&(a=this.getWidth(),l=this.getHeight(),h=t.getRegion(),d=T.charAt(0),c=T.charAt(T.length-1),u=S.charAt(0),f=S.charAt(S.length-1),p="t"==d&&"b"==u||"b"==d&&"t"==u,g="r"==c&&"l"==f||"l"==c&&"r"==f,x+C<r+a&&(r=g?h.left-a:x+C-a),r<C&&(r=g?h.right:C),E+w<o+l&&(o=p?h.top-l:E+w-l),o<w&&(o=p?h.bottom:w)),[r,o]},alignTo:function(t,e,i,s){return this.setXY(this.getAlignToXY(t,e,i),!(!this.preanim||!s)&&this.preanim(arguments,3))},adjustForConstraints:function(t,e,i){return this.getConstrainToXY(e||document,!1,i,t)||t},getConstrainToXY:function(){var v={top:0,left:0,bottom:0,right:0};return function(t,e,i,s){t=Ext.get(t),i=i?Ext.applyIf(i,v):v;var n,r,o,a=0,l=0;t.dom==document.body||t.dom==document?(r=Ext.lib.Dom.getViewWidth(),o=Ext.lib.Dom.getViewHeight()):(r=t.dom.clientWidth,o=t.dom.clientHeight,e||(a=(n=t.getXY())[0],l=n[1]));var h=t.getScroll();a+=i.left+h.left,l+=i.top+h.top;var d=a+(r-=i.right),c=l+(o-=i.bottom),u=s||(e?[this.getLeft(!0),this.getTop(!0)]:this.getXY()),f=u[0],p=u[1],g=this.getConstrainOffset(),m=this.dom.offsetWidth+g,x=this.dom.offsetHeight+g,E=!1;return d<f+m&&(f=d-m,E=!0),c<p+x&&(p=c-x,E=!0),f<a&&(f=a,E=!0),p<l&&(p=l,E=!0),!!E&&[f,p]}}(),getConstrainOffset:function(){return 0},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(t){return this.alignTo(t||document,"c-c")}}),Ext.Element.addMethods({select:function(t,e){return Ext.Element.select(t,e,this.dom)}}),Ext.apply(Ext.Element.prototype,function(){var a=Ext.getDom,l=Ext.get,h=Ext.DomHelper;return{insertSibling:function(t,e,i){var s,n,r=this,o="after"==(e||"before").toLowerCase();return Ext.isArray(t)?(n=r,Ext.each(t,function(t){s=Ext.fly(n,"_internal").insertSibling(t,e,i),o&&(n=s)})):(t=t||{}).nodeType||t.dom?(s=r.dom.parentNode.insertBefore(a(t),o?r.dom.nextSibling:r.dom),i||(s=l(s))):s=o&&!r.dom.nextSibling?h.append(r.dom.parentNode,t,!i):h[o?"insertAfter":"insertBefore"](r.dom,t,!i),s}}}()),Ext.Element.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>',Ext.Element.addMethods(function(){var n="_internal";return{applyStyles:function(t){return Ext.DomHelper.applyStyles(this.dom,t),this},getStyles:function(){var e={};return Ext.each(arguments,function(t){e[t]=this.getStyle(t)},this),e},setOverflow:function(t){var e=this.dom;"auto"==t&&Ext.isMac&&Ext.isGecko2?(e.style.overflow="hidden",function(){e.style.overflow="auto"}.defer(1)):e.style.overflow=t},boxWrap:function(t){t=t||"x-box";var e=Ext.get(this.insertHtml("beforeBegin","<div class='"+t+"'>"+String.format(Ext.Element.boxMarkup,t)+"</div>"));return Ext.DomQuery.selectNode("."+t+"-mc",e.dom).appendChild(this.dom),e},setSize:function(t,e,i){var s=this;return"object"==typeof t&&(e=t.height,t=t.width),t=s.adjustWidth(t),e=s.adjustHeight(e),i&&s.anim?s.anim({width:{to:t},height:{to:e}},s.preanim(arguments,2)):(s.dom.style.width=s.addUnits(t),s.dom.style.height=s.addUnits(e)),s},getComputedHeight:function(){var t=this,e=Math.max(t.dom.offsetHeight,t.dom.clientHeight);return e||(e=parseFloat(t.getStyle("height"))||0,t.isBorderBox()||(e+=t.getFrameWidth("tb"))),e},getComputedWidth:function(){var t=Math.max(this.dom.offsetWidth,this.dom.clientWidth);return t||(t=parseFloat(this.getStyle("width"))||0,this.isBorderBox()||(t+=this.getFrameWidth("lr"))),t},getFrameWidth:function(t,e){return e&&this.isBorderBox()?0:this.getPadding(t)+this.getBorderWidth(t)},addClassOnOver:function(t){return this.hover(function(){Ext.fly(this,n).addClass(t)},function(){Ext.fly(this,n).removeClass(t)}),this},addClassOnFocus:function(t){return this.on("focus",function(){Ext.fly(this,n).addClass(t)},this.dom),this.on("blur",function(){Ext.fly(this,n).removeClass(t)},this.dom),this},addClassOnClick:function(i){var s=this.dom;return this.on("mousedown",function(){Ext.fly(s,n).addClass(i);var t=Ext.getDoc(),e=function(){Ext.fly(s,n).removeClass(i),t.removeListener("mouseup",e)};t.on("mouseup",e)}),this},getViewSize:function(){var t=document,e=this.dom;if(e!=t&&e!=t.body)return{width:e.clientWidth,height:e.clientHeight};var i=Ext.lib.Dom;return{width:i.getViewWidth(),height:i.getViewHeight()}},getStyleSize:function(){var t,e,i=this,s=document,n=this.dom,r=n==s||n==s.body,o=n.style;if(r){var a=Ext.lib.Dom;return{width:a.getViewWidth(),height:a.getViewHeight()}}return o.width&&"auto"!=o.width&&(t=parseFloat(o.width),i.isBorderBox()&&(t-=i.getFrameWidth("lr"))),o.height&&"auto"!=o.height&&(e=parseFloat(o.height),i.isBorderBox()&&(e-=i.getFrameWidth("tb"))),{width:t||i.getWidth(!0),height:e||i.getHeight(!0)}},getSize:function(t){return{width:this.getWidth(t),height:this.getHeight(t)}},repaint:function(){var t=this.dom;return this.addClass("x-repaint"),setTimeout(function(){Ext.fly(t).removeClass("x-repaint")},1),this},unselectable:function(){return this.dom.unselectable="on",this.swallowEvent("selectstart",!0).addClass("x-unselectable")},getMargins:function(t){var e,i=this,s={t:"top",l:"left",r:"right",b:"bottom"},n={};if(t)return i.addStyles.call(i,t,i.margins);for(e in i.margins)n[s[e]]=parseFloat(i.getStyle(i.margins[e]))||0;return n}}}()),Ext.Element.addMethods({setBox:function(t,e,i){var s=this,n=t.width,r=t.height;return!e||s.autoBoxAdjust||s.isBorderBox()||(n-=s.getBorderWidth("lr")+s.getPadding("lr"),r-=s.getBorderWidth("tb")+s.getPadding("tb")),s.setBounds(t.x,t.y,n,r,s.animTest.call(s,arguments,i,2)),s},getBox:function(t,e){var i,s,n,r,o=this,a=o.getBorderWidth,l=o.getPadding,h=e?[parseInt(o.getStyle("left"),10)||0,parseInt(o.getStyle("top"),10)||0]:o.getXY(),d=o.dom,c=d.offsetWidth,u=d.offsetHeight,f=t?(i=a.call(o,"l")+l.call(o,"l"),s=a.call(o,"r")+l.call(o,"r"),n=a.call(o,"t")+l.call(o,"t"),r=a.call(o,"b")+l.call(o,"b"),{x:h[0]+i,y:h[1]+n,0:h[0]+i,1:h[1]+n,width:c-(i+s),height:u-(n+r)}):{x:h[0],y:h[1],0:h[0],1:h[1],width:c,height:u};return f.right=f.x+f.width,f.bottom=f.y+f.height,f},move:function(t,e,i){var s=this.getXY(),n=s[0],r=s[1],o=[n-e,r],a=[n+e,r],l=[n,r-e],h=[n,r+e],d={l:o,left:o,r:a,right:a,t:l,top:l,up:l,b:h,bottom:h,down:h};t=t.toLowerCase(),this.moveTo(d[t][0],d[t][1],this.animTest.call(this,arguments,i,2))},setLeftTop:function(t,e){var i=this.dom.style;return i.left=this.addUnits(t),i.top=this.addUnits(e),this},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(t,e,i,s,n){var r=this;return n&&r.anim?r.anim({points:{to:[t,e]},width:{to:r.adjustWidth(i)},height:{to:r.adjustHeight(s)}},r.preanim(arguments,4),"motion"):(r.setSize(i,s),r.setLocation(t,e)),r},setRegion:function(t,e){return this.setBounds(t.left,t.top,t.right-t.left,t.bottom-t.top,this.animTest.call(this,arguments,e,1))}}),Ext.Element.addMethods({scrollTo:function(t,e,i){var s,n=/top/i.test(t),r=this,o=r.dom;return i&&r.anim?(s="scroll"+(n?"Left":"Top"),r.anim({scroll:{to:n?[o[s],e]:[e,o[s]]}},r.preanim(arguments,2),"scroll")):o[s="scroll"+(n?"Top":"Left")]=e,r},scrollIntoView:function(t,e){var i=Ext.getDom(t)||Ext.getBody().dom,s=this.dom,n=this.getOffsetsTo(i),r=n[0]+i.scrollLeft,o=n[1]+i.scrollTop,a=o+s.offsetHeight,l=r+s.offsetWidth,h=i.clientHeight,d=parseInt(i.scrollTop,10),c=parseInt(i.scrollLeft,10),u=d+h,f=c+i.clientWidth;return s.offsetHeight>h||o<d?i.scrollTop=o:u<a&&(i.scrollTop=a-h),i.scrollTop,!1!==e&&(s.offsetWidth>i.clientWidth||r<c?i.scrollLeft=r:f<l&&(i.scrollLeft=l-i.clientWidth),i.scrollLeft),this},scrollChildIntoView:function(t,e){Ext.fly(t,"_scrollChildIntoView").scrollIntoView(this,e)},scroll:function(t,e,i){if(!this.isScrollable())return!1;var s,n=this.dom,r=n.scrollLeft,o=n.scrollTop,a=n.scrollWidth,l=n.scrollHeight,h=n.clientWidth,d=n.clientHeight,c=!1,u={l:Math.min(r+e,a-h),r:Math.max(r-e,0),t:Math.max(o-e,0),b:Math.min(o+e,l-d)};return u.d=u.b,u.u=u.t,-1<(s=u[t=t.substr(0,1)])&&(c=!0,this.scrollTo("l"==t||"r"==t?"left":"top",s,this.preanim(arguments,2))),c}}),Ext.Element.addMethods(function(){var s="display",h="x-masked",d="x-masked-relative",c=Ext.Element.data;return{isVisible:function(t){var e=!this.isStyle("visibility","hidden")&&!this.isStyle(s,"none"),i=this.dom.parentNode;if(!0!==t||!e)return e;for(;i&&!/^body/i.test(i.tagName);){if(!Ext.fly(i,"_isVisible").isVisible())return!1;i=i.parentNode}return!0},isDisplayed:function(){return!this.isStyle(s,"none")},enableDisplayMode:function(t){return this.setVisibilityMode(Ext.Element.DISPLAY),Ext.isEmpty(t)||c(this.dom,"originalDisplay",t),this},mask:function(t,e){var i,s,n,r=this,o=r.dom,a=Ext.DomHelper,l="ext-el-mask-msg";return/^body/i.test(o.tagName)||"static"!=r.getStyle("position")||r.addClass(d),(i=c(o,"maskMsg"))&&i.remove(),(i=c(o,"mask"))&&i.remove(),s=a.append(o,{cls:"ext-el-mask"},!0),c(o,"mask",s),r.addClass(h),s.setDisplayed(!0),"string"==typeof t&&(n=a.append(o,{cls:l,cn:{tag:"div"}},!0),c(o,"maskMsg",n),n.dom.className=e?l+" "+e:l,n.dom.firstChild.innerHTML=t,n.setDisplayed(!0),n.center(r)),!Ext.isIE||Ext.isIE7&&Ext.isStrict||"auto"!=r.getStyle("height")||s.setSize(void 0,r.getHeight()),s},unmask:function(){var t=this.dom,e=c(t,"mask"),i=c(t,"maskMsg");e&&(i&&(i.remove(),c(t,"maskMsg",void 0)),e.remove(),c(t,"mask",void 0),this.removeClass([h,d]))},isMasked:function(){var t=c(this.dom,"mask");return t&&t.isVisible()},createShim:function(){var t,e=document.createElement("iframe");return e.frameBorder="0",e.className="ext-shim",e.src=Ext.SSL_SECURE_URL,(t=Ext.get(this.dom.parentNode.insertBefore(e,this.dom))).autoBoxAdjust=!1,t}}}()),Ext.Element.addMethods({addKeyListener:function(t,e,i){var s="object"!=typeof t||Ext.isArray(t)?{key:t,fn:e,scope:i}:{key:t.key,shift:t.shift,ctrl:t.ctrl,alt:t.alt,fn:e,scope:i};return new Ext.KeyMap(this,s)},addKeyMap:function(t){return new Ext.KeyMap(this,t)}}),Ext.CompositeElementLite.importElementMethods(),Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(t,e){if(!t)return this;"string"==typeof t&&(t=Ext.Element.selectorFunction(t,e));var i=this.elements;return Ext.each(t,function(t){i.push(Ext.get(t))}),this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(t){return-1!=this.indexOf(t)},removeElement:function(t,e){var i,s=this,n=this.elements;return Ext.each(t,function(t){(i=n[t]||n[t=s.indexOf(t)])&&(e&&(i.dom?i.remove():Ext.removeNode(i)),n.splice(t,1))}),this}}),Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(t,e){this.elements=[],this.add(t,e)},getElement:function(t){return t},transformElement:function(t){return Ext.get(t)}}),Ext.Element.select=function(t,e,i){var s;if("string"==typeof t)s=Ext.Element.selectorFunction(t,i);else{if(void 0===t.length)throw"Invalid selector";s=t}return!0===e?new Ext.CompositeElement(s):new Ext.CompositeElementLite(s)},Ext.select=Ext.Element.select,Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var l="beforeupdate",s="update",n="failure";function h(t){var e=this;if(e.transaction=null,t.argument.form&&t.argument.reset)try{t.argument.form.reset()}catch(t){}e.loadScripts?e.renderer.render(e.el,t,e,i.createDelegate(e,[t])):(e.renderer.render(e.el,t,e),i.call(e,t))}function i(t,e,i){this.fireEvent(e||s,this.el,t),Ext.isFunction(t.argument.callback)&&t.argument.callback.call(t.argument.scope,this.el,!!Ext.isEmpty(i),t,t.argument.options)}function d(t){i.call(this,t,n,!!(this.transaction=null))}return{constructor:function(t,e){var i=this;if(t=Ext.get(t),!e&&t.updateManager)return t.updateManager;i.el=t,i.defaultUrl=null,i.addEvents(l,s,n),Ext.apply(i,Ext.Updater.defaults),i.transaction=null,i.refreshDelegate=i.refresh.createDelegate(i),i.updateDelegate=i.update.createDelegate(i),i.formUpdateDelegate=(i.formUpdate||function(){}).createDelegate(i),i.renderer=i.renderer||i.getDefaultRenderer(),Ext.Updater.superclass.constructor.call(i)},setRenderer:function(t){this.renderer=t},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer},setDefaultUrl:function(t){this.defaultUrl=t},getEl:function(){return this.el},update:function(t,e,i,s){var n,r,o,a=this;!1!==a.fireEvent(l,a.el,t,e)&&(Ext.isObject(t)&&(t=(n=t).url,e=e||n.params,i=i||n.callback,s=s||n.discardUrl,r=n.scope,Ext.isEmpty(n.nocache)||(a.disableCaching=n.nocache),Ext.isEmpty(n.text)||(a.indicatorText='<div class="loading-indicator">'+n.text+"</div>"),Ext.isEmpty(n.scripts)||(a.loadScripts=n.scripts),Ext.isEmpty(n.timeout)||(a.timeout=n.timeout)),a.showLoading(),s||(a.defaultUrl=t),Ext.isFunction(t)&&(t=t.call(a)),o=Ext.apply({},{url:t,params:Ext.isFunction(e)&&r?e.createDelegate(r):e,success:h,failure:d,scope:a,callback:void 0,timeout:1e3*a.timeout,disableCaching:a.disableCaching,argument:{options:n,url:t,form:null,callback:i,scope:r||window,params:e}},n),a.transaction=Ext.Ajax.request(o))},formUpdate:function(t,e,i,s){var n=this;!1!==n.fireEvent(l,n.el,t,e)&&(Ext.isFunction(e)&&(e=e.call(n)),t=Ext.getDom(t),n.transaction=Ext.Ajax.request({form:t,url:e,success:h,failure:d,scope:n,timeout:1e3*n.timeout,argument:{url:e,form:t,callback:s,reset:i}}),n.showLoading.defer(1,n))},startAutoRefresh:function(t,e,i,s,n){var r=this;n&&r.update(e||r.defaultUrl,i,s,!0),r.autoRefreshProcId&&clearInterval(r.autoRefreshProcId),r.autoRefreshProcId=setInterval(r.update.createDelegate(r,[e||r.defaultUrl,i,s,!0]),1e3*t)},stopAutoRefresh:function(){this.autoRefreshProcId&&(clearInterval(this.autoRefreshProcId),delete this.autoRefreshProcId)},isAutoRefreshing:function(){return!!this.autoRefreshProcId},showLoading:function(){this.showLoadIndicator&&(this.el.dom.innerHTML=this.indicatorText)},abort:function(){this.transaction&&Ext.Ajax.abort(this.transaction)},isUpdating:function(){return!!this.transaction&&Ext.Ajax.isLoading(this.transaction)},refresh:function(t){this.defaultUrl&&this.update(this.defaultUrl,null,t,!0)}}}()),Ext.Updater.defaults={timeout:30,disableCaching:!1,showLoadIndicator:!0,indicatorText:'<div class="loading-indicator">Loading...</div>',loadScripts:!1,sslBlankUrl:Ext.SSL_SECURE_URL},Ext.Updater.updateElement=function(t,e,i,s){var n=Ext.get(t).getUpdater();Ext.apply(n,s),n.update(e,i,s?s.callback:null)},Ext.Updater.BasicRenderer=function(){},Ext.Updater.BasicRenderer.prototype={render:function(t,e,i,s){t.update(e.responseText,i.loadScripts,s)}},function(){function d(t){var i=Array.prototype.slice.call(arguments,1);return t.replace(/\{(\d+)\}/g,function(t,e){return i[e]})}Date.useStrict=!1,Date.formatCodeToRegex=function(t,e){var i=Date.parseCodes[t];return i&&(i="function"==typeof i?i():i,Date.parseCodes[t]=i),i?Ext.applyIf({c:i.c?d(i.c,e||"{0}"):i.c},i):{g:0,c:null,s:Ext.escapeRe(t)}};var c,e,i,u=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{M$:function(t,e){var i=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/"),s=(t||"").match(i);return s?new Date(+((s[1]||"")+s[2])):null}},parseRegexes:[],formatFunctions:{M$: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},getShortMonthName:function(t){return Date.monthNames[t].substring(0,3)},getShortDayName:function(t){return Date.dayNames[t].substring(0,3)},getMonthNumber:function(t){return Date.monthNumbers[t.substring(0,1).toUpperCase()+t.substring(1,3).toLowerCase()]},formatContainsHourInfo:(e=/(\\.)/g,i=/([gGhHisucUOPZ]|M\$)/,function(t){return i.test(t.replace(e,""))}),formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"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:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var t="Y-m-dTH:i:sP",e=[],i=0,s=t.length;i<s;++i){var n=t.charAt(i);e.push("T"==n?"'T'":Date.getFormatCode(n))}return e.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(t,e,i,s,n,r,o){s=s||0,n=n||0,r=r||0,o=o||0;var a=new Date(t<100?100:t,e-1,i,s,n,r,o).add(Date.YEAR,t<100?t-100:0);return t==a.getFullYear()&&e==a.getMonth()+1&&i==a.getDate()&&s==a.getHours()&&n==a.getMinutes()&&r==a.getSeconds()&&o==a.getMilliseconds()},parseDate:function(t,e,i){var s=Date.parseFunctions;return null==s[e]&&Date.createParser(e),s[e](t,Ext.isDefined(i)?i:Date.useStrict)},getFormatCode:function(t){var e=Date.formatCodes[t];return e&&(e="function"==typeof e?e():e,Date.formatCodes[t]=e),e||"'"+String.escape(t)+"'"},createFormat:function(t){for(var e=[],i=!1,s="",n=0;n<t.length;++n)s=t.charAt(n),i||"\\"!=s?i?(i=!1,e.push("'"+String.escape(s)+"'")):e.push(Date.getFormatCode(s)):i=!0;Date.formatFunctions[t]=new Function("return "+e.join("+"))},createParser:(c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = Ext.num(y, Ext.num(def.y, dt.getFullYear()));","m = Ext.num(m, Ext.num(def.m - 1, dt.getMonth()));","d = Ext.num(d, Ext.num(def.d, dt.getDate()));","h  = Ext.num(h, Ext.num(def.h, dt.getHours()));","i  = Ext.num(i, Ext.num(def.i, dt.getMinutes()));","s  = Ext.num(s, Ext.num(def.s, dt.getSeconds()));","ms = Ext.num(ms, Ext.num(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n"),function(t){for(var e,i,s=Date.parseRegexes.length,n=1,r=[],o=[],a=!1,l="",h=0;h<t.length;++h)l=t.charAt(h),a||"\\"!=l?a?(a=!1,o.push(String.escape(l))):(n+=(e=u(l,n)).g,o.push(e.s),e.g&&e.c&&(e.calcLast?i=e.c:r.push(e.c))):a=!0;i&&r.push(i),Date.parseRegexes[s]=new RegExp("^"+o.join("")+"$","i"),Date.parseFunctions[t]=new Function("input","strict",d(c,s,r.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 t=[],e=0;e<7;t.push(Date.getShortDayName(e)),++e);return{g:0,c:null,s:"(?:"+t.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.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(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var t=[],e=0;e<12;t.push(Date.getShortMonthName(e)),++e);return Ext.applyIf({s:"("+t.join("|")+")"},u("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 u("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 > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return u("A")},A:{calcLast:!0,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 u("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return u("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 + String.leftPad(hr, 2, '0') + 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 + String.leftPad(hr, 2, '0') + 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(){for(var t=[],e=[u("Y",1),u("m",2),u("d",3),u("h",4),u("i",5),u("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){",u("P",8).c,"}else{",u("O",8).c,"}","}"].join("\n")}],i=0,s=e.length;i<s;++i)t.push(e[i].c);return{g:1,c:t.join(""),s:[e[0].s,"(?:","-",e[1].s,"(?:","-",e[2].s,"(?:","(?:T| )?",e[3].s,":",e[4].s,"(?::",e[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})}(),Ext.apply(Date.prototype,{dateFormat:function(t){return null==Date.formatFunctions[t]&&Date.createFormat(t),Date.formatFunctions[t].call(this)},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(t){return(0<this.getTimezoneOffset()?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(t?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var t=0,e=this.clone(),i=this.getMonth(),s=0;for(e.setDate(1),e.setMonth(0);s<i;e.setMonth(++s))t+=e.getDaysInMonth();return t+this.getDate()-1},getWeekOfYear:function(){var t=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/864e5,e=Math.floor(t/7),i=new Date(6048e5*e).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/6048e5)+1},isLeapYear:function(){var t=this.getFullYear();return!(0!=(3&t)||!(t%100||t%400==0&&t))},getFirstDayOfMonth:function(){var t=(this.getDay()-(this.getDate()-1))%7;return t<0?7+t:t},getLastDayOfMonth:function(){return this.getLastDateOfMonth().getDay()},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){var e=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var t=this.getMonth();return 1==t&&this.isLeapYear()?29:e[t]}}(),getSuffix:function(){switch(this.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(){return new Date(this.getTime())},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset()},clearTime:function(t){if(t)return this.clone().clearTime();var e=this.getDate();if(this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this.getDate()!=e){for(var i=1,s=this.add(Date.HOUR,i);s.getDate()!=e;i++,s=this.add(Date.HOUR,i));this.setDate(e),this.setHours(s.getHours())}return this},add:function(t,e){var i=this.clone();if(!t||0===e)return i;switch(t.toLowerCase()){case Date.MILLI:i.setMilliseconds(this.getMilliseconds()+e);break;case Date.SECOND:i.setSeconds(this.getSeconds()+e);break;case Date.MINUTE:i.setMinutes(this.getMinutes()+e);break;case Date.HOUR:i.setHours(this.getHours()+e);break;case Date.DAY:i.setDate(this.getDate()+e);break;case Date.MONTH:var s=this.getDate();28<s&&(s=Math.min(s,this.getFirstDateOfMonth().add("mo",e).getLastDateOfMonth().getDate())),i.setDate(s),i.setMonth(this.getMonth()+e);break;case Date.YEAR:i.setFullYear(this.getFullYear()+e)}return i},between:function(t,e){var i=this.getTime();return t.getTime()<=i&&i<=e.getTime()}}),Date.prototype.format=Date.prototype.dateFormat,Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420&&Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(t){if(t<=-1){var e=Math.ceil(-t),i=Math.ceil(e/12),s=e%12?12-e%12:0;return this.setFullYear(this.getFullYear()-i),this._xMonth(s)}return this._xMonth(t)},setDate:function(t){return this.setTime(this.getTime()-864e5*(this.getDate()-t))}}),Ext.util.MixedCollection=function(t,e){this.items=[],this.map={},this.keys=[],this.length=0,this.addEvents("clear","add","replace","remove","sort"),this.allowFunctions=!0===t,e&&(this.getKey=e),Ext.util.MixedCollection.superclass.constructor.call(this)},Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:!1,add:function(t,e){if(1==arguments.length&&(e=t,t=this.getKey(e)),null!=t){if(void 0!==this.map[t])return this.replace(t,e);this.map[t]=e}return this.length++,this.items.push(e),this.keys.push(t),this.fireEvent("add",this.length-1,e,t),e},getKey:function(t){return t.id},replace:function(t,e){1==arguments.length&&(e=t,t=this.getKey(e));var i=this.map[t];if(null==t||void 0===i)return this.add(t,e);var s=this.indexOfKey(t);return this.items[s]=e,this.map[t]=e,this.fireEvent("replace",t,i,e),e},addAll:function(t){if(1<arguments.length||Ext.isArray(t))for(var e=1<arguments.length?arguments:t,i=0,s=e.length;i<s;i++)this.add(e[i]);else for(var n in t)!this.allowFunctions&&"function"==typeof t[n]||this.add(n,t[n])},each:function(t,e){for(var i=[].concat(this.items),s=0,n=i.length;s<n&&!1!==t.call(e||i[s],i[s],s,n);s++);},eachKey:function(t,e){for(var i=0,s=this.keys.length;i<s;i++)t.call(e||window,this.keys[i],this.items[i],i,s)},find:function(t,e){for(var i=0,s=this.items.length;i<s;i++)if(t.call(e||window,this.items[i],this.keys[i]))return this.items[i];return null},insert:function(t,e,i){return 2==arguments.length&&(i=e,e=this.getKey(i)),this.containsKey(e)&&(this.suspendEvents(),this.removeKey(e),this.resumeEvents()),t>=this.length?this.add(e,i):(this.length++,this.items.splice(t,0,i),null!=e&&(this.map[e]=i),this.keys.splice(t,0,e),this.fireEvent("add",t,i,e),i)},remove:function(t){return this.removeAt(this.indexOf(t))},removeAt:function(t){if(t<this.length&&0<=t){this.length--;var e=this.items[t];this.items.splice(t,1);var i=this.keys[t];return void 0!==i&&delete this.map[i],this.keys.splice(t,1),this.fireEvent("remove",e,i),e}return!1},removeKey:function(t){return this.removeAt(this.indexOfKey(t))},getCount:function(){return this.length},indexOf:function(t){return this.items.indexOf(t)},indexOfKey:function(t){return this.keys.indexOf(t)},item:function(t){var e=this.map[t],i=void 0!==e?e:"number"==typeof t?this.items[t]:void 0;return"function"!=typeof i||this.allowFunctions?i:null},itemAt:function(t){return this.items[t]},key:function(t){return this.map[t]},contains:function(t){return-1!=this.indexOf(t)},containsKey:function(t){return void 0!==this.map[t]},clear:function(){this.length=0,this.items=[],this.keys=[],this.map={},this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(s,t,n){var e,i,r="DESC"==String(t).toUpperCase()?-1:1,o=[],a=this.keys,l=this.items;for(n=n||function(t,e){return t-e},e=0,i=l.length;e<i;e++)o[o.length]={key:a[e],value:l[e],index:e};for(o.sort(function(t,e){var i=n(t[s],e[s])*r;return 0===i&&(i=t.index<e.index?-1:1),i}),e=0,i=o.length;e<i;e++)l[e]=o[e].value,a[e]=o[e].key;this.fireEvent("sort",this)},sort:function(t,e){this._sort("value",t,e)},reorder:function(t){this.suspendEvents();var e,i=this.items,s=0,n=i.length,r=[],o=[];for(e in t)r[t[e]]=i[e];for(s=0;s<n;s++)null==t[s]&&o.push(i[s]);for(s=0;s<n;s++)null==r[s]&&(r[s]=o.shift());this.clear(),this.addAll(r),this.resumeEvents(),this.fireEvent("sort",this)},keySort:function(t,e){this._sort("key",t,e||function(t,e){var i=String(t).toUpperCase(),s=String(e).toUpperCase();return s<i?1:i<s?-1:0})},getRange:function(t,e){var i=this.items;if(i.length<1)return[];var s,n=[];if((t=t||0)<=(e=Math.min(void 0===e?this.length-1:e,this.length-1)))for(s=t;s<=e;s++)n[n.length]=i[s];else for(s=t;e<=s;s--)n[n.length]=i[s];return n},filter:function(e,i,t,s){return Ext.isEmpty(i,!1)?this.clone():(i=this.createValueMatcher(i,t,s),this.filterBy(function(t){return t&&i.test(t[e])}))},filterBy:function(t,e){var i=new Ext.util.MixedCollection;i.getKey=this.getKey;for(var s=this.keys,n=this.items,r=0,o=n.length;r<o;r++)t.call(e||this,n[r],s[r])&&i.add(s[r],n[r]);return i},findIndex:function(e,i,t,s,n){return Ext.isEmpty(i,!1)?-1:(i=this.createValueMatcher(i,s,n),this.findIndexBy(function(t){return t&&i.test(t[e])},null,t))},findIndexBy:function(t,e,i){for(var s=this.keys,n=this.items,r=i||0,o=n.length;r<o;r++)if(t.call(e||this,n[r],s[r]))return r;return-1},createValueMatcher:function(t,e,i,s){var n;return t.exec||(n=Ext.escapeRe,t=String(t),!0===e?t=n(t):(t="^"+n(t),!0===s&&(t+="$")),t=new RegExp(t,i?"":"i")),t},clone:function(){for(var t=new Ext.util.MixedCollection,e=this.keys,i=this.items,s=0,n=i.length;s<n;s++)t.add(e[s],i[s]);return t.getKey=this.getKey,t}}),Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item,Ext.AbstractManager=Ext.extend(Object,{typeName:"type",constructor:function(t){Ext.apply(this,t||{}),this.all=new Ext.util.MixedCollection,this.types={}},get:function(t){return this.all.get(t)},register:function(t){this.all.add(t)},unregister:function(t){this.all.remove(t)},registerType:function(t,e){(this.types[t]=e)[this.typeName]=t},isRegistered:function(t){return void 0!==this.types[t]},create:function(t,e){var i=t[this.typeName]||t.type||e,s=this.types[i];if(null==s)throw new Error(String.format("The '{0}' type has not been registered with this manager",i));return new s(t)},onAvailable:function(i,s,n){var r=this.all;r.on("add",function(t,e){e.id==i&&(s.call(n||e,e),r.un("add",s,n))})}}),Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g,stripTagsRE=/<\/?[^>]+>/gi,stripScriptsRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/gi,nl2brRe=/\r?\n/g,QP;return{ellipsis:function(t,e,i){if(t&&t.length>e){if(i){var s=t.substr(0,e-2),n=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));return-1==n||n<e-15?t.substr(0,e-3)+"...":s.substr(0,n)+"..."}return t.substr(0,e-3)+"..."}return t},undef:function(t){return void 0!==t?t:""},defaultValue:function(t,e){return e||0===e||(e=""),void 0!==t&&""!==t?t:e},htmlEncode:function(t){return t?String(t).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;"):t},htmlDecode:function(t){return t?String(t).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&"):t},trim:function(t){return String(t).replace(trimRe,"")},substr:function(t,e,i){return String(t).substr(e,i)},lowercase:function(t){return String(t).toLowerCase()},uppercase:function(t){return String(t).toUpperCase()},capitalize:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t},call:function(value,fn){if(2<arguments.length){var args=Array.prototype.slice.call(arguments,2);return args.unshift(value),eval(fn).apply(window,args)}return eval(fn).call(window,value)},usMoney:function(t){t=(t=Math.round(100*t)/100)==Math.floor(t)?t+".00":10*t==Math.floor(10*t)?t+"0":t;for(var e=(t=String(t)).split("."),i=e[0],s=e[1]?"."+e[1]:".00",n=/(\d+)(\d{3})/;n.test(i);)i=i.replace(n,"$1,$2");return"-"==(t=i+s).charAt(0)?"-$"+t.substr(1):"$"+t},date:function(t,e){return t?(Ext.isDate(t)||(t=new Date(Date.parse(t))),t.dateFormat(e||"m/d/Y")):""},dateRenderer:function(e){return function(t){return Ext.util.Format.date(t,e)}},stripTags:function(t){return t?String(t).replace(stripTagsRE,""):t},stripScripts:function(t){return t?String(t).replace(stripScriptsRe,""):t},fileSize:function(t){return t<1024?t+" bytes":t<1048576?Math.round(10*t/1024)/10+" KB":Math.round(10*t/1048576)/10+" MB"},math:(QP={},function(t,e){return QP[e]||(QP[e]=new Function("v","return v "+e+";")),QP[e](t)}),round:function(t,e){var i=Number(t);return"number"==typeof e&&(e=Math.pow(10,e),i=Math.round(t*e)/e),i},number:function(t,e){if(!e)return t;if(t=Ext.num(t,NaN),isNaN(t))return"";var i=",",s=".",n=!1,r=t<0;t=Math.abs(t),"/i"==e.substr(e.length-2)&&(e=e.substr(0,e.length-2),n=!0,i=".",s=",");var o=-1!=e.indexOf(i);if(1<(l=(n?e.replace(/[^\d\,]/g,""):e.replace(/[^\d\.]/g,"")).split(s)).length)t=t.toFixed(l[1].length);else{if(2<l.length)throw"NumberFormatException: invalid format, formats should have no more than 1 period: "+e;t=t.toFixed(0)}var a=t.toString(),l=a.split(".");if(o){for(var h=l[0],d=[],c=h.length,u=(Math.floor(c/3),h.length%3||3),f=0;f<c;f+=u)0!=f&&(u=3),d[d.length]=h.substr(f,u),0;a=d.join(i),l[1]&&(a+=s+l[1])}else l[1]&&(a=l[0]+s+l[1]);return(r?"-":"")+e.replace(/[\d,?\.?]+/,a)},numberRenderer:function(e){return function(t){return Ext.util.Format.number(t,e)}},plural:function(t,e,i){return t+" "+(1==t?e:i||e+"s")},nl2br:function(t){return Ext.isEmpty(t)?"":t.replace(nl2brRe,"<br/>")}}}(),Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);for(var t,e=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,i=/^<tpl\b[^>]*?for="(.*?)"/,s=/^<tpl\b[^>]*?if="(.*?)"/,n=/^<tpl\b[^>]*?exec="(.*?)"/,r=0,o=[],a="values",l="parent",h="return ",d="with(values){ ",c=["<tpl>",c=this.html,"</tpl>"].join("");t=c.match(e);){var u=t[0].match(i),f=t[0].match(s),p=t[0].match(n),g=null,m=null,x=null,E=u&&u[1]?u[1]:"";if(f&&(g=f&&f[1]?f[1]:null)&&(m=new Function(a,l,"xindex","xcount",d+h+Ext.util.Format.htmlDecode(g)+"; }")),p&&(g=p&&p[1]?p[1]:null)&&(x=new Function(a,l,"xindex","xcount",d+Ext.util.Format.htmlDecode(g)+"; }")),E)switch(E){case".":E=new Function(a,l,d+h+a+"; }");break;case"..":E=new Function(a,l,d+h+l+"; }");break;default:E=new Function(a,l,d+h+E+"; }")}o.push({id:r,target:E,exec:x,test:m,body:t[1]||""}),c=c.replace(t[0],"{xtpl"+r+"}"),++r}for(var v=o.length-1;0<=v;--v)this.compileTpl(o[v]);this.master=o[o.length-1],this.tpls=o},Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(t,e,i,s,n){var r,o=this,a=o.tpls[t],l=[];if(a.test&&!a.test.call(o,e,i,s,n)||a.exec&&a.exec.call(o,e,i,s,n))return"";if(d=(r=a.target?a.target.call(o,e,i):e).length,i=a.target?e:i,a.target&&Ext.isArray(r)){for(var h=0,d=r.length;h<d;h++)l[l.length]=a.compiled.call(o,r[h],i,h+1,d);return l.join("")}return a.compiled.call(o,r,i,s,n)},compileTpl:function(tpl){var fm=Ext.util.Format,useF=!0!==this.disableFormats,sep=Ext.isGecko?"+":",",body;function fn(t,e,i,s,n){if("xtpl"==e.substr(0,4))return"'"+sep+"this.applySubTemplate("+e.substr(4)+", values, parent, xindex, xcount)"+sep+"'";var r="."===e?"values":"#"===e?"xindex":-1!=e.indexOf(".")?e:"values['"+e+"']";return n&&(r="("+r+n+")"),i&&useF?(s=s?","+s:"","this."!=i.substr(0,5)?i="fm."+i+"(":(i='this.call("'+i.substr(5)+'", ',s=", values")):(s="",i="("+r+" === undefined ? '' : "),"'"+sep+i+r+s+")"+sep+"'"}function codeFn(t,e){return"'"+sep+"("+e.replace(/\\'/g,"'")+")"+sep+"'"}return body=Ext.isGecko?"tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};":(body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"],body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)),body.push("'].join('');};"),body.join("")),eval(body),this},applyTemplate:function(t){return this.master.compiled.call(this,t,{},1,1)},compile:function(){return this}}),Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate,Ext.XTemplate.from=function(t){return t=Ext.getDom(t),new Ext.XTemplate(t.value||t.innerHTML)},Ext.util.CSS=function(){function r(t,e){return e.charAt(1).toUpperCase()}var n=null,o=document,a=/(-[a-z])/gi;return{createStyleSheet:function(e,t){var i,s=o.getElementsByTagName("head")[0],n=o.createElement("style");if(n.setAttribute("type","text/css"),t&&n.setAttribute("id",t),Ext.isIE)s.appendChild(n),(i=n.styleSheet).cssText=e;else{try{n.appendChild(o.createTextNode(e))}catch(t){n.cssText=e}s.appendChild(n),i=n.styleSheet?n.styleSheet:n.sheet||o.styleSheets[o.styleSheets.length-1]}return this.cacheStyleSheet(i),i},removeStyleSheet:function(t){var e=o.getElementById(t);e&&e.parentNode.removeChild(e)},swapStyleSheet:function(t,e){this.removeStyleSheet(t);var i=o.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("id",t),i.setAttribute("href",e),o.getElementsByTagName("head")[0].appendChild(i)},refreshCache:function(){return this.getRules(!0)},cacheStyleSheet:function(t){n=n||{};try{for(var e=t.cssRules||t.rules,i=e.length-1;0<=i;--i)n[e[i].selectorText.toLowerCase()]=e[i]}catch(t){}},getRules:function(t){if(null===n||t){n={};for(var e=o.styleSheets,i=0,s=e.length;i<s;i++)try{this.cacheStyleSheet(e[i])}catch(t){}}return n},getRule:function(t,e){var i=this.getRules(e);if(!Ext.isArray(t))return i[t.toLowerCase()];for(var s=0;s<t.length;s++)if(i[t[s]])return i[t[s].toLowerCase()];return null},updateRule:function(t,e,i){if(Ext.isArray(t)){for(var s=0;s<t.length;s++)if(this.updateRule(t[s],e,i))return!0}else{var n=this.getRule(t);if(n)return n.style[e.replace(a,r)]=i,!0}return!1}}}(),Ext.util.ClickRepeater=Ext.extend(Ext.util.Observable,{constructor:function(t,e){this.el=Ext.get(t),this.el.unselectable(),Ext.apply(this,e),this.addEvents("mousedown","click","mouseup"),this.disabled||(this.disabled=!0,this.enable()),this.handler&&this.on("click",this.handler,this.scope||this),Ext.util.ClickRepeater.superclass.constructor.call(this)},interval:20,delay:250,preventDefault:!0,stopDefault:!1,timer:0,enable:function(){this.disabled&&(this.el.on("mousedown",this.handleMouseDown,this),Ext.isIE&&this.el.on("dblclick",this.handleDblClick,this),(this.preventDefault||this.stopDefault)&&this.el.on("click",this.eventOptions,this)),this.disabled=!1},disable:function(t){!t&&this.disabled||(clearTimeout(this.timer),this.pressClass&&this.el.removeClass(this.pressClass),Ext.getDoc().un("mouseup",this.handleMouseUp,this),this.el.removeAllListeners()),this.disabled=!0},setDisabled:function(t){this[t?"disable":"enable"]()},eventOptions:function(t){this.preventDefault&&t.preventDefault(),this.stopDefault&&t.stopEvent()},destroy:function(){this.disable(!0),Ext.destroy(this.el),this.purgeListeners()},handleDblClick:function(t){clearTimeout(this.timer),this.el.blur(),this.fireEvent("mousedown",this,t),this.fireEvent("click",this,t)},handleMouseDown:function(t){clearTimeout(this.timer),this.el.blur(),this.pressClass&&this.el.addClass(this.pressClass),this.mousedownTime=new Date,Ext.getDoc().on("mouseup",this.handleMouseUp,this),this.el.on("mouseout",this.handleMouseOut,this),this.fireEvent("mousedown",this,t),this.fireEvent("click",this,t),this.accelerate&&(this.delay=400),this.timer=this.click.defer(this.delay||this.interval,this,[t])},click:function(t){this.fireEvent("click",this,t),this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12e3):this.interval,this,[t])},easeOutExpo:function(t,e,i,s){return t==s?e+i:i*(1-Math.pow(2,-10*t/s))+e},handleMouseOut:function(){clearTimeout(this.timer),this.pressClass&&this.el.removeClass(this.pressClass),this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this),this.pressClass&&this.el.addClass(this.pressClass),this.click()},handleMouseUp:function(t){clearTimeout(this.timer),this.el.un("mouseover",this.handleMouseReturn,this),this.el.un("mouseout",this.handleMouseOut,this),Ext.getDoc().un("mouseup",this.handleMouseUp,this),this.el.removeClass(this.pressClass),this.fireEvent("mouseup",this,t)}}),Ext.KeyNav=function(t,e){this.el=Ext.get(t),Ext.apply(this,e),this.disabled||(this.disabled=!0,this.enable())},Ext.KeyNav.prototype={disabled:!1,defaultEventAction:"stopEvent",forceKeyDown:!1,relay:function(t){var e=t.getKey(),i=this.keyToHandler[e];i&&this[i]&&!0!==this.doRelay(t,this[i],i)&&t[this.defaultEventAction]()},doRelay:function(t,e,i){return e.call(this.scope||this,t,i)},enter:!1,left:!1,right:!1,up:!1,down:!1,tab:!1,esc:!1,pageUp:!1,pageDown:!1,del:!1,home:!1,end:!1,space:!1,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab",32:"space"},stopKeyUp:function(t){var e=t.getKey();37<=e&&e<=40&&t.stopEvent()},destroy:function(){this.disable()},enable:function(){this.disabled&&(Ext.isSafari2&&this.el.on("keyup",this.stopKeyUp,this),this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this),this.disabled=!1)},disable:function(){this.disabled||(Ext.isSafari2&&this.el.un("keyup",this.stopKeyUp,this),this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this),this.disabled=!0)},setDisabled:function(t){this[t?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}},Ext.KeyMap=function(t,e,i){this.el=Ext.get(t),this.eventName=i||"keydown",this.bindings=[],e&&this.addBinding(e),this.enable()},Ext.KeyMap.prototype={stopEvent:!1,addBinding:function(n){if(Ext.isArray(n))Ext.each(n,function(t){this.addBinding(t)},this);else{var r=n.key,o=n.fn||n.handler,a=n.scope;if(n.stopEvent&&(this.stopEvent=n.stopEvent),"string"==typeof r){for(var t=[],e=r.toUpperCase(),i=0,s=e.length;i<s;i++)t.push(e.charCodeAt(i));r=t}var l=Ext.isArray(r);this.bindings.push(function(t){if(this.checkModifiers(n,t)){var e=t.getKey();if(l){for(var i=0,s=r.length;i<s;i++)if(r[i]==e)return this.stopEvent&&t.stopEvent(),void o.call(a||window,e,t)}else e==r&&(this.stopEvent&&t.stopEvent(),o.call(a||window,e,t))}})}},checkModifiers:function(t,e){for(var i,s,n=["shift","ctrl","alt"],r=0,o=n.length;r<o;++r)if(void 0!==(i=t[s=n[r]])&&i!==e[s+"Key"])return!1;return!0},on:function(t,e,i){var s,n,r,o;"object"!=typeof t||Ext.isArray(t)?s=t:(s=t.key,n=t.shift,r=t.ctrl,o=t.alt),this.addBinding({key:s,shift:n,ctrl:r,alt:o,fn:e,scope:i})},handleKeyDown:function(t){if(this.enabled)for(var e=this.bindings,i=0,s=e.length;i<s;i++)e[i].call(this,t)},isEnabled:function(){return this.enabled},enable:function(){this.enabled||(this.el.on(this.eventName,this.handleKeyDown,this),this.enabled=!0)},disable:function(){this.enabled&&(this.el.removeListener(this.eventName,this.handleKeyDown,this),this.enabled=!1)},setDisabled:function(t){this[t?"disable":"enable"]()}},Ext.util.TextMetrics=function(){var s;return{measure:function(t,e,i){return(s=s||Ext.util.TextMetrics.Instance(t,i)).bind(t),s.setFixedWidth(i||"auto"),s.getSize(e)},createInstance:function(t,e){return Ext.util.TextMetrics.Instance(t,e)}}}(),Ext.util.TextMetrics.Instance=function(t,e){var i=new Ext.Element(document.createElement("div"));document.body.appendChild(i.dom),i.position("absolute"),i.setLeftTop(-1e3,-1e3),i.hide(),e&&i.setWidth(e);var s={getSize:function(t){i.update(t);var e=i.getSize();return i.update(""),e},bind:function(t){i.setStyle(Ext.fly(t).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(t){i.setWidth(t)},getWidth:function(t){return i.dom.style.width="auto",this.getSize(t).width},getHeight:function(t){return this.getSize(t).height}};return s.bind(t),s},Ext.Element.addMethods({getTextWidth:function(t,e,i){return Ext.util.TextMetrics.measure(this.dom,Ext.value(t,this.dom.innerHTML,!0)).width.constrain(e||0,i||1e6)}}),Ext.util.Cookies={set:function(t,e){var i=arguments,s=arguments.length,n=2<s?i[2]:null,r=3<s?i[3]:"/",o=4<s?i[4]:null,a=5<s&&i[5];document.cookie=t+"="+escape(e)+(null===n?"":"; expires="+n.toGMTString())+(null===r?"":"; path="+r)+(null===o?"":"; domain="+o)+(!0===a?"; secure":"")},get:function(t){for(var e=t+"=",i=e.length,s=document.cookie.length,n=0,r=0;n<s;){if(r=n+i,document.cookie.substring(n,r)==e)return Ext.util.Cookies.getCookieVal(r);if(0===(n=document.cookie.indexOf(" ",n)+1))break}return null},clear:function(t){Ext.util.Cookies.get(t)&&(document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT")},getCookieVal:function(t){var e=document.cookie.indexOf(";",t);return-1==e&&(e=document.cookie.length),unescape(document.cookie.substring(t,e))}},Ext.handleError=function(t){throw t},Ext.Error=function(t){this.message=this.lang[t]?this.lang[t]:t},Ext.Error.prototype=new Error,Ext.apply(Ext.Error.prototype,{lang:{},name:"Ext.Error",getName:function(){return this.name},getMessage:function(){return this.message},toJson:function(){return Ext.encode(this)}}),Ext.ComponentMgr=function(){var r=new Ext.util.MixedCollection,i={},s={};return{register:function(t){r.add(t)},unregister:function(t){r.remove(t)},get:function(t){return r.get(t)},onAvailable:function(i,s,n){r.on("add",function(t,e){e.id==i&&(s.call(n||e,e),r.un("add",s,n))})},all:r,types:i,ptypes:s,isRegistered:function(t){return void 0!==i[t]},isPluginRegistered:function(t){return void 0!==s[t]},registerType:function(t,e){(i[t]=e).xtype=t},create:function(t,e){return t.render?t:new i[t.xtype||e](t)},registerPlugin:function(t,e){(s[t]=e).ptype=t},createPlugin:function(t,e){var i=s[t.ptype||e];return i.init?i:new i(t)}}}(),Ext.reg=Ext.ComponentMgr.registerType,Ext.preg=Ext.ComponentMgr.registerPlugin,Ext.create=Ext.ComponentMgr.create,Ext.Component=function(t){if((t=t||{}).initialConfig?(t.isAction&&(this.baseAction=t),t=t.initialConfig):(t.tagName||t.dom||Ext.isString(t))&&(t={applyTo:t,id:t.id||t}),this.initialConfig=t,Ext.apply(this,t),this.addEvents("added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave"),this.getId(),Ext.ComponentMgr.register(this),Ext.Component.superclass.constructor.call(this),this.baseAction&&this.baseAction.addComponent(this),this.initComponent(),this.plugins)if(Ext.isArray(this.plugins))for(var e=0,i=this.plugins.length;e<i;e++)this.plugins[e]=this.initPlugin(this.plugins[e]);else this.plugins=this.initPlugin(this.plugins);!1!==this.stateful&&this.initState(),this.applyTo?(this.applyToMarkup(this.applyTo),delete this.applyTo):this.renderTo&&(this.render(this.renderTo),delete this.renderTo)},Ext.Component.AUTO_ID=1e3,Ext.extend(Ext.Component,Ext.util.Observable,{disabled:!1,hidden:!1,autoEl:"div",disabledClass:"x-item-disabled",allowDomMove:!0,autoShow:!1,hideMode:"display",hideParent:!1,rendered:!1,tplWriteMode:"overwrite",bubbleEvents:[],ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initPlugin:function(t){return t.ptype&&!Ext.isFunction(t.init)?t=Ext.ComponentMgr.createPlugin(t):Ext.isString(t)&&(t=Ext.ComponentMgr.createPlugin({ptype:t})),t.init(this),t},initComponent:function(){this.listeners&&(this.on(this.listeners),delete this.listeners),this.enableBubble(this.bubbleEvents)},render:function(t,e){var i,s;return this.rendered||!1===this.fireEvent("beforerender",this)||(!t&&this.el&&(this.el=Ext.get(this.el),t=this.el.dom.parentNode,this.allowDomMove=!1),this.container=Ext.get(t),this.ctCls&&this.container.addClass(this.ctCls),this.rendered=!0,void 0!==e&&(e=Ext.isNumber(e)?this.container.dom.childNodes[e]:Ext.getDom(e)),this.onRender(this.container,e||null),this.autoShow&&this.el.removeClass(["x-hidden","x-hide-"+this.hideMode]),this.cls&&(this.el.addClass(this.cls),delete this.cls),this.style&&(this.el.applyStyles(this.style),delete this.style),this.overCls&&this.el.addClassOnOver(this.overCls),this.fireEvent("render",this),i=this.getContentTarget(),this.html&&(i.update(Ext.DomHelper.markup(this.html)),delete this.html),this.contentEl&&(s=Ext.getDom(this.contentEl),Ext.fly(s).removeClass(["x-hidden","x-hide-display"]),i.appendChild(s)),this.tpl&&(this.tpl.compile||(this.tpl=new Ext.XTemplate(this.tpl)),this.data&&(this.tpl[this.tplWriteMode](i,this.data),delete this.data)),this.afterRender(this.container),this.hidden&&this.doHide(),this.disabled&&this.disable(!0),!1!==this.stateful&&this.initStateEvents(),this.fireEvent("afterrender",this)),this},update:function(t,e,i){var s,n=this.getContentTarget();this.tpl&&"string"!=typeof t?this.tpl[this.tplWriteMode](n,t||{}):(s=Ext.isObject(t)?Ext.DomHelper.markup(t):t,n.update(s,e,i))},onAdded:function(t,e){this.ownerCt=t,this.initRef(),this.fireEvent("added",this,t,e)},onRemoved:function(){this.removeRef(),this.fireEvent("removed",this,this.ownerCt),delete this.ownerCt},initRef:function(){if(this.ref&&!this.refOwner){for(var t=this.ref.split("/"),e=t.length,i=0,s=this;s&&i<e;)s=s.ownerCt,++i;s&&((s[this.refName=t[--i]]=this).refOwner=s)}},removeRef:function(){this.refOwner&&this.refName&&(delete this.refOwner[this.refName],delete this.refOwner)},initState:function(){var t,e;Ext.state.Manager&&(!(t=this.getStateId())||(e=Ext.state.Manager.get(t))&&!1!==this.fireEvent("beforestaterestore",this,e)&&(this.applyState(Ext.apply({},e)),this.fireEvent("staterestore",this,e)))},getStateId:function(){return this.stateId||(/^(ext-comp-|ext-gen)/.test(String(this.id))?null:this.id)},initStateEvents:function(){if(this.stateEvents)for(var t,e=0;t=this.stateEvents[e];e++)this.on(t,this.saveState,this,{delay:100})},applyState:function(t){t&&Ext.apply(this,t)},getState:function(){return null},saveState:function(){var t,e;!Ext.state.Manager||!1===this.stateful||(t=this.getStateId())&&(e=this.getState(),!1!==this.fireEvent("beforestatesave",this,e)&&(Ext.state.Manager.set(t,e),this.fireEvent("statesave",this,e)))},applyToMarkup:function(t){this.allowDomMove=!1,this.el=Ext.get(t),this.render(this.el.dom.parentNode)},addClass:function(t){return this.el?this.el.addClass(t):this.cls=this.cls?this.cls+" "+t:t,this},removeClass:function(t){return this.el?this.el.removeClass(t):this.cls&&(this.cls=this.cls.split(" ").remove(t).join(" ")),this},onRender:function(t,e){var i;!this.el&&this.autoEl&&(Ext.isString(this.autoEl)?this.el=document.createElement(this.autoEl):(i=document.createElement("div"),Ext.DomHelper.overwrite(i,this.autoEl),this.el=i.firstChild),this.el.id||(this.el.id=this.getId())),this.el&&(this.el=Ext.get(this.el),!1!==this.allowDomMove&&(t.dom.insertBefore(this.el.dom,e),i&&(Ext.removeNode(i),i=null)))},getAutoCreate:function(){var t=Ext.isObject(this.autoCreate)?this.autoCreate:Ext.apply({},this.defaultAutoCreate);return this.id&&!t.id&&(t.id=this.id),t},afterRender:Ext.emptyFn,destroy:function(){this.isDestroyed||!1!==this.fireEvent("beforedestroy",this)&&(this.destroying=!0,this.beforeDestroy(),this.ownerCt&&this.ownerCt.remove&&this.ownerCt.remove(this,!1),this.rendered&&(this.el.remove(),"container"!=this.actionMode&&"container"!=this.removeMode||this.container.remove()),this.focusTask&&this.focusTask.cancel&&this.focusTask.cancel(),this.onDestroy(),Ext.ComponentMgr.unregister(this),this.fireEvent("destroy",this),this.purgeListeners(),this.destroying=!1,this.isDestroyed=!0)},deleteMembers:function(){for(var t=arguments,e=0,i=t.length;e<i;++e)delete this[t[e]]},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el},getContentTarget:function(){return this.el},getId:function(){return this.id||(this.id="ext-comp-"+ ++Ext.Component.AUTO_ID)},getItemId:function(){return this.itemId||this.getId()},focus:function(t,e){return e?(this.focusTask=new Ext.util.DelayedTask(this.focus,this,[t,!1]),this.focusTask.delay(Ext.isNumber(e)?e:10)):this.rendered&&!this.isDestroyed&&(this.el.focus(),!0===t&&this.el.dom.select()),this},blur:function(){return this.rendered&&this.el.blur(),this},disable:function(t){return this.rendered&&this.onDisable(),(this.disabled=!0)!==t&&this.fireEvent("disable",this),this},onDisable:function(){this.getActionEl().addClass(this.disabledClass),this.el.dom.disabled=!0},enable:function(){return this.rendered&&this.onEnable(),this.disabled=!1,this.fireEvent("enable",this),this},onEnable:function(){this.getActionEl().removeClass(this.disabledClass),this.el.dom.disabled=!1},setDisabled:function(t){return this[t?"disable":"enable"]()},show:function(){return!1!==this.fireEvent("beforeshow",this)&&(this.hidden=!1,this.autoRender&&this.render(Ext.isBoolean(this.autoRender)?Ext.getBody():this.autoRender),this.rendered&&this.onShow(),this.fireEvent("show",this)),this},onShow:function(){this.getVisibilityEl().removeClass("x-hide-"+this.hideMode)},hide:function(){return!1!==this.fireEvent("beforehide",this)&&(this.doHide(),this.fireEvent("hide",this)),this},doHide:function(){this.hidden=!0,this.rendered&&this.onHide()},onHide:function(){this.getVisibilityEl().addClass("x-hide-"+this.hideMode)},getVisibilityEl:function(){return this.hideParent?this.container:this.getActionEl()},setVisible:function(t){return this[t?"show":"hide"]()},isVisible:function(){return this.rendered&&this.getVisibilityEl().isVisible()},cloneConfig:function(t){var e=(t=t||{}).id||Ext.id(),i=Ext.applyIf(t,this.initialConfig);return i.id=e,new this.constructor(i)},getXType:function(){return this.constructor.xtype},isXType:function(t,e){return Ext.isFunction(t)?t=t.xtype:Ext.isObject(t)&&(t=t.constructor.xtype),e?this.constructor.xtype==t:-1!=("/"+this.getXTypes()+"/").indexOf("/"+t+"/")},getXTypes:function(){var t=this.constructor;if(!t.xtypes){for(var e=[],i=this;i&&i.constructor.xtype;)e.unshift(i.constructor.xtype),i=i.constructor.superclass;t.xtypeChain=e,t.xtypes=e.join("/")}return t.xtypes},findParentBy:function(t){for(var e=this.ownerCt;null!=e&&!t(e,this);e=e.ownerCt);return e||null},findParentByType:function(e,i){return this.findParentBy(function(t){return t.isXType(e,i)})},bubble:function(t,e,i){for(var s=this;s&&!1!==t.apply(e||s,i||[s]);)s=s.ownerCt;return this},getPositionEl:function(){return this.positionEl||this.el},purgeListeners:function(){Ext.Component.superclass.purgeListeners.call(this),this.mons&&this.on("beforedestroy",this.clearMons,this,{single:!0})},clearMons:function(){Ext.each(this.mons,function(t){t.item.un(t.ename,t.fn,t.scope)},this),this.mons=[]},createMons:function(){this.mons||(this.mons=[],this.on("beforedestroy",this.clearMons,this,{single:!0}))},mon:function(t,e,i,s,n){if(this.createMons(),Ext.isObject(e)){var r=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,o=e;for(var a in o)r.test(a)||(Ext.isFunction(o[a])?(this.mons.push({item:t,ename:a,fn:o[a],scope:o.scope}),t.on(a,o[a],o.scope,o)):(this.mons.push({item:t,ename:a,fn:o[a],scope:o.scope}),t.on(a,o[a])))}else this.mons.push({item:t,ename:e,fn:i,scope:s}),t.on(e,i,s,n)},mun:function(t,e,i,s){var n,r;this.createMons();for(var o=0,a=this.mons.length;o<a;++o)if(t===(r=this.mons[o]).item&&e==r.ename&&i===r.fn&&s===r.scope){this.mons.splice(o,1),t.un(e,i,s),n=!0;break}return n},nextSibling:function(){if(this.ownerCt){var t=this.ownerCt.items.indexOf(this);if(-1!=t&&t+1<this.ownerCt.items.getCount())return this.ownerCt.items.itemAt(t+1)}return null},previousSibling:function(){if(this.ownerCt){var t=this.ownerCt.items.indexOf(this);if(0<t)return this.ownerCt.items.itemAt(t-1)}return null},getBubbleTarget:function(){return this.ownerCt}}),Ext.reg("component",Ext.Component),Ext.Action=Ext.extend(Object,{constructor:function(t){this.initialConfig=t,this.itemId=t.itemId=t.itemId||t.id||Ext.id(),this.items=[]},isAction:!0,setText:function(t){this.initialConfig.text=t,this.callEach("setText",[t])},getText:function(){return this.initialConfig.text},setIconClass:function(t){this.initialConfig.iconCls=t,this.callEach("setIconClass",[t])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(t){this.initialConfig.disabled=t,this.callEach("setDisabled",[t])},enable:function(){this.setDisabled(!1)},disable:function(){this.setDisabled(!0)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(t){this.initialConfig.hidden=t,this.callEach("setVisible",[!t])},show:function(){this.setHidden(!1)},hide:function(){this.setHidden(!0)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(t,e){this.initialConfig.handler=t,this.initialConfig.scope=e,this.callEach("setHandler",[t,e])},each:function(t,e){Ext.each(this.items,t,e)},callEach:function(t,e){for(var i=this.items,s=0,n=i.length;s<n;s++)i[s][t].apply(i[s],e)},addComponent:function(t){this.items.push(t),t.on("destroy",this.removeComponent,this)},removeComponent:function(t){this.items.remove(t)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments)}}),function(){Ext.Layer=function(t,e){t=t||{};var i,s=Ext.DomHelper,n=t.parentEl,r=n?Ext.getDom(n):document.body;e&&(this.dom=Ext.getDom(e)),this.dom||(i=t.dh||{tag:"div",cls:"x-layer"},this.dom=s.append(r,i)),t.cls&&this.addClass(t.cls),this.constrain=!1!==t.constrain,this.setVisibilityMode(Ext.Element.VISIBILITY),t.id?this.id=this.dom.id=t.id:this.id=Ext.id(this.dom),this.zindex=t.zindex||this.getZIndex(),this.position("absolute",this.zindex),t.shadow?(this.shadowOffset=t.shadowOffset||4,this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:t.shadow})):this.shadowOffset=0,this.useShim=!1!==t.shim&&Ext.useShims,this.useDisplay=t.useDisplay,this.hide()};var c=Ext.Element.prototype,i=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11e3},getShim:function(){if(!this.useShim)return null;if(this.shim)return this.shim;var t=i.shift();t||((t=this.createShim()).enableDisplayMode("block"),t.dom.style.display="none",t.dom.style.visibility="visible");var e=this.dom.parentNode;return t.dom.parentNode!=e&&e.insertBefore(t.dom,this.dom),t.setStyle("z-index",this.getZIndex()-2),this.shim=t},hideShim:function(){this.shim&&(this.shim.setDisplayed(!1),i.push(this.shim),delete this.shim)},disableShadow:function(){this.shadow&&(this.shadowDisabled=!0,this.shadow.hide(),this.lastShadowOffset=this.shadowOffset,this.shadowOffset=0)},enableShadow:function(t){this.shadow&&(this.shadowDisabled=!1,Ext.isDefined(this.lastShadowOffset)&&(this.shadowOffset=this.lastShadowOffset,delete this.lastShadowOffset),t&&this.sync(!0))},sync:function(t){var e,i,s,n,r,o,a,l,h=this.shadow;!this.updating&&this.isVisible()&&(h||this.useShim)&&(e=this.getShim(),i=this.getWidth(),s=this.getHeight(),n=this.getLeft(!0),r=this.getTop(!0),h&&!this.shadowDisabled?(t&&!h.isVisible()?h.show(this):h.realign(n,r,i,s),e&&(t&&e.show(),o=h.el.getXY(),a=e.dom.style,l=h.el.getSize(),a.left=o[0]+"px",a.top=o[1]+"px",a.width=l.width+"px",a.height=l.height+"px")):e&&(t&&e.show(),e.setSize(i,s),e.setLeftTop(n,r)))},destroy:function(){this.hideShim(),this.shadow&&this.shadow.hide(),this.removeAllListeners(),Ext.removeNode(this.dom),delete this.dom},remove:function(){this.destroy()},beginUpdate:function(){this.updating=!0},endUpdate:function(){this.updating=!1,this.sync(!0)},hideUnders:function(t){this.shadow&&this.shadow.hide(),this.hideShim()},constrainXY:function(){var t,e,i,s,n,r,o,a,l,h,d;return this.constrain&&(t=Ext.lib.Dom.getViewWidth(),e=Ext.lib.Dom.getViewHeight(),i=Ext.getDoc().getScroll(),n=(s=this.getXY())[0],r=s[1],o=this.shadowOffset,a=this.dom.offsetWidth+o,l=this.dom.offsetHeight+o,h=!1,n+a>t+i.left&&(n=t-a-o,h=!0),r+l>e+i.top&&(r=e-l-o,h=!0),n<i.left&&(n=i.left,h=!0),r<i.top&&(r=i.top,h=!0),h&&(!this.avoidY||r<=(d=this.avoidY)&&d<=r+l&&(r=d-l-5),s=[n,r],this.storeXY(s),c.setXY.call(this,s),this.sync())),this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){(this.visible=!0)===this.useDisplay?this.setDisplayed(""):this.lastXY?c.setXY.call(this,this.lastXY):this.lastLT&&c.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])},hideAction:function(){!(this.visible=!1)===this.useDisplay?this.setDisplayed(!1):this.setLeftTop(-1e4,-1e4)},setVisible:function(t,e,i,s,n){var r;return t&&this.showAction(),e&&t?(r=function(){this.sync(!0),s&&s()}.createDelegate(this),c.setVisible.call(this,!0,!0,i,r,n)):(t||this.hideUnders(!0),r=s,e&&(r=function(){this.hideAction(),s&&s()}.createDelegate(this)),c.setVisible.call(this,t,e,i,r,n),t?this.sync(!0):e||this.hideAction()),this},storeXY:function(t){delete this.lastLT,this.lastXY=t},storeLeftTop:function(t,e){delete this.lastXY,this.lastLT=[t,e]},beforeFx:function(){return this.beforeAction(),Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments),this.sync(this.isVisible())},beforeAction:function(){!this.updating&&this.shadow&&this.shadow.hide()},setLeft:function(t){return this.storeLeftTop(t,this.getTop(!0)),c.setLeft.apply(this,arguments),this.sync(),this},setTop:function(t){return this.storeLeftTop(this.getLeft(!0),t),c.setTop.apply(this,arguments),this.sync(),this},setLeftTop:function(t,e){return this.storeLeftTop(t,e),c.setLeftTop.apply(this,arguments),this.sync(),this},setXY:function(t,e,i,s,n){this.fixDisplay(),this.beforeAction(),this.storeXY(t);var r=this.createCB(s);return c.setXY.call(this,t,e,i,r,n),e||r(),this},createCB:function(t){var e=this;return function(){e.constrainXY(),e.sync(!0),t&&t()}},setX:function(t,e,i,s,n){return this.setXY([t,this.getY()],e,i,s,n),this},setY:function(t,e,i,s,n){return this.setXY([this.getX(),t],e,i,s,n),this},setSize:function(t,e,i,s,n,r){this.beforeAction();var o=this.createCB(n);return c.setSize.call(this,t,e,i,s,o,r),i||o(),this},setWidth:function(t,e,i,s,n){this.beforeAction();var r=this.createCB(s);return c.setWidth.call(this,t,e,i,r,n),e||r(),this},setHeight:function(t,e,i,s,n){this.beforeAction();var r=this.createCB(s);return c.setHeight.call(this,t,e,i,r,n),e||r(),this},setBounds:function(t,e,i,s,n,r,o,a){this.beforeAction();var l=this.createCB(o);return n?c.setBounds.call(this,t,e,i,s,n,r,l,a):(this.storeXY([t,e]),c.setXY.call(this,[t,e]),c.setSize.call(this,i,s,n,r,l,a),l()),this},setZIndex:function(t){return this.zindex=t,this.setStyle("z-index",t+2),this.shadow&&this.shadow.setZIndex(t+1),this.shim&&this.shim.setStyle("z-index",t),this}})}(),Ext.Shadow=function(t){Ext.apply(this,t),"string"!=typeof this.mode&&(this.mode=this.defaultMode);var e=this.offset,i={h:0},s=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":i.w=0,i.l=i.t=e,--i.t,Ext.isIE9m&&(i.l-=this.offset+s,i.t-=this.offset+s,i.w-=s,i.h-=s,i.t+=1);break;case"sides":i.w=2*e,i.l=-e,i.t=e-1,Ext.isIE9m&&(i.l-=this.offset-s,i.t-=this.offset+s,i.l+=1,i.w-=2*(this.offset-s),i.w-=s+1,--i.h);break;case"frame":i.w=i.h=2*e,i.l=i.t=-e,i.t+=1,i.h-=2,Ext.isIE9m&&(i.l-=this.offset-s,i.t-=this.offset-s,i.l+=1,i.w-=this.offset+s+1,i.h-=this.offset+s,i.h+=1)}this.adjusts=i},Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(t){t=Ext.get(t),this.el||(this.el=Ext.Shadow.Pool.pull(),this.el.dom.nextSibling!=t.dom&&this.el.insertBefore(t)),this.el.setStyle("z-index",this.zIndex||parseInt(t.getStyle("z-index"),10)-1),Ext.isIE9m&&(this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+this.offset+")"),this.realign(t.getLeft(!0),t.getTop(!0),t.getWidth(),t.getHeight()),this.el.dom.style.display="block"},isVisible:function(){return!!this.el},realign:function(t,e,i,s){var n,r,o,a,l,h,d,c,u;this.el&&(n=this.adjusts,o=(r=this.el.dom).style,h=(a=i+n.w)+"px",d=(l=s+n.h)+"px",o.left=t+n.l+"px",o.top=e+n.t+"px",o.width==h&&o.height==d||(o.width=h,o.height=d,Ext.isIE9m||(c=r.childNodes,u=Math.max(0,a-12)+"px",c[0].childNodes[1].style.width=u,c[1].childNodes[1].style.width=u,c[2].childNodes[1].style.width=u,c[1].style.height=Math.max(0,l-12)+"px")))},hide:function(){this.el&&(this.el.dom.style.display="none",Ext.Shadow.Pool.push(this.el),delete this.el)},setZIndex:function(t){this.zIndex=t,this.el&&this.el.setStyle("z-index",t)}},Ext.Shadow.Pool=function(){var e=[],i=Ext.isIE9m?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';return{pull:function(){var t=e.shift();return t||((t=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,i))).autoBoxAdjust=!1),t},push:function(t){e.push(t)}}}(),Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this),this.addEvents("resize","move")},boxReady:!1,deferHeight:!1,setSize:function(t,e){if("object"==typeof t&&(e=t.height,t=t.width),Ext.isDefined(t)&&Ext.isDefined(this.boxMinWidth)&&t<this.boxMinWidth&&(t=this.boxMinWidth),Ext.isDefined(e)&&Ext.isDefined(this.boxMinHeight)&&e<this.boxMinHeight&&(e=this.boxMinHeight),Ext.isDefined(t)&&Ext.isDefined(this.boxMaxWidth)&&t>this.boxMaxWidth&&(t=this.boxMaxWidth),Ext.isDefined(e)&&Ext.isDefined(this.boxMaxHeight)&&e>this.boxMaxHeight&&(e=this.boxMaxHeight),!this.boxReady)return this.width=t,this.height=e,this;if(!1!==this.cacheSizes&&this.lastSize&&this.lastSize.width==t&&this.lastSize.height==e)return this;this.lastSize={width:t,height:e};var i,s=this.adjustSize(t,e),n=s.width,r=s.height;return void 0===n&&void 0===r||(i=this.getResizeEl(),this.deferHeight||void 0===n||void 0===r?this.deferHeight||void 0===r?void 0!==n&&i.setWidth(n):i.setHeight(r):i.setSize(n,r),this.onResize(n,r,t,e),this.fireEvent("resize",this,n,r,t,e)),this},setWidth:function(t){return this.setSize(t)},setHeight:function(t){return this.setSize(void 0,t)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var t=this.getResizeEl();return{width:t.getWidth()+t.getMargins("lr"),height:t.getHeight()+t.getMargins("tb")}},getPosition:function(t){var e=this.getPositionEl();return!0===t?[e.getLeft(!0),e.getTop(!0)]:this.xy||e.getXY()},getBox:function(t){var e=this.getPosition(t),i=this.getSize();return i.x=e[0],i.y=e[1],i},updateBox:function(t){return this.setSize(t.width,t.height),this.setPagePosition(t.x,t.y),this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(t){return this.rendered&&this.getContentTarget().setOverflow(t?"auto":""),this.autoScroll=t,this},setPosition:function(t,e){if(t&&"number"==typeof t[1]&&(e=t[1],t=t[0]),this.x=t,this.y=e,!this.boxReady)return this;var i=this.adjustPosition(t,e),s=i.x,n=i.y,r=this.getPositionEl();return void 0===s&&void 0===n||(void 0!==s&&void 0!==n?r.setLeftTop(s,n):void 0!==s?r.setLeft(s):void 0!==n&&r.setTop(n),this.onPosition(s,n),this.fireEvent("move",this,s,n)),this},setPagePosition:function(t,e){if(t&&"number"==typeof t[1]&&(e=t[1],t=t[0]),this.pageX=t,this.pageY=e,this.boxReady&&void 0!==t&&void 0!==e){var i=this.getPositionEl().translatePoints(t,e);return this.setPosition(i.left,i.top),this}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this),this.resizeEl&&(this.resizeEl=Ext.get(this.resizeEl)),this.positionEl&&(this.positionEl=Ext.get(this.positionEl)),this.boxReady=!0,Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll),this.setSize(this.width,this.height),this.x||this.y?this.setPosition(this.x,this.y):(this.pageX||this.pageY)&&this.setPagePosition(this.pageX,this.pageY)},syncSize:function(){return delete this.lastSize,this.setSize(this.autoWidth?void 0:this.getResizeEl().getWidth(),this.autoHeight?void 0:this.getResizeEl().getHeight()),this},onResize:function(t,e,i,s){},onPosition:function(t,e){},adjustSize:function(t,e){return this.autoWidth&&(t="auto"),this.autoHeight&&(e="auto"),{width:t,height:e}},adjustPosition:function(t,e){return{x:t,y:e}}}),Ext.reg("box",Ext.BoxComponent),Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"}),Ext.reg("spacer",Ext.Spacer),Ext.SplitBar=function(t,e,i,s,n){this.el=Ext.get(t,!0),this.el.unselectable(),this.resizingEl=Ext.get(e,!0),this.orientation=i||Ext.SplitBar.HORIZONTAL,this.minSize=0,this.maxSize=2e3,this.animate=!1,this.useShim=!1,this.shim=null,this.proxy=n?Ext.get(n).dom:Ext.SplitBar.createProxy(this.orientation),this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id}),this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this),this.dd.endDrag=this.onEndProxyDrag.createDelegate(this),this.dragSpecs={},this.adapter=new Ext.SplitBar.BasicLayoutAdapter,this.adapter.init(this),this.orientation==Ext.SplitBar.HORIZONTAL?(this.placement=s||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT),this.el.addClass("x-splitbar-h")):(this.placement=s||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM),this.el.addClass("x-splitbar-v")),this.addEvents("resize","moved","beforeresize","beforeapply"),Ext.SplitBar.superclass.constructor.call(this)},Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(t,e){this.fireEvent("beforeresize",this),this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},!0),this.overlay.unselectable(),this.overlay.setSize(Ext.lib.Dom.getViewWidth(!0),Ext.lib.Dom.getViewHeight(!0)),this.overlay.show(),Ext.get(this.proxy).setDisplayed("block");var i=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize(),this.activeMaxSize=this.getMaximumSize();var s=i-this.activeMinSize,n=Math.max(this.activeMaxSize-i,0);this.orientation==Ext.SplitBar.HORIZONTAL?(this.dd.resetConstraints(),this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?s:n,this.placement==Ext.SplitBar.LEFT?n:s,this.tickSize),this.dd.setYConstraint(0,0)):(this.dd.resetConstraints(),this.dd.setXConstraint(0,0),this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?s:n,this.placement==Ext.SplitBar.TOP?n:s,this.tickSize)),this.dragSpecs.startSize=i,this.dragSpecs.startPoint=[t,e],Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,t,e)},onEndProxyDrag:function(t){Ext.get(this.proxy).setDisplayed(!1);var e,i=Ext.lib.Event.getXY(t);this.overlay&&(Ext.destroy(this.overlay),delete this.overlay),e=this.orientation==Ext.SplitBar.HORIZONTAL?this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?i[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-i[0]):this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?i[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-i[1]),(e=Math.min(Math.max(e,this.activeMinSize),this.activeMaxSize))!=this.dragSpecs.startSize&&!1!==this.fireEvent("beforeapply",this,e)&&(this.adapter.setElementSize(this,e),this.fireEvent("moved",this,e),this.fireEvent("resize",this,e))},getAdapter:function(){return this.adapter},setAdapter:function(t){this.adapter=t,this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(t){this.minSize=t},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(t){this.maxSize=t},setCurrentSize:function(t){var e=this.animate;this.animate=!1,this.adapter.setElementSize(this,t),this.animate=e},destroy:function(t){Ext.destroy(this.shim,Ext.get(this.proxy)),this.dd.unreg(),t&&this.el.remove(),this.purgeListeners()}}),Ext.SplitBar.createProxy=function(t){var e=new Ext.Element(document.createElement("div"));document.body.appendChild(e.dom),e.unselectable();var i="x-splitbar-proxy";return e.addClass(i+" "+(t==Ext.SplitBar.HORIZONTAL?i+"-h":i+"-v")),e.dom},Ext.SplitBar.BasicLayoutAdapter=function(){},Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(t){},getElementSize:function(t){return t.orientation==Ext.SplitBar.HORIZONTAL?t.resizingEl.getWidth():t.resizingEl.getHeight()},setElementSize:function(t,e,i){t.orientation==Ext.SplitBar.HORIZONTAL?t.animate?t.resizingEl.setWidth(e,!0,.1,i,"easeOut"):(t.resizingEl.setWidth(e),i&&i(t,e)):t.animate?t.resizingEl.setHeight(e,!0,.1,i,"easeOut"):(t.resizingEl.setHeight(e),i&&i(t,e))}},Ext.SplitBar.AbsoluteLayoutAdapter=function(t){this.basic=new Ext.SplitBar.BasicLayoutAdapter,this.container=Ext.get(t)},Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(t){this.basic.init(t)},getElementSize:function(t){return this.basic.getElementSize(t)},setElementSize:function(t,e,i){this.basic.setElementSize(t,e,this.moveSplitter.createDelegate(this,[t]))},moveSplitter:function(t){var e=Ext.SplitBar;switch(t.placement){case e.LEFT:t.el.setX(t.resizingEl.getRight());break;case e.RIGHT:t.el.setStyle("right",this.container.getWidth()-t.resizingEl.getLeft()+"px");break;case e.TOP:t.el.setY(t.resizingEl.getBottom());break;case e.BOTTOM:t.el.setY(t.resizingEl.getTop()-t.el.getHeight())}}},Ext.SplitBar.VERTICAL=1,Ext.SplitBar.HORIZONTAL=2,Ext.SplitBar.LEFT=1,Ext.SplitBar.RIGHT=2,Ext.SplitBar.TOP=3,Ext.SplitBar.BOTTOM=4,Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:!0,forceLayout:!1,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this),this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var t=this.items;t&&(delete this.items,this.add(t))},initItems:function(){this.items||(this.items=new Ext.util.MixedCollection(!1,this.getComponentId),this.getLayout())},setLayout:function(t){this.layout&&this.layout!=t&&this.layout.setContainer(null),this.layout=t,this.initItems(),t.setContainer(this)},afterRender:function(){var t;Ext.Container.superclass.afterRender.call(this),this.layout||(this.layout="auto"),Ext.isObject(this.layout)&&!this.layout.layout&&(this.layoutConfig=this.layout,this.layout=this.layoutConfig.type),Ext.isString(this.layout)&&(this.layout=new(Ext.Container.LAYOUTS[this.layout.toLowerCase()])(this.layoutConfig)),this.setLayout(this.layout),void 0!==this.activeItem&&this.layout.setActiveItem&&(t=this.activeItem,delete this.activeItem,this.layout.setActiveItem(t)),this.ownerCt||this.doLayout(!1,!0),!0===this.monitorResize&&Ext.EventManager.onWindowResize(this.doLayout,this,[!1])},getLayoutTarget:function(){return this.el},getComponentId:function(t){return t.getItemId()},add:function(t){this.initItems();var e=1<arguments.length;if(e||Ext.isArray(t)){var i=[];return Ext.each(e?arguments:t,function(t){i.push(this.add(t))},this),i}var s=this.lookupComponent(this.applyDefaults(t)),n=this.items.length;return!1!==this.fireEvent("beforeadd",this,s,n)&&!1!==this.onBeforeAdd(s)&&(this.items.add(s),s.onAdded(this,n),this.onAdd(s),this.fireEvent("add",this,s,n)),s},onAdd:function(t){},onAdded:function(t,e){this.ownerCt=t,this.initRef(),this.cascade(function(t){t.initRef()}),this.fireEvent("added",this,t,e)},insert:function(t,e){var i,s,n=arguments,r=n.length,o=[];if(this.initItems(),2<r){for(i=r-1;1<=i;--i)o.push(this.insert(t,n[i]));return o}return s=this.lookupComponent(this.applyDefaults(e)),t=Math.min(t,this.items.length),!1!==this.fireEvent("beforeadd",this,s,t)&&!1!==this.onBeforeAdd(s)&&(s.ownerCt==this&&this.items.remove(s),this.items.insert(t,s),s.onAdded(this,t),this.onAdd(s),this.fireEvent("add",this,s,t)),s},applyDefaults:function(t){var e=this.defaults;return e&&(Ext.isFunction(e)&&(e=e.call(this,t)),Ext.isString(t)?(t=Ext.ComponentMgr.get(t),Ext.apply(t,e)):t.events?Ext.apply(t,e):Ext.applyIf(t.isAction?t.initialConfig:t,e)),t},onBeforeAdd:function(t){t.ownerCt&&t.ownerCt.remove(t,!1),!0===this.hideBorders&&(t.border=!0===t.border)},remove:function(t,e){this.initItems();var i=this.getComponent(t);return i&&!1!==this.fireEvent("beforeremove",this,i)&&(this.doRemove(i,e),this.fireEvent("remove",this,i)),i},onRemove:function(t){},doRemove:function(t,e){var i=this.layout,s=i&&this.rendered;s&&i.onRemove(t),this.items.remove(t),t.onRemoved(),this.onRemove(t),(!0===e||!1!==e&&this.autoDestroy)&&t.destroy(),s&&i.afterRemove(t)},removeAll:function(t){this.initItems();var e,i=[],s=[];this.items.each(function(t){i.push(t)});for(var n=0,r=i.length;n<r;++n)e=i[n],this.remove(e,t),e.ownerCt!==this&&s.push(e);return s},getComponent:function(t){return Ext.isObject(t)&&(t=t.getItemId()),this.items.get(t)},lookupComponent:function(t){return Ext.isString(t)?Ext.ComponentMgr.get(t):t.events?t:this.createComponent(t)},createComponent:function(t,e){if(t.render)return t;var i=Ext.create(Ext.apply({ownerCt:this},t),e||this.defaultType);return delete i.initialConfig.ownerCt,delete i.ownerCt,i},canLayout:function(){var t=this.getVisibilityEl();return t&&t.dom&&!t.isStyle("display","none")},doLayout:function(t,e){var i=this.rendered,s=e||this.forceLayout;if(this.collapsed||!this.canLayout()){if(this.deferLayout=this.deferLayout||!t,!s)return;t=t&&!this.deferLayout}else delete this.deferLayout;if(i&&this.layout&&this.layout.layout(),!0!==t&&this.items)for(var n=this.items.items,r=0,o=n.length;r<o;r++){var a=n[r];a.doLayout&&a.doLayout(!1,s)}i&&this.onLayout(t,s),this.hasLayout=!0,delete this.forceLayout},onLayout:Ext.emptyFn,shouldBufferLayout:function(){var t=this.hasLayout;return this.ownerCt?!!t&&!this.hasLayoutPending():t},hasLayoutPending:function(){var e=!1;return this.ownerCt.bubble(function(t){if(t.layoutPending)return!(e=!0)}),e},onShow:function(){Ext.Container.superclass.onShow.call(this),Ext.isDefined(this.deferLayout)&&(delete this.deferLayout,this.doLayout(!0))},getLayout:function(){var t;return this.layout||(t=new Ext.layout.AutoLayout(this.layoutConfig),this.setLayout(t)),this.layout},beforeDestroy:function(){var t;if(this.items)for(;t=this.items.first();)this.doRemove(t,!0);this.monitorResize&&Ext.EventManager.removeResizeListener(this.doLayout,this),Ext.destroy(this.layout),Ext.Container.superclass.beforeDestroy.call(this)},cascade:function(t,e,i){if(!1!==t.apply(e||this,i||[this])&&this.items)for(var s=this.items.items,n=0,r=s.length;n<r;n++)s[n].cascade?s[n].cascade(t,e,i):t.apply(e||s[n],i||[s[n]]);return this},findById:function(e){var i=null,s=this;return this.cascade(function(t){if(s!=t&&t.id===e)return i=t,!1}),i},findByType:function(e,i){return this.findBy(function(t){return t.isXType(e,i)})},find:function(e,i){return this.findBy(function(t){return t[e]===i})},findBy:function(e,i){var s=[],n=this;return this.cascade(function(t){n!=t&&!0===e.call(i||t,t,n)&&s.push(t)}),s},get:function(t){return this.getComponent(t)}}),Ext.Container.LAYOUTS={},Ext.reg("container",Ext.Container),Ext.layout.ContainerLayout=Ext.extend(Object,{monitorResize:!1,activeItem:null,constructor:function(t){this.id=Ext.id(null,"ext-layout-"),Ext.apply(this,t)},type:"container",IEMeasureHack:function(t,e){for(var i,s,n,r=t.dom.childNodes,o=r.length,a=[],l=0;l<o;l++)i=r[l],(s=Ext.get(i))&&(a[l]=s.getStyle("display"),s.setStyle({display:"none"}));for(n=t?t.getViewSize(e):{},l=0;l<o;l++)i=r[l],(s=Ext.get(i))&&s.setStyle({display:a[l]});return n},getLayoutTargetSize:Ext.EmptyFn,layout:function(){var t=this.container,e=t.getLayoutTarget();this.hasLayout||Ext.isEmpty(this.targetCls)||e.addClass(this.targetCls),this.onLayout(t,e),t.fireEvent("afterlayout",t,this)},onLayout:function(t,e){this.renderAll(t,e)},isValidParent:function(t,e){return e&&t.getPositionEl().dom.parentNode==(e.dom||e)},renderAll:function(t,e){for(var i,s=t.items.items,n=s.length,r=0;r<n;r++)!(i=s[r])||i.rendered&&this.isValidParent(i,e)||this.renderItem(i,r,e)},renderItem:function(t,e,i){t&&(t.rendered?this.isValidParent(t,i)||(Ext.isNumber(e)&&(e=i.dom.childNodes[e]),i.dom.insertBefore(t.getPositionEl().dom,e||null),t.container=i,this.configureItem(t)):(t.render(i,e),this.configureItem(t)))},getRenderedItems:function(t){for(var e,i=t.getLayoutTarget(),s=t.items.items,n=s.length,r=[],o=0;o<n;o++)(e=s[o]).rendered&&this.isValidParent(e,i)&&!1!==e.shouldLayout&&r.push(e);return r},configureItem:function(t){this.extraCls&&(t.getPositionEl?t.getPositionEl():t).addClass(this.extraCls),t.doLayout&&this.forceLayout&&t.doLayout(),this.renderHidden&&t!=this.activeItem&&t.hide()},onRemove:function(t){this.activeItem==t&&delete this.activeItem,t.rendered&&this.extraCls&&(t.getPositionEl?t.getPositionEl():t).removeClass(this.extraCls)},afterRemove:function(t){t.removeRestore&&(t.removeMode="container",delete t.removeRestore)},onResize:function(){var t,e=this.container;e.collapsed||((t=e.bufferResize&&e.shouldBufferLayout())?(this.resizeTask||(this.resizeTask=new Ext.util.DelayedTask(this.runLayout,this),this.resizeBuffer=Ext.isNumber(t)?t:50),e.layoutPending=!0,this.resizeTask.delay(this.resizeBuffer)):this.runLayout())},runLayout:function(){var t=this.container;this.layout(),t.onLayout(),delete t.layoutPending},setContainer:function(t){var e;this.monitorResize&&t!=this.container&&((e=this.container)&&e.un(e.resizeEvent,this.onResize,this),t&&t.on(t.resizeEvent,this.onResize,this)),this.container=t},parseMargins:function(t){Ext.isNumber(t)&&(t=t.toString());var e=t.split(" "),i=e.length;return 1==i?e[1]=e[2]=e[3]=e[0]:2==i?(e[2]=e[0],e[3]=e[1]):3==i&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0}},fieldTpl:function(){var t=new Ext.Template('<div class="x-form-item {itemCls}" tabIndex="-1">','<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>','<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">','</div><div class="{clearCls}"></div>',"</div>");return t.disableFormats=!0,t.compile()}(),destroy:function(){var t;this.resizeTask&&this.resizeTask.cancel&&this.resizeTask.cancel(),this.container&&this.container.un(this.container.resizeEvent,this.onResize,this),Ext.isEmpty(this.targetCls)||(t=this.container.getLayoutTarget())&&t.removeClass(this.targetCls)}}),Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:!0,onLayout:function(t,e){Ext.layout.AutoLayout.superclass.onLayout.call(this,t,e);for(var i,s=this.getRenderedItems(t),n=s.length,r=0;r<n;r++)(i=s[r]).doLayout&&i.doLayout(!0)}}),Ext.Container.LAYOUTS.auto=Ext.layout.AutoLayout,Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,type:"fit",getLayoutTargetSize:function(){var t=this.container.getLayoutTarget();return t?t.getStyleSize():{}},onLayout:function(t,e){Ext.layout.FitLayout.superclass.onLayout.call(this,t,e),t.collapsed||this.setItemSize(this.activeItem||t.items.itemAt(0),this.getLayoutTargetSize())},setItemSize:function(t,e){t&&0<e.height&&t.setSize(e)}}),Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout,Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:!1,layoutOnCardChange:!1,renderHidden:!0,type:"card",setActiveItem:function(t){var e=this.activeItem;if((t=this.container.getComponent(t))&&e!=t){if(e){if(e.hide(),!0!==e.hidden)return!1;e.fireEvent("deactivate",e)}var i=t.doLayout&&(this.layoutOnCardChange||!t.rendered);delete(this.activeItem=t).deferLayout,t.show(),this.layout(),i&&t.doLayout(),t.fireEvent("activate",t)}},renderAll:function(t,e){this.deferredRender?this.renderItem(this.activeItem,void 0,e):Ext.layout.CardLayout.superclass.renderAll.call(this,t,e)}}),Ext.Container.LAYOUTS.card=Ext.layout.CardLayout,Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var t=this.container.getLayoutTarget(),e={};return t&&(e=t.getViewSize(),Ext.isIE9m&&Ext.isStrict&&0==e.width&&(e=t.getStyleSize()),e.width-=t.getPadding("lr"),e.height-=t.getPadding("tb")),e},onLayout:function(t,e){Ext.layout.AnchorLayout.superclass.onLayout.call(this,t,e);var i,s,n,r,o,a,l,h,d,c,u,f=this.getLayoutTargetSize(),p=f.width,g=f.height,m=e.getStyle("overflow"),x=this.getRenderedItems(t),E=x.length,v=[];if(!(p<20&&g<20)){for(t.anchorSize?"number"==typeof t.anchorSize?s=t.anchorSize:(s=t.anchorSize.width,n=t.anchorSize.height):(s=t.initialConfig.width,n=t.initialConfig.height),d=0;d<E;d++)c=(r=x[d]).getPositionEl(),r.anchor||!r.items||Ext.isNumber(r.width)||Ext.isIE6&&Ext.isStrict||(r.anchor=this.defaultAnchor),r.anchor&&((o=r.anchorSpec)||(h=r.anchor.split(" "),r.anchorSpec=o={right:this.parseAnchor(h[0],r.initialConfig.width,s),bottom:this.parseAnchor(h[1],r.initialConfig.height,n)}),a=o.right?this.adjustWidthAnchor(o.right(p)-c.getMargins("lr"),r):void 0,l=o.bottom?this.adjustHeightAnchor(o.bottom(g)-c.getMargins("tb"),r):void 0,(a||l)&&v.push({component:r,width:a||void 0,height:l||void 0}));for(d=0,E=v.length;d<E;d++)(i=v[d]).component.setSize(i.width,i.height);m&&"hidden"!=m&&!this.adjustmentPass&&((u=this.getLayoutTargetSize()).width==f.width&&u.height==f.height||(this.adjustmentPass=!0,this.onLayout(t,e))),delete this.adjustmentPass}},parseAnchor:function(e,t,i){if(e&&"none"!=e){var s;if(this.parseAnchorRE.test(e)){var n=i-t;return function(t){if(t!==s)return(s=t)-n}}if(-1!=e.indexOf("%")){var r=.01*parseFloat(e.replace("%",""));return function(t){if(t!==s)return s=t,Math.floor(t*r)}}if(e=parseInt(e,10),!isNaN(e))return function(t){if(t!==s)return(s=t)+e}}return!1},adjustWidthAnchor:function(t,e){return t},adjustHeightAnchor:function(t,e){return t}}),Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout,Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,type:"column",extraCls:"x-column",scrollOffset:0,targetCls:"x-column-layout-ct",isValidParent:function(t,e){return this.innerCt&&t.getPositionEl().dom.parentNode==this.innerCt.dom},getLayoutTargetSize:function(){var t,e=this.container.getLayoutTarget();return e&&(t=e.getViewSize(),Ext.isIE9m&&Ext.isStrict&&0==t.width&&(t=e.getStyleSize()),t.width-=e.getPadding("lr"),t.height-=e.getPadding("tb")),t},renderAll:function(t,e){this.innerCt||(this.innerCt=e.createChild({cls:"x-column-inner"}),this.innerCt.createChild({cls:"x-clear"})),Ext.layout.ColumnLayout.superclass.renderAll.call(this,t,this.innerCt)},onLayout:function(t,e){var i,s,n,r=t.items.items,o=r.length,a=[];this.renderAll(t,e);var l=this.getLayoutTargetSize();if(!(Ext.isIE9m&&l.width<1&&l.height<1)){var h=l.width-this.scrollOffset,d=(l.height,h);for(this.innerCt.setWidth(h),s=0;s<o;s++)n=(i=r[s]).getPositionEl().getMargins("lr"),a[s]=n,i.columnWidth||(d-=i.getWidth()+n);for(d=d<0?0:d,s=0;s<o;s++)i=r[s],n=a[s],i.columnWidth&&i.setSize(Math.floor(i.columnWidth*d)-n);Ext.isIE9m&&(s=e.getStyle("overflow")&&"hidden"!=s&&!this.adjustmentPass)&&this.getLayoutTargetSize().width!=l.width&&(this.adjustmentPass=!0,this.onLayout(t,e)),delete this.adjustmentPass}}}),Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout,Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,rendered:!1,type:"border",targetCls:"x-border-layout-ct",getLayoutTargetSize:function(){var t=this.container.getLayoutTarget();return t?t.getViewSize():{}},onLayout:function(t,e){var i,s,n,r=t.items.items,o=r.length;if(!this.rendered){for(i=[],s=0;s<o;s++)n=(l=r[s]).region,l.collapsed&&i.push(l),l.collapsed=!1,l.rendered||(l.render(e,s),l.getPositionEl().addClass("x-border-panel")),this[n]="center"!=n&&l.split?new Ext.layout.BorderLayout.SplitRegion(this,l.initialConfig,n):new Ext.layout.BorderLayout.Region(this,l.initialConfig,n),this[n].render(e,l);this.rendered=!0}var a=this.getLayoutTargetSize();if(a.width<20||a.height<20)i&&(this.restoreCollapsed=i);else{this.restoreCollapsed&&(i=this.restoreCollapsed,delete this.restoreCollapsed);var l,h,d,c,u,f,p,g=a.width,m=a.height,x=g,E=m,v=0,y=0,b=this.north,C=this.south,w=this.west,T=this.east;if(!(l=this.center)&&!1!==Ext.layout.BorderLayout.WARN)throw"No center region defined in BorderLayout "+t.id;if(b&&b.isVisible()&&(h=b.getSize(),d=b.getMargins(),h.width=g-(d.left+d.right),h.x=d.left,h.y=d.top,E-=v=h.height+h.y+d.bottom,b.applyLayout(h)),C&&C.isVisible()&&(h=C.getSize(),d=C.getMargins(),h.width=g-(d.left+d.right),h.x=d.left,u=h.height+d.top+d.bottom,h.y=m-u+d.top,E-=u,C.applyLayout(h)),w&&w.isVisible()&&(h=w.getSize(),d=w.getMargins(),h.height=E-(d.top+d.bottom),h.x=d.left,h.y=v+d.top,y+=c=h.width+d.left+d.right,x-=c,w.applyLayout(h)),T&&T.isVisible()&&(h=T.getSize(),d=T.getMargins(),h.height=E-(d.top+d.bottom),c=h.width+d.left+d.right,h.x=g-c+d.left,h.y=v+d.top,x-=c,T.applyLayout(h)),l&&(f={x:y+(d=l.getMargins()).left,y:v+d.top,width:x-(d.left+d.right),height:E-(d.top+d.bottom)},l.applyLayout(f)),i)for(s=0,o=i.length;s<o;s++)i[s].collapse(!1);Ext.isIE9m&&Ext.isStrict&&e.repaint(),(s=e.getStyle("overflow")&&"hidden"!=s&&!this.adjustmentPass)&&((p=this.getLayoutTargetSize()).width==a.width&&p.height==a.height||(this.adjustmentPass=!0,this.onLayout(t,e))),delete this.adjustmentPass}},destroy:function(){for(var t,e=["north","south","east","west"],i=0;i<e.length;i++)(t=this[e[i]])&&(t.destroy?t.destroy():t.split&&t.split.destroy(!0));Ext.layout.BorderLayout.superclass.destroy.call(this)}}),Ext.layout.BorderLayout.Region=function(t,e,i){Ext.apply(this,e),this.layout=t,this.position=i,this.state={},"string"==typeof this.margins&&(this.margins=this.layout.parseMargins(this.margins)),this.margins=Ext.applyIf(this.margins||{},this.defaultMargins),this.collapsible&&("string"==typeof this.cmargins&&(this.cmargins=this.layout.parseMargins(this.cmargins)),"mini"!=this.collapseMode||this.cmargins?this.cmargins=Ext.applyIf(this.cmargins||{},"north"==i||"south"==i?this.defaultNSCMargins:this.defaultEWCMargins):this.cmargins={left:0,top:0,right:0,bottom:0})},Ext.layout.BorderLayout.Region.prototype={collapsible:!1,split:!1,floatable:!0,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},floatingZIndex:100,isCollapsed:!1,render:function(t,e){(this.panel=e).el.enableDisplayMode(),this.targetEl=t,this.el=e.el;var i=e.getState,s=this.position;e.getState=function(){return Ext.apply(i.call(e)||{},this.state)}.createDelegate(this),"center"!=s&&(e.allowQueuedExpand=!1,e.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this}),(this.collapsible||this.floatable)&&(e.collapseEl="el",e.slideAnchor=this.getSlideAnchor()),e.tools&&e.tools.toggle&&(e.tools.toggle.addClass("x-tool-collapse-"+s),e.tools.toggle.addClassOnOver("x-tool-collapse-"+s+"-over")))},getCollapsedEl:function(){var t,e;return this.collapsedEl||(this.toolTemplate||((t=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>')).disableFormats=!0,t.compile(),Ext.layout.BorderLayout.Region.prototype.toolTemplate=t),this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"}),this.collapsedEl.enableDisplayMode("block"),"mini"==this.collapseMode?(this.collapsedEl.addClass("x-layout-cmini-"+this.position),this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"}),this.miniCollapsedEl.addClassOnOver("x-layout-mini-over"),this.collapsedEl.addClassOnOver("x-layout-collapsed-over"),this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:!0})):(!1===this.collapsible||this.hideCollapseTool||((e=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},!0)).addClassOnOver("x-tool-expand-"+this.position+"-over"),e.on("click",this.onExpandClick,this,{stopEvent:!0})),!1===this.floatable&&!this.titleCollapse||(this.collapsedEl.addClassOnOver("x-layout-collapsed-over"),this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)))),this.collapsedEl},onExpandClick:function(t){this.isSlid?this.panel.expand(!1):this.panel.expand()},onCollapseClick:function(t){this.panel.collapse()},beforeCollapse:function(t,e){this.lastAnim=e,this.splitEl&&this.splitEl.hide(),this.getCollapsedEl().show();var i=this.panel.getEl();this.originalZIndex=i.getStyle("z-index"),i.setStyle("z-index",100),this.isCollapsed=!0,this.layout.layout()},onCollapse:function(t){this.panel.el.setStyle("z-index",1),!1===this.lastAnim||!1===this.panel.animCollapse?this.getCollapsedEl().dom.style.visibility="visible":this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:.2}),this.state.collapsed=!0,this.panel.saveState()},beforeExpand:function(t){this.isSlid&&this.afterSlideIn();var e=this.getCollapsedEl();this.el.show(),"east"==this.position||"west"==this.position?this.panel.setSize(void 0,e.getHeight()):this.panel.setSize(e.getWidth(),void 0),e.hide(),e.dom.style.visibility="hidden",this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=!1,this.splitEl&&this.splitEl.show(),this.layout.layout(),this.panel.el.setStyle("z-index",this.originalZIndex),this.state.collapsed=!1,this.panel.saveState()},collapseClick:function(t){this.isSlid?(t.stopPropagation(),this.slideIn()):(t.stopPropagation(),this.slideOut())},onHide:function(){this.isCollapsed?this.getCollapsedEl().hide():this.splitEl&&this.splitEl.hide()},onShow:function(){this.isCollapsed?this.getCollapsedEl().show():this.splitEl&&this.splitEl.show()},isVisible:function(){return!this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(t){this.panel=t},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(t){var e=this.getCollapsedEl();e.setLeftTop(t.x,t.y),e.setSize(t.width,t.height)},applyLayout:function(t){this.isCollapsed?this.applyLayoutCollapsed(t):(this.panel.setPosition(t.x,t.y),this.panel.setSize(t.width,t.height))},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){!1!==this.autoHide&&(this.autoHideHd||(this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this),this.autoHideHd={mouseout:function(t){t.within(this.el,!0)||this.autoHideSlideTask.delay(500)},mouseover:function(t){this.autoHideSlideTask.cancel()},scope:this}),this.el.on(this.autoHideHd),this.collapsedEl.on(this.autoHideHd))},clearAutoHide:function(){!1!==this.autoHide&&(this.el.un("mouseout",this.autoHideHd.mouseout),this.el.un("mouseover",this.autoHideHd.mouseover),this.collapsedEl.un("mouseout",this.autoHideHd.mouseout),this.collapsedEl.un("mouseover",this.autoHideHd.mouseover))},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){var t,e,i;this.isSlid||this.el.hasActiveFx()||(this.isSlid=!0,(t=this.panel.tools)&&t.toggle&&t.toggle.hide(),this.el.show(),i=this.panel.collapsed,this.panel.collapsed=!1,"east"==this.position||"west"==this.position?(e=this.panel.deferHeight,this.panel.deferHeight=!1,this.panel.setSize(void 0,this.collapsedEl.getHeight()),this.panel.deferHeight=e):this.panel.setSize(this.collapsedEl.getWidth(),void 0),this.panel.collapsed=i,this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top],this.el.alignTo(this.collapsedEl,this.getCollapseAnchor()),this.el.setStyle("z-index",this.floatingZIndex+2),this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating"),!1!==this.animFloat?(this.beforeSlide(),this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide(),this.initAutoHide(),Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:!0})):(this.initAutoHide(),Ext.getDoc().on("click",this.slideInIf,this)))},afterSlideIn:function(){this.clearAutoHide(),this.isSlid=!1,this.clearMonitor(),this.el.setStyle("z-index",""),this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed"),this.el.dom.style.left=this.restoreLT[0],this.el.dom.style.top=this.restoreLT[1];var t=this.panel.tools;t&&t.toggle&&t.toggle.show()},slideIn:function(t){this.isSlid&&!this.el.hasActiveFx()?(this.isSlid=!1)!==this.animFloat?(this.beforeSlide(),this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide(),this.afterSlide(),this.afterSlideIn(),Ext.callback(t)},scope:this,block:!0})):(this.el.hide(),this.afterSlideIn()):Ext.callback(t)},slideInIf:function(t){t.within(this.el)||this.slideIn()},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){this.cmargins;switch(this.position){case"west":case"east":case"north":case"south":return[0,0]}},getExpandAdj:function(){var t=this.collapsedEl,e=this.cmargins;switch(this.position){case"west":return[-(e.right+t.getWidth()+e.left),0];case"east":return[e.right+t.getWidth()+e.left,0];case"north":return[0,-(e.top+e.bottom+t.getHeight())];case"south":return[0,e.top+e.bottom+t.getHeight()]}},destroy:function(){this.autoHideSlideTask&&this.autoHideSlideTask.cancel&&this.autoHideSlideTask.cancel(),Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}},Ext.layout.BorderLayout.SplitRegion=function(t,e,i){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,t,e,i),this.applyLayout=this.applyFns[i]},Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:!1,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(t){if(this.isCollapsed)return this.applyLayoutCollapsed(t);var e=this.splitEl.dom,i=e.style;this.panel.setPosition(t.x,t.y);var s=e.offsetWidth;i.left=t.x+t.width-s+"px",i.top=t.y+"px",i.height=Math.max(0,t.height)+"px",this.panel.setSize(t.width-s,t.height)},east:function(t){if(this.isCollapsed)return this.applyLayoutCollapsed(t);var e=this.splitEl.dom,i=e.style,s=e.offsetWidth;this.panel.setPosition(t.x+s,t.y),i.left=t.x+"px",i.top=t.y+"px",i.height=Math.max(0,t.height)+"px",this.panel.setSize(t.width-s,t.height)},north:function(t){if(this.isCollapsed)return this.applyLayoutCollapsed(t);var e=this.splitEl.dom,i=e.style,s=e.offsetHeight;this.panel.setPosition(t.x,t.y),i.left=t.x+"px",i.top=t.y+t.height-s+"px",i.width=Math.max(0,t.width)+"px",this.panel.setSize(t.width,t.height-s)},south:function(t){if(this.isCollapsed)return this.applyLayoutCollapsed(t);var e=this.splitEl.dom,i=e.style,s=e.offsetHeight;this.panel.setPosition(t.x,t.y+s),i.left=t.x+"px",i.top=t.y+"px",i.width=Math.max(0,t.width)+"px",this.panel.setSize(t.width,t.height-s)}},render:function(t,e){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,t,e);var i=this.position;this.splitEl=t.createChild({cls:"x-layout-split x-layout-split-"+i,html:"&#160;",id:this.panel.id+"-xsplit"}),"mini"==this.collapseMode&&(this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+i,html:"&#160;"}),this.miniSplitEl.addClassOnOver("x-layout-mini-over"),this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:!0}));var s=this.splitSettings[i];this.split=new Ext.SplitBar(this.splitEl.dom,e.el,s.orientation),this.split.tickSize=this.tickSize,this.split.placement=s.placement,this.split.getMaximumSize=this[s.maxFn].createDelegate(this),this.split.minSize=this.minSize||this[s.minProp],this.split.on("beforeapply",this.onSplitMove,this),this.split.useShim=!0===this.useShim,this.maxSize=this.maxSize||this[s.maxProp],e.hidden&&this.splitEl.hide(),this.useSplitTips&&(this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip),this.collapsible&&this.splitEl.on("dblclick",this.onCollapseClick,this)},getSize:function(){if(this.isCollapsed)return this.collapsedEl.getSize();var t=this.panel.getSize();return"north"==this.position||"south"==this.position?t.height+=this.splitEl.dom.offsetHeight:t.width+=this.splitEl.dom.offsetWidth,t},getHMaxSize:function(){var t=this.maxSize||1e4,e=this.layout.center;return Math.min(t,this.el.getWidth()+e.el.getWidth()-e.getMinWidth())},getVMaxSize:function(){var t=this.maxSize||1e4,e=this.layout.center;return Math.min(t,this.el.getHeight()+e.el.getHeight()-e.getMinHeight())},onSplitMove:function(t,e){var i=this.panel.getSize();return this.lastSplitSize=e,"north"==this.position||"south"==this.position?(this.panel.setSize(i.width,e),this.state.height=e):(this.panel.setSize(e,i.height),this.state.width=e),this.layout.layout(),this.panel.saveState(),!1},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl),Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}}),Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout,Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:!0,type:"form",onRemove:function(t){Ext.layout.FormLayout.superclass.onRemove.call(this,t),this.trackLabels&&(t.un("show",this.onFieldShow,this),t.un("hide",this.onFieldHide,this));var e=t.getPositionEl(),i=t.getItemCt&&t.getItemCt();t.rendered&&i&&(e&&e.dom&&e.insertAfter(i),Ext.destroy(i),Ext.destroyMembers(t,"label","itemCt"),t.customItemCt&&Ext.destroyMembers(t,"getItemCt","customItemCt"))},setContainer:function(t){var e;Ext.layout.FormLayout.superclass.setContainer.call(this,t),t.labelAlign=t.labelAlign||this.labelAlign,t.labelAlign&&t.addClass("x-form-label-"+t.labelAlign),t.hideLabels||this.hideLabels?Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0}):(this.labelSeparator=Ext.isDefined(t.labelSeparator)?t.labelSeparator:this.labelSeparator,t.labelWidth=t.labelWidth||this.labelWidth||100,Ext.isNumber(t.labelWidth)&&(e=t.labelPad||this.labelPad,e=Ext.isNumber(e)?e:5,Ext.apply(this,{labelAdjust:t.labelWidth+e,labelStyle:"width:"+t.labelWidth+"px;",elementStyle:"padding-left:"+(t.labelWidth+e)+"px"})),"top"==t.labelAlign&&Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"}))},isHide:function(t){return t.hideLabel||this.container.hideLabels},onFieldShow:function(t){t.getItemCt().removeClass("x-hide-"+t.hideMode),t.isComposite&&t.doLayout()},onFieldHide:function(t){t.getItemCt().addClass("x-hide-"+t.hideMode)},getLabelStyle:function(t){for(var e="",i=[this.labelStyle,t],s=0,n=i.length;s<n;++s)i[s]&&";"!=(e+=i[s]).substr(-1,1)&&(e+=";");return e},renderItem:function(t,e,i){var s;t&&(t.isFormField||t.fieldLabel)&&"hidden"!=t.inputType?(s=this.getTemplateArgs(t),Ext.isNumber(e)&&(e=i.dom.childNodes[e]||null),t.itemCt=e?this.fieldTpl.insertBefore(e,s,!0):this.fieldTpl.append(i,s,!0),t.getItemCt||Ext.apply(t,{getItemCt:function(){return t.itemCt},customItemCt:!0}),t.label=t.getItemCt().child("label.x-form-item-label"),t.rendered?this.isValidParent(t,i)||Ext.fly("x-form-el-"+t.id).appendChild(t.getPositionEl()):t.render("x-form-el-"+t.id),this.trackLabels&&(t.hidden&&this.onFieldHide(t),t.on({scope:this,show:this.onFieldShow,hide:this.onFieldHide})),this.configureItem(t)):Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)},getTemplateArgs:function(t){var e=!t.fieldLabel||t.hideLabel,i=(t.itemCls||this.container.itemCls||"")+(t.hideLabel?" x-hide-label":"");return Ext.isIE9&&Ext.isIEQuirks&&t instanceof Ext.form.TextField&&(i+=" x-input-wrapper"),{id:t.id,label:t.fieldLabel,itemCls:i,clearCls:t.clearCls||"x-form-clear-left",labelStyle:this.getLabelStyle(t.labelStyle),elementStyle:this.elementStyle||"",labelSeparator:e?"":Ext.isDefined(t.labelSeparator)?t.labelSeparator:this.labelSeparator}},adjustWidthAnchor:function(t,e){if(!e.label||this.isHide(e)||"top"==this.container.labelAlign)return t;var i=Ext.isIE6||Ext.isIEQuirks;return t-this.labelAdjust+(i?-3:0)},adjustHeightAnchor:function(t,e){return e.label&&!this.isHide(e)&&"top"==this.container.labelAlign?t-e.label.getHeight():t},isValidParent:function(t,e){return e&&this.container.getEl().contains(t.getPositionEl())}}),Ext.Container.LAYOUTS.form=Ext.layout.FormLayout,Ext.layout.AccordionLayout=Ext.extend(Ext.layout.FitLayout,{fill:!0,autoWidth:!0,titleCollapse:!0,hideCollapseTool:!1,collapseFirst:!1,animate:!1,sequence:!1,activeOnTop:!1,type:"accordion",renderItem:function(t){!1===this.animate&&(t.animCollapse=!1),t.collapsible=!0,this.autoWidth&&(t.autoWidth=!0),this.titleCollapse&&(t.titleCollapse=!0),this.hideCollapseTool&&(t.hideCollapseTool=!0),void 0!==this.collapseFirst&&(t.collapseFirst=this.collapseFirst),this.activeItem||t.collapsed?this.activeItem&&this.activeItem!=t&&(t.collapsed=!0):this.setActiveItem(t,!0),Ext.layout.AccordionLayout.superclass.renderItem.apply(this,arguments),t.header.addClass("x-accordion-hd"),t.on("beforeexpand",this.beforeExpand,this)},onRemove:function(t){Ext.layout.AccordionLayout.superclass.onRemove.call(this,t),t.rendered&&t.header.removeClass("x-accordion-hd"),t.un("beforeexpand",this.beforeExpand,this)},beforeExpand:function(t,e){var i=this.activeItem;if(i)if(this.sequence){if(delete this.activeItem,!i.collapsed)return i.collapse({callback:function(){t.expand(e||!0)},scope:this}),!1}else i.collapse(this.animate);this.setActive(t),this.activeOnTop&&t.el.dom.parentNode.insertBefore(t.el.dom,t.el.dom.parentNode.firstChild),this.layout()},setItemSize:function(t,e){if(this.fill&&t){for(var i,s=0,n=this.getRenderedItems(this.container),r=n.length,o=0;o<r;o++)(i=n[o])==t||i.hidden||(s+=i.header.getHeight());e.height-=s,t.setSize(e)}},setActiveItem:function(t){this.setActive(t,!0)},setActive:function(t,e){var i=this.activeItem;i!=(t=this.container.getComponent(t))&&(t.rendered&&t.collapsed&&e?t.expand():(i&&i.fireEvent("deactivate",i),(this.activeItem=t).fireEvent("activate",t)))}}),Ext.Container.LAYOUTS.accordion=Ext.layout.AccordionLayout,Ext.layout.Accordion=Ext.layout.AccordionLayout,Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!1,type:"table",targetCls:"x-table-layout-ct",tableAttrs:null,setContainer:function(t){Ext.layout.TableLayout.superclass.setContainer.call(this,t),this.currentRow=0,this.currentColumn=0,this.cells=[]},onLayout:function(t,e){t.items.items.length;this.table||(e.addClass("x-table-layout-ct"),this.table=e.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,!0)),this.renderAll(t,e)},getRow:function(t){var e=this.table.tBodies[0].childNodes[t];return e||(e=document.createElement("tr"),this.table.tBodies[0].appendChild(e)),e},getNextCell:function(t){for(var e=this.getNextNonSpan(this.currentColumn,this.currentRow),i=this.currentColumn=e[0],s=this.currentRow=e[1],n=s;n<s+(t.rowspan||1);n++){this.cells[n]||(this.cells[n]=[]);for(var r=i;r<i+(t.colspan||1);r++)this.cells[n][r]=!0}var o=document.createElement("td");t.cellId&&(o.id=t.cellId);var a="x-table-layout-cell";return t.cellCls&&(a+=" "+t.cellCls),o.className=a,t.colspan&&(o.colSpan=t.colspan),t.rowspan&&(o.rowSpan=t.rowspan),this.getRow(s).appendChild(o),o},getNextNonSpan:function(t,e){for(var i=this.columns;i&&i<=t||this.cells[e]&&this.cells[e][t];)i&&i<=t?(e++,t=0):t++;return[t,e]},renderItem:function(t,e,i){var s;this.table||(this.table=i.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,!0)),t&&!t.rendered?(t.render(this.getNextCell(t)),this.configureItem(t)):t&&!this.isValidParent(t,i)&&((s=this.getNextCell(t)).insertBefore(t.getPositionEl().dom,null),t.container=Ext.get(s),this.configureItem(t))},isValidParent:function(t,e){return t.getPositionEl().up("table",5).dom.parentNode===(e.dom||e)},destroy:function(){delete this.table,Ext.layout.TableLayout.superclass.destroy.call(this)}}),Ext.Container.LAYOUTS.table=Ext.layout.TableLayout,Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(t,e){e.position(),this.paddingLeft=e.getPadding("l"),this.paddingTop=e.getPadding("t"),Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,t,e)},adjustWidthAnchor:function(t,e){return t?t-e.getPosition(!0)[0]+this.paddingLeft:t},adjustHeightAnchor:function(t,e){return t?t-e.getPosition(!0)[1]+this.paddingTop:t}}),Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout,Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:!0,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(t){Ext.layout.BoxLayout.superclass.constructor.call(this,t),Ext.isString(this.defaultMargins)&&(this.defaultMargins=this.parseMargins(this.defaultMargins));var e=this.overflowHandler;"string"==typeof e&&(e={type:e});var i="none";e&&null!=e.type&&(i=e.type);var s=Ext.layout.boxOverflow[i];s[this.type]&&(s=s[this.type]),this.overflowHandler=new s(this,e)},onLayout:function(t,e){Ext.layout.BoxLayout.superclass.onLayout.call(this,t,e);var i,s=this.getLayoutTargetSize(),n=this.getVisibleItems(t),r=this.calculateChildBoxes(n,s),o=r.boxes,a=r.meta;0<s.width&&((i=this.overflowHandler[a.tooNarrow?"handleOverflow":"clearOverflow"](r,s))&&(i.targetSize&&(s=i.targetSize),i.recalculate&&(n=this.getVisibleItems(t),o=(r=this.calculateChildBoxes(n,s)).boxes))),this.layoutTargetLastSize=s,this.childBoxCache=r,this.updateInnerCtSize(s,r),this.updateChildBoxes(o),this.handleTargetOverflow(s,t,e)},updateChildBoxes:function(t){for(var e=0,i=t.length;e<i;e++){var s=t[e],n=s.component;s.dirtySize&&n.setSize(s.width,s.height),isNaN(s.left)||isNaN(s.top)||n.setPosition(s.left,s.top)}},updateInnerCtSize:function(t,e){var i,s,n=this.align,r=this.padding,o=t.width,a=t.height;"hbox"==this.type?(s=o,i=e.meta.maxHeight+r.top+r.bottom,"stretch"==n?i=a:"middle"==n&&(i=Math.max(a,i))):(i=a,s=e.meta.maxWidth+r.left+r.right,"stretch"==n?s=o:"center"==n&&(s=Math.max(o,s))),this.innerCt.setSize(s||void 0,i||void 0)},handleTargetOverflow:function(t,e,i){var s,n=i.getStyle("overflow");n&&"hidden"!=n&&!this.adjustmentPass&&((s=this.getLayoutTargetSize()).width==t.width&&s.height==t.height||(this.adjustmentPass=!0,this.onLayout(e,i))),delete this.adjustmentPass},isValidParent:function(t,e){return this.innerCt&&t.getPositionEl().dom.parentNode==this.innerCt.dom},getVisibleItems:function(t){for(var e,i=(t=t||this.container).getLayoutTarget(),s=t.items.items,n=s.length,r=[],o=0;o<n;o++)(e=s[o]).rendered&&this.isValidParent(e,i)&&!0!==e.hidden&&!0!==e.collapsed&&!1!==e.shouldLayout&&r.push(e);return r},renderAll:function(t,e){this.innerCt||(this.innerCt=e.createChild({cls:this.innerCls}),this.padding=this.parseMargins(this.padding)),Ext.layout.BoxLayout.superclass.renderAll.call(this,t,this.innerCt)},getLayoutTargetSize:function(){var t,e=this.container.getLayoutTarget();return e&&(t=e.getViewSize(),Ext.isIE9m&&Ext.isStrict&&0==t.width&&(t=e.getStyleSize()),t.width-=e.getPadding("lr"),t.height-=e.getPadding("tb")),t},renderItem:function(t){Ext.isString(t.margins)?t.margins=this.parseMargins(t.margins):t.margins||(t.margins=this.defaultMargins),Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments)},destroy:function(){Ext.destroy(this.overflowHandler),Ext.layout.BoxLayout.superclass.destroy.apply(this,arguments)}}),Ext.layout.boxOverflow.None=Ext.extend(Object,{constructor:function(t,e){this.layout=t,Ext.apply(this,e||{})},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn}),Ext.layout.boxOverflow.none=Ext.layout.boxOverflow.None,Ext.layout.boxOverflow.Menu=Ext.extend(Ext.layout.boxOverflow.None,{afterCls:"x-strip-right",noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',constructor:function(t){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments),this.menuItems=[]},createInnerElements:function(){this.afterCt||(this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before"))},clearOverflow:function(t,e){var i=e.width+(this.afterCt?this.afterCt.getWidth():0),s=this.menuItems;this.hideTrigger();for(var n=0,r=s.length;n<r;n++)s.pop().component.show();return{targetSize:{height:e.height,width:i}}},showTrigger:function(){this.createMenu(),this.menuTrigger.show()},hideTrigger:function(){null!=this.menuTrigger&&this.menuTrigger.hide()},beforeMenuShow:function(t){function e(t,e){return t.isXType("buttongroup")&&!(e instanceof Ext.Toolbar.Separator)}var i,s,n=this.menuItems,r=n.length;this.clearMenu(),t.removeAll();for(var o=0;o<r;o++)i=n[o].component,s&&(e(i,s)||e(s,i))&&t.add("-"),this.addComponentToMenu(t,i),s=i;t.items.length<1&&t.add(this.noItemsMenuText)},createMenuConfig:function(i,t){var e=Ext.apply({},i.initialConfig),s=i.toggleGroup;return Ext.copyTo(e,i,["iconCls","icon","itemId","disabled","handler","scope","menu"]),Ext.apply(e,{text:i.overflowText||i.text,hideOnClick:t}),(s||i.enableToggle)&&Ext.apply(e,{group:s,checked:i.pressed,listeners:{checkchange:function(t,e){i.toggle(e)}}}),delete e.ownerCt,delete e.xtype,delete e.id,e},addComponentToMenu:function(e,t){t instanceof Ext.Toolbar.Separator?e.add("-"):Ext.isFunction(t.isXType)&&(t.isXType("splitbutton")?e.add(this.createMenuConfig(t,!0)):t.isXType("button")?e.add(this.createMenuConfig(t,!t.menu)):t.isXType("buttongroup")&&t.items.each(function(t){this.addComponentToMenu(e,t)},this))},clearMenu:function(){var t=this.moreMenu;t&&t.items&&t.items.each(function(t){delete t.menu})},createMenu:function(){this.menuTrigger||(this.createInnerElements(),this.menu=new Ext.menu.Menu({ownerCt:this.layout.container,listeners:{scope:this,beforeshow:this.beforeMenuShow}}),this.menuTrigger=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.menu,renderTo:this.afterCt}))},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}}),Ext.layout.boxOverflow.menu=Ext.layout.boxOverflow.Menu,Ext.layout.boxOverflow.HorizontalMenu=Ext.extend(Ext.layout.boxOverflow.Menu,{constructor:function(){Ext.layout.boxOverflow.HorizontalMenu.superclass.constructor.apply(this,arguments);var l=this,h=l.layout,d=h.calculateChildBoxes;h.calculateChildBoxes=function(t,e){for(var i=d.apply(h,arguments),s=i.meta,n=l.menuItems,r=0,o=0,a=n.length;o<a;o++)r+=n[o].width;return s.minimumWidth+=r,s.tooNarrow=s.minimumWidth>e.width,i}},handleOverflow:function(t,e){this.showTrigger();for(var i=e.width-this.afterCt.getWidth(),s=t.boxes,n=0,r=!1,o=0,a=s.length;o<a;o++)n+=s[o].width;for(var l=i-n,h=0,o=0,a=this.menuItems.length;o<a;o++){var d=this.menuItems[o],c=d.component,u=d.width;if(!(u<l))break;c.show(),l-=u,h++,r=!0}if(r)this.menuItems=this.menuItems.slice(h);else for(var f=s.length-1;0<=f;f--){var p=s[f].component;if(!(i<=s[f].left+s[f].width))break;this.menuItems.unshift({component:p,width:s[f].width}),p.hide()}return 0==this.menuItems.length&&this.hideTrigger(),{targetSize:{height:e.height,width:i},recalculate:r}}}),Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu,Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:!0,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(t){t.stopEvent(),this.scrollBy(t.getWheelDelta()*this.wheelIncrement*-1,!1)}})},handleOverflow:function(t,e){this.createInnerElements(),this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers(),this.beforeScroller.show(),this.afterScroller.show(),this.updateScrollButtons()},hideScrollers:function(){null!=this.beforeScroller&&(this.beforeScroller.hide(),this.afterScroller.hide())},createScrollers:function(){var t,e;this.beforeScroller||this.afterScroller||(t=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)}),e=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)}),t.addClassOnOver(this.beforeScrollerCls+"-hover"),e.addClassOnOver(this.afterScrollerCls+"-hover"),t.setVisibilityMode(Ext.Element.DISPLAY),e.setVisibilityMode(Ext.Element.DISPLAY),this.beforeRepeater=new Ext.util.ClickRepeater(t,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this}),this.afterRepeater=new Ext.util.ClickRepeater(e,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this}),this.beforeScroller=t,this.afterScroller=e)},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(t,e){this.scrollTo(this.getScrollPosition()+t,e)},getItem:function(t){return Ext.isString(t)?t=Ext.getCmp(t):Ext.isNumber(t)&&(t=this.items[t]),t},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var t,e,i,s;null!=this.beforeScroller&&null!=this.afterScroller&&(t=this.atExtremeBefore()?"addClass":"removeClass",e=this.atExtremeAfter()?"addClass":"removeClass",i=this.beforeScrollerCls+"-disabled",s=this.afterScrollerCls+"-disabled",this.beforeScroller[t](i),this.afterScroller[e](s),this.scrolling=!1)},atExtremeBefore:function(){return 0===this.getScrollPosition()},scrollLeft:function(t){this.scrollBy(-this.scrollIncrement,t)},scrollRight:function(t){this.scrollBy(this.scrollIncrement,t)},scrollToItem:function(t,e){var i,s,n;null!=(t=this.getItem(t))&&((i=this.getItemVisibility(t)).fullyVisible||(n=(s=t.getBox(!0,!0)).x,i.hiddenRight&&(n-=this.layout.innerCt.getWidth()-s.width),this.scrollTo(n,e)))},getItemVisibility:function(t){var e=this.getItem(t).getBox(!0,!0),i=e.x,s=e.x+e.width,n=this.getScrollPosition(),r=this.layout.innerCt.getWidth()+n;return{hiddenLeft:i<n,hiddenRight:r<s,fullyVisible:n<i&&s<r}}}),Ext.layout.boxOverflow.scroller=Ext.layout.boxOverflow.Scroller,Ext.layout.boxOverflow.VerticalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{scrollIncrement:75,wheelIncrement:2,handleOverflow:function(t,e){return Ext.layout.boxOverflow.VerticalScroller.superclass.handleOverflow.apply(this,arguments),{targetSize:{height:e.height-(this.beforeCt.getHeight()+this.afterCt.getHeight()),width:e.width}}},createInnerElements:function(){var t=this.layout.innerCt;this.beforeCt||(this.beforeCt=t.insertSibling({cls:this.beforeCls},"before"),this.afterCt=t.insertSibling({cls:this.afterCls},"after"),this.createWheelListener())},scrollTo:function(t,e){var i=this.getScrollPosition(),s=t.constrain(0,this.getMaxScrollBottom());s==i||this.scrolling||(null==e&&(e=this.animateScroll),this.layout.innerCt.scrollTo("top",s,!!e&&this.getScrollAnim()),e?this.scrolling=!0:(this.scrolling=!1,this.updateScrollButtons()))},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollTop,10)||0},getMaxScrollBottom:function(){return this.layout.innerCt.dom.scrollHeight-this.layout.innerCt.getHeight()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollBottom()}}),Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller,Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(t,e){return Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments),{targetSize:{height:e.height,width:e.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var t=this.layout.innerCt;this.beforeCt||(this.afterCt=t.insertSibling({cls:this.afterCls},"before"),this.beforeCt=t.insertSibling({cls:this.beforeCls},"before"),this.createWheelListener())},scrollTo:function(t,e){var i=this.getScrollPosition(),s=t.constrain(0,this.getMaxScrollRight());s==i||this.scrolling||(null==e&&(e=this.animateScroll),this.layout.innerCt.scrollTo("left",s,!!e&&this.getScrollAnim()),e?this.scrolling=!0:(this.scrolling=!1,this.updateScrollButtons()))},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}}),Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller,Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(t,e){var i,s,n,r,o,a,l,h,d,c,u,f=t.length,p=this.padding,g=p.top,m=p.left,x=g+p.bottom,E=m+p.right,v=e.width-this.scrollOffset,y=e.height,b=Math.max(0,y-x),C="start"==this.pack,w="center"==this.pack,T="end"==this.pack,S=0,D=0,k=0,M=0,I=0,R=[];for(z=0;z<f;z++)n=(i=t[z]).height,s=i.width,a=!i.hasLayout&&"function"==typeof i.doLayout,"number"!=typeof s&&(i.flex&&!s?k+=i.flex:(!s&&a&&i.doLayout(),s=(r=i.getSize()).width,n=r.height)),S+=(d=(o=i.margins).left+o.right)+(s||0),M+=d+(i.flex?i.minWidth||0:s),I+=d+(i.minWidth||s||0),"number"!=typeof n&&(a&&i.doLayout(),n=i.getHeight()),D=Math.max(D,n+o.top+o.bottom),R.push({component:i,height:n||void 0,width:s||void 0});var A=M-v,F=v<I,N=Math.max(0,v-S-E);if(F)for(z=0;z<f;z++)R[z].width=t[z].minWidth||t[z].width||R[z].width;else if(0<A){for(var P=[],L=0,H=f;L<H;L++){var O=(B=t[L]).minWidth||0;B.flex?R[L].width=O:P.push({minWidth:O,available:R[L].width-O,index:L})}P.sort(function(t,e){return t.available>e.available?1:-1});for(var z=0,H=P.length;z<H;z++){var B,V,W,G,Y=P[z].index;null!=Y&&(B=t[Y],V=R[Y].width,O=B.minWidth,G=V-(W=Math.max(O,V-Math.ceil(A/(H-z)))),R[Y].width=W,A-=G)}}else{var U=N,X=k;for(z=0;z<f;z++)i=t[z],l=R[z],c=(o=i.margins).top+o.bottom,C&&i.flex&&!i.width&&(U-=h=Math.ceil(i.flex/X*U),X-=i.flex,l.width=h,l.dirtySize=!0)}for(w?m+=N/2:T&&(m+=N),z=0;z<f;z++){switch(i=t[z],l=R[z],m+=(o=i.margins).left,c=o.top+o.bottom,l.left=m,l.top=g+o.top,this.align){case"stretch":u=b-c,l.height=u.constrain(i.minHeight||0,i.maxHeight||1e6),l.dirtySize=!0;break;case"stretchmax":u=D-c,l.height=u.constrain(i.minHeight||0,i.maxHeight||1e6),l.dirtySize=!0;break;case"middle":var j=b-l.height-c;0<j&&(l.top=g+c+j/2)}m+=l.width+o.right}return{boxes:R,meta:{maxHeight:D,nonFlexWidth:S,desiredWidth:M,minimumWidth:I,shortfall:M-v,tooNarrow:F}}}}),Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout,Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(t,e){var i,s,n,r,o,a,l,h,d,c,u,f=t.length,p=this.padding,g=p.top,m=p.left,x=g+p.bottom,E=m+p.right,v=e.width-this.scrollOffset,y=e.height,b=Math.max(0,v-E),C="start"==this.pack,w="center"==this.pack,T="end"==this.pack,S=0,D=0,k=0,M=0,I=0,R=[];for(z=0;z<f;z++)n=(i=t[z]).height,s=i.width,a=!i.hasLayout&&"function"==typeof i.doLayout,"number"!=typeof n&&(i.flex&&!n?k+=i.flex:(!n&&a&&i.doLayout(),s=(r=i.getSize()).width,n=r.height)),S+=(c=(o=i.margins).top+o.bottom)+(n||0),M+=c+(i.flex?i.minHeight||0:n),I+=c+(i.minHeight||n||0),"number"!=typeof s&&(a&&i.doLayout(),s=i.getWidth()),D=Math.max(D,s+o.left+o.right),R.push({component:i,height:n||void 0,width:s||void 0});var A=M-y,F=y<I,N=Math.max(0,y-S-x);if(F)for(z=0,H=f;z<H;z++)R[z].height=t[z].minHeight||t[z].height||R[z].height;else if(0<A){for(var P=[],L=0,H=f;L<H;L++){var O=(B=t[L]).minHeight||0;B.flex?R[L].height=O:P.push({minHeight:O,available:R[L].height-O,index:L})}P.sort(function(t,e){return t.available>e.available?1:-1});for(var z=0,H=P.length;z<H;z++){var B,V,W,G,Y=P[z].index;null!=Y&&(B=t[Y],V=R[Y].height,O=B.minHeight,G=V-(W=Math.max(O,V-Math.ceil(A/(H-z)))),R[Y].height=W,A-=G)}}else{var U=N,X=k;for(z=0;z<f;z++)i=t[z],l=R[z],d=(o=i.margins).left+o.right,C&&i.flex&&!i.height&&(U-=h=Math.ceil(i.flex/X*U),X-=i.flex,l.height=h,l.dirtySize=!0)}for(w?g+=N/2:T&&(g+=N),z=0;z<f;z++){switch(i=t[z],l=R[z],g+=(o=i.margins).top,d=o.left+o.right,l.left=m+o.left,l.top=g,this.align){case"stretch":u=b-d,l.width=u.constrain(i.minWidth||0,i.maxWidth||1e6),l.dirtySize=!0;break;case"stretchmax":u=D-d,l.width=u.constrain(i.minWidth||0,i.maxWidth||1e6),l.dirtySize=!0;break;case"center":var j=b-l.width-d;0<j&&(l.left=m+d+j/2)}g+=l.height+o.bottom}return{boxes:R,meta:{maxWidth:D,nonFlexHeight:S,desiredHeight:M,minimumHeight:I,shortfall:M-y,tooNarrow:F}}}}),Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout,Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,type:"toolbar",triggerWidth:18,noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',lastOverflow:!1,tableHTML:['<table cellspacing="0" class="x-toolbar-ct">',"<tbody>","<tr>",'<td class="x-toolbar-left" align="{0}">','<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-left-row"></tr>',"</tbody>","</table>","</td>",'<td class="x-toolbar-right" align="right">','<table cellspacing="0" class="x-toolbar-right-ct">',"<tbody>","<tr>","<td>",'<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-right-row"></tr>',"</tbody>","</table>","</td>","<td>",'<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-extras-row"></tr>',"</tbody>","</table>","</td>","</tr>","</tbody>","</table>","</td>","</tr>","</tbody>","</table>"].join(""),onLayout:function(t,e){var i;this.leftTr||(i="center"==t.buttonAlign?"center":"left",e.addClass("x-toolbar-layout-ct"),e.insertHtml("beforeEnd",String.format(this.tableHTML,i)),this.leftTr=e.child("tr.x-toolbar-left-row",!0),this.rightTr=e.child("tr.x-toolbar-right-row",!0),this.extrasTr=e.child("tr.x-toolbar-extras-row",!0),null==this.hiddenItem&&(this.hiddenItems=[]));for(var s,n,r="right"==t.buttonAlign?this.rightTr:this.leftTr,o=t.items.items,a=0,l=0,h=o.length;l<h;l++,a++){(n=o[l]).isFill?(r=this.rightTr,a=-1):n.rendered?n.xtbHidden||this.isValidParent(n,r.childNodes[a])||((s=this.insertCell(n,r,a)).appendChild(n.getPositionEl().dom),n.container=Ext.get(s)):(n.render(this.insertCell(n,r,a)),this.configureItem(n))}this.cleanup(this.leftTr),this.cleanup(this.rightTr),this.cleanup(this.extrasTr),this.fitToSize(e)},cleanup:function(t){for(var e,i=t.childNodes,s=i.length-1;0<=s&&(e=i[s]);s--)e.firstChild||t.removeChild(e)},insertCell:function(t,e,i){var s=document.createElement("td");return s.className="x-toolbar-cell",e.insertBefore(s,e.childNodes[i]||null),s},hideItem:function(t){this.hiddenItems.push(t),t.xtbHidden=!0,t.xtbWidth=t.getPositionEl().dom.parentNode.offsetWidth,t.hide()},unhideItem:function(t){t.show(),t.xtbHidden=!1,this.hiddenItems.remove(t)},getItemWidth:function(t){return t.hidden?t.xtbWidth||0:t.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(t){if(!1!==this.container.enableOverflow){var e=t.dom.clientWidth,i=t.dom.firstChild.offsetWidth,s=e-this.triggerWidth,n=this.lastWidth||0,r=this.hiddenItems,o=0!=r.length,a=n<=e;if((this.lastWidth=e)<i||o&&a)for(var l,h=this.container.items.items,d=h.length,c=0,u=0;u<d;u++)(l=h[u]).isFill||(s<(c+=this.getItemWidth(l))?l.hidden||l.xtbHidden||this.hideItem(l):l.xtbHidden&&this.unhideItem(l));(o=0!=r.length)?(this.initMore(),this.lastOverflow||(this.container.fireEvent("overflowchange",this.container,!0),this.lastOverflow=!0)):this.more&&(this.clearMenu(),this.more.destroy(),delete this.more,this.lastOverflow&&(this.container.fireEvent("overflowchange",this.container,!1),this.lastOverflow=!1))}},createMenuConfig:function(i,t){var e=Ext.apply({},i.initialConfig),s=i.toggleGroup;return Ext.copyTo(e,i,["iconCls","icon","itemId","disabled","handler","scope","menu"]),Ext.apply(e,{text:i.overflowText||i.text,hideOnClick:t}),(s||i.enableToggle)&&Ext.apply(e,{group:s,checked:i.pressed,listeners:{checkchange:function(t,e){i.toggle(e)}}}),delete e.ownerCt,delete e.xtype,delete e.id,e},addComponentToMenu:function(e,t){t instanceof Ext.Toolbar.Separator?e.add("-"):Ext.isFunction(t.isXType)&&(t.isXType("splitbutton")?e.add(this.createMenuConfig(t,!0)):t.isXType("button")?e.add(this.createMenuConfig(t,!t.menu)):t.isXType("buttongroup")&&t.items.each(function(t){this.addComponentToMenu(e,t)},this))},clearMenu:function(){var t=this.moreMenu;t&&t.items&&t.items.each(function(t){delete t.menu})},beforeMoreShow:function(t){function e(t,e){return t.isXType("buttongroup")&&!(e instanceof Ext.Toolbar.Separator)}var i,s,n=this.container.items.items,r=n.length;this.clearMenu(),t.removeAll();for(var o=0;o<r;o++)(i=n[o]).xtbHidden&&(s&&(e(i,s)||e(s,i))&&t.add("-"),this.addComponentToMenu(t,i),s=i);t.items.length<1&&t.add(this.noItemsMenuText)},initMore:function(){var t;this.more||(this.moreMenu=new Ext.menu.Menu({ownerCt:this.container,listeners:{beforeshow:this.beforeMoreShow,scope:this}}),this.more=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.moreMenu,ownerCt:this.container}),t=this.insertCell(this.more,this.extrasTr,100),this.more.render(t))},destroy:function(){Ext.destroy(this.more,this.moreMenu),delete this.leftTr,delete this.rightTr,delete this.extrasTr,Ext.layout.ToolbarLayout.superclass.destroy.call(this)}}),Ext.Container.LAYOUTS.toolbar=Ext.layout.ToolbarLayout,Ext.layout.MenuLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:!0,type:"menu",setContainer:function(t){this.monitorResize=!t.floating,t.on("autosize",this.doAutoSize,this),Ext.layout.MenuLayout.superclass.setContainer.call(this,t)},renderItem:function(t,e,i){var s;this.itemTpl||(this.itemTpl=Ext.layout.MenuLayout.prototype.itemTpl=new Ext.XTemplate('<li id="{itemId}" class="{itemCls}">','<tpl if="needsIcon">','<img alt="{altText}" src="{icon}" class="{iconCls}"/>',"</tpl>","</li>")),t&&!t.rendered?(Ext.isNumber(e)&&(e=i.dom.childNodes[e]),s=this.getItemArgs(t),t.render(t.positionEl=e?this.itemTpl.insertBefore(e,s,!0):this.itemTpl.append(i,s,!0)),t.positionEl.menuItemId=t.getItemId(),!s.isMenuItem&&s.needsIcon&&t.positionEl.addClass("x-menu-list-item-indent"),this.configureItem(t)):t&&!this.isValidParent(t,i)&&(Ext.isNumber(e)&&(e=i.dom.childNodes[e]),i.dom.insertBefore(t.getActionEl().dom,e||null))},getItemArgs:function(t){var e=t instanceof Ext.menu.Item;return{isMenuItem:e,needsIcon:!(e||t instanceof Ext.menu.Separator)&&(t.icon||t.iconCls),icon:t.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(t.iconCls||""),itemId:"x-menu-el-"+t.id,itemCls:"x-menu-list-item ",altText:t.altText||""}},isValidParent:function(t,e){return t.el.up("li.x-menu-list-item",5).dom.parentNode===(e.dom||e)},onLayout:function(t,e){Ext.layout.MenuLayout.superclass.onLayout.call(this,t,e),this.doAutoSize()},doAutoSize:function(){var t,e=this.container,i=e.width;e.floating&&(i?e.setWidth(i):Ext.isIE9m&&(e.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8||Ext.isIE9)?"auto":e.minWidth),(t=e.getEl()).dom.offsetWidth,e.setWidth(e.getLayoutTarget().getWidth()+t.getFrameWidth("lr"))))}}),Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout,Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this),document.getElementsByTagName("html")[0].className+=" x-viewport",this.el=Ext.getBody(),this.el.setHeight=Ext.emptyFn,this.el.setWidth=Ext.emptyFn,this.el.setSize=Ext.emptyFn,this.el.dom.scroll="no",this.allowDomMove=!1,this.autoWidth=!0,this.autoHeight=!0,Ext.EventManager.onWindowResize(this.fireResize,this),this.renderTo=this.el},fireResize:function(t,e){this.fireEvent("resize",this,t,e,t,e)}}),Ext.reg("viewport",Ext.Viewport),Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:!0,animCollapse:Ext.enableFx,headerAsText:!0,buttonAlign:"right",collapsed:!1,collapseFirst:!0,minButtonWidth:75,elements:"body",preventBodyReset:!1,padding:void 0,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:!0,expandDefaults:{duration:.25},collapseDefaults:{duration:.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this),this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate"),this.unstyled&&(this.baseCls="x-plain"),this.toolbars=[],this.tbar&&(this.elements+=",tbar",this.topToolbar=this.createToolbar(this.tbar),this.tbar=null),this.bbar&&(this.elements+=",bbar",this.bottomToolbar=this.createToolbar(this.bbar),this.bbar=null),!0===this.header?(this.elements+=",header",this.header=null):(this.headerCfg||this.title&&!1!==this.header)&&(this.elements+=",header"),!this.footerCfg&&!0!==this.footer||(this.elements+=",footer",this.footer=null),this.buttons&&(this.fbar=this.buttons,this.buttons=null),this.fbar&&this.createFbar(this.fbar),this.autoLoad&&this.on("render",this.doAutoLoad,this,{delay:10})},createFbar:function(t){var e=this.minButtonWidth;this.elements+=",footer",this.fbar=this.createToolbar(t,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:!1,defaults:function(t){return{minWidth:t.minWidth||e}}}),this.fbar.items.each(function(t){t.minWidth=t.minWidth||this.minButtonWidth},this),this.buttons=this.fbar.items.items},createToolbar:function(t,e){var i;return Ext.isArray(t)&&(t={items:t}),i=t.events?Ext.apply(t,e):this.createComponent(Ext.apply({},t,e),"toolbar"),this.toolbars.push(i),i},createElement:function(t,e){var i;this[t]?e.appendChild(this[t].dom):"bwrap"!==t&&-1==this.elements.indexOf(t)||(this[t+"Cfg"]?this[t]=Ext.fly(e).createChild(this[t+"Cfg"]):((i=document.createElement("div")).className=this[t+"Cls"],this[t]=Ext.get(e.appendChild(i))),this[t+"CssClass"]&&this[t].addClass(this[t+"CssClass"]),this[t+"Style"]&&this[t].applyStyles(this[t+"Style"]))},onRender:function(t,e){Ext.Panel.superclass.onRender.call(this,t,e),this.createClasses();var i,s,n,r,o,a,l=this.el,h=l.dom;this.collapsible&&!this.hideCollapseTool&&(this.tools=this.tools?this.tools.slice(0):[],this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})),this.tools&&(s=this.tools,this.elements+=!1!==this.header?",header":""),this.tools={},l.addClass(this.baseCls),h.firstChild&&(this.header=l.down("."+this.headerCls),this.bwrap=l.down("."+this.bwrapCls),n=this.bwrap?this.bwrap:l,this.tbar=n.down("."+this.tbarCls),this.body=n.down("."+this.bodyCls),this.bbar=n.down("."+this.bbarCls),this.footer=n.down("."+this.footerCls),this.fromMarkup=!0),!0===this.preventBodyReset&&l.addClass("x-panel-reset"),this.cls&&l.addClass(this.cls),this.buttons&&(this.elements+=",footer"),this.frame?(l.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls)),this.createElement("header",h.firstChild.firstChild.firstChild),this.createElement("bwrap",h),i=this.bwrap.dom,r=h.childNodes[1],o=h.childNodes[2],i.appendChild(r),i.appendChild(o),a=i.firstChild.firstChild.firstChild,this.createElement("tbar",a),this.createElement("body",a),this.createElement("bbar",a),this.createElement("footer",i.lastChild.firstChild.firstChild),this.footer||(this.bwrap.dom.lastChild.className+=" x-panel-nofooter"),this.ft=Ext.get(this.bwrap.dom.lastChild),this.mc=Ext.get(a)):(this.createElement("header",h),this.createElement("bwrap",h),i=this.bwrap.dom,this.createElement("tbar",i),this.createElement("body",i),this.createElement("bbar",i),this.createElement("footer",i),this.header||(this.body.addClass(this.bodyCls+"-noheader"),this.tbar&&this.tbar.addClass(this.tbarCls+"-noheader"))),Ext.isDefined(this.padding)&&this.body.setStyle("padding",this.body.addUnits(this.padding)),!1===this.border&&(this.el.addClass(this.baseCls+"-noborder"),this.body.addClass(this.bodyCls+"-noborder"),this.header&&this.header.addClass(this.headerCls+"-noborder"),this.footer&&this.footer.addClass(this.footerCls+"-noborder"),this.tbar&&this.tbar.addClass(this.tbarCls+"-noborder"),this.bbar&&this.bbar.addClass(this.bbarCls+"-noborder")),!1===this.bodyBorder&&this.body.addClass(this.bodyCls+"-noborder"),this.bwrap.enableDisplayMode("block"),this.header&&(this.header.unselectable(),this.headerAsText&&(this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>",this.iconCls&&this.setIconClass(this.iconCls))),this.floating&&this.makeFloating(this.floating),this.collapsible&&this.titleCollapse&&this.header&&(this.mon(this.header,"click",this.toggleCollapse,this),this.header.setStyle("cursor","pointer")),s&&this.addTool.apply(this,s),this.fbar&&(this.footer.addClass("x-panel-btns"),(this.fbar.ownerCt=this).fbar.render(this.footer),this.footer.createChild({cls:"x-clear"})),this.tbar&&this.topToolbar&&(this.topToolbar.ownerCt=this).topToolbar.render(this.tbar),this.bbar&&this.bottomToolbar&&(this.bottomToolbar.ownerCt=this).bottomToolbar.render(this.bbar)},setIconClass:function(t){var e,i,s,n=this.iconCls;this.iconCls=t,this.rendered&&this.header&&(this.frame?(this.header.addClass("x-panel-icon"),this.header.replaceClass(n,this.iconCls)):(i=(e=this.header).child("img.x-panel-inline-icon"))?Ext.fly(i).replaceClass(n,this.iconCls):(s=e.child("span."+this.headerTextCls))&&Ext.DomHelper.insertBefore(s.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})),this.fireEvent("iconchange",this,t,n)},makeFloating:function(t){this.floating=!0,this.el=new Ext.Layer(Ext.apply({},t,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:!1,shim:!1!==this.shim&&void 0}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(t,e,i){return this.fbar||this.createFbar([]),e&&(Ext.isString(t)&&(t={text:t}),t=Ext.apply({handler:e,scope:i},t)),this.fbar.add(t)},addTool:function(){if(!this.rendered)return this.tools||(this.tools=[]),void Ext.each(arguments,function(t){this.tools.push(t)},this);if(this[this.toolTarget]){var t;this.toolTemplate||((t=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>')).disableFormats=!0,t.compile(),Ext.Panel.prototype.toolTemplate=t);for(var e=0,i=arguments,s=i.length;e<s;e++){var n,r,o=i[e];this.tools[o.id]||(n="x-tool-"+o.id+"-over",r=this.toolTemplate.insertFirst(this[this.toolTarget],o,!0),(this.tools[o.id]=r).enableDisplayMode("block"),this.mon(r,"click",this.createToolHandler(r,o,n,this)),o.on&&this.mon(r,o.on),o.hidden&&r.hide(),o.qtip&&(Ext.isObject(o.qtip)?Ext.QuickTips.register(Ext.apply({target:r.id},o.qtip)):r.dom.qtip=o.qtip),r.addClassOnOver(n))}}},onLayout:function(t,e){Ext.Panel.superclass.onLayout.apply(this,arguments),this.hasLayout&&0<this.toolbars.length&&(Ext.each(this.toolbars,function(t){t.doLayout(void 0,e)}),this.syncHeight())},syncHeight:function(){var t,e=this.toolbarHeight,i=this.body,s=this.lastSize.height;!this.autoHeight&&Ext.isDefined(s)&&"auto"!=s&&e!=this.getToolbarHeight()&&(e=Math.max(0,s-this.getFrameHeight()),i.setHeight(e),t=i.getSize(),this.toolbarHeight=this.getToolbarHeight(),this.onBodyResize(t.width,t.height))},onShow:function(){if(this.floating)return this.el.show();Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating)return this.el.hide();Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(e,i,s,n){return function(t){e.removeClass(s),!1!==i.stopEvent&&t.stopEvent(),i.handler&&i.handler.call(i.scope||e,t,e,n,i)}},afterRender:function(){this.floating&&!this.hidden&&this.el.show(),this.title&&this.setTitle(this.title),Ext.Panel.superclass.afterRender.call(this),this.collapsed&&(this.collapsed=!1,this.collapse(!1)),this.initEvents()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.KeyMap(this.el,this.keys)),this.keyMap},initEvents:function(){this.keys&&this.getKeyMap(),this.draggable&&this.initDraggable(),0<this.toolbars.length&&(Ext.each(this.toolbars,function(t){t.doLayout(),t.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this),this.syncHeight())},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(t){this.floating&&this.el.beforeAction(),!1!==t&&this.el.addClass("x-panel-animated")},afterEffect:function(t){this.syncShadow(),this.el.removeClass("x-panel-animated")},createEffect:function(t,e,i){var s={scope:i,block:!0};return!0===t?(s.callback=e,s):(t.callback?s.callback=function(){e.call(i),Ext.callback(t.callback,t.scope)}:s.callback=e,Ext.applyIf(s,t))},collapse:function(t){if(!this.collapsed&&!this.el.hasFxBlock()&&!1!==this.fireEvent("beforecollapse",this,t)){var e=!0===t||!1!==t&&this.animCollapse;return this.beforeEffect(e),this.onCollapse(e,t),this}},onCollapse:function(t,e){t?this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(e||!0,this.afterCollapse,this),this.collapseDefaults)):(this[this.collapseEl].hide(this.hideMode),this.afterCollapse(!1))},afterCollapse:function(t){this.collapsed=!0,this.el.addClass(this.collapsedCls),!1!==t&&this[this.collapseEl].hide(this.hideMode),this.afterEffect(t),this.cascade(function(t){t.lastSize&&(t.lastSize={width:void 0,height:void 0})}),this.fireEvent("collapse",this)},expand:function(t){if(this.collapsed&&!this.el.hasFxBlock()&&!1!==this.fireEvent("beforeexpand",this,t)){var e=!0===t||!1!==t&&this.animCollapse;return this.el.removeClass(this.collapsedCls),this.beforeEffect(e),this.onExpand(e,t),this}},onExpand:function(t,e){t?this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(e||!0,this.afterExpand,this),this.expandDefaults)):(this[this.collapseEl].show(this.hideMode),this.afterExpand(!1))},afterExpand:function(t){(this.collapsed=!1)!==t&&this[this.collapseEl].show(this.hideMode),this.afterEffect(t),this.deferLayout&&(delete this.deferLayout,this.doLayout(!0)),this.fireEvent("expand",this)},toggleCollapse:function(t){return this[this.collapsed?"expand":"collapse"](t),this},onDisable:function(){this.rendered&&this.maskDisabled&&this.el.mask(),Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){this.rendered&&this.maskDisabled&&this.el.unmask(),Ext.Panel.superclass.onEnable.call(this)},onResize:function(t,e,i,s){var n=t,r=e;(Ext.isDefined(n)||Ext.isDefined(r))&&(this.collapsed?(this.queuedBodySize={width:n,height:r},this.queuedExpand||!1===this.allowQueuedExpand||(this.queuedExpand=!0,this.on("expand",function(){delete this.queuedExpand,this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:!0}))):(Ext.isNumber(n)?this.body.setWidth(n=this.adjustBodyWidth(n-this.getFrameWidth())):n="auto"==n?this.body.setWidth("auto").dom.offsetWidth:this.body.dom.offsetWidth,this.tbar&&(this.tbar.setWidth(n),this.topToolbar&&this.topToolbar.setSize(n)),this.bbar&&(this.bbar.setWidth(n),this.bottomToolbar&&(this.bottomToolbar.setSize(n),Ext.isIE9m&&(this.bbar.setStyle("position","static"),this.bbar.setStyle("position","")))),this.footer&&(this.footer.setWidth(n),this.fbar&&this.fbar.setSize(Ext.isIE9m?n-this.footer.getFrameWidth("lr"):"auto")),Ext.isNumber(r)?(r=Math.max(0,r-this.getFrameHeight()),this.body.setHeight(r)):"auto"==r&&this.body.setHeight(r),this.disabled&&this.el._mask&&this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())),this.onBodyResize(n,r)),this.syncShadow(),Ext.Panel.superclass.onResize.call(this,t,e,i,s)},onBodyResize:function(t,e){this.fireEvent("bodyresize",this,t,e)},getToolbarHeight:function(){var e=0;return this.rendered&&Ext.each(this.toolbars,function(t){e+=t.getHeight()},this),e},adjustBodyHeight:function(t){return t},adjustBodyWidth:function(t){return t},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var t,e=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");return this.frame&&(t=this.bwrap.dom.firstChild,e+=Ext.fly(t).getFrameWidth("l")+Ext.fly(t.firstChild).getFrameWidth("r"),e+=this.mc.getFrameWidth("lr")),e},getFrameHeight:function(){var t=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");return t+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0),this.frame?t+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb"):t+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0),t},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){this.floating&&this.el.sync(!0)},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(t,e){return this.title=t,this.header&&this.headerAsText&&this.header.child("span").update(t),e&&this.setIconClass(e),this.fireEvent("titlechange",this,t),this},getUpdater:function(){return this.body.getUpdater()},load:function(){var t=this.body.getUpdater();return t.update.apply(t,arguments),this},beforeDestroy:function(){if(Ext.Panel.superclass.beforeDestroy.call(this),this.header&&this.header.removeAllListeners(),this.tools)for(var t in this.tools)Ext.destroy(this.tools[t]);if(0<this.toolbars.length&&Ext.each(this.toolbars,function(t){t.un("afterlayout",this.syncHeight,this),t.un("remove",this.syncHeight,this)},this),Ext.isArray(this.buttons))for(;this.buttons.length;)Ext.destroy(this.buttons[0]);this.rendered&&(Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd),this.fbar&&Ext.destroy(this.fbar,this.fbar.el)),Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header",this.headerTextCls=this.baseCls+"-header-text",this.bwrapCls=this.baseCls+"-bwrap",this.tbarCls=this.baseCls+"-tbar",this.bodyCls=this.baseCls+"-body",this.bbarCls=this.baseCls+"-bbar",this.footerCls=this.baseCls+"-footer"},createGhost:function(t,e,i){var s=document.createElement("div");if(s.className="x-panel-ghost "+(t||""),this.header&&s.appendChild(this.el.dom.firstChild.cloneNode(!0)),Ext.fly(s.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight()),s.style.width=this.el.dom.offsetWidth+"px",i?Ext.getDom(i).appendChild(s):this.container.dom.appendChild(s),!1===e||!1===this.el.useShim)return new Ext.Element(s);var n=new Ext.Layer({shadow:!1,useDisplay:!0,constrain:!1},s);return n.show(),n},doAutoLoad:function(){var t=this.body.getUpdater();this.renderer&&t.setRenderer(this.renderer),t.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(t){return this.tools[t]}}),Ext.reg("panel",Ext.Panel),Ext.Editor=function(t,e){t.field?(this.field=Ext.create(t.field,"textfield"),delete(e=Ext.apply({},t)).field):this.field=t,Ext.Editor.superclass.constructor.call(this,e)},Ext.extend(Ext.Editor,Ext.Component,{allowBlur:!0,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:!1,swallowKeys:!0,completeOnEnter:!0,cancelOnEsc:!0,updateEl:!1,initComponent:function(){Ext.Editor.superclass.initComponent.call(this),this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(t,e){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:t,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain}),this.zIndex&&this.el.setZIndex(this.zIndex),this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden"),"title"!=this.field.msgTarget&&(this.field.msgTarget="qtip"),this.field.inEditor=!0,this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey}),this.field.grow&&this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1}),this.field.render(this.el).show(),this.field.getEl().dom.name="",this.swallowKeys&&this.field.el.swallowEvent(["keypress","keydown"])},onSpecialKey:function(t,e){var i=e.getKey(),s=this.completeOnEnter&&i==e.ENTER,n=this.cancelOnEsc&&i==e.ESC;(s||n)&&(e.stopEvent(),s?this.completeEdit():this.cancelEdit(),t.triggerBlur&&t.triggerBlur()),this.fireEvent("specialkey",t,e)},startEdit:function(t,e){this.editing&&this.completeEdit(),this.boundEl=Ext.get(t);var i=void 0!==e?e:this.boundEl.dom.innerHTML;this.rendered||this.render(this.parentEl||document.body),!1!==this.fireEvent("beforestartedit",this,this.boundEl,i)&&(this.startValue=i,this.field.reset(),this.field.setValue(i),this.realign(!0),this.editing=!0,this.show())},doAutoSize:function(){if(this.autoSize){var t=this.boundEl.getSize(),e=this.field.getSize();switch(this.autoSize){case"width":this.setSize(t.width,e.height);break;case"height":this.setSize(e.width,t.height);break;case"none":this.setSize(e.width,e.height);break;default:this.setSize(t.width,t.height)}}},setSize:function(t,e){delete this.field.lastSize,this.field.setSize(t,e),this.el&&((Ext.isGecko2||Ext.isOpera||Ext.isIE7&&Ext.isStrict)&&this.el.setSize(t,e),this.el.sync())},realign:function(t){!0===t&&this.doAutoSize(),this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(t){var e;this.editing&&(this.field.assertValue&&this.field.assertValue(),e=this.getValue(),this.field.isValid()?String(e)===String(this.startValue)&&this.ignoreNoChange?this.hideEdit(t):!1!==this.fireEvent("beforecomplete",this,e,this.startValue)&&(e=this.getValue(),this.updateEl&&this.boundEl&&this.boundEl.update(e),this.hideEdit(t),this.fireEvent("complete",this,e,this.startValue)):!1!==this.revertInvalid&&this.cancelEdit(t))},onShow:function(){this.el.show(),!1!==this.hideEl&&this.boundEl.hide(),this.field.show().focus(!1,!0),this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(t){var e;this.editing&&(e=this.getValue(),this.setValue(this.startValue),this.hideEdit(t),this.fireEvent("canceledit",this,e,this.startValue))},hideEdit:function(t){!0!==t&&(this.editing=!1,this.hide())},onBlur:function(){!0===this.allowBlur&&this.editing&&!0!==this.selectSameEditor&&this.completeEdit()},onHide:function(){this.editing?this.completeEdit():(this.field.blur(),this.field.collapse&&this.field.collapse(),this.el.hide(),!1!==this.hideEl&&this.boundEl.show())},setValue:function(t){this.field.setValue(t)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field"),delete this.parentEl,delete this.boundEl}}),Ext.reg("editor",Ext.Editor),Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:!1,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"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this),this.addEvents("select"),this.handler&&this.on("select",this.handler,this.scope,!0)},onRender:function(t,e){this.autoEl={tag:"div",cls:this.itemCls},Ext.ColorPalette.superclass.onRender.call(this,t,e),(this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" class="x-unselectable" unselectable="on">&#160;</span></em></a></tpl>')).overwrite(this.el,this.colors),this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"}),"click"!=this.clickEvent&&this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:!0})},afterRender:function(){var t;Ext.ColorPalette.superclass.afterRender.call(this),this.value&&(t=this.value,this.value=null,this.select(t,!0))},handleClick:function(t,e){var i;t.preventDefault(),this.disabled||(i=e.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1],this.select(i.toUpperCase()))},select:function(t,e){var i;(t=t.replace("#",""))==this.value&&!this.allowReselect||(i=this.el,this.value&&i.child("a.color-"+this.value).removeClass("x-color-palette-sel"),i.child("a.color-"+t).addClass("x-color-palette-sel"),this.value=t,!0!==e&&this.fireEvent("select",this,t))}}),Ext.reg("colorpalette",Ext.ColorPalette),Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:!0,focusOnSelect:!0,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this),this.value=this.value?this.value.clearTime(!0):(new Date).clearTime(),this.addEvents("select"),this.handler&&this.on("select",this.handler,this.scope||this),this.initDisabledDays()},initDisabledDays:function(){var i,s,n;!this.disabledDatesRE&&this.disabledDates&&(i=this.disabledDates,s=i.length-1,n="(?:",Ext.each(i,function(t,e){n+=Ext.isDate(t)?"^"+Ext.escapeRe(t.dateFormat(this.format))+"$":i[e],e!=s&&(n+="|")},this),this.disabledDatesRE=new RegExp(n+")"))},setDisabledDates:function(t){Ext.isArray(t)?(this.disabledDates=t,this.disabledDatesRE=null):this.disabledDatesRE=t,this.initDisabledDays(),this.update(this.value,!0)},setDisabledDays:function(t){this.disabledDays=t,this.update(this.value,!0)},setMinDate:function(t){this.minDate=t,this.update(this.value,!0)},setMaxDate:function(t){this.maxDate=t,this.update(this.value,!0)},setValue:function(t){this.value=t.clearTime(!0),this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(t){Ext.DatePicker.superclass.onEnable.call(this),this.doDisabled(!1),this.update(t?this.value:this.activeDate),Ext.isIE9m&&this.el.repaint()},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this),this.doDisabled(!0),Ext.isIE9m&&!Ext.isIE8&&Ext.each([].concat(this.textNodes,this.el.query("th span")),function(t){Ext.fly(t).repaint()})},doDisabled:function(t){this.keyNav.setDisabled(t),this.prevRepeater.setDisabled(t),this.nextRepeater.setDisabled(t),this.showToday&&(this.todayKeyListener.setDisabled(t),this.todayBtn.setDisabled(t))},onRender:function(t,e){for(var i=['<table cellspacing="0">','<tr><td class="x-date-left"><a href="#" title="',this.prevText,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="',this.nextText,'">&#160;</a></td></tr>','<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'],s=this.dayNames,n=0;n<7;n++){var r=this.startDay+n;6<r&&(r-=7),i.push("<th><span>",s[r].substr(0,1),"</span></th>")}for(i[i.length]="</tr></thead><tbody><tr>",n=0;n<42;n++)n%7==0&&0!==n&&(i[i.length]="</tr><tr>"),i[i.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>';i.push("</tr></tbody></table></td></tr>",this.showToday?'<tr><td colspan="3" class="x-date-bottom" align="center"></td></tr>':"",'</table><div class="x-date-mp"></div>');var o,a=document.createElement("div");a.className="x-date-picker",a.innerHTML=i.join(""),t.dom.insertBefore(a,e),this.el=Ext.get(a),this.eventEl=Ext.get(a.firstChild),this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:!0,stopDefault:!0}),this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:!0,stopDefault:!0}),this.monthPicker=this.el.down("div.x-date-mp"),this.monthPicker.enableDisplayMode("block"),this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(t){t.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))},right:function(t){t.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},up:function(t){t.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},down:function(t){t.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},pageUp:function(t){this.showNextMonth()},pageDown:function(t){this.showPrevMonth()},enter:function(t){return t.stopPropagation(),!0},scope:this}),this.el.unselectable(),this.cells=this.el.select("table.x-date-inner tbody td"),this.textNodes=this.el.query("table.x-date-inner tbody span"),this.mbtn=new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",!0)}),this.mbtn.el.child("em").addClass("x-btn-arrow"),this.showToday&&(this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this),o=(new Date).dateFormat(this.format),this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",!0),text:String.format(this.todayText,o),tooltip:String.format(this.todayTip,o),handler:this.selectToday,scope:this})),this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this),this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"}),this.mon(this.mbtn,"click",this.showMonthPicker,this),this.onEnable(!0)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){for(var t=['<table border="0" cellspacing="0">'],e=0;e<6;e++)t.push('<tr><td class="x-date-mp-month"><a href="#">',Date.getShortMonthName(e),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',Date.getShortMonthName(e+6),"</a></td>",0===e?'<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>':'<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>');t.push('<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">',this.okText,'</button><button type="button" class="x-date-mp-cancel">',this.cancelText,"</button></td></tr>","</table>"),this.monthPicker.update(t.join("")),this.mon(this.monthPicker,"click",this.onMonthClick,this),this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this),this.mpMonths=this.monthPicker.select("td.x-date-mp-month"),this.mpYears=this.monthPicker.select("td.x-date-mp-year"),this.mpMonths.each(function(t,e,i){i+=1,t.dom.xmonth=i%2==0?5+Math.round(.5*i):Math.round(.5*(i-1))})}},showMonthPicker:function(){var t;this.disabled||(this.createMonthPicker(),t=this.el.getSize(),this.monthPicker.setSize(t),this.monthPicker.child("table").setSize(t),this.mpSelMonth=(this.activeDate||this.value).getMonth(),this.updateMPMonth(this.mpSelMonth),this.mpSelYear=(this.activeDate||this.value).getFullYear(),this.updateMPYear(this.mpSelYear),this.monthPicker.slideIn("t",{duration:.2}))},updateMPYear:function(t){this.mpyear=t;for(var e=this.mpYears.elements,i=1;i<=10;i++){var s=e[i-1],n=i%2==0?t+Math.round(.5*i):t-(5-Math.round(.5*i));s.firstChild.innerHTML=n,s.xyear=n,this.mpYears.item(i-1)[n==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(s){this.mpMonths.each(function(t,e,i){t[t.dom.xmonth==s?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(t){},onMonthClick:function(t,e){t.stopEvent();var i,s,n=new Ext.Element(e);n.is("button.x-date-mp-cancel")?this.hideMonthPicker():n.is("button.x-date-mp-ok")?((s=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate())).getMonth()!=this.mpSelMonth&&(s=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()),this.update(s),this.hideMonthPicker()):(i=n.up("td.x-date-mp-month",2))?(this.mpMonths.removeClass("x-date-mp-sel"),i.addClass("x-date-mp-sel"),this.mpSelMonth=i.dom.xmonth):(i=n.up("td.x-date-mp-year",2))?(this.mpYears.removeClass("x-date-mp-sel"),i.addClass("x-date-mp-sel"),this.mpSelYear=i.dom.xyear):n.is("a.x-date-mp-prev")?this.updateMPYear(this.mpyear-10):n.is("a.x-date-mp-next")&&this.updateMPYear(this.mpyear+10)},onMonthDblClick:function(t,e){t.stopEvent();var i,s=new Ext.Element(e);(i=s.up("td.x-date-mp-month",2))?(this.update(new Date(this.mpSelYear,i.dom.xmonth,(this.activeDate||this.value).getDate())),this.hideMonthPicker()):(i=s.up("td.x-date-mp-year",2))&&(this.update(new Date(i.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate())),this.hideMonthPicker())},hideMonthPicker:function(t){this.monthPicker&&(!0===t?this.monthPicker.hide():this.monthPicker.slideOut("t",{duration:.2}))},showPrevMonth:function(t){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(t){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(t){var e;t.stopEvent(),this.disabled||(0<(e=t.getWheelDelta())?this.showPrevMonth():e<0&&this.showNextMonth())},handleDateClick:function(t,e){t.stopEvent(),this.disabled||!e.dateValue||Ext.fly(e.parentNode).hasClass("x-date-disabled")||(this.cancelFocus=!1===this.focusOnSelect,this.setValue(new Date(e.dateValue)),delete this.cancelFocus,this.fireEvent("select",this,this.value))},selectToday:function(){this.todayBtn&&!this.todayBtn.disabled&&(this.setValue((new Date).clearTime()),this.fireEvent("select",this,this.value))},update:function(t,e){if(this.rendered){var i=this.activeDate,n=this.isVisible();if(this.activeDate=t,!e&&i&&this.el){var s=t.getTime();if(i.getMonth()==t.getMonth()&&i.getFullYear()==t.getFullYear())return this.cells.removeClass("x-date-selected"),void this.cells.each(function(t){if(t.dom.firstChild.dateValue==s)return t.addClass("x-date-selected"),n&&!this.cancelFocus&&Ext.fly(t.dom.firstChild).focus(50),!1},this)}var r=t.getDaysInMonth(),o=t.getFirstDateOfMonth().getDay()-this.startDay;o<0&&(o+=7),r+=o;var a,l,h=t.add("mo",-1),d=h.getDaysInMonth()-o,c=this.cells.elements,u=this.textNodes,f=new Date(h.getFullYear(),h.getMonth(),d,this.initHour),p=(new Date).clearTime().getTime(),g=t.clearTime(!0).getTime(),m=this.minDate?this.minDate.clearTime(!0):Number.NEGATIVE_INFINITY,x=this.maxDate?this.maxDate.clearTime(!0):Number.POSITIVE_INFINITY,E=this.disabledDatesRE,v=this.disabledDatesText,y=!!this.disabledDays&&this.disabledDays.join(""),b=this.disabledDaysText,C=this.format;this.showToday&&(l=(a=(new Date).clearTime())<m||x<a||E&&C&&E.test(a.dateFormat(C))||y&&-1!=y.indexOf(a.getDay()),this.disabled||(this.todayBtn.setDisabled(l),this.todayKeyListener[l?"disable":"enable"]()));function w(t,e){e.title="";var i,s=f.clearTime(!0).getTime();return(e.firstChild.dateValue=s)==p&&(e.className+=" x-date-today",e.title=t.todayText),s==g&&(e.className+=" x-date-selected",n&&Ext.fly(e.firstChild).focus(50)),s<m?(e.className=" x-date-disabled",void(e.title=t.minText)):x<s?(e.className=" x-date-disabled",void(e.title=t.maxText)):(y&&-1!=y.indexOf(f.getDay())&&(e.title=b,e.className=" x-date-disabled"),void(E&&C&&(i=f.dateFormat(C),E.test(i)&&(e.title=v.replace("%0",i),e.className=" x-date-disabled"))))}for(var T=0;T<o;T++)u[T].innerHTML=++d,f.setDate(f.getDate()+1),c[T].className="x-date-prevday",w(this,c[T]);for(;T<r;T++){var S=T-o+1;u[T].innerHTML=S,f.setDate(f.getDate()+1),c[T].className="x-date-active",w(this,c[T])}for(var D,k,M=0;T<42;T++)u[T].innerHTML=++M,f.setDate(f.getDate()+1),c[T].className="x-date-nextday",w(this,c[T]);this.mbtn.setText(this.monthNames[t.getMonth()]+" "+t.getFullYear()),this.internalRender||(k=(D=this.el.dom.firstChild).offsetWidth,this.el.setWidth(k+this.el.getBorderWidth("lr")),Ext.fly(D).setWidth(k),this.internalRender=!0,Ext.isOpera&&!this.secondPass&&(D.rows[0].cells[1].style.width=k-(D.rows[0].cells[0].offsetWidth+D.rows[0].cells[2].offsetWidth)+"px",this.secondPass=!0,this.update.defer(10,this,[t])))}},beforeDestroy:function(){this.rendered&&(Ext.destroy(this.keyNav,this.monthPicker,this.eventEl,this.mbtn,this.nextRepeater,this.prevRepeater,this.cells.el,this.todayBtn),delete this.textNodes,delete this.cells.elements)}}),Ext.reg("datepicker",Ext.DatePicker),Ext.LoadMask=function(t,e){var i;this.el=Ext.get(t),Ext.apply(this,e),this.store?(this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad}),this.removeMask=Ext.value(this.removeMask,!1)):((i=this.el.getUpdater()).showLoadIndicator=!1,i.on({scope:this,beforeupdate:this.onBeforeLoad,update:this.onLoad,failure:this.onLoad}),this.removeMask=Ext.value(this.removeMask,!0))},Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:!1,disable:function(){this.disabled=!0},enable:function(){this.disabled=!1},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){this.disabled||this.el.mask(this.msg,this.msgCls)},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){var t;this.store?(this.store.un("beforeload",this.onBeforeLoad,this),this.store.un("load",this.onLoad,this),this.store.un("exception",this.onLoad,this)):((t=this.el.getUpdater()).un("beforeupdate",this.onBeforeLoad,this),t.un("update",this.onLoad,this),t.un("failure",this.onLoad,this))}},Ext.slider.Thumb=Ext.extend(Object,{dragging:!1,constructor:function(t){Ext.apply(this,t||{},{cls:"x-slider-thumb",constrain:!1}),Ext.slider.Thumb.superclass.constructor.call(this,t),this.slider.vertical&&Ext.apply(this,Ext.slider.Thumb.Vertical)},render:function(){this.el=this.slider.innerEl.insertFirst({cls:this.cls}),this.initEvents()},enable:function(){this.disabled=!1,this.el.removeClass(this.slider.disabledClass)},disable:function(){this.disabled=!0,this.el.addClass(this.slider.disabledClass)},initEvents:function(){var t=this.el;t.addClassOnOver("x-slider-thumb-over"),this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300}),this.tracker.initEl(t)},onBeforeDragStart:function(t){return!this.disabled&&(this.slider.promoteThumb(this),!0)},onDragStart:function(t){this.el.addClass("x-slider-thumb-drag"),this.dragging=!0,this.dragStartValue=this.value,this.slider.fireEvent("dragstart",this.slider,t,this)},onDrag:function(t){var e,i,s=this.slider,n=this.index,r=this.getNewValue();this.constrain&&(e=s.thumbs[n+1],null!=(i=s.thumbs[n-1])&&r<=i.value&&(r=i.value),null!=e&&r>=e.value&&(r=e.value)),s.setValue(n,r,!1),s.fireEvent("drag",s,t,this)},getNewValue:function(){var t=this.slider,e=t.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(t.reverseValue(e.left),t.decimalPrecision)},onDragEnd:function(t){var e=this.slider,i=this.value;this.el.removeClass("x-slider-thumb-drag"),this.dragging=!1,e.fireEvent("dragend",e,t),this.dragStartValue!=i&&e.fireEvent("changecomplete",e,i,this)},destroy:function(){Ext.destroyMembers(this,"tracker","el")}}),Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:!1,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:!0,animate:!0,constrainThumbs:!0,topThumbZIndex:1e4,initComponent:function(){Ext.isDefined(this.value)||(this.value=this.minValue),this.thumbs=[],Ext.slider.MultiSlider.superclass.initComponent.call(this),this.keyIncrement=Math.max(this.increment,this.keyIncrement),this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend"),null!=this.values&&!Ext.isEmpty(this.values)||(this.values=[0]);for(var t=this.values,e=0;e<t.length;e++)this.addThumb(t[e]);this.vertical&&Ext.apply(this,Ext.slider.Vertical)},addThumb:function(t){var e=new Ext.slider.Thumb({value:t,slider:this,index:this.thumbs.length,constrain:this.constrainThumbs});this.thumbs.push(e),this.rendered&&e.render()},promoteThumb:function(t){for(var e,i,s=this.thumbs,n=0,r=s.length;n<r;n++)e=(i=s[n])==t?this.topThumbZIndex:"",i.el.setStyle("zIndex",e)},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}},Ext.slider.MultiSlider.superclass.onRender.apply(this,arguments),this.endEl=this.el.first(),this.innerEl=this.endEl.first(),this.focusEl=this.innerEl.child(".x-slider-focus");for(var t=0;t<this.thumbs.length;t++)this.thumbs[t].render();var e=this.innerEl.child(".x-slider-thumb");this.halfThumb=(this.vertical?e.getHeight():e.getWidth())/2,this.initEvents()},initEvents:function(){this.mon(this.el,{scope:this,mousedown:this.onMouseDown,keydown:this.onKeyDown}),this.focusEl.swallowEvent("click",!0)},onMouseDown:function(t){if(!this.disabled){for(var e,i=!1,s=0;s<this.thumbs.length;s++)i=i||t.target==this.thumbs[s].el.dom;this.clickToChange&&!i&&(e=this.innerEl.translatePoints(t.getXY()),this.onClickChange(e)),this.focus()}},onClickChange:function(t){var e;t.top>this.clickRange[0]&&t.top<this.clickRange[1]&&(e=this.getNearest(t,"left").index,this.setValue(e,Ext.util.Format.round(this.reverseValue(t.left),this.decimalPrecision),void 0,!0))},getNearest:function(t,e){for(var i="top"==e?this.innerEl.getHeight()-t[e]:t[e],s=this.reverseValue(i),n=this.maxValue-this.minValue+5,r=null,o=0;o<this.thumbs.length;o++){var a=this.thumbs[o],l=a.value,h=Math.abs(l-s);Math.abs(h<=n)&&(r=a,n=h)}return r},onKeyDown:function(t){var e;if(this.disabled||1!==this.thumbs.length)t.preventDefault();else switch(t.getKey()){case t.UP:case t.RIGHT:t.stopEvent(),e=t.ctrlKey?this.maxValue:this.getValue(0)+this.keyIncrement,this.setValue(0,e,void 0,!0);break;case t.DOWN:case t.LEFT:t.stopEvent(),e=t.ctrlKey?this.minValue:this.getValue(0)-this.keyIncrement,this.setValue(0,e,void 0,!0);break;default:t.preventDefault()}},doSnap:function(t){if(!this.increment||!t)return t;var e=t,i=this.increment,s=t%i;return 0!=s&&(e-=s,i<=2*s?e+=i:2*s<-i&&(e-=i)),e.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var t=0;t<this.thumbs.length;t++){var e,i=this.thumbs[t];void 0!==i.value&&((e=this.normalizeValue(i.value))!==i.value?this.setValue(t,e,!1):this.moveThumb(t,this.translateValue(e),!1))}},getRatio:function(){var t=this.innerEl.getWidth(),e=this.maxValue-this.minValue;return 0==e?t:t/e},normalizeValue:function(t){return t=this.doSnap(t),t=(t=Ext.util.Format.round(t,this.decimalPrecision)).constrain(this.minValue,this.maxValue)},setMinValue:function(t){this.minValue=t;for(var e,i=0,s=this.thumbs,n=s.length;i<n;++i)(e=s[i]).value=e.value<t?t:e.value;this.syncThumb()},setMaxValue:function(t){this.maxValue=t;for(var e,i=0,s=this.thumbs,n=s.length;i<n;++i)(e=s[i]).value=e.value>t?t:e.value;this.syncThumb()},setValue:function(t,e,i,s){var n=this.thumbs[t];n.el;(e=this.normalizeValue(e))!==n.value&&!1!==this.fireEvent("beforechange",this,e,n.value,n)&&(n.value=e,this.rendered&&(this.moveThumb(t,this.translateValue(e),!1!==i),this.fireEvent("change",this,e,n),s&&this.fireEvent("changecomplete",this,e,n)))},translateValue:function(t){var e=this.getRatio();return t*e-this.minValue*e-this.halfThumb},reverseValue:function(t){var e=this.getRatio();return(t+this.minValue*e)/e},moveThumb:function(t,e,i){var s=this.thumbs[t].el;i&&!1!==this.animate?s.shift({left:e,stopFx:!0,duration:.35}):s.setLeft(e)},focus:function(){this.focusEl.focus(10)},onResize:function(t,e){for(var i=this.thumbs,s=i.length,n=0;n<s;++n)i[n].el.stopFx();Ext.isNumber(t)&&this.innerEl.setWidth(t-(this.el.getPadding("l")+this.endEl.getPadding("r"))),this.syncThumb(),Ext.slider.MultiSlider.superclass.onResize.apply(this,arguments)},onDisable:function(){Ext.slider.MultiSlider.superclass.onDisable.call(this);for(var t=0;t<this.thumbs.length;t++){var e,i=this.thumbs[t],s=i.el;i.disable(),Ext.isIE&&(e=s.getXY(),s.hide(),this.innerEl.addClass(this.disabledClass).dom.disabled=!0,this.thumbHolder||(this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass})),this.thumbHolder.show().setXY(e))}},onEnable:function(){Ext.slider.MultiSlider.superclass.onEnable.call(this);for(var t=0;t<this.thumbs.length;t++){var e=this.thumbs[t],i=e.el;e.enable(),Ext.isIE&&(this.innerEl.removeClass(this.disabledClass).dom.disabled=!1,this.thumbHolder&&this.thumbHolder.hide(),i.show(),this.syncThumb())}},syncThumb:function(){if(this.rendered)for(var t=0;t<this.thumbs.length;t++)this.moveThumb(t,this.translateValue(this.thumbs[t].value))},getValue:function(t){return this.thumbs[t].value},getValues:function(){for(var t=[],e=0;e<this.thumbs.length;e++)t.push(this.thumbs[e].value);return t},beforeDestroy:function(){for(var t=this.thumbs,e=0,i=t.length;e<i;++e)t[e].destroy(),t[e]=null;Ext.destroyMembers(this,"endEl","innerEl","focusEl","thumbHolder"),Ext.slider.MultiSlider.superclass.beforeDestroy.call(this)}}),Ext.reg("multislider",Ext.slider.MultiSlider),Ext.slider.SingleSlider=Ext.extend(Ext.slider.MultiSlider,{constructor:function(t){t=t||{},Ext.applyIf(t,{values:[t.value||0]}),Ext.slider.SingleSlider.superclass.constructor.call(this,t)},getValue:function(){return Ext.slider.SingleSlider.superclass.getValue.call(this,0)},setValue:function(t,e){var i=Ext.toArray(arguments),s=i.length;return(1==s||s<=3&&"number"!=typeof e)&&i.unshift(0),Ext.slider.SingleSlider.superclass.setValue.apply(this,i)},syncThumb:function(){return Ext.slider.SingleSlider.superclass.syncThumb.apply(this,[0].concat(arguments))},getNearest:function(){return this.thumbs[0]}}),Ext.Slider=Ext.slider.SingleSlider,Ext.reg("slider",Ext.slider.SingleSlider),Ext.slider.Vertical={onResize:function(t,e){this.innerEl.setHeight(e-(this.el.getPadding("t")+this.endEl.getPadding("b"))),this.syncThumb()},getRatio:function(){return this.innerEl.getHeight()/(this.maxValue-this.minValue)},moveThumb:function(t,e,i){var s=this.thumbs[t].el;i&&!1!==this.animate?s.shift({bottom:e,stopFx:!0,duration:.35}):s.setBottom(e)},onClickChange:function(t){var e,i;t.left>this.clickRange[0]&&t.left<this.clickRange[1]&&(e=this.getNearest(t,"top").index,i=this.minValue+this.reverseValue(this.innerEl.getHeight()-t.top),this.setValue(e,Ext.util.Format.round(i,this.decimalPrecision),void 0,!0))}},Ext.slider.Thumb.Vertical={getNewValue:function(){var t=this.slider,e=t.innerEl,i=e.translatePoints(this.tracker.getXY()),s=e.getHeight()-i.top;return t.minValue+Ext.util.Format.round(s/t.getRatio(),t.decimalPrecision)}},Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:!1,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this),this.addEvents("update")},onRender:function(t,e){var i=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");this.el=e?i.insertBefore(e,{cls:this.baseCls},!0):i.append(t,{cls:this.baseCls},!0),this.id&&(this.el.dom.id=this.id);var s,n=this.el.dom.firstChild;this.progressBar=Ext.get(n.firstChild),this.textEl?(this.textEl=Ext.get(this.textEl),delete this.textTopEl):(this.textTopEl=Ext.get(this.progressBar.dom.firstChild),s=Ext.get(n.childNodes[1]),this.textTopEl.setStyle("z-index",99).addClass("x-hidden"),this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,s.dom.firstChild]),this.textEl.setWidth(n.offsetWidth)),this.progressBar.setHeight(n.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this),this.value?this.updateProgress(this.value,this.text):this.updateText(this.text)},updateProgress:function(t,e,i){var s;return this.value=t||0,e&&this.updateText(e),this.rendered&&!this.isDestroyed&&(s=Math.floor(t*this.el.dom.firstChild.offsetWidth),this.progressBar.setWidth(s,!0===i||!1!==i&&this.animate),this.textTopEl&&this.textTopEl.removeClass("x-hidden").setWidth(s)),this.fireEvent("update",this,t,e),this},wait:function(i){return this.waitTimer||(i=i||{},this.updateText(i.text),this.waitTimer=Ext.TaskMgr.start({run:function(t){var e=i.increment||10;--t,this.updateProgress(100/e*((t+e)%e+1)*.01,null,i.animate)},interval:i.interval||1e3,duration:i.duration,onStop:function(){i.fn&&i.fn.apply(i.scope||this),this.reset()},scope:this})),this},isWaiting:function(){return null!==this.waitTimer},updateText:function(t){return this.text=t||"&#160;",this.rendered&&this.textEl.update(this.text),this},syncProgressBar:function(){return this.value&&this.updateProgress(this.value,this.text),this},setSize:function(t,e){var i;return Ext.ProgressBar.superclass.setSize.call(this,t,e),this.textTopEl&&(i=this.el.dom.firstChild,this.textEl.setSize(i.offsetWidth,i.offsetHeight)),this.syncProgressBar(),this},reset:function(t){return this.updateProgress(0),this.textTopEl&&this.textTopEl.addClass("x-hidden"),this.clearTimer(),!0===t&&this.hide(),this},clearTimer:function(){this.waitTimer&&(this.waitTimer.onStop=null,Ext.TaskMgr.stop(this.waitTimer),this.waitTimer=null)},onDestroy:function(){this.clearTimer(),this.rendered&&(this.textEl.isComposite&&this.textEl.clear(),Ext.destroyMembers(this,"textEl","progressBar","textTopEl")),Ext.ProgressBar.superclass.onDestroy.call(this)}}),Ext.reg("progress",Ext.ProgressBar),function(){var s=Ext.EventManager,o=Ext.lib.Dom;Ext.dd.DragDrop=function(t,e,i){t&&this.init(t,e,i)},Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:!1,lock:function(){this.locked=!0},moveOnly:!1,unlock:function(){this.locked=!1},isTarget:!0,padding:null,_domRef:null,__ygDragDrop:!0,constrainX:!1,constrainY:!1,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:!1,xTicks:null,yTicks:null,primaryButtonOnly:!0,available:!1,hasOuterHandles:!1,b4StartDrag:function(t,e){},startDrag:function(t,e){},b4Drag:function(t){},onDrag:function(t){},onDragEnter:function(t,e){},b4DragOver:function(t){},onDragOver:function(t,e){},b4DragOut:function(t){},onDragOut:function(t,e){},b4DragDrop:function(t){},onDragDrop:function(t,e){},onInvalidDrop:function(t){},b4EndDrag:function(t){},endDrag:function(t){},b4MouseDown:function(t){},onMouseDown:function(t){},onMouseUp:function(t){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(t,e,i){Ext.isNumber(e)&&(e={left:e,right:e,top:e,bottom:e}),e=e||this.defaultPadding;var s,n,r=Ext.get(this.getEl()).getBox(),o=Ext.get(t),a=o.getScroll(),l=o.dom;n=l==document.body?{x:a.left,y:a.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}:{x:(s=o.getXY())[0],y:s[1],width:l.clientWidth,height:l.clientHeight};var h=r.y-n.y,d=r.x-n.x;this.resetConstraints(),this.setXConstraint(d-(e.left||0),n.width-d-r.width-(e.right||0),this.xTickSize),this.setYConstraint(h-(e.top||0),n.height-h-r.height-(e.bottom||0),this.yTickSize)},getEl:function(){return this._domRef||(this._domRef=Ext.getDom(this.id)),this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(t,e,i){this.initTarget(t,e,i),s.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(t,e,i){this.config=i||{},this.DDM=Ext.dd.DDM,this.groups={},"string"!=typeof t&&(t=Ext.id(t)),this.id=t,this.addToGroup(e||"default"),this.handleElId=t,this.setDragElId(t),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=!1!==this.config.isTarget,this.maintainOffset=this.config.maintainOffset,this.primaryButtonOnly=!1!==this.config.primaryButtonOnly},handleOnAvailable:function(){this.available=!0,this.resetConstraints(),this.onAvailable()},setPadding:function(t,e,i,s){this.padding=e||0===e?i||0===i?[t,e,i,s]:[t,e,t,e]:[t,t,t,t]},setInitPosition:function(t,e){var i,s,n,r=this.getEl();this.DDM.verifyEl(r)&&(i=t||0,s=e||0,n=o.getXY(r),this.initPageX=n[0]-i,this.initPageY=n[1]-s,this.lastPageX=n[0],this.lastPageY=n[1],this.setStartPosition(n))},setStartPosition:function(t){var e=t||o.getXY(this.getEl());this.deltaSetXY=null,this.startPageX=e[0],this.startPageY=e[1]},addToGroup:function(t){this.groups[t]=!0,this.DDM.regDragDrop(this,t)},removeFromGroup:function(t){this.groups[t]&&delete this.groups[t],this.DDM.removeDDFromGroup(this,t)},setDragElId:function(t){this.dragElId=t},setHandleElId:function(t){"string"!=typeof t&&(t=Ext.id(t)),this.handleElId=t,this.DDM.regHandle(this.id,t)},setOuterHandleElId:function(t){"string"!=typeof t&&(t=Ext.id(t)),s.on(t,"mousedown",this.handleMouseDown,this),this.setHandleElId(t),this.hasOuterHandles=!0},unreg:function(){s.un(this.id,"mousedown",this.handleMouseDown),this._domRef=null,this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return this.DDM.isLocked()||this.locked},handleMouseDown:function(t,e){var i;this.primaryButtonOnly&&0!=t.button||this.isLocked()||(this.DDM.refreshCache(this.groups),i=new Ext.lib.Point(Ext.lib.Event.getPageX(t),Ext.lib.Event.getPageY(t)),(this.hasOuterHandles||this.DDM.isOverTarget(i,this))&&this.clickValidator(t)&&(this.setStartPosition(),this.b4MouseDown(t),this.onMouseDown(t),this.DDM.handleMouseDown(t,this),this.preventDefault||this.stopPropagation?(this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation()):this.DDM.stopEvent(t)))},clickValidator:function(t){var e=t.getTarget();return this.isValidHandleChild(e)&&(this.id==this.handleElId||this.DDM.handleWasClicked(e,this.id))},addInvalidHandleType:function(t){var e=t.toUpperCase();this.invalidHandleTypes[e]=e},addInvalidHandleId:function(t){"string"!=typeof t&&(t=Ext.id(t)),this.invalidHandleIds[t]=t},addInvalidHandleClass:function(t){this.invalidHandleClasses.push(t)},removeInvalidHandleType:function(t){var e=t.toUpperCase();delete this.invalidHandleTypes[e]},removeInvalidHandleId:function(t){"string"!=typeof t&&(t=Ext.id(t)),delete this.invalidHandleIds[t]},removeInvalidHandleClass:function(t){for(var e=0,i=this.invalidHandleClasses.length;e<i;++e)this.invalidHandleClasses[e]==t&&delete this.invalidHandleClasses[e]},isValidHandleChild:function(e){var i,t=!0;try{i=e.nodeName.toUpperCase()}catch(t){i=e.nodeName}t=(t=t&&!this.invalidHandleTypes[i])&&!this.invalidHandleIds[e.id];for(var s=0,n=this.invalidHandleClasses.length;t&&s<n;++s)t=!Ext.fly(e).hasClass(this.invalidHandleClasses[s]);return t},setXTicks:function(t,e){this.xTicks=[],this.xTickSize=e;for(var i={},s=this.initPageX;s>=this.minX;s-=e)i[s]||(i[this.xTicks[this.xTicks.length]=s]=!0);for(s=this.initPageX;s<=this.maxX;s+=e)i[s]||(i[this.xTicks[this.xTicks.length]=s]=!0);this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(t,e){this.yTicks=[],this.yTickSize=e;for(var i={},s=this.initPageY;s>=this.minY;s-=e)i[s]||(i[this.yTicks[this.yTicks.length]=s]=!0);for(s=this.initPageY;s<=this.maxY;s+=e)i[s]||(i[this.yTicks[this.yTicks.length]=s]=!0);this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(t,e,i){this.leftConstraint=t,this.rightConstraint=e,this.minX=this.initPageX-t,this.maxX=this.initPageX+e,i&&this.setXTicks(this.initPageX,i),this.constrainX=!0},clearConstraints:function(){this.constrainX=!1,this.constrainY=!1,this.clearTicks()},clearTicks:function(){this.xTicks=null,this.yTicks=null,this.xTickSize=0,this.yTickSize=0},setYConstraint:function(t,e,i){this.topConstraint=t,this.bottomConstraint=e,this.minY=this.initPageY-t,this.maxY=this.initPageY+e,i&&this.setYTicks(this.initPageY,i),this.constrainY=!0},resetConstraints:function(){var t,e;this.initPageX||0===this.initPageX?(t=this.maintainOffset?this.lastPageX-this.initPageX:0,e=this.maintainOffset?this.lastPageY-this.initPageY:0,this.setInitPosition(t,e)):this.setInitPosition(),this.constrainX&&this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize),this.constrainY&&this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)},getTick:function(t,e){if(e){if(e[0]>=t)return e[0];for(var i=0,s=e.length;i<s;++i){var n=i+1;if(e[n]&&e[n]>=t)return t-e[i]<e[n]-t?e[i]:e[n]}return e[e.length-1]}return t},toString:function(){return"DragDrop "+this.id}}}(),Ext.dd.DragDropMgr||(Ext.dd.DragDropMgr=function(){var i=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:!0,stopPropagation:!0,initialized:!1,locked:!1,init:function(){this.initialized=!0},POINT:0,INTERSECT:1,mode:0,notifyOccluded:!1,_execOnAll:function(t,e){for(var i in this.ids)for(var s in this.ids[i]){var n=this.ids[i][s];this.isTypeOfDD(n)&&n[t].apply(n,e)}},_onLoad:function(){this.init(),i.on(document,"mouseup",this.handleMouseUp,this,!0),i.on(document,"mousemove",this.handleMouseMove,this,!0),i.on(window,"unload",this._onUnload,this,!0),i.on(window,"resize",this._onResize,this,!0)},_onResize:function(t){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=!0},unlock:function(){this.locked=!1},isLocked:function(){return this.locked},locationCache:{},useCache:!0,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:!1,clickTimeout:null,startX:0,startY:0,regDragDrop:function(t,e){this.initialized||this.init(),this.ids[e]||(this.ids[e]={}),this.ids[e][t.id]=t},removeDDFromGroup:function(t,e){this.ids[e]||(this.ids[e]={});var i=this.ids[e];i&&i[t.id]&&delete i[t.id]},_remove:function(t){for(var e in t.groups)e&&this.ids[e]&&this.ids[e][t.id]&&delete this.ids[e][t.id];delete this.handleIds[t.id]},regHandle:function(t,e){this.handleIds[t]||(this.handleIds[t]={}),this.handleIds[t][e]=e},isDragDrop:function(t){return!!this.getDDById(t)},getRelated:function(t,e){var i=[];for(var s in t.groups)for(var n in this.ids[s]){var r=this.ids[s][n];this.isTypeOfDD(r)&&(e&&!r.isTarget||(i[i.length]=r))}return i},isLegalTarget:function(t,e){for(var i=this.getRelated(t,!0),s=0,n=i.length;s<n;++s)if(i[s].id==e.id)return!0;return!1},isTypeOfDD:function(t){return t&&t.__ygDragDrop},isHandle:function(t,e){return this.handleIds[t]&&this.handleIds[t][e]},getDDById:function(t){for(var e in this.ids)if(this.ids[e][t])return this.ids[e][t];return null},handleMouseDown:function(t,e){Ext.QuickTips&&Ext.QuickTips.ddDisable(),this.dragCurrent&&this.handleMouseUp(t),this.currentTarget=t.getTarget();var i=(this.dragCurrent=e).getEl();this.startX=t.getPageX(),this.startY=t.getPageY(),this.deltaX=this.startX-i.offsetLeft,this.deltaY=this.startY-i.offsetTop,this.dragThreshMet=!1,this.clickTimeout=setTimeout(function(){var t=Ext.dd.DDM;t.startDrag(t.startX,t.startY)},this.clickTimeThresh)},startDrag:function(t,e){clearTimeout(this.clickTimeout),this.dragCurrent&&(this.dragCurrent.b4StartDrag(t,e),this.dragCurrent.startDrag(t,e)),this.dragThreshMet=!0},handleMouseUp:function(t){Ext.QuickTips&&Ext.QuickTips.ddEnable(),this.dragCurrent&&(clearTimeout(this.clickTimeout),this.dragThreshMet&&this.fireEvents(t,!0),this.stopDrag(t),this.stopEvent(t))},stopEvent:function(t){this.stopPropagation&&t.stopPropagation(),this.preventDefault&&t.preventDefault()},stopDrag:function(t){this.dragCurrent&&(this.dragThreshMet&&(this.dragCurrent.b4EndDrag(t),this.dragCurrent.endDrag(t)),this.dragCurrent.onMouseUp(t)),this.dragCurrent=null,this.dragOvers={}},handleMouseMove:function(t){return!this.dragCurrent||(Ext.isIE&&0!==t.button&&1!==t.button&&2!==t.button?(this.stopEvent(t),this.handleMouseUp(t)):(this.dragThreshMet||(e=Math.abs(this.startX-t.getPageX()),i=Math.abs(this.startY-t.getPageY()),(e>this.clickPixelThresh||i>this.clickPixelThresh)&&this.startDrag(this.startX,this.startY)),this.dragThreshMet&&(this.dragCurrent.b4Drag(t),this.dragCurrent.onDrag(t),this.dragCurrent.moveOnly||this.fireEvents(t,!1)),this.stopEvent(t),!0));var e,i},fireEvents:function(t,e){var i,s,n,r,o,a,l=this,h=l.dragCurrent,d=t.getPoint(),c=[],u=[],f=[],p=[],g=[],m=[];if(h&&!h.isLocked()){for(r in l.dragOvers)i=l.dragOvers[r],l.isTypeOfDD(i)&&(this.isOverTarget(d,i,l.mode)||f.push(i),u[r]=!0,delete l.dragOvers[r]);for(a in h.groups)if("string"==typeof a)for(r in l.ids[a])i=l.ids[a][r],l.isTypeOfDD(i)&&(s=i.getEl())&&i.isTarget&&!i.isLocked()&&(i!=h||!1===h.ignoreSelf)&&(-1!==(i.zIndex=l.getZIndex(s))&&(n=!0),c.push(i));for(n&&c.sort(l.byZIndex),r=0,o=c.length;r<o&&(i=c[r],!l.isOverTarget(d,i,l.mode)||(e?g.push(i):(u[i.id]?p.push(i):m.push(i),l.dragOvers[i.id]=i),l.notifyOccluded));r++);if(l.mode)f.length&&(h.b4DragOut(t,f),h.onDragOut(t,f)),m.length&&h.onDragEnter(t,m),p.length&&(h.b4DragOver(t,p),h.onDragOver(t,p)),g.length&&(h.b4DragDrop(t,g),h.onDragDrop(t,g));else{for(r=0,o=f.length;r<o;++r)h.b4DragOut(t,f[r].id),h.onDragOut(t,f[r].id);for(r=0,o=m.length;r<o;++r)h.onDragEnter(t,m[r].id);for(r=0,o=p.length;r<o;++r)h.b4DragOver(t,p[r].id),h.onDragOver(t,p[r].id);for(r=0,o=g.length;r<o;++r)h.b4DragDrop(t,g[r].id),h.onDragDrop(t,g[r].id)}e&&!g.length&&h.onInvalidDrop(t)}},getZIndex:function(t){var e,i=document.body,s=-1;for(t=Ext.getDom(t);t!==i;)isNaN(e=Number(Ext.fly(t).getStyle("zIndex")))||(s=e),t=t.parentNode;return s},byZIndex:function(t,e){return t.zIndex<e.zIndex},getBestMatch:function(t){var e=null,i=t.length;if(1==i)e=t[0];else for(var s=0;s<i;++s){var n=t[s];if(n.cursorIsOver){e=n;break}(!e||e.overlap.getArea()<n.overlap.getArea())&&(e=n)}return e},refreshCache:function(t){for(var e in t)if("string"==typeof e)for(var i in this.ids[e]){var s,n=this.ids[e][i];this.isTypeOfDD(n)&&((s=this.getLocation(n))?this.locationCache[n.id]=s:delete this.locationCache[n.id])}},verifyEl:function(t){if(t){var e;if(Ext.isIE)try{e=t.offsetParent}catch(t){}else e=t.offsetParent;if(e)return!0}return!1},getLocation:function(t){if(!this.isTypeOfDD(t))return null;var e,i,s,n,r,o,a,l,h,d=t.getEl();try{e=Ext.lib.Dom.getXY(d)}catch(t){}return e?(s=(i=e[0])+d.offsetWidth,r=(n=e[1])+d.offsetHeight,o=n-t.padding[0],a=s+t.padding[1],l=r+t.padding[2],h=i-t.padding[3],new Ext.lib.Region(o,a,l,h)):null},isOverTarget:function(t,e,i){var s=this.locationCache[e.id];if(s&&this.useCache||(s=this.getLocation(e),this.locationCache[e.id]=s),!s)return!1;e.cursorIsOver=s.contains(t);var n=this.dragCurrent;if(!n||!n.getTargetCoord||!i&&!n.constrainX&&!n.constrainY)return e.cursorIsOver;e.overlap=null;var r=n.getTargetCoord(t.x,t.y),o=n.getDragEl(),a=new Ext.lib.Region(r.y,r.x+o.offsetWidth,r.y+o.offsetHeight,r.x).intersect(s);return!!a&&(e.overlap=a,!!i||e.cursorIsOver)},_onUnload:function(t,e){i.removeListener(document,"mouseup",this.handleMouseUp,this),i.removeListener(document,"mousemove",this.handleMouseMove,this),i.removeListener(window,"resize",this._onResize,this),Ext.dd.DragDropMgr.unregAll()},unregAll:function(){for(var t in this.dragCurrent&&(this.stopDrag(),this.dragCurrent=null),this._execOnAll("unreg",[]),this.elementCache)delete this.elementCache[t];this.elementCache={},this.ids={}},elementCache:{},getElWrapper:function(t){var e=this.elementCache[t];return e&&e.el||(e=this.elementCache[t]=new this.ElementWrapper(Ext.getDom(t))),e},getElement:function(t){return Ext.getDom(t)},getCss:function(t){var e=Ext.getDom(t);return e?e.style:null},ElementWrapper:function(t){this.el=t||null,this.id=this.el&&t.id,this.css=this.el&&t.style},getPosX:function(t){return Ext.lib.Dom.getX(t)},getPosY:function(t){return Ext.lib.Dom.getY(t)},swapNode:function(t,e){var i,s;t.swapNode?t.swapNode(e):(i=e.parentNode,(s=e.nextSibling)==t?i.insertBefore(t,e):e==t.nextSibling?i.insertBefore(e,t):(t.parentNode.replaceChild(e,t),i.insertBefore(t,s)))},getScroll:function(){var t,e,i=document.documentElement,s=document.body;return i&&(i.scrollTop||i.scrollLeft)?(t=i.scrollTop,e=i.scrollLeft):s&&(t=s.scrollTop,e=s.scrollLeft),{top:t,left:e}},getStyle:function(t,e){return Ext.fly(t).getStyle(e)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(t,e){var i=Ext.lib.Dom.getXY(e);Ext.lib.Dom.setXY(t,i)},numericSort:function(t,e){return t-e},_timeoutCount:0,_addListeners:function(){var t=Ext.dd.DDM;Ext.lib.Event&&document?t._onLoad():2e3<t._timeoutCount||(setTimeout(t._addListeners,10),document&&document.body&&(t._timeoutCount+=1))},handleWasClicked:function(t,e){if(this.isHandle(e,t.id))return!0;for(var i=t.parentNode;i;){if(this.isHandle(e,i.id))return!0;i=i.parentNode}return!1}}}(),Ext.dd.DDM=Ext.dd.DragDropMgr,Ext.dd.DDM._addListeners()),Ext.dd.DD=function(t,e,i){t&&this.init(t,e,i)},Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:!0,autoOffset:function(t,e){var i=t-this.startPageX,s=e-this.startPageY;this.setDelta(i,s)},setDelta:function(t,e){this.deltaX=t,this.deltaY=e},setDragElPos:function(t,e){var i=this.getDragEl();this.alignElWithMouse(i,t,e)},alignElWithMouse:function(t,e,i){var s,n,r,o=this.getTargetCoord(e,i),a=t.dom?t:Ext.fly(t,"_dd");return this.deltaSetXY?a.setLeftTop(o.x+this.deltaSetXY[0],o.y+this.deltaSetXY[1]):(s=[o.x,o.y],a.setXY(s),n=a.getLeft(!0),r=a.getTop(!0),this.deltaSetXY=[n-o.x,r-o.y]),this.cachePosition(o.x,o.y),this.autoScroll(o.x,o.y,t.offsetHeight,t.offsetWidth),o},cachePosition:function(t,e){var i;t?(this.lastPageX=t,this.lastPageY=e):(i=Ext.lib.Dom.getXY(this.getEl()),this.lastPageX=i[0],this.lastPageY=i[1])},autoScroll:function(t,e,i,s){var n,r,o,a,l,h,d,c,u;this.scroll&&(n=Ext.lib.Dom.getViewHeight(),r=Ext.lib.Dom.getViewWidth(),o=this.DDM.getScrollTop(),a=this.DDM.getScrollLeft(),l=i+e,h=s+t,d=n+o-e-this.deltaY,c=r+a-t-this.deltaX,u=document.all?80:30,n<l&&d<40&&window.scrollTo(a,o+u),e<o&&0<o&&e-o<40&&window.scrollTo(a,o-u),r<h&&c<40&&window.scrollTo(a+u,o),t<a&&0<a&&t-a<40&&window.scrollTo(a-u,o))},getTargetCoord:function(t,e){var i=t-this.deltaX,s=e-this.deltaY;return this.constrainX&&(i<this.minX&&(i=this.minX),i>this.maxX&&(i=this.maxX)),this.constrainY&&(s<this.minY&&(s=this.minY),s>this.maxY&&(s=this.maxY)),{x:i=this.getTick(i,this.xTicks),y:s=this.getTick(s,this.yTicks)}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this),this.scroll=!1!==this.config.scroll},b4MouseDown:function(t){this.autoOffset(t.getPageX(),t.getPageY())},b4Drag:function(t){this.setDragElPos(t.getPageX(),t.getPageY())},toString:function(){return"DD "+this.id}}),Ext.dd.DDProxy=function(t,e,i){t&&(this.init(t,e,i),this.initFrame())},Ext.dd.DDProxy.dragElId="ygddfdiv",Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:!0,centerFrame:!1,createFrame:function(){var t,e,i=this,s=document.body;s&&s.firstChild?(t=this.getDragEl())||((t=document.createElement("div")).id=this.dragElId,(e=t.style).position="absolute",e.visibility="hidden",e.cursor="move",e.border="2px solid #aaa",e.zIndex=999,s.insertBefore(t,s.firstChild)):setTimeout(function(){i.createFrame()},50)},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this),this.resizeFrame=!1!==this.config.resizeFrame,this.centerFrame=this.config.centerFrame,this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(t,e){this.getEl();var i=this.getDragEl(),s=i.style;this._resizeProxy(),this.centerFrame&&this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2)),this.setDragElPos(t,e),Ext.fly(i).show()},_resizeProxy:function(){var t;this.resizeFrame&&(t=this.getEl(),Ext.fly(this.getDragEl()).setSize(t.offsetWidth,t.offsetHeight))},b4MouseDown:function(t){var e=t.getPageX(),i=t.getPageY();this.autoOffset(e,i),this.setDragElPos(e,i)},b4StartDrag:function(t,e){this.showFrame(t,e)},b4EndDrag:function(t){Ext.fly(this.getDragEl()).hide()},endDrag:function(t){var e=this.getEl(),i=this.getDragEl();i.style.visibility="",this.beforeMove(),e.style.visibility="hidden",Ext.dd.DDM.moveToEl(e,i),i.style.visibility="hidden",e.style.visibility="",this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return"DDProxy "+this.id}}),Ext.dd.DDTarget=function(t,e,i){t&&this.initTarget(t,e,i)},Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{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.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:!1,tolerance:5,autoStart:!1,constructor:function(t){Ext.apply(this,t),this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag"),this.dragRegion=new Ext.lib.Region(0,0,0,0),this.el&&this.initEl(this.el),Ext.dd.DragTracker.superclass.constructor.call(this,t)},initEl:function(t){this.el=Ext.get(t),t.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:void 0)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this),delete this.el},onMouseDown:function(t,e){!1!==this.fireEvent("mousedown",this,t)&&!1!==this.onBeforeStart(t)&&(this.startXY=this.lastXY=t.getXY(),this.dragTarget=this.delegate?e:this.el.dom,!1!==this.preventDefault&&t.preventDefault(),Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect}),this.autoStart&&(this.timer=this.triggerStart.defer(!0===this.autoStart?1e3:this.autoStart,this,[t])))},onMouseMove:function(t,e){var i=Ext.isIE6||Ext.isIE7||Ext.isIE8;if(this.active&&i&&!t.browserEvent.button)return t.preventDefault(),void this.onMouseUp(t);t.preventDefault();var s=t.getXY(),n=this.startXY;if(this.lastXY=s,!this.active){if(!(Math.abs(n[0]-s[0])>this.tolerance||Math.abs(n[1]-s[1])>this.tolerance))return;this.triggerStart(t)}this.fireEvent("mousemove",this,t),this.onDrag(t),this.fireEvent("drag",this,t)},onMouseUp:function(t){var e=Ext.getDoc(),i=this.active;e.un("mousemove",this.onMouseMove,this),e.un("mouseup",this.onMouseUp,this),e.un("selectstart",this.stopSelect,this),t.preventDefault(),this.clearStart(),this.active=!1,delete this.elRegion,this.fireEvent("mouseup",this,t),i&&(this.onEnd(t),this.fireEvent("dragend",this,t))},triggerStart:function(t){this.clearStart(),this.active=!0,this.onStart(t),this.fireEvent("dragstart",this,t)},clearStart:function(){this.timer&&(clearTimeout(this.timer),delete this.timer)},stopSelect:function(t){return t.stopEvent(),!1},onBeforeStart:function(t){},onStart:function(t){},onDrag:function(t){},onEnd:function(t){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(t){return t?this.constrainModes[t].call(this,this.lastXY):this.lastXY},getOffset:function(t){var e=this.getXY(t),i=this.startXY;return[i[0]-e[0],i[1]-e[1]]},constrainModes:{point:function(t){this.elRegion||(this.elRegion=this.getDragCt().getRegion());var e=this.dragRegion;return e.left=t[0],e.top=t[1],e.right=t[0],e.bottom=t[1],e.constrainTo(this.elRegion),[e.left,e.top]}}}),Ext.dd.ScrollManager=function(){function i(){d.dragCurrent&&d.refreshCache(d.dragCurrent.groups)}function n(){var t,e;d.dragCurrent&&(t=Ext.dd.ScrollManager,e=f.el.ddScrollConfig?f.el.ddScrollConfig.increment:t.increment,t.animate?f.el.scroll(f.dir,e,!0,t.animDuration,i):f.el.scroll(f.dir,e)&&i())}function h(t,e){p(),f.el=t,f.dir=e;var i=t.ddScrollConfig?t.ddScrollConfig.ddGroup:void 0,s=t.ddScrollConfig&&t.ddScrollConfig.frequency?t.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;void 0!==i&&d.dragCurrent.ddGroup!=i||(f.id=setInterval(n,s))}var d=Ext.dd.DragDropMgr,c={},u=null,f={},p=function(){f.id&&clearInterval(f.id),f.id=0,f.el=null,f.dir=""};return d.fireEvents=d.fireEvents.createSequence(function(t,e){if(!e&&d.dragCurrent){var i=Ext.dd.ScrollManager;u&&u==d.dragCurrent||(u=d.dragCurrent,i.refreshCache());var s=Ext.lib.Event.getXY(t),n=new Ext.lib.Point(s[0],s[1]);for(var r in c){var o=c[r],a=o._region,l=o.ddScrollConfig?o.ddScrollConfig:i;if(a&&a.contains(n)&&o.isScrollable()){if(a.bottom-n.y<=l.vthresh)return void(f.el!=o&&h(o,"down"));if(a.right-n.x<=l.hthresh)return void(f.el!=o&&h(o,"left"));if(n.y-a.top<=l.vthresh)return void(f.el!=o&&h(o,"up"));if(n.x-a.left<=l.hthresh)return void(f.el!=o&&h(o,"right"))}}p()}},d),d.stopDrag=d.stopDrag.createSequence(function(t){u=null,p()},d),{register:function(t){if(Ext.isArray(t))for(var e=0,i=t.length;e<i;e++)this.register(t[e]);else t=Ext.get(t),c[t.id]=t},unregister:function(t){if(Ext.isArray(t))for(var e=0,i=t.length;e<i;e++)this.unregister(t[e]);else t=Ext.get(t),delete c[t.id]},vthresh:25,hthresh:25,increment:100,frequency:500,animate:!0,animDuration:.4,ddGroup:void 0,refreshCache:function(){for(var t in c)"object"==typeof c[t]&&(c[t]._region=c[t].getRegion())}}}(),Ext.dd.Registry=function(){function o(t,e){if("string"==typeof t)return t;var i=t.id;return i||!1===e||(i="extdd-"+ ++s,t.id=i),i}var a={},l={},s=0;return{register:function(t,e){if(e=e||{},"string"==typeof t&&(t=document.getElementById(t)),e.ddel=t,!1!==(a[o(t)]=e).isHandle&&(l[e.ddel.id]=e),e.handles)for(var i=e.handles,s=0,n=i.length;s<n;s++)l[o(i[s])]=e},unregister:function(t){var e=o(t,!1),i=a[e];if(i&&(delete a[e],i.handles))for(var s=i.handles,n=0,r=s.length;n<r;n++)delete l[o(s[n],!1)]},getHandle:function(t){return"string"!=typeof t&&(t=t.id),l[t]},getHandleFromEvent:function(t){var e=Ext.lib.Event.getTarget(t);return e?l[e.id]:null},getTarget:function(t){return"string"!=typeof t&&(t=t.id),a[t]},getTargetFromEvent:function(t){var e=Ext.lib.Event.getTarget(t);return e?a[e.id]||l[e.id]:null}}}(),Ext.dd.StatusProxy=function(t){Ext.apply(this,t),this.id=this.id||Ext.id(),this.el=new Ext.Layer({dh:{id:this.id,tag:"div",cls:"x-dd-drag-proxy "+this.dropNotAllowed,children:[{tag:"div",cls:"x-dd-drop-icon"},{tag:"div",cls:"x-dd-drag-ghost"}]},shadow:!t||!1!==t.shadow}),this.ghost=Ext.get(this.el.dom.childNodes[1]),this.dropStatus=this.dropNotAllowed},Ext.dd.StatusProxy.prototype={dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",setStatus:function(t){t=t||this.dropNotAllowed,this.dropStatus!=t&&(this.el.replaceClass(this.dropStatus,t),this.dropStatus=t)},reset:function(t){this.el.dom.className="x-dd-drag-proxy "+this.dropNotAllowed,this.dropStatus=this.dropNotAllowed,t&&this.ghost.update("")},update:function(t){"string"==typeof t?this.ghost.update(t):(this.ghost.update(""),t.style.margin="0",this.ghost.dom.appendChild(t));var e=this.ghost.dom.firstChild;e&&Ext.fly(e).setStyle("float","none")},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(t){this.el.hide(),t&&this.reset(!0)},stop:function(){this.anim&&this.anim.isAnimated&&this.anim.isAnimated()&&this.anim.stop()},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(t,e,i){this.callback=e,this.scope=i,t&&!1!==this.animRepair?(this.el.addClass("x-dd-drag-repair"),this.el.hideUnders(!0),this.anim=this.el.shift({duration:this.repairDuration||.5,easing:"easeOut",xy:t,stopFx:!0,callback:this.afterRepair,scope:this})):this.afterRepair()},afterRepair:function(){this.hide(!0),"function"==typeof this.callback&&this.callback.call(this.scope||this),this.callback=null,this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.el)}},Ext.dd.DragSource=function(t,e){this.el=Ext.get(t),this.dragData||(this.dragData={}),Ext.apply(this,e),this.proxy||(this.proxy=new Ext.dd.StatusProxy),Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:!1,isTarget:!1,scroll:!0===this.scroll}),this.dragging=!1},Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(t){return this.dragData},onDragEnter:function(t,e){var i,s=Ext.dd.DragDropMgr.getDDById(e);this.cachedTarget=s,!1!==this.beforeDragEnter(s,t,e)&&(s.isNotifyTarget?(i=s.notifyEnter(this,t,this.dragData),this.proxy.setStatus(i)):this.proxy.setStatus(this.dropAllowed),this.afterDragEnter&&this.afterDragEnter(s,t,e))},beforeDragEnter:function(t,e,i){return!0},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments),this.proxy.sync()},onDragOver:function(t,e){var i,s=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(e);!1!==this.beforeDragOver(s,t,e)&&(s.isNotifyTarget&&(i=s.notifyOver(this,t,this.dragData),this.proxy.setStatus(i)),this.afterDragOver&&this.afterDragOver(s,t,e))},beforeDragOver:function(t,e,i){return!0},onDragOut:function(t,e){var i=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(e);!1!==this.beforeDragOut(i,t,e)&&(i.isNotifyTarget&&i.notifyOut(this,t,this.dragData),this.proxy.reset(),this.afterDragOut&&this.afterDragOut(i,t,e)),this.cachedTarget=null},beforeDragOut:function(t,e,i){return!0},onDragDrop:function(t,e){var i=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(e);!1!==this.beforeDragDrop(i,t,e)&&(!i.isNotifyTarget||i.notifyDrop(this,t,this.dragData)?this.onValidDrop(i,t,e):this.onInvalidDrop(i,t,e),this.afterDragDrop&&this.afterDragDrop(i,t,e)),delete this.cachedTarget},beforeDragDrop:function(t,e,i){return!0},onValidDrop:function(t,e,i){this.hideProxy(),this.afterValidDrop&&this.afterValidDrop(t,e,i)},getRepairXY:function(t,e){return this.el.getXY()},onInvalidDrop:function(t,e,i){this.beforeInvalidDrop(t,e,i),this.cachedTarget&&(this.cachedTarget.isNotifyTarget&&this.cachedTarget.notifyOut(this,e,this.dragData),this.cacheTarget=null),this.proxy.repair(this.getRepairXY(e,this.dragData),this.afterRepair,this),this.afterInvalidDrop&&this.afterInvalidDrop(e,i)},afterRepair:function(){Ext.enableFx&&this.el.highlight(this.hlColor||"c3daf9"),this.dragging=!1},beforeInvalidDrop:function(t,e,i){return!0},handleMouseDown:function(t){var e;this.dragging||(e=this.getDragData(t))&&!1!==this.onBeforeDrag(e,t)&&(this.dragData=e,this.proxy.stop(),Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments))},onBeforeDrag:function(t,e){return!0},onStartDrag:Ext.emptyFn,startDrag:function(t,e){this.proxy.reset(),this.dragging=!0,this.proxy.update(""),this.onInitDrag(t,e),this.proxy.show()},onInitDrag:function(t,e){var i=this.el.dom.cloneNode(!0);return i.id=Ext.id(),this.proxy.update(i),this.onStartDrag(t,e),!0},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide(),this.proxy.reset(!0),this.dragging=!1},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(t){},endDrag:function(t){this.onEndDrag(this.dragData,t)},onEndDrag:function(t,e){},autoOffset:function(t,e){this.setDelta(-12,-20)},destroy:function(){Ext.dd.DragSource.superclass.destroy.call(this),Ext.destroy(this.proxy)}}),Ext.dd.DropTarget=Ext.extend(Ext.dd.DDTarget,{constructor:function(t,e){this.el=Ext.get(t),Ext.apply(this,e),this.containerScroll&&Ext.dd.ScrollManager.register(this.el),Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:!0})},dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:!0,isNotifyTarget:!0,notifyEnter:function(t,e,i){return this.overClass&&this.el.addClass(this.overClass),this.dropAllowed},notifyOver:function(t,e,i){return this.dropAllowed},notifyOut:function(t,e,i){this.overClass&&this.el.removeClass(this.overClass)},notifyDrop:function(t,e,i){return!1},destroy:function(){Ext.dd.DropTarget.superclass.destroy.call(this),this.containerScroll&&Ext.dd.ScrollManager.unregister(this.el)}}),Ext.dd.DragZone=Ext.extend(Ext.dd.DragSource,{constructor:function(t,e){Ext.dd.DragZone.superclass.constructor.call(this,t,e),this.containerScroll&&Ext.dd.ScrollManager.register(this.el)},getDragData:function(t){return Ext.dd.Registry.getHandleFromEvent(t)},onInitDrag:function(t,e){return this.proxy.update(this.dragData.ddel.cloneNode(!0)),this.onStartDrag(t,e),!0},afterRepair:function(){Ext.enableFx&&Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9"),this.dragging=!1},getRepairXY:function(t){return Ext.Element.fly(this.dragData.ddel).getXY()},destroy:function(){Ext.dd.DragZone.superclass.destroy.call(this),this.containerScroll&&Ext.dd.ScrollManager.unregister(this.el)}}),Ext.dd.DropZone=function(t,e){Ext.dd.DropZone.superclass.constructor.call(this,t,e)},Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(t){return Ext.dd.Registry.getTargetFromEvent(t)},onNodeEnter:function(t,e,i,s){},onNodeOver:function(t,e,i,s){return this.dropAllowed},onNodeOut:function(t,e,i,s){},onNodeDrop:function(t,e,i,s){return!1},onContainerOver:function(t,e,i){return this.dropNotAllowed},onContainerDrop:function(t,e,i){return!1},notifyEnter:function(t,e,i){return this.dropNotAllowed},notifyOver:function(t,e,i){var s=this.getTargetFromEvent(e);return s?(this.lastOverNode!=s&&(this.lastOverNode&&this.onNodeOut(this.lastOverNode,t,e,i),this.onNodeEnter(s,t,e,i),this.lastOverNode=s),this.onNodeOver(s,t,e,i)):(this.lastOverNode&&(this.onNodeOut(this.lastOverNode,t,e,i),this.lastOverNode=null),this.onContainerOver(t,e,i))},notifyOut:function(t,e,i){this.lastOverNode&&(this.onNodeOut(this.lastOverNode,t,e,i),this.lastOverNode=null)},notifyDrop:function(t,e,i){this.lastOverNode&&(this.onNodeOut(this.lastOverNode,t,e,i),this.lastOverNode=null);var s=this.getTargetFromEvent(e);return s?this.onNodeDrop(s,t,e,i):this.onContainerDrop(t,e,i)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}}),Ext.Element.addMethods({initDD:function(t,e,i){var s=new Ext.dd.DD(Ext.id(this.dom),t,e);return Ext.apply(s,i)},initDDProxy:function(t,e,i){var s=new Ext.dd.DDProxy(Ext.id(this.dom),t,e);return Ext.apply(s,i)},initDDTarget:function(t,e,i){var s=new Ext.dd.DDTarget(Ext.id(this.dom),t,e);return Ext.apply(s,i)}}),Ext.data.Api=function(){var i={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(t){return!!Ext.data.Api.actions[t]},getVerb:function(t){if(i[t])return i[t];for(var e in this.actions)if(this.actions[e]===t){i[t]=e;break}return void 0!==i[t]?i[t]:null},isValid:function(t){var e=[],i=this.actions;for(var s in t)s in i||e.push(s);return!e.length||e},hasUniqueUrl:function(t,e){var i=t.api[e]?t.api[e].url:null,s=!0;for(var n in t.api)if(!1==(s=n===e||t.api[n].url!=i))break;return s},prepare:function(t){for(var e in t.api||(t.api={}),this.actions){var i=this.actions[e];t.api[i]=t.api[i]||t.url||t.directFn,"string"==typeof t.api[i]&&(t.api[i]={url:t.api[i],method:!0===t.restful?Ext.data.Api.restActions[i]:void 0})}},restify:function(t){for(var e in t.restful=!0,this.restActions)t.api[this.actions[e]].method||(t.api[this.actions[e]].method=this.restActions[e]);t.onWrite=t.onWrite.createInterceptor(function(t,e,i,s){e.reader;var n=new Ext.data.Response({action:t,raw:i});switch(i.status){case 200:return!0;case 201:if(!Ext.isEmpty(n.raw.responseText))return!0;n.success=!0;break;case 204:n.success=!0,n.data=null;break;default:return!0}return!0===n.success?this.fireEvent("write",this,t,n.data,n,s,e.request.arg):this.fireEvent("exception",this,"remote",t,e,n,s),e.request.callback.call(e.request.scope,n.data,n,n.success),!1},t)}}}(),Ext.data.Response=function(t,e){Ext.apply(this,t,{raw:e})},Ext.data.Response.prototype={message:null,success:!1,status:null,root:null,raw:null,getMessage:function(){return this.message},getSuccess:function(){return this.success},getStatus:function(){return this.status},getRoot:function(){return this.root},getRawResponse:function(){return this.raw}},Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(t,e){this.arg=e,Ext.Error.call(this,t)},name:"Ext.data.Api"}),Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url.  Please review your proxy configuration.",execute:'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'}}),Ext.data.SortTypes={none:function(t){return t},stripTagsRE:/<\/?[^>]+>/gi,asText:function(t){return String(t).replace(this.stripTagsRE,"")},asUCText:function(t){return String(t).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(t){return String(t).toUpperCase()},asDate:function(t){return t?Ext.isDate(t)?t.getTime():Date.parse(String(t)):0},asFloat:function(t){var e=parseFloat(String(t).replace(/,/g,""));return isNaN(e)?0:e},asInt:function(t){var e=parseInt(String(t).replace(/,/g,""),10);return isNaN(e)?0:e}},Ext.data.Record=function(t,e){this.id=e||0===e?e:Ext.data.Record.id(this),this.data=t||{}},Ext.data.Record.create=function(t){var e=Ext.extend(Ext.data.Record,{}),i=e.prototype;i.fields=new Ext.util.MixedCollection(!1,function(t){return t.name});for(var s=0,n=t.length;s<n;s++)i.fields.add(new Ext.data.Field(t[s]));return e.getField=function(t){return i.fields.get(t)},e},Ext.data.Record.PREFIX="ext-record",Ext.data.Record.AUTO_ID=1,Ext.data.Record.EDIT="edit",Ext.data.Record.REJECT="reject",Ext.data.Record.COMMIT="commit",Ext.data.Record.id=function(t){return t.phantom=!0,[Ext.data.Record.PREFIX,"-",Ext.data.Record.AUTO_ID++].join("")},Ext.data.Record.prototype={dirty:!1,editing:!1,error:null,modified:null,phantom:!1,join:function(t){this.store=t},set:function(t,e){var i=Ext.isPrimitive(e)?String:Ext.encode;i(this.data[t])!=i(e)&&(this.dirty=!0,this.modified||(this.modified={}),void 0===this.modified[t]&&(this.modified[t]=this.data[t]),this.data[t]=e,this.editing||this.afterEdit())},afterEdit:function(){null!=this.store&&"function"==typeof this.store.afterEdit&&this.store.afterEdit(this)},afterReject:function(){this.store&&this.store.afterReject(this)},afterCommit:function(){this.store&&this.store.afterCommit(this)},get:function(t){return this.data[t]},beginEdit:function(){this.editing=!0,this.modified=this.modified||{}},cancelEdit:function(){this.editing=!1,delete this.modified},endEdit:function(){this.editing=!1,this.dirty&&this.afterEdit()},reject:function(t){var e=this.modified;for(var i in e)"function"!=typeof e[i]&&(this.data[i]=e[i]);this.dirty=!1,delete this.modified,!(this.editing=!1)!==t&&this.afterReject()},commit:function(t){this.dirty=!1,delete this.modified,!(this.editing=!1)!==t&&this.afterCommit()},getChanges:function(){var t=this.modified,e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=this.data[i]);return e},hasError:function(){return null!==this.error},clearError:function(){this.error=null},copy:function(t){return new this.constructor(Ext.apply({},this.data),t||this.id)},isModified:function(t){return!(!this.modified||!this.modified.hasOwnProperty(t))},isValid:function(){return!this.fields.find(function(t){return!(!1!==t.allowBlank||!Ext.isEmpty(this.data[t.name]))},this)},markDirty:function(){this.dirty=!0,this.modified||(this.modified={}),this.fields.each(function(t){this.modified[t.name]=this.data[t.name]},this)}},Ext.StoreMgr=Ext.apply(new Ext.util.MixedCollection,{register:function(){for(var t,e=0;t=arguments[e];e++)this.add(t)},unregister:function(){for(var t,e=0;t=arguments[e];e++)this.remove(this.lookup(t))},lookup:function(t){if(Ext.isArray(t)){var e=["field1"],i=!Ext.isArray(t[0]);if(!i)for(var s=2,n=t[0].length;s<=n;++s)e.push("field"+s);return new Ext.data.ArrayStore({fields:e,data:t,expandData:i,autoDestroy:!0,autoCreated:!0})}return Ext.isObject(t)?t.events?t:Ext.create(t,"store"):this.get(t)},getKey:function(t){return t.storeId}}),Ext.data.Store=Ext.extend(Ext.util.Observable,{writer:void 0,remoteSort:!1,autoDestroy:!1,pruneModifiedRecords:!1,lastOptions:null,autoSave:!0,batch:!0,restful:!1,paramNames:void 0,defaultParamNames:{start:"start",limit:"limit",sort:"sort",dir:"dir"},isDestroyed:!1,hasMultiSort:!1,batchKey:"_ext_batch_",constructor:function(t){this.data=new Ext.util.MixedCollection(!1),this.data.getKey=function(t){return t.id},this.removed=[],t&&t.data&&(this.inlineData=t.data,delete t.data),Ext.apply(this,t),this.baseParams=Ext.isObject(this.baseParams)?this.baseParams:{},this.paramNames=Ext.applyIf(this.paramNames||{},this.defaultParamNames),!this.url&&!this.api||this.proxy||(this.proxy=new Ext.data.HttpProxy({url:this.url,api:this.api})),!0===this.restful&&this.proxy&&(this.batch=!1,Ext.data.Api.restify(this.proxy)),this.reader&&(this.recordType||(this.recordType=this.reader.recordType),this.reader.onMetaChange&&(this.reader.onMetaChange=this.reader.onMetaChange.createSequence(this.onMetaChange,this)),this.writer&&(this.writer instanceof Ext.data.DataWriter==!1&&(this.writer=this.buildWriter(this.writer)),this.writer.meta=this.reader.meta,this.pruneModifiedRecords=!0)),this.recordType&&(this.fields=this.recordType.prototype.fields),this.modified=[],this.addEvents("datachanged","metachange","add","remove","update","clear","exception","beforeload","load","loadexception","beforewrite","write","beforesave","save"),this.proxy&&this.relayEvents(this.proxy,["loadexception","exception"]),this.writer&&this.on({scope:this,add:this.createRecords,remove:this.destroyRecord,update:this.updateRecord,clear:this.onClear}),this.sortToggle={},this.sortField?this.setDefaultSort(this.sortField,this.sortDir):this.sortInfo&&this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction),Ext.data.Store.superclass.constructor.call(this),this.id&&(this.storeId=this.id,delete this.id),this.storeId&&Ext.StoreMgr.register(this),this.inlineData?(this.loadData(this.inlineData),delete this.inlineData):this.autoLoad&&this.load.defer(10,this,["object"==typeof this.autoLoad?this.autoLoad:void 0]),this.batchCounter=0,this.batches={}},buildWriter:function(t){var e=void 0;switch((t.format||"json").toLowerCase()){case"json":e=Ext.data.JsonWriter;break;case"xml":e=Ext.data.XmlWriter;break;default:e=Ext.data.JsonWriter}return new e(t)},destroy:function(){this.isDestroyed||(this.storeId&&Ext.StoreMgr.unregister(this),this.clearData(),this.data=null,Ext.destroy(this.proxy),this.reader=this.writer=null,this.purgeListeners(),this.isDestroyed=!0)},add:function(t){var e,i,s,n;if(!((t=[].concat(t)).length<1)){for(e=0,i=t.length;e<i;e++)(s=t[e]).join(this),(s.dirty||s.phantom)&&this.modified.push(s);n=this.data.length,this.data.addAll(t),this.snapshot&&this.snapshot.addAll(t),this.fireEvent("add",this,t,n)}},addSorted:function(t){var e=this.findInsertIndex(t);this.insert(e,t)},doUpdate:function(t){var e=t.id;this.getById(e).join(null),this.data.replace(e,t),this.snapshot&&this.snapshot.replace(e,t),t.join(this),this.fireEvent("update",this,t,Ext.data.Record.COMMIT)},remove:function(t){var e;Ext.isArray(t)?Ext.each(t,function(t){this.remove(t)},this):(-1<(e=this.data.indexOf(t))&&(t.join(null),this.data.removeAt(e)),this.pruneModifiedRecords&&this.modified.remove(t),this.snapshot&&this.snapshot.remove(t),-1<e&&this.fireEvent("remove",this,t,e))},removeAt:function(t){this.remove(this.getAt(t))},removeAll:function(t){var e=[];this.each(function(t){e.push(t)}),this.clearData(),this.snapshot&&this.snapshot.clear(),this.pruneModifiedRecords&&(this.modified=[]),!0!==t&&this.fireEvent("clear",this,e)},onClear:function(t,e){Ext.each(e,function(t,e){this.destroyRecord(this,t,e)},this)},insert:function(t,e){for(var i,s=0,n=(e=[].concat(e)).length;s<n;s++)i=e[s],this.data.insert(t+s,i),i.join(this),(i.dirty||i.phantom)&&this.modified.push(i);this.snapshot&&this.snapshot.addAll(e),this.fireEvent("add",this,e,t)},indexOf:function(t){return this.data.indexOf(t)},indexOfId:function(t){return this.data.indexOfKey(t)},getById:function(t){return(this.snapshot||this.data).key(t)},getAt:function(t){return this.data.itemAt(t)},getRange:function(t,e){return this.data.getRange(t,e)},storeOptions:function(t){delete(t=Ext.apply({},t)).callback,delete t.scope,this.lastOptions=t},clearData:function(){this.data.each(function(t){t.join(null)}),this.data.clear()},load:function(t){var e;t=Ext.apply({},t),this.storeOptions(t),this.sortInfo&&this.remoteSort&&(e=this.paramNames,t.params=Ext.apply({},t.params),t.params[e.sort]=this.sortInfo.field,t.params[e.dir]=this.sortInfo.direction);try{return this.execute("read",null,t)}catch(t){return this.handleException(t),!1}},updateRecord:function(t,e,i){i==Ext.data.Record.EDIT&&!0===this.autoSave&&(!e.phantom||e.phantom&&e.isValid())&&this.save()},createRecords:function(t,e,i){for(var s,n=this.modified,r=e.length,o=0;o<r;o++)(s=e[o]).phantom&&s.isValid()&&(s.markDirty(),-1==n.indexOf(s)&&n.push(s));!0===this.autoSave&&this.save()},destroyRecord:function(t,e,i){-1!=this.modified.indexOf(e)&&this.modified.remove(e),e.phantom||(this.removed.push(e),e.lastIndex=i,!0===this.autoSave&&this.save())},execute:function(t,e,i,s){if(!Ext.data.Api.isAction(t))throw new Ext.data.Api.Error("execute",t);i=Ext.applyIf(i||{},{params:{}}),void 0!==s&&this.addToBatch(s);var n=!0;return"read"===t?(n=this.fireEvent("beforeload",this,i),Ext.applyIf(i.params,this.baseParams)):(!0===this.writer.listful&&!0!==this.restful?e=Ext.isArray(e)?e:[e]:Ext.isArray(e)&&1==e.length&&(e=e.shift()),!1!==(n=this.fireEvent("beforewrite",this,t,e,i))&&this.writer.apply(i.params,this.baseParams,t,e)),!1!==n&&(this.writer&&this.proxy.url&&!this.proxy.restful&&!Ext.data.Api.hasUniqueUrl(this.proxy,t)&&(i.params.xaction=t),this.proxy.request(Ext.data.Api.actions[t],e,i.params,this.reader,this.createCallback(t,e,s),this,i)),n},save:function(){if(!this.writer)throw new Ext.data.Store.Error("writer-undefined");var t,e,i,s=[],n={};this.removed.length&&s.push(["destroy",this.removed]);var r=[].concat(this.getModifiedRecords());if(r.length){for(var o,a=[],l=r.length-1;0<=l;l--){!0===r[l].phantom?(o=r.splice(l,1).shift()).isValid()&&a.push(o):r[l].isValid()||r.splice(l,1)}a.length&&s.push(["create",a]),r.length&&s.push(["update",r])}if(t=s.length){for(i=++this.batchCounter,l=0;l<t;++l)n[(e=s[l])[0]]=e[1];if(!1!==this.fireEvent("beforesave",this,n)){for(l=0;l<t;++l)e=s[l],this.doTransaction(e[0],e[1],i);return i}}return-1},doTransaction:function(e,t,i){function s(t){try{this.execute(e,t,void 0,i)}catch(t){this.handleException(t)}}if(!1===this.batch)for(var n=0,r=t.length;n<r;n++)s.call(this,t[n]);else s.call(this,t)},addToBatch:function(t){var e=this.batches,i=this.batchKey+t,s=e[i];s||(e[i]=s={id:t,count:0,data:{}}),++s.count},removeFromBatch:function(t,e,i){var s,n=this.batches,r=this.batchKey+t,o=n[r];o&&(s=o.data[e]||[],o.data[e]=s.concat(i),1===o.count?(i=o.data,delete n[r],this.fireEvent("save",this,t,i)):--o.count)},createCallback:function(s,n,r){Ext.data.Api.actions;return"read"==s?this.loadRecords:function(t,e,i){this["on"+Ext.util.Format.capitalize(s)+"Records"](i,n,[].concat(t)),!0===i&&this.fireEvent("write",this,s,t,e,n),this.removeFromBatch(r,s,t)}},clearModified:function(t){if(Ext.isArray(t))for(var e=t.length-1;0<=e;e--)this.modified.splice(this.modified.indexOf(t[e]),1);else this.modified.splice(this.modified.indexOf(t),1)},reMap:function(t){if(Ext.isArray(t))for(var e=0,i=t.length;e<i;e++)this.reMap(t[e]);else{delete this.data.map[t._phid],this.data.map[t.id]=t;var s=this.data.keys.indexOf(t._phid);this.data.keys.splice(s,1,t.id),delete t._phid}},onCreateRecords:function(e,i,s){if(!0===e)try{this.reader.realize(i,s)}catch(t){this.handleException(t),Ext.isArray(i)&&this.onCreateRecords(e,i,s)}},onUpdateRecords:function(e,i,s){if(!0===e)try{this.reader.update(i,s)}catch(t){this.handleException(t),Ext.isArray(i)&&this.onUpdateRecords(e,i,s)}},onDestroyRecords:function(t,e,i){for(var s=0,n=(e=e instanceof Ext.data.Record?[e]:[].concat(e)).length;s<n;s++)this.removed.splice(this.removed.indexOf(e[s]),1);if(!1===t)for(s=e.length-1;0<=s;s--)this.insert(e[s].lastIndex,e[s])},handleException:function(t){Ext.handleError(t)},reload:function(t){this.load(Ext.applyIf(t||{},this.lastOptions))},loadRecords:function(t,e,i){if(!0!==this.isDestroyed){if(!t||!1===i)return!1!==i&&this.fireEvent("load",this,[],e),void(e.callback&&e.callback.call(e.scope||this,[],e,!1,t));var s=t.records,n=t.totalRecords||s.length;if(e&&!0===e.add){for(var r,o=[],a=0,l=0,h=s.length;l<h;++l)r=s[l],-1<this.indexOfId(r.id)?this.doUpdate(r):(o.push(r),++a);this.totalLength=Math.max(n,this.data.length+a),this.add(o)}else{for(this.pruneModifiedRecords&&(this.modified=[]),l=0,h=s.length;l<h;l++)s[l].join(this);this.snapshot&&(this.data=this.snapshot,delete this.snapshot),this.clearData(),this.data.addAll(s),this.totalLength=n,this.applySort(),this.fireEvent("datachanged",this)}this.fireEvent("load",this,s,e),e.callback&&e.callback.call(e.scope||this,s,e,!0)}},loadData:function(t,e){var i=this.reader.readRecords(t);this.loadRecords(i,{add:e},!0)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){!this.sortInfo&&!this.multiSortInfo||this.remoteSort||this.sortData()},sortData:function(){var t=this.hasMultiSort?this.multiSortInfo:this.sortInfo,e=t.direction||"ASC",i=t.sorters,r=[];this.hasMultiSort||(i=[{direction:e,field:t.field}]);for(var o,s,n=0,a=i.length;n<a;n++)r.push(this.createSortFunction(i[n].field,i[n].direction));0!=r.length&&(o="DESC"==e.toUpperCase()?-1:1,s=function(t,e){var i=r[0].call(this,t,e);if(1<r.length)for(var s=1,n=r.length;s<n;s++)i=i||r[s].call(this,t,e);return o*i},this.data.sort(e,s),this.snapshot&&this.snapshot!=this.data&&this.snapshot.sort(e,s))},createSortFunction:function(n,t){var r="DESC"==(t=t||"ASC").toUpperCase()?-1:1,o=this.fields.get(n).sortType;return function(t,e){var i=o(t.data[n]),s=o(e.data[n]);return r*(s<i?1:i<s?-1:0)}},setDefaultSort:function(t,e){e=e?e.toUpperCase():"ASC",this.sortInfo={field:t,direction:e},this.sortToggle[t]=e},sort:function(t,e){return Ext.isArray(t)?this.multiSort.call(this,t,e):this.singleSort(t,e)},singleSort:function(t,e){var i=this.fields.get(t);if(!i)return!1;var s=i.name,n=this.sortInfo||null,r=this.sortToggle?this.sortToggle[s]:null;return e=e||(n&&n.field==s?(this.sortToggle[s]||"ASC").toggle("ASC","DESC"):i.sortDir),this.sortToggle[s]=e,this.sortInfo={field:s,direction:e},this.hasMultiSort=!1,this.remoteSort?this.load(this.lastOptions)||(r&&(this.sortToggle[s]=r),n&&(this.sortInfo=n)):(this.applySort(),this.fireEvent("datachanged",this)),!0},multiSort:function(t,e){this.hasMultiSort=!0,e=e||"ASC",this.multiSortInfo&&e==this.multiSortInfo.direction&&(e=e.toggle("ASC","DESC")),this.multiSortInfo={sorters:t,direction:e},this.remoteSort?this.singleSort(t[0].field,t[0].direction):(this.applySort(),this.fireEvent("datachanged",this))},each:function(t,e){this.data.each(t,e)},getModifiedRecords:function(){return this.modified},sum:function(t,e,i){var s=this.data.items,n=0;e=e||0,i=i||0===i?i:s.length-1;for(var r=e;r<=i;r++)n+=s[r].data[t]||0;return n},createFilterFn:function(e,i,t,s,n){return!Ext.isEmpty(i,!1)&&(i=this.data.createValueMatcher(i,t,s,n),function(t){return i.test(t.data[e])})},createMultipleFilterFn:function(a){return function(t){for(var e=!0,i=0,s=a.length;i<s;i++)var n=a[i],r=n.fn,o=n.scope,e=e&&r.call(o,t);return e}},filter:function(t,e,i,s,n){var r;if(Ext.isObject(t)&&(t=[t]),Ext.isArray(t)){for(var o=[],a=0,l=t.length;a<l;a++){var h=t[a],d=h.fn,c=h.scope||this;Ext.isFunction(d)||(d=this.createFilterFn(h.property,h.value,h.anyMatch,h.caseSensitive,h.exactMatch)),o.push({fn:d,scope:c})}r=this.createMultipleFilterFn(o)}else r=this.createFilterFn(t,e,i,s,n);return r?this.filterBy(r):this.clearFilter()},filterBy:function(t,e){this.snapshot=this.snapshot||this.data,this.data=this.queryBy(t,e||this),this.fireEvent("datachanged",this)},clearFilter:function(t){this.isFiltered()&&(this.data=this.snapshot,delete this.snapshot,!0!==t&&this.fireEvent("datachanged",this))},isFiltered:function(){return!!this.snapshot&&this.snapshot!=this.data},query:function(t,e,i,s){var n=this.createFilterFn(t,e,i,s);return n?this.queryBy(n):this.data.clone()},queryBy:function(t,e){return(this.snapshot||this.data).filterBy(t,e||this)},find:function(t,e,i,s,n){var r=this.createFilterFn(t,e,s,n);return r?this.data.findIndexBy(r,null,i):-1},findExact:function(e,i,t){return this.data.findIndexBy(function(t){return t.get(e)===i},this,t)},findBy:function(t,e,i){return this.data.findIndexBy(t,e,i)},collect:function(t,e,i){for(var s,n,r=!0===i&&this.snapshot?this.snapshot.items:this.data.items,o=[],a={},l=0,h=r.length;l<h;l++)s=r[l].data[t],n=String(s),!e&&Ext.isEmpty(s)||a[n]||(a[n]=!0,o[o.length]=s);return o},afterEdit:function(t){-1==this.modified.indexOf(t)&&this.modified.push(t),this.fireEvent("update",this,t,Ext.data.Record.EDIT)},afterReject:function(t){this.modified.remove(t),this.fireEvent("update",this,t,Ext.data.Record.REJECT)},afterCommit:function(t){this.modified.remove(t),this.fireEvent("update",this,t,Ext.data.Record.COMMIT)},commitChanges:function(){for(var t=this.modified.slice(0),e=t.length,i=0;i<e;i++)t[i].commit();this.modified=[],this.removed=[]},rejectChanges:function(){for(var t=this.modified.slice(0),e=this.removed.slice(0).reverse(),i=t.length,s=e.length,n=0;n<i;n++)t[n].reject();for(n=0;n<s;n++)this.insert(e[n].lastIndex||0,e[n]),e[n].reject();this.modified=[],this.removed=[]},onMetaChange:function(t){this.recordType=this.reader.recordType,this.fields=this.recordType.prototype.fields,delete this.snapshot,this.reader.meta.sortInfo?this.sortInfo=this.reader.meta.sortInfo:this.sortInfo&&!this.fields.get(this.sortInfo.field)&&delete this.sortInfo,this.writer&&(this.writer.meta=this.reader.meta),this.modified=[],this.fireEvent("metachange",this,this.reader.meta)},findInsertIndex:function(t){this.suspendEvents();var e=this.data.clone();this.data.add(t),this.applySort();var i=this.data.indexOf(t);return this.data=e,this.resumeEvents(),i},setBaseParam:function(t,e){this.baseParams=this.baseParams||{},this.baseParams[t]=e}}),Ext.reg("store",Ext.data.Store),Ext.data.Store.Error=Ext.extend(Ext.Error,{name:"Ext.data.Store"}),Ext.apply(Ext.data.Store.Error.prototype,{lang:{"writer-undefined":"Attempted to execute a write-action without a DataWriter installed."}}),Ext.data.Field=Ext.extend(Object,{constructor:function(t){Ext.isString(t)&&(t={name:t}),Ext.apply(this,t);var e=Ext.data.Types,i=this.sortType;this.type?Ext.isString(this.type)&&(this.type=Ext.data.Types[this.type.toUpperCase()]||e.AUTO):this.type=e.AUTO,Ext.isString(i)?this.sortType=Ext.data.SortTypes[i]:Ext.isEmpty(i)&&(this.sortType=this.type.sortType),this.convert||(this.convert=this.type.convert)},dateFormat:null,useNull:!1,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:!0}),Ext.data.DataReader=function(t,e){this.meta=t,this.recordType=Ext.isArray(e)?Ext.data.Record.create(e):e,this.recordType&&this.buildExtractors()},Ext.data.DataReader.prototype={getTotal:Ext.emptyFn,getRoot:Ext.emptyFn,getMessage:Ext.emptyFn,getSuccess:Ext.emptyFn,getId:Ext.emptyFn,buildExtractors:Ext.emptyFn,extractValues:Ext.emptyFn,realize:function(t,e){if(Ext.isArray(t))for(var i=t.length-1;0<=i;i--)Ext.isArray(e)?this.realize(t.splice(i,1).shift(),e.splice(i,1).shift()):this.realize(t.splice(i,1).shift(),e);else{if(Ext.isArray(e)&&1==e.length&&(e=e.shift()),!this.isData(e))throw new Ext.data.DataReader.Error("realize",t);t.phantom=!1,t._phid=t.id,t.id=this.getId(e),t.data=e,t.commit(),t.store.reMap(t)}},update:function(t,e){if(Ext.isArray(t))for(var i=t.length-1;0<=i;i--)Ext.isArray(e)?this.update(t.splice(i,1).shift(),e.splice(i,1).shift()):this.update(t.splice(i,1).shift(),e);else Ext.isArray(e)&&1==e.length&&(e=e.shift()),this.isData(e)&&(t.data=Ext.apply(t.data,e)),t.commit()},extractData:function(t,e){var i=this instanceof Ext.data.JsonReader?"json":"node",s=[];!this.isData(t)||this instanceof Ext.data.XmlReader||(t=[t]);var n=this.recordType.prototype.fields,r=n.items,o=n.length,s=[];if(!0===e)for(var a=this.recordType,l=0;l<t.length;l++){var h=t[l],d=new a(this.extractValues(h,r,o),this.getId(h));d[i]=h,s.push(d)}else for(l=0;l<t.length;l++){var c=this.extractValues(t[l],r,o);c[this.meta.idProperty]=this.getId(t[l]),s.push(c)}return s},isData:function(t){return!(!t||!Ext.isObject(t)||Ext.isEmpty(this.getId(t)))},onMetaChange:function(t){delete this.ef,this.meta=t,this.recordType=Ext.data.Record.create(t.fields),this.buildExtractors()}},Ext.data.DataReader.Error=Ext.extend(Ext.Error,{constructor:function(t,e){this.arg=e,Ext.Error.call(this,t)},name:"Ext.data.DataReader"}),Ext.apply(Ext.data.DataReader.Error.prototype,{lang:{update:"#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",realize:"#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.","invalid-response":"#readResponse received an invalid response from the server."}}),Ext.data.DataWriter=function(t){Ext.apply(this,t)},Ext.data.DataWriter.prototype={writeAllFields:!1,listful:!1,apply:function(t,e,i,s){var n=[],r=i+"Record";Ext.isArray(s)?Ext.each(s,function(t){n.push(this[r](t))},this):s instanceof Ext.data.Record&&(n=this[r](s)),this.render(t,e,n)},render:Ext.emptyFn,updateRecord:Ext.emptyFn,createRecord:Ext.emptyFn,destroyRecord:Ext.emptyFn,toHash:function(t,e){var i,s=t.fields.map,n={},r=!1===this.writeAllFields&&!1===t.phantom?t.getChanges():t.data;return Ext.iterate(r,function(t,e){(i=s[t])&&(n[i.mapping?i.mapping:i.name]=e)}),t.phantom?t.fields.containsKey(this.meta.idProperty)&&Ext.isEmpty(t.data[this.meta.idProperty])&&delete n[this.meta.idProperty]:n[this.meta.idProperty]=t.id,n},toArray:function(t){var i=[];return Ext.iterate(t,function(t,e){i.push({name:t,value:e})},this),i}},Ext.data.DataProxy=function(t){t=t||{},this.api=t.api,this.url=t.url,this.restful=t.restful,this.listeners=t.listeners,this.prettyUrls=t.prettyUrls,this.addEvents("exception","beforeload","load","loadexception","beforewrite","write"),Ext.data.DataProxy.superclass.constructor.call(this);try{Ext.data.Api.prepare(this)}catch(t){t instanceof Ext.data.Api.Error&&t.toConsole()}Ext.data.DataProxy.relayEvents(this,["beforewrite","write","exception"])},Ext.extend(Ext.data.DataProxy,Ext.util.Observable,{restful:!1,setApi:function(){if(1==arguments.length){var t=Ext.data.Api.isValid(arguments[0]);if(!0!==t)throw new Ext.data.Api.Error("invalid",t);this.api=arguments[0]}else if(2==arguments.length){if(!Ext.data.Api.isAction(arguments[0]))throw new Ext.data.Api.Error("invalid",arguments[0]);this.api[arguments[0]]=arguments[1]}Ext.data.Api.prepare(this)},isApiAction:function(t){return!!this.api[t]},request:function(t,e,i,s,n,r,o){if(!this.api[t]&&!this.load)throw new Ext.data.DataProxy.Error("action-undefined",t);i=i||{},(t===Ext.data.Api.actions.read?this.fireEvent("beforeload",this,i):!1!==this.fireEvent("beforewrite",this,t,e,i))?this.doRequest.apply(this,arguments):n.call(r||this,null,o,!1)},load:null,doRequest:function(t,e,i,s,n,r,o){this.load(i,s,n,r,o)},onRead:Ext.emptyFn,onWrite:Ext.emptyFn,buildUrl:function(t,e){e=e||null;var i=this.conn&&this.conn.url?this.conn.url:this.api[t]?this.api[t].url:this.url;if(!i)throw new Ext.data.Api.Error("invalid-url",t);var s=null,n=i.match(/(.*)(\.json|\.xml|\.html)$/);return n&&(s=n[2],i=n[1]),(!0===this.restful||!0===this.prettyUrls)&&e instanceof Ext.data.Record&&!e.phantom&&(i+="/"+e.id),null===s?i:i+s},destroy:function(){this.purgeListeners()}}),Ext.apply(Ext.data.DataProxy,Ext.util.Observable.prototype),Ext.util.Observable.call(Ext.data.DataProxy),Ext.data.DataProxy.Error=Ext.extend(Ext.Error,{constructor:function(t,e){this.arg=e,Ext.Error.call(this,t)},name:"Ext.data.DataProxy"}),Ext.apply(Ext.data.DataProxy.Error.prototype,{lang:{"action-undefined":"DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.","api-invalid":"Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions."}}),Ext.data.Request=function(t){Ext.apply(this,t)},Ext.data.Request.prototype={action:void 0,rs:void 0,params:void 0,callback:Ext.emptyFn,scope:void 0,reader:void 0},Ext.data.Response=function(t){Ext.apply(this,t)},Ext.data.Response.prototype={action:void 0,success:void 0,message:void 0,data:void 0,raw:void 0,records:void 0},Ext.data.ScriptTagProxy=function(t){Ext.apply(this,t),Ext.data.ScriptTagProxy.superclass.constructor.call(this,t),this.head=document.getElementsByTagName("head")[0]},Ext.data.ScriptTagProxy.TRANS_ID=1e3,Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:3e4,callbackParam:"callback",nocache:!0,doRequest:function(t,e,i,s,n,r,o){var a=Ext.urlEncode(Ext.apply(i,this.extraParams)),l=this.buildUrl(t,e);if(!l)throw new Ext.data.Api.Error("invalid-url",l);l=Ext.urlAppend(l,a),this.nocache&&(l=Ext.urlAppend(l,"_dc="+(new Date).getTime()));var h=++Ext.data.ScriptTagProxy.TRANS_ID,d={id:h,action:t,cb:"stcCallback"+h,scriptId:"stcScript"+h,params:i,arg:o,url:l,callback:n,scope:r,reader:s};window[d.cb]=this.createCallback(t,e,d),l+=String.format("&{0}={1}",this.callbackParam,d.cb),!1!==this.autoAbort&&this.abort(),d.timeoutId=this.handleFailure.defer(this.timeout,this,[d]);var c=document.createElement("script");c.setAttribute("src",l),c.setAttribute("type","text/javascript"),c.setAttribute("id",d.scriptId),this.head.appendChild(c),this.trans=d},createCallback:function(e,i,s){var n=this;return function(t){n.trans=!1,n.destroyTrans(s,!0),e===Ext.data.Api.actions.read?n.onRead.call(n,e,s,t):n.onWrite.call(n,e,s,t,i)}},onRead:function(e,i,s){var t;try{t=i.reader.readRecords(s)}catch(t){return this.fireEvent("loadexception",this,i,s,t),this.fireEvent("exception",this,"response",e,i,s,t),void i.callback.call(i.scope||window,null,i.arg,!1)}!1===t.success?(this.fireEvent("loadexception",this,i,s),this.fireEvent("exception",this,"remote",e,i,s,null)):this.fireEvent("load",this,s,i.arg),i.callback.call(i.scope||window,t,i.arg,t.success)},onWrite:function(e,i,t,s){var n=i.reader;try{var r=n.readResponse(e,t)}catch(t){return this.fireEvent("exception",this,"response",e,i,r,t),void i.callback.call(i.scope||window,null,r,!1)}if(!0==!r.success)return this.fireEvent("exception",this,"remote",e,i,r,s),void i.callback.call(i.scope||window,null,r,!1);this.fireEvent("write",this,e,r.data,r,s,i.arg),i.callback.call(i.scope||window,r.data,r,!0)},isLoading:function(){return!!this.trans},abort:function(){this.isLoading()&&this.destroyTrans(this.trans)},destroyTrans:function(t,e){if(this.head.removeChild(document.getElementById(t.scriptId)),clearTimeout(t.timeoutId),e){window[t.cb]=void 0;try{delete window[t.cb]}catch(t){}}else window[t.cb]=function(){window[t.cb]=void 0;try{delete window[t.cb]}catch(t){}}},handleFailure:function(t){this.trans=!1,this.destroyTrans(t,!1),t.action===Ext.data.Api.actions.read&&this.fireEvent("loadexception",this,null,t.arg),this.fireEvent("exception",this,"response",t.action,{response:null,options:t.arg}),t.callback.call(t.scope||window,null,t.arg,!1)},destroy:function(){this.abort(),Ext.data.ScriptTagProxy.superclass.destroy.call(this)}}),Ext.data.HttpProxy=function(t){Ext.data.HttpProxy.superclass.constructor.call(this,t),this.conn=t,this.conn.url=null,this.useAjax=!t||!t.events;var e=Ext.data.Api.actions;for(var i in this.activeRequest={},e)this.activeRequest[e[i]]=void 0},Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},setUrl:function(t,e){this.conn.url=t,!0===e&&(this.url=t,this.api=null,Ext.data.Api.prepare(this))},doRequest:function(t,e,i,s,n,r,o){var a={method:this.api[t]?this.api[t].method:void 0,request:{callback:n,scope:r,arg:o},reader:s,callback:this.createCallback(t,e),scope:this};i.jsonData?a.jsonData=i.jsonData:i.xmlData?a.xmlData=i.xmlData:a.params=i||{},this.conn.url=this.buildUrl(t,e),this.useAjax?(Ext.applyIf(a,this.conn),t==Ext.data.Api.actions.read&&this.activeRequest[t]&&Ext.Ajax.abort(this.activeRequest[t]),this.activeRequest[t]=Ext.Ajax.request(a)):this.conn.request(a),this.conn.url=null},createCallback:function(s,n){return function(t,e,i){if(this.activeRequest[s]=void 0,!e)return s===Ext.data.Api.actions.read&&this.fireEvent("loadexception",this,t,i),this.fireEvent("exception",this,"response",s,t,i),void t.request.callback.call(t.request.scope,null,t.request.arg,!1);s===Ext.data.Api.actions.read?this.onRead(s,t,i):this.onWrite(s,t,i,n)}},onRead:function(e,i,s){var t,n;try{t=i.reader.read(s)}catch(t){return this.fireEvent("loadexception",this,i,s,t),this.fireEvent("exception",this,"response",e,i,s,t),void i.request.callback.call(i.request.scope,null,i.request.arg,!1)}!1===t.success?(this.fireEvent("loadexception",this,i,s),n=i.reader.readResponse(e,s),this.fireEvent("exception",this,"remote",e,i,n,null)):this.fireEvent("load",this,i,i.request.arg),i.request.callback.call(i.request.scope,t,i.request.arg,t.success)},onWrite:function(e,i,s,t){var n,r=i.reader;try{n=r.readResponse(e,s)}catch(t){return this.fireEvent("exception",this,"response",e,i,s,t),void i.request.callback.call(i.request.scope,null,i.request.arg,!1)}!0===n.success?this.fireEvent("write",this,e,n.data,n,t,i.request.arg):this.fireEvent("exception",this,"remote",e,i,n,t),i.request.callback.call(i.request.scope,n.data,n,n.success)},destroy:function(){if(this.useAjax){if(this.activeRequest){var t=Ext.data.Api.actions;for(var e in t)this.activeRequest[t[e]]&&Ext.Ajax.abort(this.activeRequest[t[e]])}}else this.conn.abort();Ext.data.HttpProxy.superclass.destroy.call(this)}}),Ext.data.MemoryProxy=function(t){var e={};e[Ext.data.Api.actions.read]=!0,Ext.data.MemoryProxy.superclass.constructor.call(this,{api:e}),this.data=t},Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{doRequest:function(e,t,i,s,n,r,o){var a;try{a=s.readRecords(this.data)}catch(t){return this.fireEvent("loadexception",this,null,o,t),this.fireEvent("exception",this,"response",e,o,null,t),void n.call(r,null,o,!1)}n.call(r,a,o,!0)}}),Ext.data.Types=new function(){var t=Ext.data.SortTypes;Ext.apply(this,{stripRe:/[\$,%]/g,AUTO:{convert:function(t){return t},sortType:t.none,type:"auto"},STRING:{convert:function(t){return null==t?"":String(t)},sortType:t.asUCString,type:"string"},INT:{convert:function(t){return null!=t&&""!==t?parseInt(String(t).replace(Ext.data.Types.stripRe,""),10):this.useNull?null:0},sortType:t.none,type:"int"},FLOAT:{convert:function(t){return null!=t&&""!==t?parseFloat(String(t).replace(Ext.data.Types.stripRe,""),10):this.useNull?null:0},sortType:t.none,type:"float"},BOOL:{convert:function(t){return!0===t||"true"===t||1==t},sortType:t.none,type:"bool"},DATE:{convert:function(t){var e=this.dateFormat;if(!t)return null;if(Ext.isDate(t))return t;if(e)return"timestamp"==e?new Date(1e3*t):"time"==e?new Date(parseInt(t,10)):Date.parseDate(t,e);var i=Date.parse(t);return i?new Date(i):null},sortType:t.asDate,type:"date"}}),Ext.apply(this,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})},Ext.data.JsonWriter=Ext.extend(Ext.data.DataWriter,{encode:!0,encodeDelete:!1,constructor:function(t){Ext.data.JsonWriter.superclass.constructor.call(this,t)},render:function(t,e,i){var s;!0===this.encode?(Ext.apply(t,e),t[this.meta.root]=Ext.encode(i)):((s=Ext.apply({},e))[this.meta.root]=i,t.jsonData=s)},createRecord:function(t){return this.toHash(t)},updateRecord:function(t){return this.toHash(t)},destroyRecord:function(t){if(this.encodeDelete){var e={};return e[this.meta.idProperty]=t.id,e}return t.id}}),Ext.data.JsonReader=function(t,e){t=t||{},Ext.applyIf(t,{idProperty:"id",successProperty:"success",totalProperty:"total"}),Ext.data.JsonReader.superclass.constructor.call(this,t,e||t.fields)},Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(t){var e=t.responseText,i=Ext.decode(e);if(!i)throw{message:"JsonReader.read: Json object not found"};return this.readRecords(i)},readResponse:function(t,e){var i=void 0!==e.responseText?Ext.decode(e.responseText):e;if(!i)throw new Ext.data.JsonReader.Error("response");var s=this.getRoot(i),n=this.getSuccess(i);if(n&&t===Ext.data.Api.actions.create){var r=Ext.isDefined(s);if(r&&Ext.isEmpty(s))throw new Ext.data.JsonReader.Error("root-empty",this.meta.root);if(!r)throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}var o=new Ext.data.Response({action:t,success:n,data:s?this.extractData(s,!1):[],message:this.getMessage(i),raw:i});if(Ext.isEmpty(o.success))throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty);return o},readRecords:function(t){(this.jsonData=t).metaData&&this.onMetaChange(t.metaData);var e,i=this.meta,s=this.recordType.prototype.fields,n=(s.items,s.length,this.getRoot(t)),r=n.length,o=!0;return i.totalProperty&&(e=parseInt(this.getTotal(t),10),isNaN(e)||(r=e)),i.successProperty&&(!1!==(e=this.getSuccess(t))&&"false"!==e||(o=!1)),{success:o,records:this.extractData(n,!0),totalRecords:r}},buildExtractors:function(){if(!this.ef){var i,t=this.meta,e=this.recordType.prototype.fields,s=e.items,n=e.length;t.totalProperty&&(this.getTotal=this.createAccessor(t.totalProperty)),t.successProperty&&(this.getSuccess=this.createAccessor(t.successProperty)),t.messageProperty&&(this.getMessage=this.createAccessor(t.messageProperty)),this.getRoot=t.root?this.createAccessor(t.root):function(t){return t},t.id||t.idProperty?(i=this.createAccessor(t.id||t.idProperty),this.getId=function(t){var e=i(t);return void 0===e||""===e?null:e}):this.getId=function(){return null};for(var r=[],o=0;o<n;o++){var a=void 0!==(e=s[o]).mapping&&null!==e.mapping?e.mapping:e.name;r.push(this.createAccessor(a))}this.ef=r}},simpleAccess:function(t,e){return t[e]},createAccessor:function(){var i=/[\[\.]/;return function(e){if(Ext.isEmpty(e))return Ext.emptyFn;if(Ext.isFunction(e))return e;var t=String(e).search(i);return 0<=t?new Function("obj","return obj"+(0<t?".":"")+e):function(t){return t[e]}}}(),extractValues:function(t,e,i){for(var s,n={},r=0;r<i;r++){s=e[r];var o=this.ef[r](t);n[s.name]=s.convert(void 0!==o?o:s.defaultValue,t)}return n}}),Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(t,e){this.arg=e,Ext.Error.call(this,t)},name:"Ext.data.JsonReader"}),Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',"root-undefined-config":'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',"idProperty-undefined":'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',"root-empty":'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'}}),Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(t){this.arrayData=t;for(var e=this.meta,i=e?Ext.num(e.idIndex,e.id):null,s=this.recordType,n=s.prototype.fields,r=[],o=!0,a=this.getRoot(t),l=0,h=a.length;l<h;l++){for(var d=a[l],c={},u=!i&&0!==i||void 0===d[i]||""===d[i]?null:d[i],f=0,p=n.length;f<p;f++){var g=n.items[f],m=void 0!==g.mapping&&null!==g.mapping?g.mapping:f,x=void 0!==d[m]?d[m]:g.defaultValue;x=g.convert(x,d),c[g.name]=x}var E=new s(c,u);E.json=d,r[r.length]=E}var v=r.length;return e.totalProperty&&(x=parseInt(this.getTotal(t),10),isNaN(x)||(v=x)),e.successProperty&&(!1!==(x=this.getSuccess(t))&&"false"!==x||(o=!1)),{success:o,records:r,totalRecords:v}}}),Ext.data.ArrayStore=Ext.extend(Ext.data.Store,{constructor:function(t){Ext.data.ArrayStore.superclass.constructor.call(this,Ext.apply(t,{reader:new Ext.data.ArrayReader(t)}))},loadData:function(t,e){if(!0===this.expandData){for(var i=[],s=0,n=t.length;s<n;s++)i[i.length]=[t[s]];t=i}Ext.data.ArrayStore.superclass.loadData.call(this,t,e)}}),Ext.reg("arraystore",Ext.data.ArrayStore),Ext.data.SimpleStore=Ext.data.ArrayStore,Ext.reg("simplestore",Ext.data.SimpleStore),Ext.data.JsonStore=Ext.extend(Ext.data.Store,{constructor:function(t){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(t,{reader:new Ext.data.JsonReader(t)}))}}),Ext.reg("jsonstore",Ext.data.JsonStore),Ext.data.XmlWriter=function(t){Ext.data.XmlWriter.superclass.constructor.apply(this,arguments),this.tpl="string"==typeof this.tpl?new Ext.XTemplate(this.tpl).compile():this.tpl.compile()},Ext.extend(Ext.data.XmlWriter,Ext.data.DataWriter,{documentRoot:"xrequest",forceDocumentRoot:!1,root:"records",xmlVersion:"1.0",xmlEncoding:"ISO-8859-15",tpl:'<tpl for="."><?xml version="{version}" encoding="{encoding}"?><tpl if="documentRoot"><{documentRoot}><tpl for="baseParams"><tpl for="."><{name}>{value}</{name}></tpl></tpl></tpl><tpl if="records.length&gt;1"><{root}></tpl><tpl for="records"><{parent.record}><tpl for="."><{name}>{value}</{name}></tpl></{parent.record}></tpl><tpl if="records.length&gt;1"></{root}></tpl><tpl if="documentRoot"></{documentRoot}></tpl></tpl>',render:function(t,e,i){e=this.toArray(e),t.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(0<e.length||!0===this.forceDocumentRoot)&&this.documentRoot,record:this.meta.record,root:this.root,baseParams:e,records:Ext.isArray(i[0])?i:[i]})},createRecord:function(t){return this.toArray(this.toHash(t))},updateRecord:function(t){return this.toArray(this.toHash(t))},destroyRecord:function(t){var e={};return e[this.meta.idProperty]=t.id,this.toArray(e)}}),Ext.data.XmlReader=function(t,e){t=t||{},Ext.applyIf(t,{idProperty:t.idProperty||t.idPath||t.id,successProperty:t.successProperty||t.success}),Ext.data.XmlReader.superclass.constructor.call(this,t,e||t.fields)},Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(t){var e=t.responseXML;if(!e)throw{message:"XmlReader.read: XML Document not available"};return this.readRecords(e)},readRecords:function(t){var e=(this.xmlData=t).documentElement||t,i=Ext.DomQuery,s=0,n=!0;this.meta.totalProperty&&(s=this.getTotal(e,0)),this.meta.successProperty&&(n=this.getSuccess(e));var r=this.extractData(i.select(this.meta.record,e),!0);return{success:n,records:r,totalRecords:s||r.length}},readResponse:function(t,e){var i=Ext.DomQuery,s=e.responseXML,n=s.documentElement||s,r=new Ext.data.Response({action:t,success:this.getSuccess(n),message:this.getMessage(n),data:this.extractData(i.select(this.meta.record,n)||i.select(this.meta.root,n),!1),raw:s});if(Ext.isEmpty(r.success))throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty);if(t===Ext.data.Api.actions.create){var o=Ext.isDefined(r.data);if(o&&Ext.isEmpty(r.data))throw new Ext.data.JsonReader.Error("root-empty",this.meta.root);if(!o)throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}return r},getSuccess:function(){return!0},buildExtractors:function(){if(!this.ef){var i,t=this.meta,e=this.recordType.prototype.fields,s=e.items,n=e.length;t.totalProperty&&(this.getTotal=this.createAccessor(t.totalProperty)),t.successProperty&&(this.getSuccess=this.createAccessor(t.successProperty)),t.messageProperty&&(this.getMessage=this.createAccessor(t.messageProperty)),this.getRoot=function(t){return Ext.isEmpty(t[this.meta.record])?t[this.meta.root]:t[this.meta.record]},t.idPath||t.idProperty?(i=this.createAccessor(t.idPath||t.idProperty),this.getId=function(t){var e=i(t)||t.id;return void 0===e||""===e?null:e}):this.getId=function(){return null};for(var r=[],o=0;o<n;o++){var a=void 0!==(e=s[o]).mapping&&null!==e.mapping?e.mapping:e.name;r.push(this.createAccessor(a))}this.ef=r}},createAccessor:function(){var n=Ext.DomQuery;return function(s){if(Ext.isFunction(s))return s;switch(s){case this.meta.totalProperty:return function(t,e){return n.selectNumber(s,t,e)};case this.meta.successProperty:return function(t,e){var i=n.selectValue(s,t,!0);return!1!==i&&"false"!==i};default:return function(t,e){return n.selectValue(s,t,e)}}}}(),extractValues:function(t,e,i){for(var s,n={},r=0;r<i;r++){s=e[r];var o=this.ef[r](t);n[s.name]=s.convert(void 0!==o?o:s.defaultValue,t)}return n}}),Ext.data.XmlStore=Ext.extend(Ext.data.Store,{constructor:function(t){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(t,{reader:new Ext.data.XmlReader(t)}))}}),Ext.reg("xmlstore",Ext.data.XmlStore),Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(t){t=t||{},this.hasMultiSort=!0,this.multiSortInfo=this.multiSortInfo||{sorters:[]};var e=this.multiSortInfo.sorters,i=t.groupField||this.groupField,s=t.sortInfo||this.sortInfo,n=t.groupDir||this.groupDir;i&&e.push({field:i,direction:n}),s&&e.push(s),Ext.data.GroupingStore.superclass.constructor.call(this,t),this.addEvents("groupchange"),this.applyGroupField()},remoteGroup:!1,groupOnSort:!1,groupDir:"ASC",clearGrouping:function(){var t;this.groupField=!1,this.remoteGroup?(this.baseParams&&(delete this.baseParams.groupBy,delete this.baseParams.groupDir),(t=this.lastOptions)&&t.params&&(delete t.params.groupBy,delete t.params.groupDir),this.reload()):(this.sort(),this.fireEvent("datachanged",this))},groupBy:function(t,e,i){if(i=i?"DESC"==String(i).toUpperCase()?"DESC":"ASC":this.groupDir,this.groupField!=t||this.groupDir!=i||e){var s=this.multiSortInfo.sorters;0<s.length&&s[0].field==this.groupField&&s.shift(),this.groupField=t,this.groupDir=i,this.applyGroupField();function n(){this.fireEvent("groupchange",this,this.getGroupState())}if(this.groupOnSort)return this.sort(t,i),void n.call(this);this.remoteGroup?(this.on("load",n,this,{single:!0}),this.reload()):(this.sort(s),n.call(this))}},sort:function(t,e){if(this.remoteSort)return Ext.data.GroupingStore.superclass.sort.call(this,t,e);var i=[];if(Ext.isArray(t))i=t;else if(null==t)i=this.sortInfo?[this.sortInfo]:[];else{var s=this.fields.get(t);if(!s)return!1;var n=s.name,r=this.sortInfo||null;this.sortToggle&&this.sortToggle[n];e=e||(r&&r.field==n?(this.sortToggle[n]||"ASC").toggle("ASC","DESC"):s.sortDir),this.sortToggle[n]=e,this.sortInfo={field:n,direction:e},i=[this.sortInfo]}return this.groupField&&i.unshift({direction:this.groupDir,field:this.groupField}),this.multiSort.call(this,i,e)},applyGroupField:function(){var t;this.remoteGroup&&(this.baseParams||(this.baseParams={}),Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir}),(t=this.lastOptions)&&t.params&&(t.params.groupDir=this.groupDir,delete t.params.groupBy))},applyGrouping:function(t){return!1!==this.groupField?(this.groupBy(this.groupField,!0,this.groupDir),!0):(!0===t&&this.fireEvent("datachanged",this),!1)},getGroupState:function(){return this.groupOnSort&&!1!==this.groupField?this.sortInfo?this.sortInfo.field:void 0:this.groupField}}),Ext.reg("groupingstore",Ext.data.GroupingStore),Ext.data.DirectProxy=function(t){Ext.apply(this,t),"string"==typeof this.paramOrder&&(this.paramOrder=this.paramOrder.split(/[\s,|]/)),Ext.data.DirectProxy.superclass.constructor.call(this,t)},Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:void 0,paramsAsHash:!0,directFn:void 0,doRequest:function(t,e,i,s,n,r,o){var a=[],l=this.api[t]||this.directFn;switch(t){case Ext.data.Api.actions.create:a.push(i.jsonData);break;case Ext.data.Api.actions.read:if(0<l.directCfg.method.len)if(this.paramOrder)for(var h=0,d=this.paramOrder.length;h<d;h++)a.push(i[this.paramOrder[h]]);else this.paramsAsHash&&a.push(i);break;case Ext.data.Api.actions.update:case Ext.data.Api.actions.destroy:a.push(i.jsonData)}var c={params:i||{},request:{callback:n,scope:r,arg:o},reader:s};a.push(this.createCallback(t,e,c),this),l.apply(window,a)},createCallback:function(i,s,n){var r=this;return function(t,e){if(!e.status)return i===Ext.data.Api.actions.read&&r.fireEvent("loadexception",r,n,e,null),r.fireEvent("exception",r,"remote",i,n,e,null),void n.request.callback.call(n.request.scope,null,n.request.arg,!1);i===Ext.data.Api.actions.read?r.onRead(i,n,t,e):r.onWrite(i,n,t,e,s)}},onRead:function(e,i,t,s){var n;try{n=i.reader.readRecords(t)}catch(t){return this.fireEvent("loadexception",this,i,s,t),this.fireEvent("exception",this,"response",e,i,s,t),void i.request.callback.call(i.request.scope,null,i.request.arg,!1)}this.fireEvent("load",this,s,i.request.arg),i.request.callback.call(i.request.scope,n,i.request.arg,!0)},onWrite:function(t,e,i,s,n){var r=e.reader.extractData(e.reader.getRoot(i),!1),o=e.reader.getSuccess(i);(o=!1!==o)?this.fireEvent("write",this,t,r,s,n,e.request.arg):this.fireEvent("exception",this,"remote",t,e,i,n),e.request.callback.call(e.request.scope,r,s,o)}}),Ext.data.DirectStore=Ext.extend(Ext.data.Store,{constructor:function(t){var e=Ext.apply({},{batchTransactions:!1},t);Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(e,{proxy:Ext.isDefined(e.proxy)?e.proxy:new Ext.data.DirectProxy(Ext.copyTo({},e,"paramOrder,paramsAsHash,directFn,api")),reader:!Ext.isDefined(e.reader)&&e.fields?new Ext.data.JsonReader(Ext.copyTo({},e,"totalProperty,root,idProperty"),e.fields):e.reader}))}}),Ext.reg("directstore",Ext.data.DirectStore),Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){this.addEvents("event","exception"),this.transactions={},this.providers={}},addProvider:function(t){var e=arguments;if(!(1<e.length))return t.events||(t=new Ext.Direct.PROVIDERS[t.type](t)),t.id=t.id||Ext.id(),(this.providers[t.id]=t).on("data",this.onProviderData,this),t.on("exception",this.onProviderException,this),t.isConnected()||t.connect(),t;for(var i=0,s=e.length;i<s;i++)this.addProvider(e[i])},getProvider:function(t){return this.providers[t]},removeProvider:function(t){var e=t.id?t:this.providers[t];return e.un("data",this.onProviderData,this),e.un("exception",this.onProviderException,this),delete this.providers[e.id],e},addTransaction:function(t){return this.transactions[t.tid]=t},removeTransaction:function(t){return delete this.transactions[t.tid||t],t},getTransaction:function(t){return this.transactions[t.tid||t]},onProviderData:function(t,e){if(Ext.isArray(e))for(var i=0,s=e.length;i<s;i++)this.onProviderData(t,e[i]);else e.name&&"event"!=e.name&&"exception"!=e.name?this.fireEvent(e.name,e):"exception"==e.type&&this.fireEvent("exception",e),this.fireEvent("event",e,t)},createEvent:function(t,e){return new Ext.Direct.eventTypes[t.type](Ext.apply(t,e))}}),Ext.Direct=new Ext.Direct,Ext.Direct.TID=1,Ext.Direct.PROVIDERS={},Ext.Direct.Transaction=function(t){Ext.apply(this,t),this.tid=++Ext.Direct.TID,this.retryCount=0},Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++,this.send()},getProvider:function(){return this.provider}},Ext.Direct.Event=function(t){Ext.apply(this,t)},Ext.Direct.Event.prototype={status:!0,getData:function(){return this.data}},Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:"rpc",getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid)}}),Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:!1,type:"exception"}),Ext.Direct.eventTypes={rpc:Ext.Direct.RemotingEvent,event:Ext.Direct.Event,exception:Ext.Direct.ExceptionEvent},Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(t){Ext.apply(this,t),this.addEvents("connect","disconnect","data","exception"),Ext.direct.Provider.superclass.constructor.call(this,t)},isConnected:function(){return!1},connect:Ext.emptyFn,disconnect:Ext.emptyFn}),Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(t){return Ext.isEmpty(t.responseText)?null:"object"==typeof t.responseText?t.responseText:Ext.decode(t.responseText)},getEvents:function(e){var i=null;try{i=this.parseResponse(e)}catch(t){return[new Ext.Direct.ExceptionEvent({data:t,xhr:e,code:Ext.Direct.exceptions.PARSE,message:"Error parsing json response: \n\n "+i})]}var t=[];if(Ext.isArray(i))for(var s=0,n=i.length;s<n;s++)t.push(Ext.Direct.createEvent(i[s]));else t.push(Ext.Direct.createEvent(i));return t}}),Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3e3,constructor:function(t){Ext.direct.PollingProvider.superclass.constructor.call(this,t),this.addEvents("beforepoll","poll")},isConnected:function(){return!!this.pollTask},connect:function(){if(this.url&&!this.pollTask)this.pollTask=Ext.TaskMgr.start({run:function(){!1!==this.fireEvent("beforepoll",this)&&("function"==typeof this.url?this.url(this.baseParams):Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams}))},interval:this.interval,scope:this}),this.fireEvent("connect",this);else if(!this.url)throw"Error initializing PollingProvider, no url configured."},disconnect:function(){this.pollTask&&(Ext.TaskMgr.stop(this.pollTask),delete this.pollTask,this.fireEvent("disconnect",this))},onData:function(t,e,i){if(e)for(var s=this.getEvents(i),n=0,r=s.length;n<r;n++){var o=s[n];this.fireEvent("data",this,o)}else{o=new Ext.Direct.ExceptionEvent({data:o,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:i});this.fireEvent("data",this,o)}}}),Ext.Direct.PROVIDERS.polling=Ext.direct.PollingProvider,Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{enableBuffer:10,maxRetries:1,timeout:void 0,constructor:function(t){Ext.direct.RemotingProvider.superclass.constructor.call(this,t),this.addEvents("beforecall","call"),this.namespace=Ext.isString(this.namespace)?Ext.ns(this.namespace):this.namespace||window,this.transactions={},this.callBuffer=[]},initAPI:function(){var t=this.actions;for(var e in t)for(var i=this.namespace[e]||(this.namespace[e]={}),s=t[e],n=0,r=s.length;n<r;n++){var o=s[n];i[o.name]=this.createMethod(e,o)}},isConnected:function(){return!!this.connected},connect:function(){if(this.url)this.initAPI(),this.connected=!0,this.fireEvent("connect",this);else if(!this.url)throw"Error initializing RemotingProvider, no url configured."},disconnect:function(){this.connected&&(this.connected=!1,this.fireEvent("disconnect",this))},onData:function(t,e,i){if(e)for(var s=this.getEvents(i),n=0,r=s.length;n<r;n++){var o=s[n],a=this.getTransaction(o);this.fireEvent("data",this,o),a&&(this.doCallback(a,o,!0),Ext.Direct.removeTransaction(a))}else for(var l=[].concat(t.ts),n=0,r=l.length;n<r;n++){(a=this.getTransaction(l[n]))&&a.retryCount<this.maxRetries?a.retry():(o=new Ext.Direct.ExceptionEvent({data:o,transaction:a,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:i}),this.fireEvent("data",this,o),a&&(this.doCallback(a,o,!1),Ext.Direct.removeTransaction(a)))}},getCallData:function(t){return{action:t.action,method:t.method,data:t.data,type:"rpc",tid:t.tid}},doSend:function(t){var e,i,s={url:this.url,callback:this.onData,scope:this,ts:t,timeout:this.timeout};if(Ext.isArray(t)){e=[];for(var n=0,r=t.length;n<r;n++)e.push(this.getCallData(t[n]))}else e=this.getCallData(t);this.enableUrlEncode?((i={})[Ext.isString(this.enableUrlEncode)?this.enableUrlEncode:"data"]=Ext.encode(e),s.params=i):s.jsonData=e,Ext.Ajax.request(s)},combineAndSend:function(){var t=this.callBuffer.length;0<t&&(this.doSend(1==t?this.callBuffer[0]:this.callBuffer),this.callBuffer=[])},queueTransaction:function(t){t.form?this.processForm(t):(this.callBuffer.push(t),this.enableBuffer?(this.callTask||(this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)),this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)):this.combineAndSend())},doCall:function(t,e,i){var s=null,n=i[e.len],r=i[e.len+1];0!==e.len&&(s=i.slice(0,e.len));var o=new Ext.Direct.Transaction({provider:this,args:i,action:t,method:e.name,data:s,cb:r&&Ext.isFunction(n)?n.createDelegate(r):n});!1!==this.fireEvent("beforecall",this,o,e)&&(Ext.Direct.addTransaction(o),this.queueTransaction(o),this.fireEvent("call",this,o,e))},doForm:function(t,e,i,s,n){var r,o,a=new Ext.Direct.Transaction({provider:this,action:t,method:e.name,args:[i,s,n],cb:n&&Ext.isFunction(s)?s.createDelegate(n):s,isForm:!0});!1!==this.fireEvent("beforecall",this,a,e)&&(Ext.Direct.addTransaction(a),r="multipart/form-data"==String(i.getAttribute("enctype")).toLowerCase(),o={extTID:a.tid,extAction:t,extMethod:e.name,extType:"rpc",extUpload:String(r)},Ext.apply(a,{form:Ext.getDom(i),isUpload:r,params:s&&Ext.isObject(s.params)?Ext.apply(o,s.params):o}),this.fireEvent("call",this,a,e),this.processForm(a))},processForm:function(t){Ext.Ajax.request({url:this.url,params:t.params,callback:this.onData,scope:this,form:t.form,isUpload:t.isUpload,ts:t})},createMethod:function(s,n){var t=n.formHandler?function(t,e,i){this.doForm(s,n,t,e,i)}.createDelegate(this):function(){this.doCall(s,n,Array.prototype.slice.call(arguments,0))}.createDelegate(this);return t.directCfg={action:s,method:n},t},getTransaction:function(t){return t&&t.tid?Ext.Direct.getTransaction(t.tid):null},doCallback:function(t,e){var i,s,n=e.status?"success":"failure";t&&t.cb&&(i=t.cb,s=Ext.isDefined(e.result)?e.result:e.data,Ext.isFunction(i)?i(s,e):(Ext.callback(i[n],i.scope,[s,e]),Ext.callback(i.callback,i.scope,[s,e])))}}),Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider,Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(t,e){var i;this.el=Ext.get(t),e&&e.wrap&&(e.resizeChild=this.el,this.el=this.el.wrap("object"==typeof e.wrap?e.wrap:{cls:"xresizable-wrap"}),this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap",this.el.setStyle("overflow","hidden"),this.el.setPositioning(e.resizeChild.getPositioning()),e.resizeChild.clearPositioning(),e.width&&e.height||(i=e.resizeChild.getSize(),this.el.setSize(i.width,i.height)),e.pinned&&!e.adjustments&&(e.adjustments="auto")),this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody()),this.proxy.unselectable(),this.proxy.enableDisplayMode("block"),Ext.apply(this,e),this.pinned&&(this.disableTrackOver=!0,this.el.addClass("x-resizable-pinned"));var s=this.el.getStyle("position");"absolute"!=s&&"fixed"!=s&&this.el.setStyle("position","relative"),this.handles||(this.handles="s,e,se",this.multiDirectional&&(this.handles+=",n,w")),"all"==this.handles&&(this.handles="n s e w ne nw se sw");for(var n,r,o,a,l,h=this.handles.split(/\s*?[,;]\s*?| /),d=Ext.Resizable.positions,c=0,u=h.length;c<u;c++){h[c]&&d[h[c]]&&(this[n=d[h[c]]]=new Ext.Resizable.Handle(this,n,this.disableTrackOver,this.transparent,this.handleCls))}this.corner=this.southeast,-1==this.handles.indexOf("n")&&-1==this.handles.indexOf("w")||(this.updateBox=!0),this.activeHandle=null,this.resizeChild&&("boolean"==typeof this.resizeChild?this.resizeChild=Ext.get(this.el.dom.firstChild,!0):this.resizeChild=Ext.get(this.resizeChild,!0)),"auto"==this.adjustments&&(r=this.resizeChild,o=this.west,a=this.east,l=this.north,h=this.south,r&&(o||l)&&(r.position("relative"),r.setLeft(o?o.el.getWidth():0),r.setTop(l?l.el.getHeight():0)),this.adjustments=[(a?-a.el.getWidth():0)+(o?-o.el.getWidth():0),(l?-l.el.getHeight():0)+(h?-h.el.getHeight():0)-1]),this.draggable&&(this.dd=this.dynamic?this.el.initDD(null):this.el.initDDProxy(null,{dragElId:this.proxy.id}),this.dd.setHandleElId(this.resizeChild?this.resizeChild.id:this.el.id),this.constrainTo&&this.dd.constrainTo(this.constrainTo)),this.addEvents("beforeresize","resize"),null!==this.width&&null!==this.height?this.resizeTo(this.width,this.height):this.updateChildSize(),Ext.isIE&&(this.el.dom.style.zoom=1),Ext.Resizable.superclass.constructor.call(this)},adjustments:[0,0],animate:!1,disableTrackOver:!1,draggable:!1,duration:.35,dynamic:!1,easing:"easeOutStrong",enabled:!0,handles:!1,multiDirectional:!1,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:5,minWidth:5,maxHeight:1e4,maxWidth:1e4,minX:0,minY:0,pinned:!1,preserveRatio:!1,resizeChild:!1,transparent:!1,resizeTo:function(t,e){this.el.setSize(t,e),this.updateChildSize(),this.fireEvent("resize",this,t,e,null)},startSizing:function(t,e){var i;this.fireEvent("beforeresize",this,t),this.enabled&&(this.overlay||(this.overlay=this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:"&#160;"},Ext.getBody()),this.overlay.unselectable(),this.overlay.enableDisplayMode("block"),this.overlay.on({scope:this,mousemove:this.onMouseMove,mouseup:this.onMouseUp})),this.overlay.setStyle("cursor",e.el.getStyle("cursor")),this.resizing=!0,this.startBox=this.el.getBox(),this.startPoint=t.getXY(),this.offsets=[this.startBox.x+this.startBox.width-this.startPoint[0],this.startBox.y+this.startBox.height-this.startPoint[1]],this.overlay.setSize(Ext.lib.Dom.getViewWidth(!0),Ext.lib.Dom.getViewHeight(!0)),this.overlay.show(),this.constrainTo&&(i=Ext.get(this.constrainTo),this.resizeRegion=i.getRegion().adjust(i.getFrameWidth("t"),i.getFrameWidth("l"),-i.getFrameWidth("b"),-i.getFrameWidth("r"))),this.proxy.setStyle("visibility","hidden"),this.proxy.show(),this.proxy.setBox(this.startBox),this.dynamic||this.proxy.setStyle("visibility","visible"))},onMouseDown:function(t,e){this.enabled&&(e.stopEvent(),this.activeHandle=t,this.startSizing(e,t))},onMouseUp:function(t){this.activeHandle=null;var e=this.resizeElement();this.resizing=!1,this.handleOut(),this.overlay.hide(),this.proxy.hide(),this.fireEvent("resize",this,e.width,e.height,t)},updateChildSize:function(){var e,i,s,t;this.resizeChild&&(e=this.el,i=this.resizeChild,s=this.adjustments,e.dom.offsetWidth&&(t=e.getSize(!0),i.setSize(t.width+s[0],t.height+s[1])),Ext.isIE9m&&setTimeout(function(){var t;e.dom.offsetWidth&&(t=e.getSize(!0),i.setSize(t.width+s[0],t.height+s[1]))},10))},snap:function(t,e,i){if(!e||!t)return t;var s=t,n=t%e;return 0<n&&(s=e/2<n?t+(e-n):t-n),Math.max(i,s)},resizeElement:function(){var t=this.proxy.getBox();return this.updateBox?this.el.setBox(t,!1,this.animate,this.duration,null,this.easing):this.el.setSize(t.width,t.height,this.animate,this.duration,null,this.easing),this.updateChildSize(),this.dynamic||this.proxy.hide(),this.draggable&&this.constrainTo&&(this.dd.resetConstraints(),this.dd.constrainTo(this.constrainTo)),t},constrain:function(t,e,i,s){return t-e<i?e=t-i:s<t-e&&(e=t-s),e},onMouseMove:function(t){if(this.enabled&&this.activeHandle)try{if(this.resizeRegion&&!this.resizeRegion.contains(t.getPoint()))return;var e,i,s=this.curSize||this.startBox,n=this.startBox.x,r=this.startBox.y,o=s.width,a=s.height,l=o,h=a,d=this.minWidth,c=this.minHeight,u=this.maxWidth,f=this.maxHeight,p=this.widthIncrement,g=this.heightIncrement,m=t.getXY(),x=-(this.startPoint[0]-Math.max(this.minX,m[0])),E=-(this.startPoint[1]-Math.max(this.minY,m[1])),v=this.activeHandle.position;switch(v){case"east":o+=x,o=Math.min(Math.max(d,o),u);break;case"south":a+=E,a=Math.min(Math.max(c,a),f);break;case"southeast":o+=x,a+=E,o=Math.min(Math.max(d,o),u),a=Math.min(Math.max(c,a),f);break;case"north":r+=E=this.constrain(a,E,c,f),a-=E;break;case"west":n+=x=this.constrain(o,x,d,u),o-=x;break;case"northeast":o+=x,o=Math.min(Math.max(d,o),u),r+=E=this.constrain(a,E,c,f),a-=E;break;case"northwest":x=this.constrain(o,x,d,u),r+=E=this.constrain(a,E,c,f),a-=E,n+=x,o-=x;break;case"southwest":x=this.constrain(o,x,d,u),a+=E,a=Math.min(Math.max(c,a),f),n+=x,o-=x}var y=this.snap(o,p,d),b=this.snap(a,g,c);if(y!=o||b!=a){switch(v){case"northeast":case"north":r-=b-a;break;case"southwest":case"west":n-=y-o;break;case"northwest":n-=y-o,r-=b-a}o=y,a=b}if(this.preserveRatio)switch(v){case"southeast":case"east":a=h*(o/l),o=l*((a=Math.min(Math.max(c,a),f))/h);break;case"south":case"northeast":o=l*(a/h),a=h*((o=Math.min(Math.max(d,o),u))/l);break;case"north":e=o,o=l*(a/h),a=h*((o=Math.min(Math.max(d,o),u))/l),n+=(e-o)/2;break;case"southwest":a=h*(o/l),a=Math.min(Math.max(c,a),f),n+=(e=o)-(o=l*(a/h));break;case"west":i=a,a=h*(o/l),r+=(i-(a=Math.min(Math.max(c,a),f)))/2,n+=(e=o)-(o=l*(a/h));break;case"northwest":i=a,a=h*((e=o)/l),r+=i-(a=Math.min(Math.max(c,a),f)),n+=e-(o=l*(a/h))}this.proxy.setBounds(n,r,o,a),this.dynamic&&this.resizeElement()}catch(t){}},handleOver:function(){this.enabled&&this.el.addClass("x-resizable-over")},handleOut:function(){this.resizing||this.el.removeClass("x-resizable-over")},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(t){Ext.destroy(this.dd,this.overlay,this.proxy),this.overlay=null,this.proxy=null;var e=Ext.Resizable.positions;for(var i in e)"function"!=typeof e[i]&&this[e[i]]&&this[e[i]].destroy();t&&(this.el.update(""),Ext.destroy(this.el),this.el=null),this.purgeListeners()},syncHandleHeight:function(){var t=this.el.getHeight(!0);this.west&&this.west.el.setHeight(t),this.east&&this.east.el.setHeight(t)}}),Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(t,e,i,s,n){var r;this.tpl||((r=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"})).compile(),Ext.Resizable.Handle.prototype.tpl=r),this.position=e,this.rz=t,this.el=this.tpl.append(t.el.dom,[this.position],!0),this.el.unselectable(),s&&this.el.setOpacity(0),Ext.isEmpty(n)||this.el.addClass(n),this.el.on("mousedown",this.onMouseDown,this),i||this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})},afterResize:function(t){},onMouseDown:function(t){this.rz.onMouseDown(this,t)},onMouseOver:function(t){this.rz.handleOver(this,t)},onMouseOut:function(t){this.rz.handleOut(this,t)},destroy:function(){Ext.destroy(this.el),this.el=null}}),Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:!0,draggable:!0,closable:!0,closeAction:"close",constrain:!1,constrainHeader:!1,plain:!1,minimizable:!1,maximizable:!1,minHeight:100,minWidth:200,expandOnShow:!0,showAnimDuration:.25,hideAnimDuration:.25,collapsible:!1,initHidden:void 0,hidden:!0,elements:"header,body",frame:!0,floating:!0,initComponent:function(){this.initTools(),Ext.Window.superclass.initComponent.call(this),this.addEvents("resize","maximize","minimize","restore"),Ext.isDefined(this.initHidden)&&(this.hidden=this.initHidden),!1===this.hidden&&(this.hidden=!0,this.show())},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(!0))},onRender:function(t,e){Ext.Window.superclass.onRender.call(this,t,e),this.plain&&this.el.addClass("x-window-plain"),this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"}),this.focusEl.swallowEvent("click",!0),this.proxy=this.el.createProxy("x-window-proxy"),this.proxy.enableDisplayMode("block"),this.modal&&(this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom),this.mask.enableDisplayMode("block"),this.mask.hide(),this.mon(this.mask,"click",this.focus,this)),this.maximizable&&this.mon(this.header,"dblclick",this.toggleMaximize,this)},initEvents:function(){var t;Ext.Window.superclass.initEvents.call(this),this.animateTarget&&this.setAnimateTarget(this.animateTarget),this.resizable&&(this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:!0,resizeElement:this.resizerAction,handleCls:"x-window-handle"}),(this.resizer.window=this).mon(this.resizer,"beforeresize",this.beforeResize,this)),this.draggable&&this.header.addClass("x-window-draggable"),this.mon(this.el,"mousedown",this.toFront,this),this.manager=this.manager||Ext.WindowMgr,this.manager.register(this),this.maximized&&(this.maximized=!1,this.maximize()),this.closable&&((t=this.getKeyMap()).on(27,this.onEsc,this),t.disable())},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(t,e){this.activeGhost&&this.unghost(),e.stopEvent(),this[this.closeAction]()},beforeDestroy:function(){this.rendered&&(this.hide(),this.clearAnchor(),Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)),Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){this.manager&&this.manager.unregister(this),Ext.Window.superclass.onDestroy.call(this)},initTools:function(){this.minimizable&&this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])}),this.maximizable&&(this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])}),this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:!0})),this.closable&&this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})},resizerAction:function(){var t=this.proxy.getBox();return this.proxy.hide(),this.window.handleResize(t),t},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40),this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40),this.resizeBox=this.el.getBox()},updateHandles:function(){Ext.isIE9m&&this.resizer&&(this.resizer.syncHandleHeight(),this.el.repaint())},handleResize:function(t){var e=this.resizeBox;e.x!=t.x||e.y!=t.y?this.updateBox(t):(this.setSize(t),Ext.isIE6&&Ext.isStrict&&this.doLayout()),this.focus(),this.updateHandles(),this.saveState()},focus:function(){var t,e,i=this.focusEl,s=this.defaultButton;Ext.isDefined(s)&&(t=(i=Ext.isNumber(s)&&this.fbar?this.fbar.items.get(s):Ext.isString(s)?Ext.getCmp(s):s).getEl(),e=Ext.getDom(this.container),t&&e&&e!=document.body&&!Ext.lib.Region.getRegion(e).contains(Ext.lib.Region.getRegion(t.dom)))||(i=i||this.focusEl).focus.defer(10,i)},setAnimateTarget:function(t){t=Ext.get(t),this.animateTarget=t},beforeShow:function(){var t,e;delete this.el.lastXY,delete this.el.lastLT,void 0!==this.x&&void 0!==this.y||(t=this.el.getAlignToXY(this.container,"c-c"),e=this.el.translatePoints(t[0],t[1]),this.x=void 0===this.x?e.left:this.x,this.y=void 0===this.y?e.top:this.y),this.el.setLeftTop(this.x,this.y),this.expandOnShow&&this.expand(!1),this.modal&&(Ext.getBody().addClass("x-body-masked"),this.mask.setSize(Ext.lib.Dom.getViewWidth(!0),Ext.lib.Dom.getViewHeight(!0)),this.mask.show())},show:function(t,e,i){return this.rendered||this.render(Ext.getBody()),!1===this.hidden?this.toFront():!1===this.fireEvent("beforeshow",this)||(e&&this.on("show",e,i,{single:!0}),this.hidden=!1,Ext.isDefined(t)&&this.setAnimateTarget(t),this.beforeShow(),this.animateTarget?this.animShow():this.afterShow()),this},afterShow:function(t){if(this.isDestroyed)return!1;var e;this.proxy.hide(),this.el.setStyle("display","block"),this.el.show(),this.maximized&&this.fitContainer(),Ext.isMac&&Ext.isGecko2&&this.cascade(this.setAutoScroll),(this.monitorResize||this.modal||this.constrain||this.constrainHeader)&&Ext.EventManager.onWindowResize(this.onWindowResize,this),this.doConstrain(),this.doLayout(),this.keyMap&&this.keyMap.enable(),this.toFront(),this.updateHandles(),t&&(Ext.isIE||Ext.isWebKit)&&(e=this.getSize(),this.onResize(e.width,e.height)),this.onShow(),this.fireEvent("show",this)},animShow:function(){this.proxy.show(),this.proxy.setBox(this.animateTarget.getBox()),this.proxy.setOpacity(0);var t=this.getBox();this.el.setStyle("display","none"),this.proxy.shift(Ext.apply(t,{callback:this.afterShow.createDelegate(this,[!0],!1),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:.5}))},hide:function(t,e,i){return this.hidden||!1===this.fireEvent("beforehide",this)||(e&&this.on("hide",e,i,{single:!0}),this.hidden=!0,void 0!==t&&this.setAnimateTarget(t),this.modal&&(this.mask.hide(),Ext.getBody().removeClass("x-body-masked")),this.animateTarget?this.animHide():(this.el.hide(),this.afterHide())),this},afterHide:function(){this.proxy.hide(),(this.monitorResize||this.modal||this.constrain||this.constrainHeader)&&Ext.EventManager.removeResizeListener(this.onWindowResize,this),this.keyMap&&this.keyMap.disable(),this.onHide(),this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(.5),this.proxy.show();var t=this.getBox(!1);this.proxy.setBox(t),this.el.hide(),this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){this.maximized&&this.fitContainer(),this.modal&&(this.mask.setSize("100%","100%"),this.mask.dom.offsetHeight,this.mask.setSize(Ext.lib.Dom.getViewWidth(!0),Ext.lib.Dom.getViewHeight(!0))),this.doConstrain()},doConstrain:function(){var t,e,i;(this.constrain||this.constrainHeader)&&(e=this.constrain?{right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}:{right:-((t=this.getSize()).width-100),bottom:-(t.height-25+this.el.getConstrainOffset())},(i=this.el.getConstrainToXY(this.container,!0,e))&&this.setPosition(i[0],i[1]))},ghost:function(t){var e=this.createGhost(t),i=this.getBox(!0);return e.setLeftTop(i.x,i.y),e.setWidth(i.width),this.el.hide(),this.activeGhost=e},unghost:function(t,e){this.activeGhost&&(!1!==t&&(this.el.show(),this.focus.defer(10,this),Ext.isMac&&Ext.isGecko2&&this.cascade(this.setAutoScroll)),!1!==e&&this.setPosition(this.activeGhost.getLeft(!0),this.activeGhost.getTop(!0)),this.activeGhost.hide(),this.activeGhost.remove(),delete this.activeGhost)},minimize:function(){return this.fireEvent("minimize",this),this},close:function(){!1!==this.fireEvent("beforeclose",this)&&(this.hidden?this.doClose():this.hide(null,this.doClose,this))},doClose:function(){this.fireEvent("close",this),this.destroy()},maximize:function(){return this.maximized||(this.expand(!1),this.restoreSize=this.getSize(),this.restorePos=this.getPosition(!0),this.maximizable&&(this.tools.maximize.hide(),this.tools.restore.show()),this.maximized=!0,this.el.disableShadow(),this.dd&&this.dd.lock(),this.collapsible&&this.tools.toggle.hide(),this.el.addClass("x-window-maximized"),this.container.addClass("x-window-maximized-ct"),this.setPosition(0,0),this.fitContainer(),this.fireEvent("maximize",this)),this},restore:function(){var t;return this.maximized&&(t=this.tools,this.el.removeClass("x-window-maximized"),t.restore&&t.restore.hide(),t.maximize&&t.maximize.show(),this.setPosition(this.restorePos[0],this.restorePos[1]),this.setSize(this.restoreSize.width,this.restoreSize.height),delete this.restorePos,delete this.restoreSize,this.maximized=!1,this.el.enableShadow(!0),this.dd&&this.dd.unlock(),this.collapsible&&t.toggle&&t.toggle.show(),this.container.removeClass("x-window-maximized-ct"),this.doConstrain(),this.fireEvent("restore",this)),this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var t=this.container.getViewSize(!1);this.setSize(t.width,t.height)},setZIndex:function(t){this.modal&&this.mask.setStyle("z-index",t),this.el.setZIndex(++t),t+=5,this.resizer&&this.resizer.proxy.setStyle("z-index",++t),this.lastZIndex=t},alignTo:function(t,e,i){var s=this.el.getAlignToXY(t,e,i);return this.setPagePosition(s[0],s[1]),this},anchorTo:function(t,e,i,s){this.clearAnchor(),this.anchorTarget={el:t,alignment:e,offsets:i},Ext.EventManager.onWindowResize(this.doAnchor,this);var n=typeof s;return"undefined"!=n&&Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:"number"==n?s:50}),this.doAnchor()},doAnchor:function(){var t=this.anchorTarget;return this.alignTo(t.el,t.alignment,t.offsets),this},clearAnchor:function(){return this.anchorTarget&&(Ext.EventManager.removeResizeListener(this.doAnchor,this),Ext.EventManager.un(window,"scroll",this.doAnchor,this),delete this.anchorTarget),this},toFront:function(t){return this.manager.bringToFront(this)&&(t&&t.getTarget().focus||this.focus()),this},setActive:function(t){t?(this.maximized||this.el.enableShadow(!0),this.fireEvent("activate",this)):(this.el.disableShadow(),this.fireEvent("deactivate",this))},toBack:function(){return this.manager.sendToBack(this),this},center:function(){var t=this.el.getAlignToXY(this.container,"c-c");return this.setPagePosition(t[0],t[1]),this}}),Ext.reg("window",Ext.Window),Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(t){this.win=t,Ext.Window.DD.superclass.constructor.call(this,t.el.id,"WindowDD-"+t.id),this.setHandleElId(t.header.id),this.scroll=!1},moveOnly:!0,headerOffsets:[100,25],startDrag:function(){var t,e,i=this.win;this.proxy=i.ghost(i.initialConfig.cls),!1!==i.constrain?(t=i.el.shadowOffset,this.constrainTo(i.container,{right:t,left:t,bottom:t})):!1!==i.constrainHeader&&(e=this.proxy.getSize(),this.constrainTo(i.container,{right:-(e.width-this.headerOffsets[0]),bottom:-(e.height-this.headerOffsets[1])}))},b4Drag:Ext.emptyFn,onDrag:function(t){this.alignElWithMouse(this.proxy,t.getPageX(),t.getPageY())},endDrag:function(t){this.win.unghost(),this.win.saveState()}}),Ext.WindowGroup=function(){function r(t,e){return!t._lastAccess||t._lastAccess<e._lastAccess?-1:1}function e(){var t=o,e=t.length;if(0<e){t.sort(r);for(var i=t[0].manager.zseed,s=0;s<e;s++){var n=t[s];n&&!n.hidden&&n.setZIndex(i+10*s)}}a()}function i(t){t!=n&&(n&&n.setActive(!1),(n=t)&&t.setActive(!0))}var s={},o=[],n=null,a=function(){for(var t=o.length-1;0<=t;--t)if(!o[t].hidden)return void i(o[t]);i(null)};return{zseed:9e3,register:function(t){t.manager&&t.manager.unregister(t),t.manager=this,s[t.id]=t,o.push(t),t.on("hide",a)},unregister:function(t){delete t.manager,delete s[t.id],t.un("hide",a),o.remove(t)},get:function(t){return"object"==typeof t?t:s[t]},bringToFront:function(t){return(t=this.get(t))!=n&&(t._lastAccess=(new Date).getTime(),e(),!0)},sendToBack:function(t){return(t=this.get(t))._lastAccess=-(new Date).getTime(),e(),t},hideAll:function(){for(var t in s)s[t]&&"function"!=typeof s[t]&&s[t].isVisible()&&s[t].hide()},getActive:function(){return n},getBy:function(t,e){for(var i=[],s=o.length-1;0<=s;--s){var n=o[s];!1!==t.call(e||n,n)&&i.push(n)}return i},each:function(t,e){for(var i in s)if(s[i]&&"function"!=typeof s[i]&&!1===t.call(e||s[i],s[i]))return}}},Ext.WindowMgr=new Ext.WindowGroup,Ext.MessageBox=function(){function s(t){p[t].blur(),l.isVisible()&&(l.hide(),e(),Ext.callback(h.fn,h.scope||window,[t,g.dom.value,h],1))}var l,h,d,n,o,c,u,f,a,p,g,m,x="",E="",v=["ok","yes","no","cancel"],e=function(){h&&h.cls&&l.el.removeClass(h.cls),f.reset()};return{getDialog:function(t){var e,i;return l||(e=[],p={},Ext.each(v,function(t){e.push(p[t]=new Ext.Button({text:this.buttonText[t],handler:s.createCallback(t),hideMode:"offsets"}))},this),(l=new Ext.Window({autoCreate:!0,title:t,resizable:!1,constrain:!0,constrainHeader:!0,minimizable:!1,maximizable:!1,stateful:!1,modal:!0,shim:!0,buttonAlign:"center",width:400,height:100,minHeight:80,plain:!0,footer:!0,closable:!0,close:function(){h&&h.buttons&&h.buttons.no&&!h.buttons.cancel?s("no"):s("cancel")},fbar:new Ext.Toolbar({items:e,enableOverflow:!1})})).render(document.body),l.getEl().addClass("x-window-dlg"),d=l.mask,n=l.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'}),a=Ext.get(n.dom.firstChild),i=n.dom.childNodes[1],o=Ext.get(i.firstChild),(c=Ext.get(i.childNodes[2].firstChild)).enableDisplayMode(),c.addKeyListener([10,13],function(){l.isVisible()&&h&&h.buttons&&(h.buttons.ok?s("ok"):h.buttons.yes&&s("yes"))}),(u=Ext.get(i.childNodes[2].childNodes[1])).enableDisplayMode(),f=new Ext.ProgressBar({renderTo:n}),n.createChild({cls:"x-clear"})),l},updateText:function(t){l.isVisible()||h.width||l.setSize(this.maxWidth,100),o.update(t?t+" ":"&#160;");var e=""!=E?a.getWidth()+a.getMargins("lr"):0,i=o.getWidth()+o.getMargins("lr"),s=l.getFrameWidth("lr"),n=l.body.getFrameWidth("lr"),r=Math.max(Math.min(h.width||e+i+s+n,h.maxWidth||this.maxWidth),Math.max(h.minWidth||this.minWidth,m||0));return!0===h.prompt&&g.setWidth(r-e-s-n),!0!==h.progress&&!0!==h.wait||f.setSize(r-e-s-n),Ext.isIE9m&&r==m&&(r+=4),o.update(t||"&#160;"),l.setSize(r,"auto").center(),this},updateProgress:function(t,e,i){return f.updateProgress(t,e),i&&this.updateText(i),this},isVisible:function(){return l&&l.isVisible()},hide:function(){var t=l?l.activeGhost:null;return(this.isVisible()||t)&&(l.hide(),e(),t&&l.unghost(!1,!1)),this},show:function(t){this.isVisible()&&this.hide(),h=t;var e=this.getDialog(h.title||"&#160;");e.setTitle(h.title||"&#160;");var i,s,n,r,o,a=!1!==h.closable&&!0!==h.progress&&!0!==h.wait;return e.tools.close.setDisplayed(a),g=c,h.prompt=h.prompt||!!h.multiline,h.prompt?h.multiline?(c.hide(),u.show(),u.setHeight(Ext.isNumber(h.multiline)?h.multiline:this.defaultTextHeight),g=u):(c.show(),u.hide()):(c.hide(),u.hide()),g.dom.value=h.value||"",h.prompt?e.focusEl=g:(s=null,(i=h.buttons)&&i.ok?s=p.ok:i&&i.yes&&(s=p.yes),s&&(e.focusEl=s)),Ext.isDefined(h.iconCls)&&e.setIconClass(h.iconCls),this.setIcon(Ext.isDefined(h.icon)?h.icon:x),n=h.buttons,o=0,n?(l.footer.dom.style.display="",Ext.iterate(p,function(t,e){(r=n[t])?(e.show(),e.setText(Ext.isString(r)?r:Ext.MessageBox.buttonText[t]),o+=e.getEl().getWidth()+15):e.hide()})):Ext.each(v,function(t){p[t].hide()}),m=o,f.setVisible(!0===h.progress||!0===h.wait),this.updateProgress(0,h.progressText),this.updateText(h.msg),h.cls&&e.el.addClass(h.cls),e.proxyDrag=!0===h.proxyDrag,e.modal=!1!==h.modal,e.mask=!1!==h.modal&&d,e.isVisible()||(document.body.appendChild(l.el.dom),e.setAnimateTarget(h.animEl),e.on("show",function(){!0==a?e.keyMap.enable():e.keyMap.disable()},this,{single:!0}),e.show(h.animEl)),!0===h.wait&&f.wait(h.waitConfig),this},setIcon:function(t){if(l)return x=void 0,E=t&&""!=t?(a.removeClass("x-hidden"),a.replaceClass(E,t),n.addClass("x-dlg-icon"),t):(a.replaceClass(E,"x-hidden"),n.removeClass("x-dlg-icon"),""),this;x=t},progress:function(t,e,i){return this.show({title:t,msg:e,buttons:!1,progress:!0,closable:!1,minWidth:this.minProgressWidth,progressText:i}),this},wait:function(t,e,i){return this.show({title:e,msg:t,buttons:!1,closable:!1,wait:!0,modal:!0,minWidth:this.minProgressWidth,waitConfig:i}),this},alert:function(t,e,i,s){return this.show({title:t,msg:e,buttons:this.OK,fn:i,scope:s,minWidth:this.minWidth}),this},confirm:function(t,e,i,s){return this.show({title:t,msg:e,buttons:this.YESNO,fn:i,scope:s,icon:this.QUESTION,minWidth:this.minWidth}),this},prompt:function(t,e,i,s,n,r){return this.show({title:t,msg:e,buttons:this.OKCANCEL,fn:i,minWidth:this.minPromptWidth,scope:s,prompt:!0,multiline:n,value:r}),this},OK:{ok:!0},CANCEL:{cancel:!0},OKCANCEL:{ok:!0,cancel:!0},YESNO:{yes:!0,no:!0},YESNOCANCEL:{yes:!0,no:!0,cancel:!0},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}(),Ext.Msg=Ext.MessageBox,Ext.dd.PanelProxy=Ext.extend(Object,{constructor:function(t,e){this.panel=t,this.id=this.panel.id+"-ddproxy",Ext.apply(this,e)},insertProxy:!0,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){this.ghost&&(this.proxy&&(this.proxy.remove(),delete this.proxy),this.panel.el.dom.style.display="",this.ghost.remove(),delete this.ghost)},show:function(){this.ghost||(this.ghost=this.panel.createGhost(this.panel.initialConfig.cls,void 0,Ext.getBody()),this.ghost.setXY(this.panel.el.getXY()),this.insertProxy&&(this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"}),this.proxy.setSize(this.panel.getSize())),this.panel.el.dom.style.display="none")},repair:function(t,e,i){this.hide(),"function"==typeof e&&e.call(i||this)},moveProxy:function(t,e){this.proxy&&t.insertBefore(this.proxy.dom,e)}}),Ext.Panel.DD=Ext.extend(Ext.dd.DragSource,{constructor:function(t,e){this.panel=t,this.dragData={panel:t},this.proxy=new Ext.dd.PanelProxy(t,e),Ext.Panel.DD.superclass.constructor.call(this,t.el,e);var i=t.header,s=t.body;i&&(this.setHandleElId(i.id),s=t.header),s.setStyle("cursor","move"),this.scroll=!1},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(t,e){this.proxy.show()},b4MouseDown:function(t){var e=t.getPageX(),i=t.getPageY();this.autoOffset(e,i)},onInitDrag:function(t,e){return this.onStartDrag(t,e),!0},createFrame:Ext.emptyFn,getDragEl:function(t){return this.proxy.ghost.dom},endDrag:function(t){this.proxy.hide(),this.panel.saveState()},autoOffset:function(t,e){t-=this.startPageX,e-=this.startPageY,this.setDelta(t,e)}}),Ext.state.Provider=Ext.extend(Ext.util.Observable,{constructor:function(){this.addEvents("statechange"),this.state={},Ext.state.Provider.superclass.constructor.call(this)},get:function(t,e){return void 0===this.state[t]?e:this.state[t]},clear:function(t){delete this.state[t],this.fireEvent("statechange",this,t,null)},set:function(t,e){this.state[t]=e,this.fireEvent("statechange",this,t,e)},decodeValue:function(t){var e,i,s,n,r=/^(a|n|d|b|s|o|e)\:(.*)$/.exec(unescape(t));if(r&&r[1])switch(i=r[1],s=r[2],i){case"e":return null;case"n":return parseFloat(s);case"d":return new Date(Date.parse(s));case"b":return"1"==s;case"a":return e=[],""!=s&&Ext.each(s.split("^"),function(t){e.push(this.decodeValue(t))},this),e;case"o":return e={},""!=s&&Ext.each(s.split("^"),function(t){n=t.split("="),e[n[0]]=this.decodeValue(n[1])},this),e;default:return s}},encodeValue:function(t){var e,i,s,n="",r=0;if(null==t)return"e:1";if("number"==typeof t)e="n:"+t;else if("boolean"==typeof t)e="b:"+(t?"1":"0");else if(Ext.isDate(t))e="d:"+t.toGMTString();else if(Ext.isArray(t)){for(i=t.length;r<i;r++)n+=this.encodeValue(t[r]),r!=i-1&&(n+="^");e="a:"+n}else if("object"==typeof t){for(s in t)"function"!=typeof t[s]&&void 0!==t[s]&&(n+=s+"="+this.encodeValue(t[s])+"^");e="o:"+n.substring(0,n.length-1)}else e="s:"+t;return escape(e)}}),Ext.state.Manager=function(){var i=new Ext.state.Provider;return{setProvider:function(t){i=t},get:function(t,e){return i.get(t,e)},set:function(t,e){i.set(t,e)},clear:function(t){i.clear(t)},getProvider:function(){return i}}}(),Ext.state.CookieProvider=Ext.extend(Ext.state.Provider,{constructor:function(t){Ext.state.CookieProvider.superclass.constructor.call(this),this.path="/",this.expires=new Date((new Date).getTime()+6048e5),this.domain=null,this.secure=!1,Ext.apply(this,t),this.state=this.readCookies()},set:function(t,e){null!=e?(this.setCookie(t,e),Ext.state.CookieProvider.superclass.set.call(this,t,e)):this.clear(t)},clear:function(t){this.clearCookie(t),Ext.state.CookieProvider.superclass.clear.call(this,t)},readCookies:function(){for(var t,e,i,s={},n=document.cookie+";",r=/\s?(.*?)=(.*?);/g;null!=(t=r.exec(n));)e=t[1],i=t[2],e&&"ys-"==e.substring(0,3)&&(s[e.substr(3)]=this.decodeValue(i));return s},setCookie:function(t,e){document.cookie="ys-"+t+"="+this.encodeValue(e)+(null==this.expires?"":"; expires="+this.expires.toGMTString())+(null==this.path?"":"; path="+this.path)+(null==this.domain?"":"; domain="+this.domain)+(1==this.secure?"; secure":"")},clearCookie:function(t){document.cookie="ys-"+t+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+(null==this.path?"":"; path="+this.path)+(null==this.domain?"":"; domain="+this.domain)+(1==this.secure?"; secure":"")}}),Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:!0,trackOver:!1,blockRefresh:!1,last:!1,initComponent:function(){Ext.DataView.superclass.initComponent.call(this),(Ext.isString(this.tpl)||Ext.isArray(this.tpl))&&(this.tpl=new Ext.XTemplate(this.tpl)),this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect"),this.store=Ext.StoreMgr.lookup(this.store),this.all=new Ext.CompositeElementLite,this.selected=new Ext.CompositeElementLite},afterRender:function(){Ext.DataView.superclass.afterRender.call(this),this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this}),(this.overClass||this.trackOver)&&this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this}),this.store&&this.bindStore(this.store,!0)},refresh:function(){this.clearSelections(!1,!0);var t=this.getTemplateTarget(),e=this.store.getRange();t.update(""),e.length<1?(this.deferEmptyText&&!this.hasSkippedEmptyText||t.update(this.emptyText),this.all.clear()):(this.tpl.overwrite(t,this.collectData(e,0)),this.all.fill(Ext.query(this.itemSelector,t.dom)),this.updateIndexes(0)),this.hasSkippedEmptyText=!0},getTemplateTarget:function(){return this.el},prepareData:function(t){return t},collectData:function(t,e){for(var i=[],s=0,n=t.length;s<n;s++)i[i.length]=this.prepareData(t[s].data,e+s,t[s]);return i},bufferRender:function(t,e){var i=document.createElement("div");return this.tpl.overwrite(i,this.collectData(t,e)),Ext.query(this.itemSelector,i)},onUpdate:function(t,e){var i,s,n,r=this.store.indexOf(e);-1<r&&(i=this.isSelected(r),s=this.all.elements[r],n=this.bufferRender([e],r)[0],this.all.replaceElement(r,n,!0),i&&(this.selected.replaceElement(s,n),this.all.item(r).addClass(this.selectedClass)),this.updateIndexes(r,r))},onAdd:function(t,e,i){var s,n;0!==this.all.getCount()?(s=this.bufferRender(e,i),n=this.all.elements,i<this.all.getCount()?(this.all.item(i).insertSibling(s,"before",!0),n.splice.apply(n,[i,0].concat(s))):(this.all.last().insertSibling(s,"after",!0),n.push.apply(n,s)),this.updateIndexes(i)):this.refresh()},onRemove:function(t,e,i){this.deselect(i),this.all.removeElement(i,!0),this.updateIndexes(i),0===this.store.getCount()&&this.refresh()},refreshNode:function(t){this.onUpdate(this.store,this.store.getAt(t))},updateIndexes:function(t,e){var i=this.all.elements;t=t||0,e=e||(0===e?0:i.length-1);for(var s=t;s<=e;s++)i[s].viewIndex=s},getStore:function(){return this.store},bindStore:function(t,e){!e&&this.store&&(t!==this.store&&this.store.autoDestroy?this.store.destroy():(this.store.un("beforeload",this.onBeforeLoad,this),this.store.un("datachanged",this.onDataChanged,this),this.store.un("add",this.onAdd,this),this.store.un("remove",this.onRemove,this),this.store.un("update",this.onUpdate,this),this.store.un("clear",this.refresh,this)),t||(this.store=null)),t&&(t=Ext.StoreMgr.lookup(t)).on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.onDataChanged,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh}),(this.store=t)&&this.refresh()},onDataChanged:function(){!0!==this.blockRefresh&&this.refresh.apply(this,arguments)},findItemFromChild:function(t){return Ext.fly(t).findParent(this.itemSelector,this.getTemplateTarget())},onClick:function(t){var e,i=t.getTarget(this.itemSelector,this.getTemplateTarget());i?(e=this.indexOf(i),!1!==this.onItemClick(i,e,t)&&this.fireEvent("click",this,e,i,t)):!1!==this.fireEvent("containerclick",this,t)&&this.onContainerClick(t)},onContainerClick:function(t){this.clearSelections()},onContextMenu:function(t){var e=t.getTarget(this.itemSelector,this.getTemplateTarget());e?this.fireEvent("contextmenu",this,this.indexOf(e),e,t):this.fireEvent("containercontextmenu",this,t)},onDblClick:function(t){var e=t.getTarget(this.itemSelector,this.getTemplateTarget());e&&this.fireEvent("dblclick",this,this.indexOf(e),e,t)},onMouseOver:function(t){var e=t.getTarget(this.itemSelector,this.getTemplateTarget());e&&e!==this.lastItem&&(this.lastItem=e,Ext.fly(e).addClass(this.overClass),this.fireEvent("mouseenter",this,this.indexOf(e),e,t))},onMouseOut:function(t){this.lastItem&&(t.within(this.lastItem,!0,!0)||(Ext.fly(this.lastItem).removeClass(this.overClass),this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,t),delete this.lastItem))},onItemClick:function(t,e,i){return!1!==this.fireEvent("beforeclick",this,e,t,i)&&(this.multiSelect?(this.doMultiSelection(t,e,i),i.preventDefault()):this.singleSelect&&(this.doSingleSelection(t,e,i),i.preventDefault()),!0)},doSingleSelection:function(t,e,i){i.ctrlKey&&this.isSelected(e)?this.deselect(e):this.select(e,!1)},doMultiSelection:function(t,e,i){var s;i.shiftKey&&!1!==this.last?(s=this.last,this.selectRange(s,e,i.ctrlKey),this.last=s):(i.ctrlKey||this.simpleSelect)&&this.isSelected(e)?this.deselect(e):this.select(e,i.ctrlKey||i.shiftKey||this.simpleSelect)},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){for(var t=[],e=this.selected.elements,i=0,s=e.length;i<s;i++)t.push(e[i].viewIndex);return t},getSelectedRecords:function(){return this.getRecords(this.selected.elements)},getRecords:function(t){for(var e=[],i=0,s=t.length;i<s;i++)e[e.length]=this.store.getAt(t[i].viewIndex);return e},getRecord:function(t){return this.store.getAt(t.viewIndex)},clearSelections:function(t,e){(this.multiSelect||this.singleSelect)&&0<this.selected.getCount()&&(e||this.selected.removeClass(this.selectedClass),this.selected.clear(),this.last=!1,t||this.fireEvent("selectionchange",this,this.selected.elements))},isSelected:function(t){return this.selected.contains(this.getNode(t))},deselect:function(t){this.isSelected(t)&&(t=this.getNode(t),this.selected.removeElement(t),this.last==t.viewIndex&&(this.last=!1),Ext.fly(t).removeClass(this.selectedClass),this.fireEvent("selectionchange",this,this.selected.elements))},select:function(t,e,i){if(Ext.isArray(t)){e||this.clearSelections(!0);for(var s=0,n=t.length;s<n;s++)this.select(t[s],!0,!0);i||this.fireEvent("selectionchange",this,this.selected.elements)}else{var r=this.getNode(t);e||this.clearSelections(!0),r&&!this.isSelected(r)&&!1!==this.fireEvent("beforeselect",this,r,this.selected.elements)&&(Ext.fly(r).addClass(this.selectedClass),this.selected.add(r),this.last=r.viewIndex,i||this.fireEvent("selectionchange",this,this.selected.elements))}},selectRange:function(t,e,i){i||this.clearSelections(!0),this.select(this.getNodes(t,e),!0)},getNode:function(t){if(Ext.isString(t))return document.getElementById(t);if(Ext.isNumber(t))return this.all.elements[t];if(t instanceof Ext.data.Record){var e=this.store.indexOf(t);return this.all.elements[e]}return t},getNodes:function(t,e){var i,s=this.all.elements,n=[];if((t=t||0)<=(e=Ext.isDefined(e)?e:Math.max(s.length-1,0)))for(i=t;i<=e&&s[i];i++)n.push(s[i]);else for(i=t;e<=i&&s[i];i--)n.push(s[i]);return n},indexOf:function(t){return t=this.getNode(t),Ext.isNumber(t.viewIndex)?t.viewIndex:this.all.indexOf(t)},onBeforeLoad:function(){this.loadingText&&(this.clearSelections(!1,!0),this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>"),this.all.clear())},onDestroy:function(){this.all.clear(),this.selected.clear(),Ext.DataView.superclass.onDestroy.call(this),this.bindStore(null)}}),Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore,Ext.reg("dataview",Ext.DataView),Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:void 0,columnResize:!0,columnSort:!0,maxColumnWidth:Ext.isIE9m?99:100,initComponent:function(){this.columnResize&&(this.colResizer=new Ext.list.ColumnResizer(this.colResizer),this.colResizer.init(this)),this.columnSort&&(this.colSorter=new Ext.list.Sorter(this.columnSort),this.colSorter.init(this)),this.internalTpl||(this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{[values.width*100]}%;text-align:{align};"><em class="x-unselectable" unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>")),this.tpl||(this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{[values.width*100]}%;text-align:{align};">','<em unselectable="on"<tpl if="cls"> class="{cls}</tpl>">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>"));for(var t=this.columns,e=0,i=0,s=t.length,n=[],r=0;r<s;r++){(a=t[r]).isColumn||(a.xtype=a.xtype?/^lv/.test(a.xtype)?a.xtype:"lv"+a.xtype:"lvcolumn",a=Ext.create(a)),a.width&&((e+=100*a.width)>this.maxColumnWidth&&(a.width-=(e-this.maxColumnWidth)/100),i++),n.push(a)}if(t=this.columns=n,i<s){var o=s-i;if(e<this.maxColumnWidth)for(var a,l=(this.maxColumnWidth-e)/o/100,h=0;h<s;h++){(a=t[h]).width||(a.width=l)}}Ext.list.ListView.superclass.initComponent.call(this)},onRender:function(){this.autoEl={cls:"x-list-wrap"},Ext.list.ListView.superclass.onRender.apply(this,arguments),this.internalTpl.overwrite(this.el,{columns:this.columns}),this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild),this.innerHd=Ext.get(this.el.dom.firstChild.firstChild),this.hideHeaders&&(this.el.dom.firstChild.style.display="none")},getTemplateTarget:function(){return this.innerBody},collectData:function(){var t=Ext.list.ListView.superclass.collectData.apply(this,arguments);return{columns:this.columns,rows:t}},verifyInternalSize:function(){this.lastSize&&this.onResize(this.lastSize.width,this.lastSize.height)},onResize:function(t,e){var i,s=this.innerBody.dom,n=this.innerHd.dom,r=t-Ext.num(this.scrollOffset,Ext.getScrollBarWidth())+"px";s&&(i=s.parentNode,Ext.isNumber(t)&&(this.reserveScrollOffset||10<i.offsetWidth-i.clientWidth?(s.style.width=r,n.style.width=r):(s.style.width=t+"px",n.style.width=t+"px",setTimeout(function(){10<i.offsetWidth-i.clientWidth&&(s.style.width=r,n.style.width=r)},10))),Ext.isNumber(e)&&(i.style.height=Math.max(0,e-n.parentNode.offsetHeight)+"px"))},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments),this.verifyInternalSize()},findHeaderIndex:function(t){for(var e,i=(t=t.dom||t).parentNode,s=i.parentNode.childNodes,n=0;e=s[n];n++)if(e==i)return n;return-1},setHdWidths:function(){for(var t=this.innerHd.dom.getElementsByTagName("div"),e=0,i=this.columns,s=i.length;e<s;e++)t[e].style.width=100*i[e].width+"%"}}),Ext.reg("listview",Ext.list.ListView),Ext.ListView=Ext.list.ListView,Ext.list.Column=Ext.extend(Object,{isColumn:!0,align:"left",header:"",width:null,cls:"",constructor:function(t){t.tpl?Ext.isString(t.tpl)&&(t.tpl=new Ext.XTemplate(t.tpl)):t.tpl=new Ext.XTemplate("{"+t.dataIndex+"}"),Ext.apply(this,t)}}),Ext.reg("lvcolumn",Ext.list.Column),Ext.list.NumberColumn=Ext.extend(Ext.list.Column,{format:"0,000.00",constructor:function(t){t.tpl=t.tpl||new Ext.XTemplate("{"+t.dataIndex+':number("'+(t.format||this.format)+'")}'),Ext.list.NumberColumn.superclass.constructor.call(this,t)}}),Ext.reg("lvnumbercolumn",Ext.list.NumberColumn),Ext.list.DateColumn=Ext.extend(Ext.list.Column,{format:"m/d/Y",constructor:function(t){t.tpl=t.tpl||new Ext.XTemplate("{"+t.dataIndex+':date("'+(t.format||this.format)+'")}'),Ext.list.DateColumn.superclass.constructor.call(this,t)}}),Ext.reg("lvdatecolumn",Ext.list.DateColumn),Ext.list.BooleanColumn=Ext.extend(Ext.list.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(t){t.tpl=t.tpl||new Ext.XTemplate("{"+t.dataIndex+":this.format}");var e=this.trueText,i=this.falseText,s=this.undefinedText;t.tpl.format=function(t){return void 0===t?s:t&&"false"!==t?e:i},Ext.list.DateColumn.superclass.constructor.call(this,t)}}),Ext.reg("lvbooleancolumn",Ext.list.BooleanColumn),Ext.list.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:.05,constructor:function(t){Ext.apply(this,t),Ext.list.ColumnResizer.superclass.constructor.call(this)},init:function(t){(this.view=t).on("render",this.initEvents,this)},initEvents:function(t){t.mon(t.innerHd,"mousemove",this.handleHdMove,this),this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300}),this.tracker.initEl(t.innerHd),t.on("beforedestroy",this.tracker.destroy,this.tracker)},handleHdMove:function(t,e){var i,s,n,r=t.getPageX(),o=t.getTarget("em",3,!0);o&&(i=o.getRegion(),s=o.dom.style,n=o.dom.parentNode,r-i.left<=5&&n!=n.parentNode.firstChild?(this.activeHd=Ext.get(n.previousSibling.firstChild),s.cursor=Ext.isWebKit?"e-resize":"col-resize"):i.right-r<=5&&n!=n.parentNode.lastChild.previousSibling?(this.activeHd=o,s.cursor=Ext.isWebKit?"w-resize":"col-resize"):(delete this.activeHd,s.cursor=""))},onBeforeStart:function(t){return this.dragHd=this.activeHd,!!this.dragHd},onStart:function(t){var e=this,i=e.view,s=e.dragHd,n=e.tracker.getXY()[0];e.proxy=i.el.createChild({cls:"x-list-resizer"}),e.dragX=s.getX(),e.headerIndex=i.findHeaderIndex(s),e.headersDisabled=i.disableHeaders,i.disableHeaders=!0,e.proxy.setHeight(i.el.getHeight()),e.proxy.setX(e.dragX),e.proxy.setWidth(n-e.dragX),this.setBoundaries()},setBoundaries:function(t){var e,i=this.view,s=this.headerIndex,n=i.innerHd.getWidth(),t=i.innerHd.getX(),r=Math.ceil(n*this.minPct),o=n-r,a=i.columns.length,l=i.innerHd.select("em",!0),h=r+t,d=o+t;2==a?(this.minX=h,this.maxX=d):(e=l.item(s+2),this.minX=l.item(s).getX()+r,this.maxX=e?e.getX()-r:d,0==s?this.minX=h:s==a-2&&(this.maxX=d))},onDrag:function(t){var e=this.tracker.getXY()[0].constrain(this.minX,this.maxX);this.proxy.setWidth(e-this.dragX)},onEnd:function(t){var e=this.proxy.getWidth(),i=this.headerIndex,s=this.view,n=s.columns,r=s.innerHd.getWidth(),o=Math.ceil(e*s.maxColumnWidth/r)/100,a=this.headersDisabled,l=n[i],h=n[i+1],d=l.width+h.width;this.proxy.remove(),l.width=o,h.width=d-o,delete this.dragHd,s.setHdWidths(),s.refresh(),setTimeout(function(){s.disableHeaders=a},100)}}),Ext.ListView.ColumnResizer=Ext.list.ColumnResizer,Ext.list.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(t){Ext.apply(this,t),Ext.list.Sorter.superclass.constructor.call(this)},init:function(t){(this.view=t).on("render",this.initEvents,this)},initEvents:function(t){t.mon(t.innerHd,"click",this.onHdClick,this),t.innerHd.setStyle("cursor","pointer"),t.mon(t.store,"datachanged",this.updateSortState,this),this.updateSortState.defer(10,this,[t.store])},updateSortState:function(t){var e=t.getSortState();if(e){this.sortState=e;for(var i,s=this.view.columns,n=-1,r=0,o=s.length;r<o;r++)if(s[r].dataIndex==e.field){n=r;break}-1!=n&&(i=e.direction,this.updateSortIcon(n,i))}},updateSortIcon:function(t,e){var i=this.sortClasses;this.view.innerHd.select("em").removeClass(i).item(t).addClass(i["DESC"==e?1:0])},onHdClick:function(t){var e,i=t.getTarget("em",3);i&&!this.view.disableHeaders&&(e=this.view.findHeaderIndex(i),this.view.store.sort(this.view.columns[e].dataIndex))}}),Ext.ListView.Sorter=Ext.list.Sorter,Ext.TabPanel=Ext.extend(Ext.Panel,{deferredRender:!0,tabWidth:120,minTabWidth:30,resizeTabs:!1,enableTabScroll:!1,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:.35,animScroll:!0,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:!1,autoTabSelector:"div.x-tab",activeTab:void 0,tabMargin:2,plain:!1,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:!1,frame:!1,hideBorders:!0,initComponent:function(){this.frame=!1,Ext.TabPanel.superclass.initComponent.call(this),this.addEvents("beforetabchange","tabchange","contextmenu"),this.setLayout(new Ext.layout.CardLayout(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig))),"top"==this.tabPosition?(this.elements+=",header",this.stripTarget="header"):(this.elements+=",footer",this.stripTarget="footer"),this.stack||(this.stack=Ext.TabPanel.AccessStack()),this.initItems()},onRender:function(t,e){var i;Ext.TabPanel.superclass.onRender.call(this,t,e),this.plain&&this[i="top"==this.tabPosition?"header":"footer"].addClass("x-tab-panel-"+i+"-plain");var s=this[this.stripTarget];this.stripWrap=s.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var n,r="bottom"==this.tabPosition?this.stripWrap:null;s.createChild({cls:"x-tab-strip-spacer"},r),this.strip=new Ext.Element(this.stripWrap.dom.firstChild),this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge",cn:[{tag:"span",cls:"x-tab-strip-text",cn:"&#160;"}]}),this.strip.createChild({cls:"x-clear"}),this.body.addClass("x-tab-panel-body-"+this.tabPosition),this.itemTpl||((n=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close"></a>','<a class="x-tab-right" href="#"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>")).disableFormats=!0,n.compile(),Ext.TabPanel.prototype.itemTpl=n),this.items.each(this.initTab,this)},afterRender:function(){var t;Ext.TabPanel.superclass.afterRender.call(this),this.autoTabs&&this.readTabs(!1),void 0!==this.activeTab&&(t=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab),delete this.activeTab,this.setActiveTab(t))},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this),this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu}),this.enableTabScroll&&this.mon(this.strip,"mousewheel",this.onWheel,this)},findTargets:function(t){var e=null,i=t.getTarget("li:not(.x-tab-edge)",this.strip);return i&&(e=this.getComponent(i.id.split(this.idDelimiter)[1])).disabled?{close:null,item:null,el:null}:{close:t.getTarget(".x-tab-strip-close",this.strip),item:e,el:i}},onStripMouseDown:function(t){var e;0===t.button&&(t.preventDefault(),(e=this.findTargets(t)).close?!1!==e.item.fireEvent("beforeclose",e.item)&&(e.item.fireEvent("close",e.item),this.remove(e.item)):e.item&&e.item!=this.activeTab&&this.setActiveTab(e.item))},onStripContextMenu:function(t){t.preventDefault();var e=this.findTargets(t);e.item&&this.fireEvent("contextmenu",this,e.item,t)},readTabs:function(t){!0===t&&this.items.each(function(t){this.remove(t)},this);for(var e=this.el.query(this.autoTabSelector),i=0,s=e.length;i<s;i++){var n=e[i],r=n.getAttribute("title");n.removeAttribute("title"),this.add({title:r,contentEl:n})}},initTab:function(t,e){var i=this.strip.dom.childNodes[e],s=this.getTemplateArgs(t),n=i?this.itemTpl.insertBefore(i,s):this.itemTpl.append(this.strip,s),r="x-tab-strip-over",o=Ext.get(n);o.hover(function(){t.disabled||o.addClass(r)},function(){o.removeClass(r)}),t.tabTip&&(o.child("span.x-tab-strip-text",!0).qtip=t.tabTip),t.tabEl=n,o.select("a").on("click",function(t){t.getPageX()||this.onStripMouseDown(t)},this,{preventDefault:!0}),t.on({scope:this,disable:this.onItemDisabled,enable:this.onItemEnabled,titlechange:this.onItemTitleChanged,iconchange:this.onItemIconChanged,beforeshow:this.onBeforeShowItem})},getTemplateArgs:function(t){var e=t.closable?"x-tab-strip-closable":"";return t.disabled&&(e+=" x-item-disabled"),t.iconCls&&(e+=" x-tab-with-icon"),t.tabCls&&(e+=" "+t.tabCls),{id:this.id+this.idDelimiter+t.getItemId(),text:t.title,cls:e,iconCls:t.iconCls||""}},onAdd:function(t){var e;Ext.TabPanel.superclass.onAdd.call(this,t),this.rendered&&(e=this.items,this.initTab(t,e.indexOf(t)),this.delegateUpdates())},onBeforeAdd:function(t){if(t.events?this.items.containsKey(t.getItemId())?t:null:this.items.get(t))return this.setActiveTab(t),!1;Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);var e=t.elements;t.elements=e?e.replace(",header",""):e,t.border=!0===t.border},onRemove:function(t){var e,i=Ext.get(t.tabEl);i&&(i.select("a").removeAllListeners(),Ext.destroy(i)),Ext.TabPanel.superclass.onRemove.call(this,t),this.stack.remove(t),delete t.tabEl,t.un("disable",this.onItemDisabled,this),t.un("enable",this.onItemEnabled,this),t.un("titlechange",this.onItemTitleChanged,this),t.un("iconchange",this.onItemIconChanged,this),t.un("beforeshow",this.onBeforeShowItem,this),t==this.activeTab&&((e=this.stack.next())?this.setActiveTab(e):0<this.items.getCount()?this.setActiveTab(0):this.setActiveTab(null)),this.destroying||this.delegateUpdates()},onBeforeShowItem:function(t){if(t!=this.activeTab)return this.setActiveTab(t),!1},onItemDisabled:function(t){var e=this.getTabEl(t);e&&Ext.fly(e).addClass("x-item-disabled"),this.stack.remove(t)},onItemEnabled:function(t){var e=this.getTabEl(t);e&&Ext.fly(e).removeClass("x-item-disabled")},onItemTitleChanged:function(t){var e=this.getTabEl(t);e&&(Ext.fly(e).child("span.x-tab-strip-text",!0).innerHTML=t.title,this.delegateUpdates())},onItemIconChanged:function(t,e,i){var s=this.getTabEl(t);s&&((s=Ext.get(s)).child("span.x-tab-strip-text").replaceClass(i,e),s[Ext.isEmpty(e)?"removeClass":"addClass"]("x-tab-with-icon"),this.delegateUpdates())},getTabEl:function(t){var e=this.getComponent(t);return e?e.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments),this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=!0},endUpdate:function(){this.suspendUpdates=!1,this.delegateUpdates()},hideTabStripItem:function(t){t=this.getComponent(t);var e=this.getTabEl(t);e&&(e.style.display="none",this.delegateUpdates()),this.stack.remove(t)},unhideTabStripItem:function(t){t=this.getComponent(t);var e=this.getTabEl(t);e&&(e.style.display="",this.delegateUpdates())},delegateUpdates:function(){var t=this.rendered;this.suspendUpdates||(this.resizeTabs&&t&&this.autoSizeTabs(),this.enableTabScroll&&t&&this.autoScrollTabs())},autoSizeTabs:function(){var t=this.items.length,e="bottom"!=this.tabPosition?"header":"footer",i=(this[e].dom.offsetWidth,this[e].dom.clientWidth);if(this.resizeTabs&&!(t<1)&&i){var s=Math.max(Math.min(Math.floor((i-4)/t)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=s;for(var n=this.strip.query("li:not(.x-tab-edge)"),r=0,o=n.length;r<o;r++){var a=n[r],l=Ext.fly(a).child(".x-tab-strip-inner",!0),h=a.offsetWidth,d=l.offsetWidth;l.style.width=s-(h-d)+"px"}}},adjustBodyWidth:function(t){return this.header&&this.header.setWidth(t),this.footer&&this.footer.setWidth(t),t},setActiveTab:function(t){var e,i;t=this.getComponent(t),!1!==this.fireEvent("beforetabchange",this,t,this.activeTab)&&(this.rendered?this.activeTab!=t&&(!this.activeTab||(e=this.getTabEl(this.activeTab))&&Ext.fly(e).removeClass("x-tab-strip-active"),(this.activeTab=t)&&(i=this.getTabEl(t),Ext.fly(i).addClass("x-tab-strip-active"),this.stack.add(t),this.layout.setActiveItem(t),this.delegateUpdates(),this.scrolling&&this.scrollToTab(t,this.animScroll)),this.fireEvent("tabchange",this,t)):this.activeTab=t)},getActiveTab:function(){return this.activeTab||null},getItem:function(t){return this.getComponent(t)},autoScrollTabs:function(){this.pos="bottom"==this.tabPosition?this.footer:this.header;var t=this.items.length,e=(this.pos.dom.offsetWidth,this.pos.dom.clientWidth),i=this.stripWrap,s=i.dom,n=s.offsetWidth,r=this.getScrollPos(),o=this.edge.getOffsetsTo(this.stripWrap)[0]+r;!this.enableTabScroll||n<20||(0==t||o<=e?(s.scrollLeft=0,i.setWidth(e),this.scrolling&&(this.scrolling=!1,this.pos.removeClass("x-tab-scrolling"),this.scrollLeft.hide(),this.scrollRight.hide(),(Ext.isAir||Ext.isWebKit)&&(s.style.marginLeft="",s.style.marginRight=""))):(this.scrolling||(this.pos.addClass("x-tab-scrolling"),(Ext.isAir||Ext.isWebKit)&&(s.style.marginLeft="18px",s.style.marginRight="18px")),e-=i.getMargins("lr"),i.setWidth(20<e?e:20),this.scrolling||(this.scrollLeft?(this.scrollLeft.show(),this.scrollRight.show()):this.createScrollers()),this.scrolling=!0,o-e<r?s.scrollLeft=o-e:this.scrollToTab(this.activeTab,!1),this.updateScrollButtons()))},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var t=this.stripWrap.dom.offsetHeight,e=this.pos.insertFirst({cls:"x-tab-scroller-left"});e.setHeight(t),e.addClassOnOver("x-tab-scroller-left-over"),this.leftRepeater=new Ext.util.ClickRepeater(e,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this}),this.scrollLeft=e;var i=this.pos.insertFirst({cls:"x-tab-scroller-right"});i.setHeight(t),i.addClassOnOver("x-tab-scroller-right-over"),this.rightRepeater=new Ext.util.ClickRepeater(i,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this}),this.scrollRight=i},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(t,e){var i,s,n,r,o;t&&(i=this.getTabEl(t),s=this.getScrollPos(),n=this.getScrollArea(),o=(r=Ext.fly(i).getOffsetsTo(this.stripWrap)[0]+s)+i.offsetWidth,r<s?this.scrollTo(r,e):s+n<o&&this.scrollTo(o-n,e))},scrollTo:function(t,e){this.stripWrap.scrollTo("left",t,!!e&&this.getScrollAnim()),e||this.updateScrollButtons()},onWheel:function(t){var e=t.getWheelDelta()*this.wheelIncrement*-1;t.stopEvent();var i=this.getScrollPos(),s=i+e,n=this.getScrollWidth()-this.getScrollArea(),r=Math.max(0,Math.min(n,s));r!=i&&this.scrollTo(r,!1)},onScrollRight:function(){var t=this.getScrollWidth()-this.getScrollArea(),e=this.getScrollPos(),i=Math.min(t,e+this.getScrollIncrement());i!=e&&this.scrollTo(i,this.animScroll)},onScrollLeft:function(){var t=this.getScrollPos(),e=Math.max(0,t-this.getScrollIncrement());e!=t&&this.scrollTo(e,this.animScroll)},updateScrollButtons:function(){var t=this.getScrollPos();this.scrollLeft[0===t?"addClass":"removeClass"]("x-tab-scroller-left-disabled"),this.scrollRight[t>=this.getScrollWidth()-this.getScrollArea()?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater),this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap"),this.activeTab=null,Ext.TabPanel.superclass.beforeDestroy.apply(this)}}),Ext.reg("tabpanel",Ext.TabPanel),Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab,Ext.TabPanel.AccessStack=function(){var n=[];return{add:function(t){n.push(t),10<n.length&&n.shift()},remove:function(t){for(var e=[],i=0,s=n.length;i<s;i++)n[i]!=t&&e.push(n[i]);n=e},next:function(){return n.pop()}}},Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:!1,disabled:!1,pressed:!1,enableToggle:!1,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:!0,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",initComponent:function(){this.menu&&(Ext.isArray(this.menu)&&(this.menu={items:this.menu}),Ext.isObject(this.menu)&&(this.menu.ownerCt=this),this.menu=Ext.menu.MenuMgr.get(this.menu),this.menu.ownerCt=void 0),Ext.Button.superclass.initComponent.call(this),this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout"),Ext.isString(this.toggleGroup)&&(this.enableToggle=!0)},getTemplateArgs:function(){return[this.type,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass(),this.cls,this.id]},setButtonClass:function(){this.useSetClass&&(Ext.isEmpty(this.oldCls)||this.el.removeClass([this.oldCls,"x-btn-pressed"]),this.oldCls=this.iconCls||this.icon?this.text?"x-btn-text-icon":"x-btn-icon":"x-btn-noicon",this.el.addClass([this.oldCls,this.pressed?"x-btn-pressed":null]))},getMenuClass:function(){return this.menu?"bottom"!=this.arrowAlign?"x-btn-arrow":"x-btn-arrow-bottom":""},onRender:function(t,e){this.template||(Ext.Button.buttonTemplate||(Ext.Button.buttonTemplate=new Ext.Template('<table id="{4}" cellspacing="0" class="x-btn {3}"><tbody class="{1}">','<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{2} x-unselectable" unselectable="on"><button type="{0}"></button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',"</tbody></table>"),Ext.Button.buttonTemplate.compile()),this.template=Ext.Button.buttonTemplate);var i=this.getTemplateArgs(),s=e?this.template.insertBefore(e,i,!0):this.template.append(t,i,!0);this.btnEl=s.child(this.buttonSelector),this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur}),this.initButtonEl(s,this.btnEl),Ext.ButtonToggleMgr.register(this)},initButtonEl:function(t,e){var i;this.el=t,this.setIcon(this.icon),this.setText(this.text),this.setIconClass(this.iconCls),Ext.isDefined(this.tabIndex)&&(e.dom.tabIndex=this.tabIndex),this.tooltip&&this.setTooltip(this.tooltip,!0),this.handleMouseEvents&&this.mon(t,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown}),this.menu&&this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide}),this.repeat?(i=new Ext.util.ClickRepeater(t,Ext.isObject(this.repeat)?this.repeat:{}),this.mon(i,"click",this.onRepeatClick,this)):this.mon(t,this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this),this.useSetClass=!0,this.setButtonClass(),this.doc=Ext.getDoc(),this.doAutoWidth()},setIconClass:function(t){return this.iconCls=t,this.el&&(this.btnEl.dom.className="",this.btnEl.addClass(["x-btn-text",t||""]),this.setButtonClass()),this},setTooltip:function(t,e){return this.rendered?(e||this.clearTip(),Ext.isObject(t)?(Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},t)),this.tooltip=t):this.btnEl.dom[this.tooltipType]=t):this.tooltip=t,this},clearTip:function(){Ext.isObject(this.tooltip)&&Ext.QuickTips.unregister(this.btnEl)},beforeDestroy:function(){this.rendered&&this.clearTip(),this.menu&&!1!==this.destroyMenu&&Ext.destroy(this.btnEl,this.menu),Ext.destroy(this.repeater)},onDestroy:function(){this.rendered&&(this.doc.un("mouseover",this.monitorMouseOver,this),this.doc.un("mouseup",this.onMouseUp,this),delete this.doc,delete this.btnEl,Ext.ButtonToggleMgr.unregister(this)),Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){var t;!1!==this.autoWidth&&this.el&&this.text&&void 0===this.width&&(this.el.setWidth("auto"),Ext.isIE7&&Ext.isStrict&&((t=this.btnEl)&&20<t.getWidth()&&(t.clip(),t.setWidth(Ext.util.TextMetrics.measure(t,this.text).width+t.getFrameWidth("lr")))),this.minWidth&&this.el.getWidth()<this.minWidth&&this.el.setWidth(this.minWidth))},setHandler:function(t,e){return this.handler=t,this.scope=e,this},setText:function(t){return this.text=t,this.el&&(this.btnEl.update(t||"&#160;"),this.setButtonClass()),this.doAutoWidth(),this},setIcon:function(t){return this.icon=t,this.el&&(this.btnEl.setStyle("background-image",t?"url("+t+")":""),this.setButtonClass()),this},getText:function(){return this.text},toggle:function(t,e){return(t=void 0===t?!this.pressed:!!t)!=this.pressed&&(this.rendered&&this.el[t?"addClass":"removeClass"]("x-btn-pressed"),this.pressed=t,e||(this.fireEvent("toggle",this,t),this.toggleHandler&&this.toggleHandler.call(this.scope||this,this,t))),this},onDisable:function(){this.onDisableChange(!0)},onEnable:function(){this.onDisableChange(!1)},onDisableChange:function(t){this.el&&(Ext.isIE6&&this.text||this.el[t?"addClass":"removeClass"](this.disabledClass),this.el.dom.disabled=t),this.disabled=t},showMenu:function(){return this.rendered&&this.menu&&(this.tooltip&&Ext.QuickTips.getQuickTip().cancelShow(this.btnEl),this.menu.isVisible()&&this.menu.hide(),(this.menu.ownerCt=this).menu.show(this.el,this.menuAlign)),this},hideMenu:function(){return this.hasVisibleMenu()&&this.menu.hide(),this},hasVisibleMenu:function(){return this.menu&&this.menu.ownerCt==this&&this.menu.isVisible()},onRepeatClick:function(t,e){this.onClick(e)},onClick:function(t){t&&t.preventDefault(),0===t.button&&(this.disabled||(this.doToggle(),!this.menu||this.hasVisibleMenu()||this.ignoreNextClick||this.showMenu(),this.fireEvent("click",this,t),this.handler&&this.handler.call(this.scope||this,this,t)))},doToggle:function(){!this.enableToggle||!1===this.allowDepress&&this.pressed||this.toggle()},isMenuTriggerOver:function(t,e){return this.menu&&!e},isMenuTriggerOut:function(t,e){return this.menu&&!e},onMouseOver:function(t){var e;this.disabled||((e=t.within(this.el,!0))||(this.el.addClass("x-btn-over"),this.monitoringMouseOver||(this.doc.on("mouseover",this.monitorMouseOver,this),this.monitoringMouseOver=!0),this.fireEvent("mouseover",this,t)),this.isMenuTriggerOver(t,e)&&this.fireEvent("menutriggerover",this,this.menu,t))},monitorMouseOver:function(t){t.target==this.el.dom||t.within(this.el)||(this.monitoringMouseOver&&(this.doc.un("mouseover",this.monitorMouseOver,this),this.monitoringMouseOver=!1),this.onMouseOut(t))},onMouseOut:function(t){var e=t.within(this.el)&&t.target!=this.el.dom;this.el.removeClass("x-btn-over"),this.fireEvent("mouseout",this,t),this.isMenuTriggerOut(t,e)&&this.fireEvent("menutriggerout",this,this.menu,t)},focus:function(){this.btnEl.focus()},blur:function(){this.btnEl.blur()},onFocus:function(t){this.disabled||this.el.addClass("x-btn-focus")},onBlur:function(t){this.el.removeClass("x-btn-focus")},getClickEl:function(t,e){return this.el},onMouseDown:function(t){this.disabled||0!==t.button||(this.getClickEl(t).addClass("x-btn-click"),this.doc.on("mouseup",this.onMouseUp,this))},onMouseUp:function(t){0===t.button&&(this.getClickEl(t,!0).removeClass("x-btn-click"),this.doc.un("mouseup",this.onMouseUp,this))},onMenuShow:function(t){this.menu.ownerCt==this&&((this.menu.ownerCt=this).ignoreNextClick=0,this.el.addClass("x-btn-menu-active"),this.fireEvent("menushow",this,this.menu))},onMenuHide:function(t){this.menu.ownerCt==this&&(this.el.removeClass("x-btn-menu-active"),this.ignoreNextClick=this.restoreClick.defer(250,this),this.fireEvent("menuhide",this,this.menu),delete this.menu.ownerCt)},restoreClick:function(){this.ignoreNextClick=0}}),Ext.reg("button",Ext.Button),Ext.ButtonToggleMgr=function(){var r={};function i(t,e){if(e)for(var i=r[t.toggleGroup],s=0,n=i.length;s<n;s++)i[s]!=t&&i[s].toggle(!1)}return{register:function(t){t.toggleGroup&&((r[t.toggleGroup]||(r[t.toggleGroup]=[])).push(t),t.on("toggle",i))},unregister:function(t){var e;!t.toggleGroup||(e=r[t.toggleGroup])&&(e.remove(t),t.un("toggle",i))},getPressed:function(t){var e=r[t];if(e)for(var i=0,s=e.length;i<s;i++)if(!0===e[i].pressed)return e[i];return null}}}(),Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"em",split:!0,initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this),this.addEvents("arrowclick")},onRender:function(){Ext.SplitButton.superclass.onRender.apply(this,arguments),this.arrowTooltip&&(this.el.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip)},setArrowHandler:function(t,e){this.arrowHandler=t,this.scope=e},getMenuClass:function(){return"x-btn-split"+("bottom"==this.arrowAlign?"-bottom":"")},isClickOnArrow:function(t){if("bottom"==this.arrowAlign)return t.getPageY()>this.btnEl.getRegion().bottom;var e=this.el.child("em.x-btn-split"),i=e.getRegion().right-e.getPadding("r");return t.getPageX()>i},onClick:function(t,e){t.preventDefault(),this.disabled||(this.isClickOnArrow(t)?(!this.menu||this.menu.isVisible()||this.ignoreNextClick||this.showMenu(),this.fireEvent("arrowclick",this,t),this.arrowHandler&&this.arrowHandler.call(this.scope||this,this,t)):(this.doToggle(),this.fireEvent("click",this,t),this.handler&&this.handler.call(this.scope||this,this,t)))},isMenuTriggerOver:function(t){return this.menu&&t.target.tagName==this.arrowSelector},isMenuTriggerOut:function(t,e){return this.menu&&t.target.tagName!=this.arrowSelector}}),Ext.reg("splitbutton",Ext.SplitButton),Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(t){if(t&&!0===this.showText){var e="";return this.prependText&&(e+=this.prependText),e+=t.text}},setActiveItem:function(t,e){var i;Ext.isObject(t)||(t=this.menu.getComponent(t)),t&&(this.rendered?((i=this.getItemText(t))&&this.setText(i),this.setIconClass(t.iconCls)):(this.text=this.getItemText(t),this.iconCls=t.iconCls),(this.activeItem=t).checked||t.setChecked(!0,e),this.forceIcon&&this.setIconClass(this.forceIcon),e||this.fireEvent("change",this,t))},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change"),this.changeHandler&&(this.on("change",this.changeHandler,this.scope||this),delete this.changeHandler),this.itemCount=this.items.length,this.menu={cls:"x-cycle-menu",items:[]};var i=0;Ext.each(this.items,function(t,e){Ext.apply(t,{group:t.group||this.id,itemIndex:e,checkHandler:this.checkHandler,scope:this,checked:t.checked||!1}),this.menu.items.push(t),t.checked&&(i=e)},this),Ext.CycleButton.superclass.initComponent.call(this),this.on("click",this.toggleSelected,this),this.setActiveItem(i,!0)},checkHandler:function(t,e){e&&this.setActiveItem(t)},toggleSelected:function(){var t,e,i=this.menu;i.render(),i.hasLayout||i.doLayout();for(var s=1;s<this.itemCount;s++)if(t=(this.activeItem.itemIndex+s)%this.itemCount,!(e=i.items.itemAt(t)).disabled){e.setChecked(!0);break}}}),Ext.reg("cycle",Ext.CycleButton),Ext.Toolbar=function(t){Ext.isArray(t)?t={items:t,layout:"toolbar"}:(t=Ext.apply({layout:"toolbar"},t)).buttons&&(t.items=t.buttons),Ext.Toolbar.superclass.constructor.call(this,t)},function(){var i=Ext.Toolbar;Ext.extend(i,Ext.Container,{defaultType:"button",enableOverflow:!1,trackMenus:!0,internalDefaults:{removeMode:"container",hideParent:!0},toolbarCls:"x-toolbar",initComponent:function(){i.superclass.initComponent.call(this),this.addEvents("overflowchange")},onRender:function(t,e){this.el||(this.autoCreate||(this.autoCreate={cls:this.toolbarCls+" x-small-editor"}),this.el=t.createChild(Ext.apply({id:this.id},this.autoCreate),e),Ext.Toolbar.superclass.onRender.apply(this,arguments))},lookupComponent:function(t){return Ext.isString(t)?(t="-"==t?new i.Separator:" "==t?new i.Spacer:"->"==t?new i.Fill:new i.TextItem(t),this.applyDefaults(t)):t.isFormField||t.render?t=this.createComponent(t):t.tag?t=new i.Item({autoEl:t}):t.tagName?t=new i.Item({el:t}):Ext.isObject(t)&&(t=t.xtype?this.createComponent(t):this.constructButton(t)),t},applyDefaults:function(t){var e;return Ext.isString(t)||(t=Ext.Toolbar.superclass.applyDefaults.call(this,t),e=this.internalDefaults,t.events?(Ext.applyIf(t.initialConfig,e),Ext.apply(t,e)):Ext.applyIf(t,e)),t},addSeparator:function(){return this.add(new i.Separator)},addSpacer:function(){return this.add(new i.Spacer)},addFill:function(){this.add(new i.Fill)},addElement:function(t){return this.addItem(new i.Item({el:t}))},addItem:function(t){return this.add.apply(this,arguments)},addButton:function(t){if(Ext.isArray(t)){for(var e=[],i=0,s=t.length;i<s;i++)e.push(this.addButton(t[i]));return e}return this.add(this.constructButton(t))},addText:function(t){return this.addItem(new i.TextItem(t))},addDom:function(t){return this.add(new i.Item({autoEl:t}))},addField:function(t){return this.add(t)},insertButton:function(t,e){if(Ext.isArray(e)){for(var i=[],s=0,n=e.length;s<n;s++)i.push(this.insertButton(t+s,e[s]));return i}return Ext.Toolbar.superclass.insert.call(this,t,e)},trackMenu:function(t,e){var i;this.trackMenus&&t.menu&&(this[i=e?"mun":"mon"](t,"menutriggerover",this.onButtonTriggerOver,this),this[i](t,"menushow",this.onButtonMenuShow,this),this[i](t,"menuhide",this.onButtonMenuHide,this))},constructButton:function(t){return t.events?t:this.createComponent(t,t.split?"splitbutton":this.defaultType)},onAdd:function(t){Ext.Toolbar.superclass.onAdd.call(this),this.trackMenu(t),this.disabled&&t.disable()},onRemove:function(t){Ext.Toolbar.superclass.onRemove.call(this),t==this.activeMenuBtn&&delete this.activeMenuBtn,this.trackMenu(t,!0)},onDisable:function(){this.items.each(function(t){t.disable&&t.disable()})},onEnable:function(){this.items.each(function(t){t.enable&&t.enable()})},onButtonTriggerOver:function(t){this.activeMenuBtn&&this.activeMenuBtn!=t&&(this.activeMenuBtn.hideMenu(),t.showMenu(),this.activeMenuBtn=t)},onButtonMenuShow:function(t){this.activeMenuBtn=t},onButtonMenuHide:function(t){delete this.activeMenuBtn}}),Ext.reg("toolbar",Ext.Toolbar),i.Item=Ext.extend(Ext.BoxComponent,{hideParent:!0,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn}),Ext.reg("tbitem",i.Item),i.Separator=Ext.extend(i.Item,{onRender:function(t,e){this.el=t.createChild({tag:"span",cls:"xtb-sep"},e)}}),Ext.reg("tbseparator",i.Separator),i.Spacer=Ext.extend(i.Item,{onRender:function(t,e){this.el=t.createChild({tag:"div",cls:"xtb-spacer",style:this.width?"width:"+this.width+"px":""},e)}}),Ext.reg("tbspacer",i.Spacer),i.Fill=Ext.extend(i.Item,{render:Ext.emptyFn,isFill:!0}),Ext.reg("tbfill",i.Fill),i.TextItem=Ext.extend(i.Item,{constructor:function(t){i.TextItem.superclass.constructor.call(this,Ext.isString(t)?{text:t}:t)},onRender:function(t,e){this.autoEl={cls:"xtb-text",html:this.text||""},i.TextItem.superclass.onRender.call(this,t,e)},setText:function(t){this.rendered?this.el.update(t):this.text=t}}),Ext.reg("tbtext",i.TextItem),i.Button=Ext.extend(Ext.Button,{}),i.SplitButton=Ext.extend(Ext.SplitButton,{}),Ext.reg("tbbutton",i.Button),Ext.reg("tbsplit",i.SplitButton)}(),Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:"x-btn-group",layout:"table",defaultType:"button",frame:!0,internalDefaults:{removeMode:"container",hideParent:!0},initComponent:function(){this.layoutConfig=this.layoutConfig||{},Ext.applyIf(this.layoutConfig,{columns:this.columns}),this.title||this.addClass("x-btn-group-notitle"),this.on("afterlayout",this.onAfterLayout,this),Ext.ButtonGroup.superclass.initComponent.call(this)},applyDefaults:function(t){t=Ext.ButtonGroup.superclass.applyDefaults.call(this,t);var e=this.internalDefaults;return t.events?(Ext.applyIf(t.initialConfig,e),Ext.apply(t,e)):Ext.applyIf(t,e),t},onAfterLayout:function(){var t=this.body.getFrameWidth("lr")+this.body.dom.firstChild.offsetWidth;this.body.setWidth(t),this.el.setWidth(t+this.getFrameWidth())}}),Ext.reg("buttongroup",Ext.ButtonGroup),function(){var i=Ext.Toolbar;Ext.PagingToolbar=Ext.extend(Ext.Toolbar,{pageSize:20,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",initComponent:function(){var t=[this.first=new i.Button({tooltip:this.firstText,overflowText:this.firstText,iconCls:"x-tbar-page-first",disabled:!0,handler:this.moveFirst,scope:this}),this.prev=new i.Button({tooltip:this.prevText,overflowText:this.prevText,iconCls:"x-tbar-page-prev",disabled:!0,handler:this.movePrevious,scope:this}),"-",this.beforePageText,this.inputItem=new Ext.form.NumberField({cls:"x-tbar-page-number",allowDecimals:!1,allowNegative:!1,enableKeyEvents:!0,selectOnFocus:!0,submitValue:!1,listeners:{scope:this,keydown:this.onPagingKeyDown,blur:this.onPagingBlur}}),this.afterTextItem=new i.TextItem({text:String.format(this.afterPageText,1)}),"-",this.next=new i.Button({tooltip:this.nextText,overflowText:this.nextText,iconCls:"x-tbar-page-next",disabled:!0,handler:this.moveNext,scope:this}),this.last=new i.Button({tooltip:this.lastText,overflowText:this.lastText,iconCls:"x-tbar-page-last",disabled:!0,handler:this.moveLast,scope:this}),"-",this.refresh=new i.Button({tooltip:this.refreshText,overflowText:this.refreshText,iconCls:"x-tbar-loading",handler:this.doRefresh,scope:this})],e=this.items||this.buttons||[];this.prependButtons?this.items=e.concat(t):this.items=t.concat(e),delete this.buttons,this.displayInfo&&(this.items.push("->"),this.items.push(this.displayItem=new i.TextItem({}))),Ext.PagingToolbar.superclass.initComponent.call(this),this.addEvents("change","beforechange"),this.on("afterlayout",this.onFirstLayout,this,{single:!0}),this.cursor=0,this.bindStore(this.store,!0)},onFirstLayout:function(){this.dsLoaded&&this.onLoad.apply(this,this.dsLoaded)},updateInfo:function(){var t,e;this.displayItem&&(e=0==(t=this.store.getCount())?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+t,this.store.getTotalCount()),this.displayItem.setText(e))},onLoad:function(t,e,i){var s,n,r,o;this.rendered?(s=this.getParams(),this.cursor=i.params&&i.params[s.start]?i.params[s.start]:0,r=(n=this.getPageData()).activePage,o=n.pages,this.afterTextItem.setText(String.format(this.afterPageText,n.pages)),this.inputItem.setValue(r),this.first.setDisabled(1==r),this.prev.setDisabled(1==r),this.next.setDisabled(r==o),this.last.setDisabled(r==o),this.refresh.enable(),this.updateInfo(),this.fireEvent("change",this,n)):this.dsLoaded=[t,e,i]},getPageData:function(){var t=this.store.getTotalCount();return{total:t,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:t<this.pageSize?1:Math.ceil(t/this.pageSize)}},changePage:function(t){this.doLoad(((t-1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onLoadError:function(){this.rendered&&this.refresh.enable()},readPage:function(t){var e,i=this.inputItem.getValue();return!i||isNaN(e=parseInt(i,10))?(this.inputItem.setValue(t.activePage),!1):e},onPagingFocus:function(){this.inputItem.select()},onPagingBlur:function(t){this.inputItem.setValue(this.getPageData().activePage)},onPagingKeyDown:function(t,e){var i,s,n=e.getKey(),r=this.getPageData();n==e.RETURN?(e.stopEvent(),!1!==(i=this.readPage(r))&&(i=Math.min(Math.max(1,i),r.pages)-1,this.doLoad(i*this.pageSize))):n==e.HOME||n==e.END?(e.stopEvent(),i=n==e.HOME?1:r.pages,t.setValue(i)):n!=e.UP&&n!=e.PAGEUP&&n!=e.DOWN&&n!=e.PAGEDOWN||(e.stopEvent(),(i=this.readPage(r))&&(s=e.shiftKey?10:1,n!=e.DOWN&&n!=e.PAGEDOWN||(s*=-1),1<=(i+=s)&i<=r.pages&&t.setValue(i)))},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){this.rendered&&this.refresh&&this.refresh.disable()},doLoad:function(t){var e={},i=this.getParams();e[i.start]=t,e[i.limit]=this.pageSize,!1!==this.fireEvent("beforechange",this,e)&&this.store.load({params:e})},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var t=this.store.getTotalCount(),e=t%this.pageSize;this.doLoad(e?t-e:t-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(t,e){var i;!e&&this.store&&(t!==this.store&&this.store.autoDestroy?this.store.destroy():(this.store.un("beforeload",this.beforeLoad,this),this.store.un("load",this.onLoad,this),this.store.un("exception",this.onLoadError,this)),t||(this.store=null)),t&&((t=Ext.StoreMgr.lookup(t)).on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}),i=!0),this.store=t,i&&this.onLoad(t,null,{})},unbind:function(t){this.bindStore(null)},bind:function(t){this.bindStore(t)},onDestroy:function(){this.bindStore(null),Ext.PagingToolbar.superclass.onDestroy.call(this)}})}(),Ext.reg("paging",Ext.PagingToolbar),Ext.History=function(){var o,s,n,a=!1;function l(){var t=location.href,e=t.indexOf("#"),i=0<=e?t.substr(e+1):null;return Ext.isGecko&&(i=decodeURIComponent(i)),i}function h(){s.value=n}function d(t){n=t,Ext.History.fireEvent("change",t)}function c(t){var e=['<html><body><div id="state">',Ext.util.Format.htmlEncode(t),"</div></body></html>"].join("");try{var i=o.contentWindow.document;return i.open(),i.write(e),i.close(),!0}catch(t){return!1}}function u(){var i,s,n,r;o.contentWindow&&o.contentWindow.document?(i=o.contentWindow.document,s=i.getElementById("state"),n=s?s.innerText:null,r=l(),setInterval(function(){i=o.contentWindow.document;var t=(s=i.getElementById("state"))?s.innerText:null,e=l();t!==n?(d(n=t),location.hash=n,r=n,h()):e!==r&&c(r=e)},50),a=!0,Ext.History.fireEvent("ready",Ext.History)):setTimeout(u,10)}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(t,e){var i;a?Ext.callback(t,e,[this]):Ext.isReady?(s=Ext.getDom(Ext.History.fieldId),Ext.isIE&&(o=Ext.getDom(Ext.History.iframeId)),this.addEvents("ready","change"),t&&this.on("ready",t,e,{single:!0}),n=s.value?s.value:l(),Ext.isIE?u():(i=l(),setInterval(function(){var t=l();t!==i&&(d(i=t),h())},50),a=!0,Ext.History.fireEvent("ready",Ext.History))):Ext.onReady(function(){Ext.History.init(t,e)})},add:function(t,e){return!1!==e&&this.getToken()==t||(Ext.isIE?c(t):(location.hash=t,!0))},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return a?n:l()}}}(),Ext.apply(Ext.History,new Ext.util.Observable),Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:!0,quickShowInterval:250,frame:!0,hidden:!0,baseCls:"x-tip",floating:{shadow:!0,shim:!0,useDisplay:!0,constrain:!1},autoHeight:!0,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this),this.closable&&!this.title&&(this.elements+=",header")},afterRender:function(){Ext.Tip.superclass.afterRender.call(this),this.closable&&this.addTool({id:"close",handler:this[this.closeAction],scope:this})},showAt:function(t){Ext.Tip.superclass.show.call(this),!1===this.measureWidth||this.initialConfig&&"number"==typeof this.initialConfig.width||this.doAutoWidth(),this.constrainPosition&&(t=this.el.adjustForConstraints(t)),this.setPagePosition(t[0],t[1])},doAutoWidth:function(t){t=t||0;var e=this.body.getTextWidth();this.title&&(e=Math.max(e,this.header.child("span").getTextWidth(this.title))),e+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+t,this.setWidth(e.constrain(this.minWidth,this.maxWidth)),Ext.isIE7&&!this.repainted&&(this.el.repaint(),this.repainted=!0)},showBy:function(t,e){this.rendered||this.render(Ext.getBody()),this.showAt(this.el.getAlignToXY(t,e||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,"boolean"==typeof this.draggable?null:this.draggable),this.header.addClass("x-tip-draggable")}}),Ext.reg("tip",Ext.Tip),Ext.Tip.DD=function(t,e){Ext.apply(this,e),this.tip=t,Ext.Tip.DD.superclass.constructor.call(this,t.el.id,"WindowDD-"+t.id),this.setHandleElId(t.header.id),this.scroll=!1},Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:!0,scroll:!1,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(t){this.tip.el.enableShadow(!0)}}),Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5e3,trackMouse:!1,anchorToTarget:!0,anchorOffset:0,targetCounter:0,constrainPosition:!1,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this),this.lastActive=new Date,this.initTarget(this.target),this.origAnchor=this.anchor},onRender:function(t,e){Ext.ToolTip.superclass.onRender.call(this,t,e),this.anchorCls="x-tip-anchor-"+this.getAnchorPosition(),this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this),this.anchorEl.setStyle("z-index",this.el.getZIndex()+1).setVisibilityMode(Ext.Element.DISPLAY)},initTarget:function(t){var e,i;(e=Ext.get(t))&&(this.target&&(i=Ext.get(this.target),this.mun(i,"mouseover",this.onTargetOver,this),this.mun(i,"mouseout",this.onTargetOut,this),this.mun(i,"mousemove",this.onMouseMove,this)),this.mon(e,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this}),this.target=e),this.anchor&&(this.anchorTarget=this.target)},onMouseMove:function(t){var e=this.delegate?t.getTarget(this.delegate):this.triggerElement=!0;e?(this.targetXY=t.getXY(),e===this.triggerElement?!this.hidden&&this.trackMouse&&this.setPagePosition(this.getTargetXY()):(this.hide(),this.lastActive=new Date(0),this.onTargetOver(t))):!this.closable&&this.isVisible()&&this.hide()},getTargetXY:function(){if(this.delegate&&(this.anchorTarget=this.triggerElement),this.anchor){this.targetCounter++;var t=this.getOffsets(),e=this.anchorToTarget&&!this.trackMouse?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,i=Ext.lib.Dom.getViewWidth()-5,s=Ext.lib.Dom.getViewHeight()-5,n=document.documentElement,r=document.body,o=(n.scrollLeft||r.scrollLeft||0)+5,a=(n.scrollTop||r.scrollTop||0)+5,l=[e[0]+t[0],e[1]+t[1]],h=this.getSize();if(this.anchorEl.removeClass(this.anchorCls),this.targetCounter<2){if(l[0]<o)return this.anchorToTarget&&(this.defaultAlign="l-r",this.mouseOffset&&(this.mouseOffset[0]*=-1)),this.anchor="left",this.getTargetXY();if(l[0]+h.width>i)return this.anchorToTarget&&(this.defaultAlign="r-l",this.mouseOffset&&(this.mouseOffset[0]*=-1)),this.anchor="right",this.getTargetXY();if(l[1]<a)return this.anchorToTarget&&(this.defaultAlign="t-b",this.mouseOffset&&(this.mouseOffset[1]*=-1)),this.anchor="top",this.getTargetXY();if(l[1]+h.height>s)return this.anchorToTarget&&(this.defaultAlign="b-t",this.mouseOffset&&(this.mouseOffset[1]*=-1)),this.anchor="bottom",this.getTargetXY()}return this.anchorCls="x-tip-anchor-"+this.getAnchorPosition(),this.anchorEl.addClass(this.anchorCls),this.targetCounter=0,l}var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]},getMouseOffset:function(){var t=this.anchor?[0,0]:[15,18];return this.mouseOffset&&(t[0]+=this.mouseOffset[0],t[1]+=this.mouseOffset[1]),t},getAnchorPosition:function(){if(this.anchor)this.tipAnchor=this.anchor.charAt(0);else{var t=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!t)throw"AnchorTip.defaultAlign is invalid";this.tipAnchor=t[1].charAt(0)}switch(this.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 t,e=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse)switch(e){case"t":t=[0,9];break;case"b":t=[0,-13];break;case"r":t=[-13,0];break;default:t=[9,0]}else switch(e){case"t":t=[-15-this.anchorOffset,30];break;case"b":t=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":t=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:t=[25,-13-this.anchorOffset]}var i=this.getMouseOffset();return t[0]+=i[0],t[1]+=i[1],t},onTargetOver:function(t){var e;this.disabled||t.within(this.target.dom,!0)||(e=t.getTarget(this.delegate))&&(this.triggerElement=e,this.clearTimer("hide"),this.targetXY=t.getXY(),this.delayShow())},delayShow:function(){this.hidden&&!this.showTimer?this.lastActive.getElapsed()<this.quickShowInterval?this.show():this.showTimer=this.show.defer(this.showDelay,this):this.hidden||!1===this.autoHide||this.show()},onTargetOut:function(t){this.disabled||t.within(this.target.dom,!0)||(this.clearTimer("show"),!1!==this.autoHide&&this.delayHide())},delayHide:function(){this.hidden||this.hideTimer||(this.hideTimer=this.hide.defer(this.hideDelay,this))},hide:function(){this.clearTimer("dismiss"),this.lastActive=new Date,this.anchorEl&&this.anchorEl.hide(),Ext.ToolTip.superclass.hide.call(this),delete this.triggerElement},show:function(){this.anchor&&(this.showAt([-1e3,-1e3]),this.origConstrainPosition=this.constrainPosition,this.constrainPosition=!1,this.anchor=this.origAnchor),this.showAt(this.getTargetXY()),this.anchor?(this.anchorEl.show(),this.syncAnchor(),this.constrainPosition=this.origConstrainPosition):this.anchorEl.hide()},showAt:function(t){this.lastActive=new Date,this.clearTimers(),Ext.ToolTip.superclass.showAt.call(this,t),this.dismissDelay&&!1!==this.autoHide&&(this.dismissTimer=this.hide.defer(this.dismissDelay,this)),this.anchor&&!this.anchorEl.isVisible()?(this.syncAnchor(),this.anchorEl.show()):this.anchorEl.hide()},syncAnchor:function(){var t,e,i;switch(this.tipAnchor.charAt(0)){case"t":t="b",e="tl",i=[20+this.anchorOffset,2];break;case"r":t="l",e="tr",i=[-2,11+this.anchorOffset];break;case"b":t="t",e="bl",i=[20+this.anchorOffset,-2];break;default:t="r",e="tl",i=[2,11+this.anchorOffset]}this.anchorEl.alignTo(this.el,t+"-"+e,i)},setPagePosition:function(t,e){Ext.ToolTip.superclass.setPagePosition.call(this,t,e),this.anchor&&this.syncAnchor()},clearTimer:function(t){t+="Timer",clearTimeout(this[t]),delete this[t]},clearTimers:function(){this.clearTimer("show"),this.clearTimer("dismiss"),this.clearTimer("hide")},onShow:function(){Ext.ToolTip.superclass.onShow.call(this),Ext.getDoc().on("mousedown",this.onDocMouseDown,this)},onHide:function(){Ext.ToolTip.superclass.onHide.call(this),Ext.getDoc().un("mousedown",this.onDocMouseDown,this)},onDocMouseDown:function(t){!0===this.autoHide||this.closable||t.within(this.el.dom)||(this.disable(),this.doEnable.defer(100,this))},doEnable:function(){this.isDestroyed||this.enable()},onDisable:function(){this.clearTimers(),this.hide()},adjustPosition:function(t,e){var i,s;return this.constrainPosition&&(i=this.targetXY[1],s=this.getSize().height,e<=i&&i<=e+s&&(e=i-s-5)),{x:t,y:e}},beforeDestroy:function(){this.clearTimers(),Ext.destroy(this.anchorEl),delete this.anchorEl,delete this.target,delete this.anchorTarget,delete this.triggerElement,Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this),Ext.ToolTip.superclass.onDestroy.call(this)}}),Ext.reg("tooltip",Ext.ToolTip),Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:!1,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc(),this.targets=this.targets||{},Ext.QuickTip.superclass.initComponent.call(this)},register:function(t){for(var e=Ext.isArray(t)?t:arguments,i=0,s=e.length;i<s;i++){var n=e[i],r=n.target;if(r)if(Ext.isArray(r))for(var o=0,a=r.length;o<a;o++)this.targets[Ext.id(r[o])]=n;else this.targets[Ext.id(r)]=n}},unregister:function(t){delete this.targets[Ext.id(t)]},cancelShow:function(t){var e=this.activeTarget;t=Ext.get(t).dom,this.isVisible()?e&&e.el==t&&this.hide():e&&e.el==t&&this.clearTimer("show")},getTipCfg:function(t){var e,i,s=t.getTarget();return this.interceptTitles&&s.title&&Ext.isString(s.title)?(e=s.title,s.qtip=e,s.removeAttribute("title"),t.preventDefault()):(i=this.tagConfig,e=s.qtip||Ext.fly(s).getAttribute(i.attribute,i.namespace)),e},onTargetOver:function(t){if(!this.disabled){this.targetXY=t.getXY();var e=t.getTarget();if(e&&1===e.nodeType&&e!=document&&e!=document.body){if(this.activeTarget&&(e==this.activeTarget.el||Ext.fly(this.activeTarget.el).contains(e)))return this.clearTimer("hide"),void this.show();if(e&&this.targets[e.id])return this.activeTarget=this.targets[e.id],this.activeTarget.el=e,this.anchor=this.activeTarget.anchor,this.anchor&&(this.anchorTarget=e),void this.delayShow();var i,s,n=Ext.fly(e),r=this.tagConfig,o=r.namespace;(i=this.getTipCfg(t))&&(s=n.getAttribute(r.hide,o),this.activeTarget={el:e,text:i,width:n.getAttribute(r.width,o),autoHide:"user"!=s&&"false"!==s,title:n.getAttribute(r.title,o),cls:n.getAttribute(r.cls,o),align:n.getAttribute(r.align,o)},this.anchor=n.getAttribute(r.anchor,o),this.anchor&&(this.anchorTarget=e),this.delayShow())}}},onTargetOut:function(t){this.activeTarget&&t.within(this.activeTarget.el)&&!this.getTipCfg(t)||(this.clearTimer("show"),!1!==this.autoHide&&this.delayHide())},showAt:function(t){var e=this.activeTarget;e&&(this.rendered||(this.render(Ext.getBody()),this.activeTarget=e),e.width?(this.setWidth(e.width),this.body.setWidth(this.adjustBodyWidth(e.width-this.getFrameWidth())),this.measureWidth=!1):this.measureWidth=!0,this.setTitle(e.title||""),this.body.update(e.text),this.autoHide=e.autoHide,this.dismissDelay=e.dismissDelay||this.dismissDelay,this.lastCls&&(this.el.removeClass(this.lastCls),delete this.lastCls),e.cls&&(this.el.addClass(e.cls),this.lastCls=e.cls),this.anchor?this.constrainPosition=!1:e.align?(t=this.el.getAlignToXY(e.el,e.align),this.constrainPosition=!1):this.constrainPosition=!0),Ext.QuickTip.superclass.showAt.call(this,t)},hide:function(){delete this.activeTarget,Ext.QuickTip.superclass.hide.call(this)}}),Ext.reg("quicktip",Ext.QuickTip),Ext.QuickTips=function(){var e,i=!1;return{init:function(t){if(!e){if(!Ext.isReady)return void Ext.onReady(function(){Ext.QuickTips.init(t)});e=new Ext.QuickTip({elements:"header,body",disabled:i}),!1!==t&&e.render(Ext.getBody())}},ddDisable:function(){e&&!i&&e.disable()},ddEnable:function(){e&&!i&&e.enable()},enable:function(){e&&e.enable(),i=!1},disable:function(){e&&e.disable(),i=!0},isEnabled:function(){return void 0!==e&&!e.disabled},getQuickTip:function(){return e},register:function(){e.register.apply(e,arguments)},unregister:function(){e.unregister.apply(e,arguments)},tips:function(){e.register.apply(e,arguments)}}}(),Ext.slider.Tip=Ext.extend(Ext.Tip,{minWidth:10,offsets:[0,-10],init:function(t){t.on({scope:this,dragstart:this.onSlide,drag:this.onSlide,dragend:this.hide,destroy:this.destroy})},onSlide:function(t,e,i){this.show(),this.body.update(this.getText(i)),this.doAutoWidth(),this.el.alignTo(i.el,"b-t?",this.offsets)},getText:function(t){return String(t.value)}}),Ext.ux.SliderTip=Ext.slider.Tip,Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:!0,animate:Ext.enableFx,lines:!0,enableDD:!1,hlDrop:Ext.enableFx,pathSeparator:"/",bubbleEvents:[],initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this),this.eventModel||(this.eventModel=new Ext.tree.TreeEventModel(this));var t,e=this.loader;e?Ext.isObject(e)&&!e.load&&(e=new Ext.tree.TreeLoader(e)):e=new Ext.tree.TreeLoader({dataUrl:this.dataUrl,requestMethod:this.requestMethod}),this.loader=e,this.nodeHash={},this.root&&(t=this.root,delete this.root,this.setRootNode(t)),this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","containerclick","checkchange","beforedblclick","dblclick","containerdblclick","contextmenu","containercontextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover"),this.singleExpand&&this.on("beforeexpandnode",this.restrictExpand,this)},proxyNodeEvent:function(t,e,i,s,n,r,o){return"collapse"!=t&&"expand"!=t&&"beforecollapse"!=t&&"beforeexpand"!=t&&"move"!=t&&"beforemove"!=t||(t+="node"),this.fireEvent(t,e,i,s,n,r,o)},getRootNode:function(){return this.root},setRootNode:function(t){var e;return this.destroyRoot(),t.render||(t=this.loader.createNode(t)),(this.root=t).ownerTree=this,t.isRoot=!0,this.registerNode(t),this.rootVisible||(e=t.attributes.uiProvider,t.ui=e?new e(t):new Ext.tree.RootTreeNodeUI(t)),this.innerCt&&(this.clearInnerCt(),this.renderRoot()),t},clearInnerCt:function(){this.innerCt.update("")},renderRoot:function(){this.root.render(),this.rootVisible||this.root.renderChildren()},getNodeById:function(t){return this.nodeHash[t]},registerNode:function(t){this.nodeHash[t.id]=t},unregisterNode:function(t){delete this.nodeHash[t.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(t){var e=t.parentNode;e&&(e.expandedChild&&e.expandedChild.parentNode==e&&e.expandedChild.collapse(),e.expandedChild=t)},getChecked:function(t,e){e=e||this.root;var i=[];return e.cascade(function(){this.attributes.checked&&i.push(t?"id"==t?this.id:this.attributes[t]:this)}),i},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(!0)},collapseAll:function(){this.root.collapse(!0)},getSelectionModel:function(){return this.selModel||(this.selModel=new Ext.tree.DefaultSelectionModel),this.selModel},expandPath:function(t,e,i){var s,n,r,o;Ext.isEmpty(t)?i&&i(!1,void 0):(e=e||"id",s=t.split(this.pathSeparator),(n=this.root).attributes[e]==s[1]?(r=1,o=function(){var t;++r!=s.length?(t=n.findChild(e,s[r]))?(n=t).expand(!1,!1,o):i&&i(!1,n):i&&i(!0,n)},n.expand(!1,!1,o)):i&&i(!1,null))},selectPath:function(t,s,n){var e,r;Ext.isEmpty(t)?n&&n(!1,void 0):(s=s||"id",e=t.split(this.pathSeparator),r=e.pop(),1<e.length?this.expandPath(e.join(this.pathSeparator),s,function(t,e){var i;t&&e&&(i=e.findChild(s,r))?(i.select(),n&&n(!0,i)):n&&n(!1,i)}):(this.root.select(),n&&n(!0,this.root)))},getTreeEl:function(){return this.body},onRender:function(t,e){Ext.tree.TreePanel.superclass.onRender.call(this,t,e),this.el.addClass("x-tree"),this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this),this.containerScroll&&Ext.dd.ScrollManager.register(this.body),!this.enableDD&&!this.enableDrop||this.dropZone||(this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:!0===this.ddAppendOnly})),!this.enableDD&&!this.enableDrag||this.dragZone||(this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})),this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this),this.renderRoot()},beforeDestroy:function(){this.rendered&&(Ext.dd.ScrollManager.unregister(this.body),Ext.destroy(this.dropZone,this.dragZone)),this.destroyRoot(),Ext.destroy(this.loader),this.nodeHash=this.root=this.loader=null,Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){this.root&&this.root.destroy&&this.root.destroy(!0)}}),Ext.tree.TreePanel.nodeTypes={},Ext.reg("treepanel",Ext.tree.TreePanel),Ext.tree.TreeEventModel=function(t){this.tree=t,this.tree.on("render",this.initEvents,this)},Ext.tree.TreeEventModel.prototype={initEvents:function(){var t=this.tree;!1!==t.trackMouseOver&&t.mon(t.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut}),t.mon(t.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(t){var e;if(e=t.getTarget(".x-tree-node-el",10)){var i=Ext.fly(e,"_treeEvents").getAttribute("tree-node-id","ext");if(i)return this.tree.getNodeById(i)}return null},getNodeTarget:function(t){return t.getTarget(".x-tree-node-icon",1)||t.getTarget(".x-tree-node-el",6)},delegateOut:function(t,e){var i;this.beforeEvent(t)&&(t.getTarget(".x-tree-ec-icon",1)&&(i=this.getNode(t),this.onIconOut(t,i),i==this.lastEcOver&&delete this.lastEcOver),(e=this.getNodeTarget(t))&&!t.within(e,!0)&&this.onNodeOut(t,this.getNode(t)))},delegateOver:function(t,e){this.beforeEvent(t)&&(Ext.isGecko&&!this.trackingDoc&&(Ext.getBody().on("mouseover",this.trackExit,this),this.trackingDoc=!0),this.lastEcOver&&(this.onIconOut(t,this.lastEcOver),delete this.lastEcOver),t.getTarget(".x-tree-ec-icon",1)&&(this.lastEcOver=this.getNode(t),this.onIconOver(t,this.lastEcOver)),this.getNodeTarget(t)&&this.onNodeOver(t,this.getNode(t)))},trackExit:function(t){this.lastOverNode&&(this.lastOverNode.ui&&!t.within(this.lastOverNode.ui.getEl())&&this.onNodeOut(t,this.lastOverNode),delete this.lastOverNode,Ext.getBody().un("mouseover",this.trackExit,this),this.trackingDoc=!1)},delegateClick:function(t,e){this.beforeEvent(t)?t.getTarget("input[type=checkbox]",1)?this.onCheckboxClick(t,this.getNode(t)):t.getTarget(".x-tree-ec-icon",1)?this.onIconClick(t,this.getNode(t)):this.getNodeTarget(t)&&this.onNodeClick(t,this.getNode(t)):this.checkContainerEvent(t,"click")},delegateDblClick:function(t,e){this.beforeEvent(t)?this.getNodeTarget(t)&&this.onNodeDblClick(t,this.getNode(t)):this.checkContainerEvent(t,"dblclick")},delegateContextMenu:function(t,e){this.beforeEvent(t)?this.getNodeTarget(t)&&this.onNodeContextMenu(t,this.getNode(t)):this.checkContainerEvent(t,"contextmenu")},checkContainerEvent:function(t,e){if(this.disabled)return t.stopEvent(),!1;this.onContainerEvent(t,e)},onContainerEvent:function(t,e){this.tree.fireEvent("container"+e,this.tree,t)},onNodeClick:function(t,e){e.ui.onClick(t)},onNodeOver:function(t,e){(this.lastOverNode=e).ui.onOver(t)},onNodeOut:function(t,e){e.ui.onOut(t)},onIconOver:function(t,e){e.ui.addClass("x-tree-ec-over")},onIconOut:function(t,e){e.ui.removeClass("x-tree-ec-over")},onIconClick:function(t,e){e.ui.ecClick(t)},onCheckboxClick:function(t,e){e.ui.onCheckChange(t)},onNodeDblClick:function(t,e){e.ui.onDblClick(t)},onNodeContextMenu:function(t,e){e.ui.onContextMenu(t)},beforeEvent:function(t){var e=this.getNode(t);return!(this.disabled||!e||!e.ui)||(t.stopEvent(),!1)},disable:function(){this.disabled=!0},enable:function(){this.disabled=!1}},Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(t){this.selNode=null,this.addEvents("selectionchange","beforeselect"),Ext.apply(this,t),Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(t){(this.tree=t).mon(t.getTreeEl(),"keydown",this.onKeyDown,this),t.on("click",this.onNodeClick,this)},onNodeClick:function(t,e){this.select(t)},select:function(t,e){if(!Ext.fly(t.ui.wrap).isVisible()&&e)return e.call(this,t);var i=this.selNode;return t==i?t.ui.onSelectedChange(!0):!1!==this.fireEvent("beforeselect",this,t,i)&&(i&&i.ui&&i.ui.onSelectedChange(!1),(this.selNode=t).ui.onSelectedChange(!0),this.fireEvent("selectionchange",this,t,i)),t},unselect:function(t,e){this.selNode==t&&this.clearSelections(e)},clearSelections:function(t){var e=this.selNode;return e&&(e.ui.onSelectedChange(!1),!(this.selNode=null)!==t&&this.fireEvent("selectionchange",this,null)),e},getSelectedNode:function(){return this.selNode},isSelected:function(t){return this.selNode==t},selectPrevious:function(t){if(!(t=t||this.selNode||this.lastSelNode))return null;var e=t.previousSibling;if(e){if(!e.isExpanded()||e.childNodes.length<1)return this.select(e,this.selectPrevious);for(var i=e.lastChild;i&&i.isExpanded()&&Ext.fly(i.ui.wrap).isVisible()&&0<i.childNodes.length;)i=i.lastChild;return this.select(i,this.selectPrevious)}return!t.parentNode||!this.tree.rootVisible&&t.parentNode.isRoot?null:this.select(t.parentNode,this.selectPrevious)},selectNext:function(t){if(!(t=t||this.selNode||this.lastSelNode))return null;if(t.firstChild&&t.isExpanded()&&Ext.fly(t.ui.wrap).isVisible())return this.select(t.firstChild,this.selectNext);if(t.nextSibling)return this.select(t.nextSibling,this.selectNext);if(t.parentNode){var e=null;return t.parentNode.bubble(function(){if(this.nextSibling)return e=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext),!1}),e}return null},onKeyDown:function(t){var e=this.selNode||this.lastSelNode;if(e)switch(t.getKey()){case t.DOWN:t.stopEvent(),this.selectNext();break;case t.UP:t.stopEvent(),this.selectPrevious();break;case t.RIGHT:t.preventDefault(),e.hasChildNodes()&&(e.isExpanded()?e.firstChild&&this.select(e.firstChild,t):e.expand());break;case t.LEFT:t.preventDefault(),e.hasChildNodes()&&e.isExpanded()?e.collapse():e.parentNode&&(this.tree.rootVisible||e.parentNode!=this.tree.getRootNode())&&this.select(e.parentNode,t)}}}),Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(t){this.selNodes=[],this.selMap={},this.addEvents("selectionchange"),Ext.apply(this,t),Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(t){(this.tree=t).mon(t.getTreeEl(),"keydown",this.onKeyDown,this),t.on("click",this.onNodeClick,this)},onNodeClick:function(t,e){e.ctrlKey&&this.isSelected(t)?this.unselect(t):this.select(t,e,e.ctrlKey)},select:function(t,e,i){return!0!==i&&this.clearSelections(!0),this.isSelected(t)?this.lastSelNode=t:(this.selNodes.push(t),this.selMap[t.id]=t,(this.lastSelNode=t).ui.onSelectedChange(!0),this.fireEvent("selectionchange",this,this.selNodes),t)},unselect:function(t){var e;this.selMap[t.id]&&(t.ui.onSelectedChange(!1),-1!=(e=this.selNodes.indexOf(t))&&this.selNodes.splice(e,1),delete this.selMap[t.id],this.fireEvent("selectionchange",this,this.selNodes))},clearSelections:function(t){var e=this.selNodes;if(0<e.length){for(var i=0,s=e.length;i<s;i++)e[i].ui.onSelectedChange(!1);this.selNodes=[],this.selMap={},!0!==t&&this.fireEvent("selectionchange",this,this.selNodes)}},isSelected:function(t){return!!this.selMap[t.id]},getSelectedNodes:function(){return this.selNodes.concat([])},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious}),Ext.data.Tree=Ext.extend(Ext.util.Observable,{constructor:function(t){this.nodeHash={},this.root=null,t&&this.setRootNode(t),this.addEvents("append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert"),Ext.data.Tree.superclass.constructor.call(this)},pathSeparator:"/",proxyNodeEvent:function(){return this.fireEvent.apply(this,arguments)},getRootNode:function(){return this.root},setRootNode:function(t){return(this.root=t).ownerTree=this,t.isRoot=!0,this.registerNode(t),t},getNodeById:function(t){return this.nodeHash[t]},registerNode:function(t){this.nodeHash[t.id]=t},unregisterNode:function(t){delete this.nodeHash[t.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"}}),Ext.data.Node=Ext.extend(Ext.util.Observable,{constructor:function(t){this.attributes=t||{},this.leaf=this.attributes.leaf,this.id=this.attributes.id,this.id||(this.id=Ext.id(null,"xnode-"),this.attributes.id=this.id),this.childNodes=[],this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.addEvents({append:!0,remove:!0,move:!0,insert:!0,beforeappend:!0,beforeremove:!0,beforemove:!0,beforeinsert:!0}),this.listeners=this.attributes.listeners,Ext.data.Node.superclass.constructor.call(this)},fireEvent:function(t){if(!1===Ext.data.Node.superclass.fireEvent.apply(this,arguments))return!1;var e=this.getOwnerTree();return!e||!1!==e.proxyNodeEvent.apply(e,arguments)},isLeaf:function(){return!0===this.leaf},setFirstChild:function(t){this.firstChild=t},setLastChild:function(t){this.lastChild=t},isLast:function(){return!this.parentNode||this.parentNode.lastChild==this},isFirst:function(){return!this.parentNode||this.parentNode.firstChild==this},hasChildNodes:function(){return!this.isLeaf()&&0<this.childNodes.length},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(t){var e=!1;if(Ext.isArray(t)?e=t:1<arguments.length&&(e=arguments),!e){if(!1===this.fireEvent("beforeappend",this.ownerTree,this,t))return!1;var i=this.childNodes.length,s=t.parentNode;if(s){if(!1===t.fireEvent("beforemove",t.getOwnerTree(),t,s,this,i))return!1;s.removeChild(t)}0===(i=this.childNodes.length)&&this.setFirstChild(t),this.childNodes.push(t);var n=(t.parentNode=this).childNodes[i-1];return n?(t.previousSibling=n).nextSibling=t:t.previousSibling=null,t.nextSibling=null,this.setLastChild(t),t.setOwnerTree(this.getOwnerTree()),this.fireEvent("append",this.ownerTree,this,t,i),s&&t.fireEvent("move",this.ownerTree,t,s,this,i),t}for(var r=0,o=e.length;r<o;r++)this.appendChild(e[r])},removeChild:function(t,e){var i=this.childNodes.indexOf(t);return-1!=i&&(!1!==this.fireEvent("beforeremove",this.ownerTree,this,t)&&(this.childNodes.splice(i,1),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),t.nextSibling&&(t.nextSibling.previousSibling=t.previousSibling),this.firstChild==t&&this.setFirstChild(t.nextSibling),this.lastChild==t&&this.setLastChild(t.previousSibling),this.fireEvent("remove",this.ownerTree,this,t),e?t.destroy(!0):t.clear(),t))},clear:function(t){this.setOwnerTree(null,t),this.parentNode=this.previousSibling=this.nextSibling=null,t&&(this.firstChild=this.lastChild=null)},destroy:function(t){!0===t?(this.purgeListeners(),this.clear(!0),Ext.each(this.childNodes,function(t){t.destroy(!0)}),this.childNodes=null):this.remove(!0)},insertBefore:function(t,e){if(!e)return this.appendChild(t);if(t==e)return!1;if(!1===this.fireEvent("beforeinsert",this.ownerTree,this,t,e))return!1;var i=this.childNodes.indexOf(e),s=t.parentNode,n=i;if(s==this&&this.childNodes.indexOf(t)<i&&n--,s){if(!1===t.fireEvent("beforemove",t.getOwnerTree(),t,s,this,i,e))return!1;s.removeChild(t)}0===n&&this.setFirstChild(t),this.childNodes.splice(n,0,t);var r=(t.parentNode=this).childNodes[n-1];return r?(t.previousSibling=r).nextSibling=t:t.previousSibling=null,((t.nextSibling=e).previousSibling=t).setOwnerTree(this.getOwnerTree()),this.fireEvent("insert",this.ownerTree,this,t,e),s&&t.fireEvent("move",this.ownerTree,t,s,this,n,e),t},remove:function(t){return this.parentNode&&this.parentNode.removeChild(this,t),this},removeAll:function(t){for(var e,i=this.childNodes;e=i[0];)this.removeChild(e,t);return this},item:function(t){return this.childNodes[t]},replaceChild:function(t,e){var i=e?e.nextSibling:null;return this.removeChild(e),this.insertBefore(t,i),e},indexOf:function(t){return this.childNodes.indexOf(t)},getOwnerTree:function(){if(!this.ownerTree)for(var t=this;t;){if(t.ownerTree){this.ownerTree=t.ownerTree;break}t=t.parentNode}return this.ownerTree},getDepth:function(){for(var t=0,e=this;e.parentNode;)++t,e=e.parentNode;return t},setOwnerTree:function(e,t){e!=this.ownerTree&&(this.ownerTree&&this.ownerTree.unregisterNode(this),this.ownerTree=e,!0!==t&&Ext.each(this.childNodes,function(t){t.setOwnerTree(e)}),e&&e.registerNode(this))},setId:function(t){var e;t!==this.id&&((e=this.ownerTree)&&e.unregisterNode(this),this.id=this.attributes.id=t,e&&e.registerNode(this),this.onIdChange(t))},onIdChange:Ext.emptyFn,getPath:function(t){t=t||"id";for(var e=this.parentNode,i=[this.attributes[t]];e;)i.unshift(e.attributes[t]),e=e.parentNode;var s=this.getOwnerTree().pathSeparator;return s+i.join(s)},bubble:function(t,e,i){for(var s=this;s&&!1!==t.apply(e||s,i||[s]);)s=s.parentNode},cascade:function(t,e,i){if(!1!==t.apply(e||this,i||[this]))for(var s=this.childNodes,n=0,r=s.length;n<r;n++)s[n].cascade(t,e,i)},eachChild:function(t,e,i){for(var s=this.childNodes,n=0,r=s.length;n<r&&!1!==t.apply(e||s[n],i||[s[n]]);n++);},findChild:function(t,e,i){return this.findChildBy(function(){return this.attributes[t]==e},null,i)},findChildBy:function(t,e,i){for(var s,n,r=this.childNodes,o=r.length,a=0;a<o;a++){if(s=r[a],!0===t.call(e||s,s))return s;if(i&&null!=(n=s.findChildBy(t,e,i)))return n}return null},sort:function(t,e){var i=this.childNodes,s=i.length;if(0<s){var n=e?function(){t.apply(e,arguments)}:t;i.sort(n);for(var r=0;r<s;r++){var o=i[r];o.previousSibling=i[r-1],o.nextSibling=i[r+1],0===r&&this.setFirstChild(o),r==s-1&&this.setLastChild(o)}}},contains:function(t){return t.isAncestor(this)},isAncestor:function(t){for(var e=this.parentNode;e;){if(e==t)return!0;e=e.parentNode}return!1},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}}),Ext.tree.TreeNode=Ext.extend(Ext.data.Node,{constructor:function(t){t=t||{},Ext.isString(t)&&(t={text:t}),this.childrenRendered=!1,this.rendered=!1,Ext.tree.TreeNode.superclass.constructor.call(this,t),this.expanded=!0===t.expanded,this.isTarget=!1!==t.isTarget,this.draggable=!1!==t.draggable&&!1!==t.allowDrag,this.allowChildren=!1!==t.allowChildren&&!1!==t.allowDrop,this.text=t.text,this.disabled=!0===t.disabled,this.hidden=!0===t.hidden,this.addEvents("textchange","beforeexpand","beforecollapse","expand","disabledchange","collapse","beforeclick","click","checkchange","beforedblclick","dblclick","contextmenu","beforechildrenrendered");var e=this.attributes.uiProvider||this.defaultUI||Ext.tree.TreeNodeUI;this.ui=new e(this)},preventHScroll:!0,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},getLoader:function(){var t;return this.loader||((t=this.getOwnerTree())&&t.loader?t.loader:this.loader=new Ext.tree.TreeLoader)},setFirstChild:function(t){var e=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,t),this.childrenRendered&&e&&t!=e&&e.renderIndent(!0,!0),this.rendered&&this.renderIndent(!0,!0)},setLastChild:function(t){var e=this.lastChild;Ext.tree.TreeNode.superclass.setLastChild.call(this,t),this.childrenRendered&&e&&t!=e&&e.renderIndent(!0,!0),this.rendered&&this.renderIndent(!0,!0)},appendChild:function(t){t.render||Ext.isArray(t)||(t=this.getLoader().createNode(t));var e=Ext.tree.TreeNode.superclass.appendChild.call(this,t);return e&&this.childrenRendered&&e.render(),this.ui.updateExpandIcon(),e},removeChild:function(t,e){var i;return this.ownerTree.getSelectionModel().unselect(t),Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments),e||((i=t.ui.rendered)&&t.ui.remove(),i&&this.childNodes.length<1?this.collapse(!1,!1):this.ui.updateExpandIcon(),this.firstChild||this.isHiddenRoot()||(this.childrenRendered=!1)),t},insertBefore:function(t,e){t.render||(t=this.getLoader().createNode(t));var i=Ext.tree.TreeNode.superclass.insertBefore.call(this,t,e);return i&&e&&this.childrenRendered&&t.render(),this.ui.updateExpandIcon(),i},setText:function(t){var e=this.text;this.text=this.attributes.text=t,this.rendered&&this.ui.onTextChange(this,t,e),this.fireEvent("textchange",this,t,e)},setIconCls:function(t){var e=this.attributes.iconCls;this.attributes.iconCls=t,this.rendered&&this.ui.onIconClsChange(this,t,e)},setTooltip:function(t,e){this.attributes.qtip=t,this.attributes.qtipTitle=e,this.rendered&&this.ui.onTipChange(this,t,e)},setIcon:function(t){this.attributes.icon=t,this.rendered&&this.ui.onIconChange(this,t)},setHref:function(t,e){this.attributes.href=t,this.attributes.hrefTarget=e,this.rendered&&this.ui.onHrefChange(this,t,e)},setCls:function(t){var e=this.attributes.cls;this.attributes.cls=t,this.rendered&&this.ui.onClsChange(this,t,e)},select:function(){var t=this.getOwnerTree();t&&t.getSelectionModel().select(this)},unselect:function(t){var e=this.getOwnerTree();e&&e.getSelectionModel().unselect(this,t)},isSelected:function(){var t=this.getOwnerTree();return!!t&&t.getSelectionModel().isSelected(this)},expand:function(t,e,i,s){if(this.expanded)this.runCallback(i,s||this,[this]);else{if(!1===this.fireEvent("beforeexpand",this,t,e))return;if(this.childrenRendered||this.renderChildren(),this.expanded=!0,!this.isHiddenRoot()&&this.getOwnerTree().animate&&!1!==e||e)return void this.ui.animExpand(function(){this.fireEvent("expand",this),this.runCallback(i,s||this,[this]),!0===t&&this.expandChildNodes(!0,!0)}.createDelegate(this));this.ui.expand(),this.fireEvent("expand",this),this.runCallback(i,s||this,[this])}!0===t&&this.expandChildNodes(!0)},runCallback:function(t,e,i){Ext.isFunction(t)&&t.apply(e,i)},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(t,e,i,s){if(this.expanded&&!this.isHiddenRoot()){if(!1===this.fireEvent("beforecollapse",this,t,e))return;if(this.expanded=!1,this.getOwnerTree().animate&&!1!==e||e)return void this.ui.animCollapse(function(){this.fireEvent("collapse",this),this.runCallback(i,s||this,[this]),!0===t&&this.collapseChildNodes(!0)}.createDelegate(this));this.ui.collapse(),this.fireEvent("collapse",this),this.runCallback(i,s||this,[this])}else this.expanded||this.runCallback(i,s||this,[this]);if(!0===t)for(var n=this.childNodes,r=0,o=n.length;r<o;r++)n[r].collapse(!0,!1)},delayedExpand:function(t){this.expandProcId||(this.expandProcId=this.expand.defer(t,this))},cancelExpand:function(){this.expandProcId&&clearTimeout(this.expandProcId),this.expandProcId=!1},toggle:function(){this.expanded?this.collapse():this.expand()},ensureVisible:function(e,i){var s=this.getOwnerTree();s.expandPath(this.parentNode?this.parentNode.getPath():this.getPath(),!1,function(){var t=s.getNodeById(this.id);s.getTreeEl().scrollChildIntoView(t.ui.anchor),this.runCallback(e,i||this,[this])}.createDelegate(this))},expandChildNodes:function(t,e){for(var i=this.childNodes,s=i.length,n=0;n<s;n++)i[n].expand(t,e)},collapseChildNodes:function(t){for(var e=this.childNodes,i=0,s=e.length;i<s;i++)e[i].collapse(t)},disable:function(){this.disabled=!0,this.unselect(),this.rendered&&this.ui.onDisableChange&&this.ui.onDisableChange(this,!0),this.fireEvent("disabledchange",this,!0)},enable:function(){this.disabled=!1,this.rendered&&this.ui.onDisableChange&&this.ui.onDisableChange(this,!1),this.fireEvent("disabledchange",this,!1)},renderChildren:function(t){!1!==t&&this.fireEvent("beforechildrenrendered",this);for(var e=this.childNodes,i=0,s=e.length;i<s;i++)e[i].render(!0);this.childrenRendered=!0},sort:function(t,e){if(Ext.tree.TreeNode.superclass.sort.apply(this,arguments),this.childrenRendered)for(var i=this.childNodes,s=0,n=i.length;s<n;s++)i[s].render(!0)},render:function(t){this.ui.render(t),this.rendered||(this.getOwnerTree().registerNode(this),this.rendered=!0,this.expanded&&(this.expanded=!1,this.expand(!1,!1)))},renderIndent:function(t,e){if(e&&(this.ui.childIndent=null),this.ui.renderIndent(),!0===t&&this.childrenRendered)for(var i=this.childNodes,s=0,n=i.length;s<n;s++)i[s].renderIndent(!0,e)},beginUpdate:function(){this.childrenRendered=!1},endUpdate:function(){this.expanded&&this.rendered&&this.renderChildren()},destroy:function(t){!0===t&&this.unselect(!0),Ext.tree.TreeNode.superclass.destroy.call(this,t),Ext.destroy(this.ui,this.loader),this.ui=this.loader=null},onIdChange:function(t){this.ui.onIdChange(t)}}),Ext.tree.TreePanel.nodeTypes.node=Ext.tree.TreeNode,Ext.tree.AsyncTreeNode=function(t){this.loaded=t&&!0===t.loaded,this.loading=!1,Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments),this.addEvents("beforeload","load")},Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(t,e,i,s){if(this.loading)var n=function(){this.loading||(clearInterval(r),this.expand(t,e,i,s))}.createDelegate(this),r=setInterval(n,200);else{if(!this.loaded){if(!1===this.fireEvent("beforeload",this))return;this.loading=!0,this.ui.beforeLoad(this);var o=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(o)return void o.load(this,this.loadComplete.createDelegate(this,[t,e,i,s]),this)}Ext.tree.AsyncTreeNode.superclass.expand.call(this,t,e,i,s)}},isLoading:function(){return this.loading},loadComplete:function(t,e,i,s){this.loading=!1,this.loaded=!0,this.ui.afterLoad(this),this.fireEvent("load",this),this.expand(t,e,i,s)},isLoaded:function(){return this.loaded},hasChildNodes:function(){return!this.isLeaf()&&!this.loaded||Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)},reload:function(t,e){for(this.collapse(!1,!1);this.firstChild;)this.removeChild(this.firstChild).destroy();this.childrenRendered=!1,this.loaded=!1,this.isHiddenRoot()&&(this.expanded=!1),this.expand(!1,!1,t,e)}}),Ext.tree.TreePanel.nodeTypes.async=Ext.tree.AsyncTreeNode,Ext.tree.TreeNodeUI=Ext.extend(Object,{constructor:function(t){Ext.apply(this,{node:t,rendered:!1,animating:!1,wasLeaf:!0,ecc:"x-tree-ec-icon x-tree-elbow",emptyIcon:Ext.BLANK_IMAGE_URL})},removeChild:function(t){this.rendered&&this.ctNode.removeChild(t.ui.getEl())},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(t,e,i){this.rendered&&(this.textNode.innerHTML=e)},onIconClsChange:function(t,e,i){this.rendered&&Ext.fly(this.iconNode).replaceClass(i,e)},onIconChange:function(t,e){var i;this.rendered&&(i=Ext.isEmpty(e),this.iconNode.src=i?this.emptyIcon:e,Ext.fly(this.iconNode)[i?"removeClass":"addClass"]("x-tree-node-inline-icon"))},onTipChange:function(t,e,i){var s;this.rendered&&(s=Ext.isDefined(i),this.textNode.setAttributeNS?(this.textNode.setAttributeNS("ext","qtip",e),s&&this.textNode.setAttributeNS("ext","qtitle",i)):(this.textNode.setAttribute("ext:qtip",e),s&&this.textNode.setAttribute("ext:qtitle",i)))},onHrefChange:function(t,e,i){this.rendered&&(this.anchor.href=this.getHref(e),Ext.isDefined(i)&&(this.anchor.target=i))},onClsChange:function(t,e,i){this.rendered&&Ext.fly(this.elNode).replaceClass(i,e)},onDisableChange:function(t,e){this.disabled=e,this.checkbox&&(this.checkbox.disabled=e),this[e?"addClass":"removeClass"]("x-tree-node-disabled")},onSelectedChange:function(t){t?(this.focus(),this.addClass("x-tree-selected")):this.removeClass("x-tree-selected")},onMove:function(t,e,i,s,n,r){if(this.childIndent=null,this.rendered){var o=s.ui.getContainer();if(!o)return this.holder=document.createElement("div"),void this.holder.appendChild(this.wrap);var a=r?r.ui.getEl():null;a?o.insertBefore(this.wrap,a):o.appendChild(this.wrap),this.node.renderIndent(!0,i!=s)}},addClass:function(t){this.elNode&&Ext.fly(this.elNode).addClass(t)},removeClass:function(t){this.elNode&&Ext.fly(this.elNode).removeClass(t)},remove:function(){this.rendered&&(this.holder=document.createElement("div"),this.holder.appendChild(this.wrap))},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this),this.node.disabled&&this.onDisableChange(this.node,!0),this.node.hidden&&this.hide();var t=this.node.getOwnerTree();!(t.enableDD||t.enableDrag||t.enableDrop)||this.node.isRoot&&!t.rootVisible||Ext.dd.Registry.register(this.elNode,{node:this.node,handles:this.getDDHandles(),isHandle:!1})},getDDHandles:function(){return[this.iconNode,this.textNode,this.elNode]},hide:function(){this.node.hidden=!0,this.wrap&&(this.wrap.style.display="none")},show:function(){this.node.hidden=!1,this.wrap&&(this.wrap.style.display="")},onContextMenu:function(t){(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu"))&&(t.preventDefault(),this.focus(),this.fireEvent("contextmenu",this.node,t))},onClick:function(t){if(this.dropping)t.stopEvent();else if(!1!==this.fireEvent("beforeclick",this.node,t)){var e=t.getTarget("a");if(!this.disabled&&this.node.attributes.href&&e)return void this.fireEvent("click",this.node,t);if(e&&t.ctrlKey&&t.stopEvent(),t.preventDefault(),this.disabled)return;this.node.attributes.singleClickExpand&&!this.animating&&this.node.isExpandable()&&this.node.toggle(),this.fireEvent("click",this.node,t)}else t.stopEvent()},onDblClick:function(t){t.preventDefault(),this.disabled||!1!==this.fireEvent("beforedblclick",this.node,t)&&(this.checkbox&&this.toggleCheck(),!this.animating&&this.node.isExpandable()&&this.node.toggle(),this.fireEvent("dblclick",this.node,t))},onOver:function(t){this.addClass("x-tree-node-over")},onOut:function(t){this.removeClass("x-tree-node-over")},onCheckChange:function(){var t=this.checkbox.checked;this.checkbox.defaultChecked=t,this.node.attributes.checked=t,this.fireEvent("checkchange",this.node,t)},ecClick:function(t){!this.animating&&this.node.isExpandable()&&this.node.toggle()},startDrop:function(){this.dropping=!0},endDrop:function(){setTimeout(function(){this.dropping=!1}.createDelegate(this),50)},expand:function(){this.updateExpandIcon(),this.ctNode.style.display=""},focus:function(){if(this.node.preventHScroll)try{var t=this.node.getOwnerTree().getTreeEl().dom,e=t.scrollLeft;this.anchor.focus(),t.scrollLeft=e}catch(t){}else try{this.anchor.focus()}catch(t){}},toggleCheck:function(t){var e=this.checkbox;e&&(e.checked=void 0===t?!e.checked:t,this.onCheckChange())},blur:function(){try{this.anchor.blur()}catch(t){}},animExpand:function(t){var e=Ext.get(this.ctNode);if(e.stopFx(),!this.node.isExpandable())return this.updateExpandIcon(),this.ctNode.style.display="",void Ext.callback(t);this.animating=!0,this.updateExpandIcon(),e.slideIn("t",{callback:function(){this.animating=!1,Ext.callback(t)},scope:this,duration:this.node.ownerTree.duration||.25})},highlight:function(){var t=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(t.hlColor||"C3DAF9",{endColor:t.hlBaseColor})},collapse:function(){this.updateExpandIcon(),this.ctNode.style.display="none"},animCollapse:function(t){var e=Ext.get(this.ctNode);e.enableDisplayMode("block"),e.stopFx(),this.animating=!0,this.updateExpandIcon(),e.slideOut("t",{callback:function(){this.animating=!1,Ext.callback(t)},scope:this,duration:this.node.ownerTree.duration||.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(t){t.appendChild(this.elNode.cloneNode(!0))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},render:function(t){var e=this.node,i=e.attributes,s=e.parentNode?e.parentNode.ui.getContainer():e.ownerTree.innerCt.dom;this.rendered?!0===t&&s.appendChild(this.wrap):(this.rendered=!0,this.renderElements(e,i,s,t),i.qtip?this.onTipChange(e,i.qtip,i.qtipTitle):i.qtipCfg&&(i.qtipCfg.target=Ext.id(this.textNode),Ext.QuickTips.register(i.qtipCfg)),this.initEvents(),this.node.expanded||this.updateExpandIcon(!0))},renderElements:function(t,e,i,s){this.indentMarkup=t.parentNode?t.parentNode.ui.getChildIndent():"";var n,r=Ext.isBoolean(e.checked),o=this.getHref(e.href),a=['<li class="x-tree-node"><div ext:tree-node-id="',t.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',e.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img alt="" src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img alt="" src="',e.icon||this.emptyIcon,'" class="x-tree-node-icon',e.icon?" x-tree-node-inline-icon":"",e.iconCls?" "+e.iconCls:"",'" unselectable="on" />',r?'<input class="x-tree-node-cb" type="checkbox" '+(e.checked?'checked="checked" />':"/>"):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',o,'" tabIndex="1" ',e.hrefTarget?' target="'+e.hrefTarget+'"':"",'><span unselectable="on">',t.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");!0!==s&&t.nextSibling&&(n=t.nextSibling.ui.getEl())?this.wrap=Ext.DomHelper.insertHtml("beforeBegin",n,a):this.wrap=Ext.DomHelper.insertHtml("beforeEnd",i,a),this.elNode=this.wrap.childNodes[0],this.ctNode=this.wrap.childNodes[1];var l=this.elNode.childNodes;this.indentNode=l[0],this.ecNode=l[1],this.iconNode=l[2];var h=3;r&&(this.checkbox=l[3],this.checkbox.defaultChecked=this.checkbox.checked,h++),this.anchor=l[h],this.textNode=l[h].firstChild},getHref:function(t){return Ext.isEmpty(t)?Ext.isGecko?"":"#":t},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return!!this.checkbox&&this.checkbox.checked},updateExpandIcon:function(){var t,e,i,s,n;this.rendered&&(s=(t=this.node).isLast()?"x-tree-elbow-end":"x-tree-elbow",t.hasChildNodes()||t.attributes.expandable?(i=t.expanded?(s+="-minus",e="x-tree-node-collapsed","x-tree-node-expanded"):(s+="-plus",e="x-tree-node-expanded","x-tree-node-collapsed"),this.wasLeaf&&(this.removeClass("x-tree-node-leaf"),this.wasLeaf=!1),this.c1==e&&this.c2==i||(Ext.fly(this.elNode).replaceClass(e,i),this.c1=e,this.c2=i)):this.wasLeaf||(Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed"),delete this.c1,delete this.c2,this.wasLeaf=!0),n="x-tree-ec-icon "+s,this.ecc!=n&&(this.ecNode.className=n,this.ecc=n))},onIdChange:function(t){this.rendered&&this.elNode.setAttribute("ext:tree-node-id",t)},getChildIndent:function(){if(!this.childIndent){for(var t=[],e=this.node;e;)(!e.isRoot||e.isRoot&&e.ownerTree.rootVisible)&&(e.isLast()?t.unshift('<img alt="" src="'+this.emptyIcon+'" class="x-tree-icon" />'):t.unshift('<img alt="" src="'+this.emptyIcon+'" class="x-tree-elbow-line" />')),e=e.parentNode;this.childIndent=t.join("")}return this.childIndent},renderIndent:function(){var t,e;this.rendered&&(t="",(e=this.node.parentNode)&&(t=e.ui.getChildIndent()),this.indentMarkup!=t&&(this.indentNode.innerHTML=t,this.indentMarkup=t),this.updateExpandIcon())},destroy:function(){this.elNode&&Ext.dd.Registry.unregister(this.elNode.id),Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(t){this[t]&&(Ext.fly(this[t]).remove(),delete this[t])},this),delete this.node}}),Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){var t;this.rendered||(t=this.node.ownerTree.innerCt.dom,this.node.expanded=!0,t.innerHTML='<div class="x-tree-root-node"></div>',this.wrap=this.ctNode=t.firstChild)},collapse:Ext.emptyFn,expand:Ext.emptyFn}),Ext.tree.TreeLoader=function(t){this.baseParams={},Ext.apply(this,t),this.addEvents("beforeload","load","loadexception"),Ext.tree.TreeLoader.superclass.constructor.call(this),Ext.isString(this.paramOrder)&&(this.paramOrder=this.paramOrder.split(/[\s,|]/))},Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:!0,paramOrder:void 0,paramsAsHash:!1,nodeParameter:"node",directFn:void 0,load:function(t,e,i){if(this.clearOnLoad)for(;t.firstChild;)t.removeChild(t.firstChild);this.doPreload(t)?this.runCallback(e,i||t,[t]):(this.directFn||this.dataUrl||this.url)&&this.requestData(t,e,i||t)},doPreload:function(t){if(t.attributes.children){if(t.childNodes.length<1){var e=t.attributes.children;t.beginUpdate();for(var i=0,s=e.length;i<s;i++){var n=t.appendChild(this.createNode(e[i]));this.preloadChildren&&this.doPreload(n)}t.endUpdate()}return!0}return!1},getParams:function(t){var e=Ext.apply({},this.baseParams),i=this.nodeParameter,s=this.paramOrder;if(i&&(e[i]=t.id),this.directFn){var n=[t.id];if(s){i&&-1<s.indexOf(i)&&(n=[]);for(var r=0,o=s.length;r<o;r++)n.push(e[s[r]])}else this.paramsAsHash&&(n=[e]);return n}return e},requestData:function(t,e,i){var s;!1!==this.fireEvent("beforeload",this,t,e)?this.directFn?((s=this.getParams(t)).push(this.processDirectResponse.createDelegate(this,[{callback:e,node:t,scope:i}],!0)),this.directFn.apply(window,s)):this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:e,node:t,scope:i},params:this.getParams(t)}):this.runCallback(e,i||t,[])},processDirectResponse:function(t,e,i){e.status?this.handleResponse({responseData:Ext.isArray(t)?t:null,responseText:t,argument:i}):this.handleFailure({argument:i})},runCallback:function(t,e,i){Ext.isFunction(t)&&t.apply(e,i)},isLoading:function(){return!!this.transId},abort:function(){this.isLoading()&&Ext.Ajax.abort(this.transId)},createNode:function(attr){return this.baseAttrs&&Ext.applyIf(attr,this.baseAttrs),!1===this.applyLoader||attr.loader||(attr.loader=this),Ext.isString(attr.uiProvider)&&(attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)),attr.nodeType?new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr):attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr)},processResponse:function(e,t,i,s){var n=e.responseText;try{var r=e.responseData||Ext.decode(n);t.beginUpdate();for(var o=0,a=r.length;o<a;o++){var l=this.createNode(r[o]);l&&t.appendChild(l)}t.endUpdate(),this.runCallback(i,s||t,[t])}catch(t){this.handleFailure(e)}},handleResponse:function(t){this.transId=!1;var e=t.argument;this.processResponse(t,e.node,e.callback,e.scope),this.fireEvent("load",this,e.node,t)},handleFailure:function(t){this.transId=!1;var e=t.argument;this.fireEvent("loadexception",this,e.node,t),this.runCallback(e.callback,e.scope||e.node,[e.node])},destroy:function(){this.abort(),this.purgeListeners()}}),Ext.tree.TreeFilter=function(t,e){this.tree=t,this.filtered={},Ext.apply(this,e)},Ext.tree.TreeFilter.prototype={clearBlank:!1,reverse:!1,autoClear:!1,remove:!1,filter:function(e,i,t){var s;if(i=i||"text","string"==typeof e){var n=e.length;if(0==n&&this.clearBlank)return void this.clear();e=e.toLowerCase(),s=function(t){return t.attributes[i].substr(0,n).toLowerCase()==e}}else{if(!e.exec)throw"Illegal filter type, must be string or regex";s=function(t){return e.test(t.attributes[i])}}this.filterBy(s,null,t)},filterBy:function(e,i,s){s=s||this.tree.root,this.autoClear&&this.clear();var t,n=this.filtered,r=this.reverse;if(s.cascade(function(t){return t==s||!n[t.id]&&(!(!e.call(i||t,t)||r)||((n[t.id]=t).ui.hide(),!1))}),this.remove)for(var o in n){"function"==typeof o||(t=n[o])&&t.parentNode&&t.parentNode.removeChild(t)}},clear:function(){this.tree;var t,e=this.filtered;for(var i in e){"function"==typeof i||(t=e[i])&&t.ui.show()}this.filtered={}}},Ext.tree.TreeSorter=Ext.extend(Object,{constructor:function(t,e){Ext.apply(this,e),t.on({scope:this,beforechildrenrendered:this.doSort,append:this.updateSort,insert:this.updateSort,textchange:this.updateSortParent});var l=this.dir&&"desc"==this.dir.toLowerCase(),h=this.property||"text",d=this.sortType,c=this.folderSort,u=!0===this.caseSensitive,f=this.leafAttr||"leaf";Ext.isString(d)&&(d=Ext.data.SortTypes[d]),this.sortFn=function(t,e){var i=t.attributes,s=e.attributes;if(c){if(i[f]&&!s[f])return 1;if(!i[f]&&s[f])return-1}var n=i[h],r=s[h],o=d?d(n,t):u?n:n.toUpperCase(),a=d?d(r,e):u?r:r.toUpperCase();return o<a?l?1:-1:a<o?l?-1:1:0}},doSort:function(t){t.sort(this.sortFn)},updateSort:function(t,e){e.childrenRendered&&this.doSort.defer(1,this,[e])},updateSortParent:function(t){var e=t.parentNode;e&&e.childrenRendered&&this.doSort.defer(1,this,[e])}}),Ext.dd.DropZone&&(Ext.tree.TreeDropZone=function(t,e){this.allowParentInsert=e.allowParentInsert||!1,this.allowContainerDrop=e.allowContainerDrop||!1,this.appendOnly=e.appendOnly||!1,Ext.tree.TreeDropZone.superclass.constructor.call(this,t.getTreeEl(),e),this.tree=t,this.dragOverData={},this.lastInsertClass="x-tree-no-status"},Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1e3,expandNode:function(t){t.hasChildNodes()&&!t.isExpanded()&&t.expand(!1,null,this.triggerCacheRefresh.createDelegate(this))},queueExpand:function(t){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[t])},cancelExpand:function(){this.expandProcId&&(clearTimeout(this.expandProcId),this.expandProcId=!1)},isValidDropPoint:function(t,e,i,s,n){if(!t||!n)return!1;var r=t.node,o=n.node;if(!(r&&r.isTarget&&e))return!1;if("append"==e&&!1===r.allowChildren)return!1;if(("above"==e||"below"==e)&&r.parentNode&&!1===r.parentNode.allowChildren)return!1;if(o&&(r==o||o.contains(r)))return!1;var a=this.dragOverData;a.tree=this.tree,a.target=r,a.data=n,a.point=e,a.source=i,a.rawEvent=s,a.dropNode=o,a.cancel=!1;var l=this.tree.fireEvent("nodedragover",a);return!1===a.cancel&&!1!==l},getDropPoint:function(t,e,i){var s=e.node;if(s.isRoot)return!1!==s.allowChildren&&"append";var n=e.ddel,r=Ext.lib.Dom.getY(n),o=r+n.offsetHeight,a=Ext.lib.Event.getPageY(t),l=!1===s.allowChildren||s.isLeaf();if(this.appendOnly||!1===s.parentNode.allowChildren)return!l&&"append";var h=!1;this.allowParentInsert||(h=s.hasChildNodes()&&s.isExpanded());var d=(o-r)/(l?2:3);return r<=a&&a<r+d?"above":!h&&(l||o-d<=a&&a<=o)?"below":"append"},onNodeEnter:function(t,e,i,s){this.cancelExpand()},onContainerOver:function(t,e,i){return this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",t,e,i)?this.dropAllowed:this.dropNotAllowed},onNodeOver:function(t,e,i,s){var n=this.getDropPoint(i,t,e),r=t.node;this.expandProcId||"append"!=n||!r.hasChildNodes()||t.node.isExpanded()?"append"!=n&&this.cancelExpand():this.queueExpand(r);var o,a,l=this.dropNotAllowed;return this.isValidDropPoint(t,n,e,i,s)&&n&&(o=t.ddel,a="above"==n?(l=t.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between","x-tree-drag-insert-above"):"below"==n?(l=t.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between","x-tree-drag-insert-below"):(l="x-tree-drop-ok-append","x-tree-drag-append"),this.lastInsertClass!=a&&(Ext.fly(o).replaceClass(this.lastInsertClass,a),this.lastInsertClass=a)),l},onNodeOut:function(t,e,i,s){this.cancelExpand(),this.removeDropIndicators(t)},onNodeDrop:function(t,e,i,s){var n=this.getDropPoint(i,t,e),r=t.node;if(r.ui.startDrop(),!this.isValidDropPoint(t,n,e,i,s))return r.ui.endDrop(),!1;var o=s.node||(e.getTreeNode?e.getTreeNode(s,r,n,i):null);return this.processDrop(r,s,n,e,i,o)},onContainerDrop:function(t,e,i){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",t,e,i)){var s=this.tree.getRootNode();s.ui.startDrop();var n=i.node||(t.getTreeNode?t.getTreeNode(i,s,"append",e):null);return this.processDrop(s,i,"append",t,e,n)}return!1},processDrop:function(t,e,i,s,n,r){var o={tree:this.tree,target:t,data:e,point:i,source:s,rawEvent:n,dropNode:r,cancel:!r,dropStatus:!1};return!1!==this.tree.fireEvent("beforenodedrop",o)&&!0!==o.cancel&&o.dropNode?(t=o.target,"append"!=i||t.isExpanded()?this.completeDrop(o):t.expand(!1,null,function(){this.completeDrop(o)}.createDelegate(this)),!0):(t.ui.endDrop(),o.dropStatus)},completeDrop:function(t){var e,i=t.dropNode,s=t.point,n=t.target;Ext.isArray(i)||(i=[i]);for(var r=0,o=i.length;r<o;r++)e=i[r],"above"==s?n.parentNode.insertBefore(e,n):"below"==s?n.parentNode.insertBefore(e,n.nextSibling):n.appendChild(e);e.ui.focus(),Ext.enableFx&&this.tree.hlDrop&&e.ui.highlight(),n.ui.endDrop(),this.tree.fireEvent("nodedrop",t)},afterNodeMoved:function(t,e,i,s,n){Ext.enableFx&&this.tree.hlDrop&&(n.ui.focus(),n.ui.highlight()),this.tree.fireEvent("nodedrop",this.tree,s,e,t,i)},getTree:function(){return this.tree},removeDropIndicators:function(t){var e;t&&t.ddel&&(e=t.ddel,Ext.fly(e).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]),this.lastInsertClass="_noclass")},beforeDragDrop:function(t,e,i){return this.cancelExpand(),!0},afterRepair:function(t){t&&Ext.enableFx&&t.node.ui.highlight(),this.hideProxy()}})),Ext.dd.DragZone&&(Ext.tree.TreeDragZone=function(t,e){Ext.tree.TreeDragZone.superclass.constructor.call(this,t.innerCt,e),this.tree=t},Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(t,e){var i=t.node;return i&&i.draggable&&!i.disabled},onInitDrag:function(t){var e=this.dragData;this.tree.getSelectionModel().select(e.node),this.tree.eventModel.disable(),this.proxy.update(""),e.node.ui.appendDDGhost(this.proxy.ghost.dom),this.tree.fireEvent("startdrag",this.tree,e.node,t)},getRepairXY:function(t,e){return e.node.ui.getDDRepairXY()},onEndDrag:function(t,e){this.tree.eventModel.enable.defer(100,this.tree.eventModel),this.tree.fireEvent("enddrag",this.tree,t.node,e)},onValidDrop:function(t,e,i){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,t,e),this.hideProxy()},beforeInvalidDrop:function(t,e){var i=this.tree.getSelectionModel();i.clearSelections(),i.select(this.dragData.node)},afterRepair:function(){Ext.enableFx&&this.tree.hlDrop&&Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9"),this.dragging=!1}})),Ext.tree.TreeEditor=function(t,e,i){var s=(e=e||{}).events?e:new Ext.form.TextField(e);Ext.tree.TreeEditor.superclass.constructor.call(this,s,i),(this.tree=t).rendered?this.initEditor(t):t.on("render",this.initEditor,this)},Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:!1,hideEl:!1,cls:"x-small-editor x-tree-editor",shim:!1,shadow:"frame",maxWidth:250,editDelay:350,initEditor:function(t){t.on({scope:this,beforeclick:this.beforeNodeClick,dblclick:this.onNodeDblClick}),this.on({scope:this,complete:this.updateNode,beforestartedit:this.fitToTree,specialkey:this.onSpecialKey}),this.on("startedit",this.bindScroll,this,{delay:10})},fitToTree:function(t,e){var i=this.tree.getTreeEl().dom,s=e.dom;i.scrollLeft>s.offsetLeft&&(i.scrollLeft=s.offsetLeft);var n=Math.min(this.maxWidth,(20<i.clientWidth?i.clientWidth:i.offsetWidth)-Math.max(0,s.offsetLeft-i.scrollLeft)-5);this.setSize(n,"")},triggerEdit:function(t,e){if(this.completeEdit(),!1!==t.attributes.editable){this.editNode=t,this.tree.autoScroll&&Ext.fly(t.ui.getEl()).scrollIntoView(this.tree.body);var i=t.text||"";return!Ext.isGecko&&Ext.isEmpty(t.text)&&t.setText("&#160;"),this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[t.ui.textNode,i]),!1}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(t,e){if(clearTimeout(this.autoEditTimer),this.tree.getSelectionModel().isSelected(t))return e.stopEvent(),this.triggerEdit(t)},onNodeDblClick:function(t,e){clearTimeout(this.autoEditTimer)},updateNode:function(t,e){this.tree.getTreeEl().un("scroll",this.cancelEdit,this),this.editNode.setText(e)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this),this.editNode&&this.editNode.ui.focus.defer(50,this.editNode.ui)},onSpecialKey:function(t,e){var i=e.getKey();i==e.ESC?(e.stopEvent(),this.cancelEdit()):i!=e.ENTER||e.hasModifier()||(e.stopEvent(),this.completeEdit())},onDestroy:function(){clearTimeout(this.autoEditTimer),Ext.tree.TreeEditor.superclass.onDestroy.call(this);var t=this.tree;t.un("beforeclick",this.beforeNodeClick,this),t.un("dblclick",this.onNodeDblClick,this)}}),Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:!1,ignoreParentClicks:!1,enableScrolling:!0,maxHeight:null,scrollIncrement:24,showSeparator:!0,defaultOffsets:[0,0],plain:!1,floating:!0,zIndex:15e3,hidden:!0,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:!0,defaultType:"menuitem",bufferResize:!1,initComponent:function(){var t;Ext.isArray(this.initialConfig)&&Ext.apply(this,{items:this.initialConfig}),this.addEvents("click","mouseover","mouseout","itemclick"),Ext.menu.MenuMgr.register(this),this.floating?Ext.EventManager.onWindowResize(this.hide,this):(!1!==this.initialConfig.hidden&&(this.hidden=!1),this.internalDefaults={hideOnClick:!1}),Ext.menu.Menu.superclass.initComponent.call(this),this.autoLayout&&(t=this.doLayout.createDelegate(this,[]),this.on({add:t,remove:t}))},getLayoutTarget:function(){return this.ul},onRender:function(t,e){t=t||Ext.getBody();var i={id:this.getId(),cls:"x-menu "+(this.floating?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};this.floating?this.el=new Ext.Layer({shadow:this.shadow,dh:i,constrain:!1,parentEl:t,zindex:this.zIndex}):this.el=t.createChild(i),Ext.menu.Menu.superclass.onRender.call(this,t,e),this.keyNav||(this.keyNav=new Ext.menu.MenuNav(this)),this.focusEl=this.el.child("a.x-menu-focus"),this.ul=this.el.child("ul.x-menu-list"),this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut}),this.enableScrolling&&this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})},findTargetItem:function(t){var e=t.getTarget(".x-menu-list-item",this.ul,!0);if(e&&e.menuItemId)return this.items.get(e.menuItemId)},onClick:function(t){var e=this.findTargetItem(t);e&&(e.isFormField?this.setActiveItem(e):e instanceof Ext.menu.BaseItem&&(e.menu&&this.ignoreParentClicks?(e.expandMenu(),t.preventDefault()):e.onClick&&(e.onClick(t),this.fireEvent("click",this,e,t))))},setActiveItem:function(t,e){t!=this.activeItem?(this.deactivateActive(),(this.activeItem=t).isFormField?t.focus():t.activate(e)):e&&t.expandMenu()},deactivateActive:function(){var t=this.activeItem;t&&(t.isFormField?t.collapse&&t.collapse():t.deactivate(),delete this.activeItem)},tryActivate:function(t,e){for(var i=this.items,s=t,n=i.length;0<=s&&s<n;s+=e){var r=i.get(s);if(r.isVisible()&&!r.disabled&&(r.canActivate||r.isFormField))return this.setActiveItem(r,!1),r}return!1},onMouseOver:function(t){var e=this.findTargetItem(t);e&&e.canActivate&&!e.disabled&&this.setActiveItem(e,!0),this.over=!0,this.fireEvent("mouseover",this,t,e)},onMouseOut:function(t){var e=this.findTargetItem(t);e&&e==this.activeItem&&e.shouldDeactivate&&e.shouldDeactivate(t)&&(this.activeItem.deactivate(),delete this.activeItem),this.over=!1,this.fireEvent("mouseout",this,t,e)},onScroll:function(t,e){t&&t.stopEvent();var i=this.ul.dom,s=Ext.fly(e).is(".x-menu-scroller-top");i.scrollTop+=this.scrollIncrement*(s?-1:1),(s?i.scrollTop<=0:i.scrollTop+this.activeMax>=i.scrollHeight)&&this.onScrollerOut(null,e)},onScrollerIn:function(t,e){var i=this.ul.dom;(Ext.fly(e).is(".x-menu-scroller-top")?0<i.scrollTop:i.scrollTop+this.activeMax<i.scrollHeight)&&Ext.fly(e).addClass(["x-menu-item-active","x-menu-scroller-active"])},onScrollerOut:function(t,e){Ext.fly(e).removeClass(["x-menu-item-active","x-menu-scroller-active"])},show:function(t,e,i){this.floating?(this.parentMenu=i,this.el||(this.render(),this.doLayout(!1,!0)),this.showAt(this.el.getAlignToXY(t,e||this.defaultAlign,this.defaultOffsets),i)):Ext.menu.Menu.superclass.show.call(this)},showAt:function(t,e){!1!==this.fireEvent("beforeshow",this)&&(this.parentMenu=e,this.el||this.render(),t=this.enableScrolling?(this.el.setXY(t),t[1]=this.constrainScroll(t[1]),[this.el.adjustForConstraints(t)[0],t[1]]):this.el.adjustForConstraints(t),this.el.setXY(t),this.el.show(),Ext.menu.Menu.superclass.onShow.call(this),Ext.isIE9m&&(this.fireEvent("autosize",this),Ext.isIE8||this.el.repaint()),this.hidden=!1,this.focus(),this.fireEvent("show",this))},constrainScroll:function(t){var e,i,s,n,r,o=this.ul.setHeight("auto").getHeight(),a=t;return this.floating?(n=(s=Ext.fly(this.el.dom.parentNode)).getScroll().top,r=s.getViewSize().height,i=t-n,e=this.maxHeight?this.maxHeight:r-i,r<o?(e=r,a=t-i):e<o&&(a=t-(o-e),e=o)):e=this.getHeight(),this.maxHeight&&(e=Math.min(this.maxHeight,e)),e<o&&0<e?(this.activeMax=e-2*this.scrollerHeight-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0),this.ul.setHeight(this.activeMax),this.createScrollers(),this.el.select(".x-menu-scroller").setDisplayed("")):(this.ul.setHeight(o),this.el.select(".x-menu-scroller").setDisplayed("none")),this.ul.dom.scrollTop=0,a},createScrollers:function(){this.scroller||(this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:"&#160;"}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:"&#160;"})},this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this),this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],!1)}}),this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this),this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],!1)}}))},onLayout:function(){this.isVisible()&&(this.enableScrolling&&this.constrainScroll(this.el.getTop()),this.floating&&this.el.sync())},focus:function(){this.hidden||this.doFocus.defer(50,this)},doFocus:function(){this.hidden||this.focusEl.focus()},hide:function(t){this.isDestroyed||(this.deepHide=t,Ext.menu.Menu.superclass.hide.call(this),delete this.deepHide)},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this),this.deactivateActive(),this.el&&this.floating&&this.el.hide();var t=this.parentMenu;!0===this.deepHide&&t&&(t.floating?t.hide(!0):t.deactivateActive())},lookupComponent:function(t){return Ext.isString(t)?(t="separator"==t||"-"==t?new Ext.menu.Separator:new Ext.menu.TextItem(t),this.applyDefaults(t)):Ext.isObject(t)?t=this.getMenuItem(t):(t.tagName||t.el)&&(t=new Ext.BoxComponent({el:t})),t},applyDefaults:function(t){var e;return Ext.isString(t)||(t=Ext.menu.Menu.superclass.applyDefaults.call(this,t),(e=this.internalDefaults)&&(t.events?(Ext.applyIf(t.initialConfig,e),Ext.apply(t,e)):Ext.applyIf(t,e))),t},getMenuItem:function(t){return t.ownerCt=this,t.isXType?t:!t.xtype&&Ext.isBoolean(t.checked)?new Ext.menu.CheckItem(t):Ext.create(t,this.defaultType)},addSeparator:function(){return this.add(new Ext.menu.Separator)},addElement:function(t){return this.add(new Ext.menu.BaseItem({el:t}))},addItem:function(t){return this.add(t)},addMenuItem:function(t){return this.add(this.getMenuItem(t))},addText:function(t){return this.add(new Ext.menu.TextItem(t))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var t=this.parentMenu;t&&t.activeChild==this&&delete t.activeChild,delete this.parentMenu,Ext.menu.Menu.superclass.onDestroy.call(this),Ext.menu.MenuMgr.unregister(this),this.keyNav&&this.keyNav.disable();var e=this.scroller;e&&Ext.destroy(e.topRepeater,e.bottomRepeater,e.top,e.bottom),Ext.destroy(this.el,this.focusEl,this.ul)}}),Ext.reg("menu",Ext.menu.Menu),Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function i(t,e){e.tryActivate(e.items.indexOf(e.activeItem)-1,-1)||e.tryActivate(e.items.length-1,-1)}function s(t,e){e.tryActivate(e.items.indexOf(e.activeItem)+1,1)||e.tryActivate(0,1)}return{constructor:function(t){Ext.menu.MenuNav.superclass.constructor.call(this,t.el),this.scope=this.menu=t},doRelay:function(t,e){var i=t.getKey();return(!this.menu.activeItem||!this.menu.activeItem.isFormField||i==t.TAB)&&(!this.menu.activeItem&&t.isNavKeyPress()&&i!=t.SPACE&&i!=t.RETURN?(this.menu.tryActivate(0,1),!1):e.call(this.scope||this,t,this.menu))},tab:function(t,e){t.stopEvent(),(t.shiftKey?i:s)(0,e)},up:i,down:s,right:function(t,e){e.activeItem&&e.activeItem.expandMenu(!0)},left:function(t,e){e.hide(),e.parentMenu&&e.parentMenu.activeItem&&e.parentMenu.activeItem.activate()},enter:function(t,e){if(e.activeItem)return t.stopPropagation(),e.activeItem.onClick(t),e.fireEvent("click",this,e.activeItem),!0}}}()),Ext.menu.MenuMgr=function(){var e,i,s,o={},n=!1,r=new Date;function a(){return!!(i&&0<i.length)&&(i.clone().each(function(t){t.hide()}),!0)}function l(t){i.remove(t),i.length<1&&(s.disable(),Ext.getDoc().un("mousedown",u),n=!1)}function h(t){var e=i.last();r=new Date,i.add(t),n||(s.enable(),Ext.getDoc().on("mousedown",u),n=!0),t.parentMenu?(t.getEl().setZIndex(parseInt(t.parentMenu.getEl().getStyle("z-index"),10)+3),t.parentMenu.activeChild=t):e&&!e.isDestroyed&&e.isVisible()&&t.getEl().setZIndex(parseInt(e.getEl().getStyle("z-index"),10)+3)}function d(t){t.activeChild&&t.activeChild.hide(),t.autoHideTimer&&(clearTimeout(t.autoHideTimer),delete t.autoHideTimer)}function c(t){var e=t.parentMenu;e||t.allowOtherMenus?e&&e.activeChild&&e.activeChild.hide():a()}function u(t){50<r.getElapsed()&&0<i.length&&!t.getTarget(".x-menu")&&a()}return{hideAll:a,register:function(t){e||(e={},i=new Ext.util.MixedCollection,(s=Ext.getDoc().addKeyListener(27,a)).disable()),(e[t.id]=t).on({beforehide:d,hide:l,beforeshow:c,show:h})},get:function(t){return"string"==typeof t?e?e[t]:null:t.events?t:"number"==typeof t.length?new Ext.menu.Menu({items:t}):Ext.create(t,"menu")},unregister:function(t){delete e[t.id],t.un("beforehide",d),t.un("hide",l),t.un("beforeshow",c),t.un("show",h)},registerCheckable:function(t){var e=t.group;e&&(o[e]||(o[e]=[]),o[e].push(t))},unregisterCheckable:function(t){var e=t.group;e&&o[e].remove(t)},onCheckChange:function(t,e){if(t.group&&e)for(var i,s=o[t.group],n=0,r=s.length;n<r;n++)(i=s[n])!=t&&i.setChecked(!1)},getCheckedItem:function(t){var e=o[t];if(e)for(var i=0,s=e.length;i<s;i++)if(e[i].checked)return e[i];return null},setCheckedItem:function(t,e){var i=o[t];if(i)for(var s=0,n=i.length;s<n;s++)i[s].id==e&&i[s].setChecked(!0);return null}}}(),Ext.menu.BaseItem=Ext.extend(Ext.Component,{canActivate:!1,activeClass:"x-menu-item-active",hideOnClick:!0,clickHideDelay:1,ctype:"Ext.menu.BaseItem",actionMode:"container",initComponent:function(){Ext.menu.BaseItem.superclass.initComponent.call(this),this.addEvents("click","activate","deactivate"),this.handler&&this.on("click",this.handler,this.scope)},onRender:function(t,e){Ext.menu.BaseItem.superclass.onRender.apply(this,arguments),this.ownerCt&&this.ownerCt instanceof Ext.menu.Menu?this.parentMenu=this.ownerCt:(this.container.addClass("x-menu-list-item"),this.mon(this.el,{scope:this,click:this.onClick,mouseenter:this.activate,mouseleave:this.deactivate}))},setHandler:function(t,e){this.handler&&this.un("click",this.handler,this.scope),this.on("click",this.handler=t,this.scope=e)},onClick:function(t){!this.disabled&&!1!==this.fireEvent("click",this,t)&&this.parentMenu&&!1!==this.parentMenu.fireEvent("itemclick",this,t)?this.handleClick(t):t.stopEvent()},activate:function(){if(this.disabled)return!1;var t=this.container;return t.addClass(this.activeClass),this.region=t.getRegion().adjust(2,2,-2,-2),this.fireEvent("activate",this),!0},deactivate:function(){this.container.removeClass(this.activeClass),this.fireEvent("deactivate",this)},shouldDeactivate:function(t){return!this.region||!this.region.contains(t.getPoint())},handleClick:function(t){var e=this.parentMenu;this.hideOnClick&&(e.floating?this.clickHideDelayTimer=e.hide.defer(this.clickHideDelay,e,[!0]):e.deactivateActive())},beforeDestroy:function(){clearTimeout(this.clickHideDelayTimer),Ext.menu.BaseItem.superclass.beforeDestroy.call(this)},expandMenu:Ext.emptyFn,hideMenu:Ext.emptyFn}),Ext.reg("menubaseitem",Ext.menu.BaseItem),Ext.menu.TextItem=Ext.extend(Ext.menu.BaseItem,{hideOnClick:!1,itemCls:"x-menu-text",constructor:function(t){"string"==typeof t&&(t={text:t}),Ext.menu.TextItem.superclass.constructor.call(this,t)},onRender:function(){var t=document.createElement("span");t.className=this.itemCls,t.innerHTML=this.text,this.el=t,Ext.menu.TextItem.superclass.onRender.apply(this,arguments)}}),Ext.reg("menutextitem",Ext.menu.TextItem),Ext.menu.Separator=Ext.extend(Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:!1,activeClass:"",onRender:function(t){var e=document.createElement("span");e.className=this.itemCls,e.innerHTML="&#160;",this.el=e,t.addClass("x-menu-sep-li"),Ext.menu.Separator.superclass.onRender.apply(this,arguments)}}),Ext.reg("menuseparator",Ext.menu.Separator),Ext.menu.Item=Ext.extend(Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:!0,showDelay:200,altText:"",hideDelay:200,ctype:"Ext.menu.Item",initComponent:function(){Ext.menu.Item.superclass.initComponent.call(this),this.menu&&(Ext.isArray(this.menu)&&(this.menu={items:this.menu}),Ext.isObject(this.menu)&&(this.menu.ownerCt=this),this.menu=Ext.menu.MenuMgr.get(this.menu),this.menu.ownerCt=void 0)},onRender:function(t,e){this.itemTpl||(this.itemTpl=Ext.menu.Item.prototype.itemTpl=new Ext.XTemplate('<a id="{id}" class="{cls} x-unselectable" hidefocus="true" unselectable="on" href="{href}"','<tpl if="hrefTarget">',' target="{hrefTarget}"',"</tpl>",">",'<img alt="{altText}" src="{icon}" class="x-menu-item-icon {iconCls}"/>','<span class="x-menu-item-text">{text}</span>',"</a>"));var i=this.getTemplateArgs();this.el=e?this.itemTpl.insertBefore(e,i,!0):this.itemTpl.append(t,i,!0),this.iconEl=this.el.child("img.x-menu-item-icon"),this.textEl=this.el.child(".x-menu-item-text"),this.href||this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:!0}),Ext.menu.Item.superclass.onRender.call(this,t,e)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||"&#160;",altText:this.altText||""}},setText:function(t){this.text=t||"&#160;",this.rendered&&(this.textEl.update(this.text),this.parentMenu.layout.doAutoSize())},setIconClass:function(t){var e=this.iconCls;this.iconCls=t,this.rendered&&this.iconEl.replaceClass(e,this.iconCls)},beforeDestroy:function(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.menu&&(delete this.menu.ownerCt,this.menu.destroy()),Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(t){this.href||t.stopEvent(),Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(t){return Ext.menu.Item.superclass.activate.apply(this,arguments)&&(this.focus(),t&&this.expandMenu()),!0},shouldDeactivate:function(t){return!!Ext.menu.Item.superclass.shouldDeactivate.call(this,t)&&(!this.menu||!this.menu.isVisible()||!this.menu.getEl().getRegion().contains(t.getPoint()))},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments),this.hideMenu()},expandMenu:function(t){!this.disabled&&this.menu&&(clearTimeout(this.hideTimer),delete this.hideTimer,this.menu.isVisible()||this.showTimer?this.menu.isVisible()&&t&&this.menu.tryActivate(0,1):this.showTimer=this.deferExpand.defer(this.showDelay,this,[t]))},deferExpand:function(t){delete this.showTimer,this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu),t&&this.menu.tryActivate(0,1)},hideMenu:function(){clearTimeout(this.showTimer),delete this.showTimer,!this.hideTimer&&this.menu&&this.menu.isVisible()&&(this.hideTimer=this.deferHide.defer(this.hideDelay,this))},deferHide:function(){delete this.hideTimer,this.menu.over?this.parentMenu.setActiveItem(this,!1):this.menu.hide()}}),Ext.reg("menuitem",Ext.menu.Item),Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:!1,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this),this.addEvents("beforecheckchange","checkchange"),this.checkHandler&&this.on("checkchange",this.checkHandler,this.scope),Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(t){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments),this.group&&this.el.addClass(this.groupClass),this.checked&&(this.checked=!1,this.setChecked(!0,!0))},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this),Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(t,e){var i=!0===e;this.checked==t||!i&&!1===this.fireEvent("beforecheckchange",this,t)||(Ext.menu.MenuMgr.onCheckChange(this,t),this.container&&this.container[t?"addClass":"removeClass"]("x-menu-item-checked"),this.checked=t,i||this.fireEvent("checkchange",this,t))},handleClick:function(t){this.disabled||this.checked&&this.group||this.setChecked(!this.checked),Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}}),Ext.reg("menucheckitem",Ext.menu.CheckItem),Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:!1,hideOnClick:!0,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this),(this.strict=Ext.isIE7&&Ext.isStrict)&&this.on("show",this.onShow,this,{single:!0,delay:20}),Ext.apply(this,{plain:!0,showSeparator:!1,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE9m,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))}),this.picker.purgeListeners(),Ext.menu.DateMenu.superclass.initComponent.call(this),this.relayEvents(this.picker,["select"]),this.on("show",this.picker.focus,this.picker),this.on("select",this.menuHide,this),this.handler&&this.on("select",this.handler,this.scope||this)},menuHide:function(){this.hideOnClick&&this.hide(!0)},onBeforeShow:function(){this.picker&&this.picker.hideMonthPicker(!0)},onShow:function(){var t=this.picker.getEl();t.setWidth(t.getWidth())}}),Ext.reg("datemenu",Ext.menu.DateMenu),Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:!1,hideOnClick:!0,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:!0,showSeparator:!1,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))}),this.palette.purgeListeners(),Ext.menu.ColorMenu.superclass.initComponent.call(this),this.relayEvents(this.palette,["select"]),this.on("select",this.menuHide,this),this.handler&&this.on("select",this.handler,this.scope||this)},menuHide:function(){this.hideOnClick&&this.hide(!0)}}),Ext.reg("colormenu",Ext.menu.ColorMenu),Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:!0,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:!1,disabled:!1,submitValue:!0,isFormField:!0,msgDisplay:"",hasFocus:!1,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this),this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(t,e){var i;this.el||((i=this.getAutoCreate()).name||(i.name=this.name||this.id),this.inputType&&(i.type=this.inputType),this.autoEl=i),Ext.form.Field.superclass.onRender.call(this,t,e),!1===this.submitValue&&this.el.dom.removeAttribute("name");var s=this.el.dom.type;s&&("password"==s&&(s="text"),this.el.addClass("x-form-"+s)),this.readOnly&&this.setReadOnly(!0),void 0!==this.tabIndex&&this.el.dom.setAttribute("tabIndex",this.tabIndex),this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){void 0!==this.value?this.setValue(this.value):Ext.isEmpty(this.el.dom.value)||this.el.dom.value==this.emptyText||this.setValue(this.el.dom.value),this.originalValue=this.getValue()},isDirty:function(){return!(this.disabled||!this.rendered)&&String(this.getValue())!==String(this.originalValue)},setReadOnly:function(t){this.rendered&&(this.el.dom.readOnly=t),this.readOnly=t},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this),this.initEvents(),this.initValue()},fireKey:function(t){t.isSpecialKey()&&this.fireEvent("specialkey",this,t)},reset:function(){this.setValue(this.originalValue),this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.getKeyEvent(),this.fireKey,this),this.mon(this.el,"focus",this.onFocus,this),this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus(),this.focusClass&&this.el.addClass(this.focusClass),this.hasFocus||(this.hasFocus=!0,this.startValue=this.getValue(),this.fireEvent("focus",this))},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur(),this.focusClass&&this.el.removeClass(this.focusClass),(this.hasFocus=!1)===this.validationEvent||!this.validateOnBlur&&"blur"!=this.validationEvent||this.validate();var t=this.getValue();String(t)!==String(this.startValue)&&this.fireEvent("change",this,t,this.startValue),this.fireEvent("blur",this),this.postBlur()},postBlur:Ext.emptyFn,isValid:function(t){if(this.disabled)return!0;var e=this.preventMark;this.preventMark=!0===t;var i=this.validateValue(this.processValue(this.getRawValue()),t);return this.preventMark=e,i},validate:function(){return!(!this.disabled&&!this.validateValue(this.processValue(this.getRawValue())))&&(this.clearInvalid(),!0)},processValue:function(t){return t},validateValue:function(t){var e=this.getErrors(t)[0];return null==e||(this.markInvalid(e),!1)},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(t){var e,i;this.rendered&&!this.preventMark&&(t=t||this.invalidText,(e=this.getMessageHandler())?e.mark(this,t):this.msgTarget&&(this.el.addClass(this.invalidClass),(i=Ext.getDom(this.msgTarget))&&(i.innerHTML=t,i.style.display=this.msgDisplay))),this.setActiveError(t)},clearInvalid:function(){var t,e;this.rendered&&!this.preventMark&&(this.el.removeClass(this.invalidClass),(t=this.getMessageHandler())?t.clear(this):this.msgTarget&&(this.el.removeClass(this.invalidClass),(e=Ext.getDom(this.msgTarget))&&(e.innerHTML="",e.style.display="none"))),this.unsetActiveError()},setActiveError:function(t,e){this.activeError=t,!0!==e&&this.fireEvent("invalid",this,t)},unsetActiveError:function(t){delete this.activeError,!0!==t&&this.fireEvent("valid",this)},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,!0)||this.el.findParent(".x-form-field-wrap",5,!0)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(!0)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var t=this.rendered?this.el.getValue():Ext.value(this.value,"");return t===this.emptyText&&(t=""),t},getValue:function(){if(!this.rendered)return this.value;var t=this.el.getValue();return t!==this.emptyText&&void 0!==t||(t=""),t},setRawValue:function(t){return this.rendered?this.el.dom.value=Ext.isEmpty(t)?"":t:""},setValue:function(t){return this.value=t,this.rendered&&(this.el.dom.value=Ext.isEmpty(t)?"":t,this.validate()),this},append:function(t){this.setValue([this.getValue(),t].join(""))}}),Ext.form.MessageTargets={qtip:{mark:function(t,e){t.el.addClass(t.invalidClass),t.el.dom.qtip=e,t.el.dom.qclass="x-form-invalid-tip",Ext.QuickTips&&Ext.QuickTips.enable()},clear:function(t){t.el.removeClass(t.invalidClass),t.el.dom.qtip=""}},title:{mark:function(t,e){t.el.addClass(t.invalidClass),t.el.dom.title=e},clear:function(t){t.el.dom.title=""}},under:{mark:function(t,e){if(t.el.addClass(t.invalidClass),!t.errorEl){var i=t.getErrorCt();if(!i)return void(t.el.dom.title=e);t.errorEl=i.createChild({cls:"x-form-invalid-msg"}),t.on("resize",t.alignErrorEl,t),t.on("destroy",function(){Ext.destroy(this.errorEl)},t)}t.alignErrorEl(),t.errorEl.update(e),Ext.form.Field.msgFx[t.msgFx].show(t.errorEl,t)},clear:function(t){t.el.removeClass(t.invalidClass),t.errorEl?Ext.form.Field.msgFx[t.msgFx].hide(t.errorEl,t):t.el.dom.title=""}},side:{mark:function(t,e){if(t.el.addClass(t.invalidClass),!t.errorIcon){var i=t.getErrorCt();if(!i)return void(t.el.dom.title=e);t.errorIcon=i.createChild({cls:"x-form-invalid-icon"}),t.ownerCt&&(t.ownerCt.on("afterlayout",t.alignErrorIcon,t),t.ownerCt.on("expand",t.alignErrorIcon,t)),t.on("resize",t.alignErrorIcon,t),t.on("destroy",function(){Ext.destroy(this.errorIcon)},t)}t.alignErrorIcon(),t.errorIcon.dom.qtip=e,t.errorIcon.dom.qclass="x-form-invalid-tip",t.errorIcon.show()},clear:function(t){t.el.removeClass(t.invalidClass),t.errorIcon?(t.errorIcon.dom.qtip="",t.errorIcon.hide()):t.el.dom.title=""}}},Ext.form.Field.msgFx={normal:{show:function(t,e){t.setDisplayed("block")},hide:function(t,e){t.setDisplayed(!1).update("")}},slide:{show:function(t,e){t.slideIn("t",{stopFx:!0})},hide:function(t,e){t.slideOut("t",{stopFx:!0,useDisplay:!0})}},slideRight:{show:function(t,e){t.fixDisplay(),t.alignTo(e.el,"tl-tr"),t.slideIn("l",{stopFx:!0})},hide:function(t,e){t.slideOut("l",{stopFx:!0,useDisplay:!0})}}},Ext.reg("field",Ext.form.Field),Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:!1,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:!1,allowBlank:!0,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:!1,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this),this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this),"keyup"==this.validationEvent?(this.validationTask=new Ext.util.DelayedTask(this.validate,this),this.mon(this.el,"keyup",this.filterValidation,this)):!1!==this.validationEvent&&"blur"!=this.validationEvent&&this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay}),(this.selectOnFocus||this.emptyText)&&(this.mon(this.el,"mousedown",this.onMouseDown,this),this.emptyText&&this.applyEmptyText()),(this.maskRe||this.vtype&&!0!==this.disableKeyFilter&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))&&this.mon(this.el,"keypress",this.filterKeys,this),this.grow&&(this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50}),this.mon(this.el,"click",this.autoSize,this)),this.enableKeyEvents&&this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})},onMouseDown:function(t){this.hasFocus||this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:!0,preventDefault:!0})},processValue:function(t){if(this.stripCharsRe){var e=t.replace(this.stripCharsRe,"");if(e!==t)return this.setRawValue(e),e}return t},filterValidation:function(t){t.isNavKeyPress()||this.validationTask.delay(this.validationDelay)},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this),Ext.isIE&&(this.el.dom.unselectable="on")},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this),Ext.isIE&&(this.el.dom.unselectable="")},onKeyUpBuffered:function(t){this.doAutoSize(t)&&this.autoSize()},doAutoSize:function(t){return!t.isNavKeyPress()},onKeyUp:function(t){this.fireEvent("keyup",this,t)},onKeyDown:function(t){this.fireEvent("keydown",this,t)},onKeyPress:function(t){this.fireEvent("keypress",this,t)},reset:function(){Ext.form.TextField.superclass.reset.call(this),this.applyEmptyText()},applyEmptyText:function(){this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus&&(this.setRawValue(this.emptyText),this.el.addClass(this.emptyClass))},preFocus:function(){var t,e=this.el;this.emptyText&&(e.dom.value==this.emptyText&&(this.setRawValue(""),t=!0),e.removeClass(this.emptyClass)),(this.selectOnFocus||t)&&e.dom.select()},postBlur:function(){this.applyEmptyText()},filterKeys:function(t){var e,i;t.ctrlKey||(e=t.getKey(),Ext.isGecko&&(t.isNavKeyPress()||e==t.BACKSPACE||e==t.DELETE&&-1==t.button)||(i=String.fromCharCode(t.getCharCode()),!Ext.isGecko&&t.isSpecialKey()&&!i||this.maskRe.test(i)||t.stopEvent()))},setValue:function(t){return this.emptyText&&this.el&&!Ext.isEmpty(t)&&this.el.removeClass(this.emptyClass),Ext.form.TextField.superclass.setValue.apply(this,arguments),this.applyEmptyText(),this.autoSize(),this},getErrors:function(t){var e,i,s=Ext.form.TextField.superclass.getErrors.apply(this,arguments);if(t=Ext.isDefined(t)?t:this.processValue(this.getRawValue()),!Ext.isFunction(this.validator)||!0!==(e=this.validator(t))&&s.push(e),t.length<1||t===this.emptyText){if(this.allowBlank)return s;s.push(this.blankText)}return!this.allowBlank&&(t.length<1||t===this.emptyText)&&s.push(this.blankText),t.length<this.minLength&&s.push(String.format(this.minLengthText,this.minLength)),t.length>this.maxLength&&s.push(String.format(this.maxLengthText,this.maxLength)),this.vtype&&((i=Ext.form.VTypes)[this.vtype](t,this)||s.push(this.vtypeText||i[this.vtype+"Text"])),this.regex&&!this.regex.test(t)&&s.push(this.regexText),s},selectText:function(t,e){var i,s,n=this.getRawValue();0<n.length&&(t=void 0===t?0:t,e=void 0===e?n.length:e,(i=this.el.dom).setSelectionRange?i.setSelectionRange(t,e):i.createTextRange&&((s=i.createTextRange()).moveStart("character",t),s.moveEnd("character",e-n.length),s.select()),!Ext.isGecko&&!Ext.isOpera)||this.focus()},autoSize:function(){var t,e,i;this.grow&&this.rendered&&(this.metrics||(this.metrics=Ext.util.TextMetrics.createInstance(this.el)),t=this.el.dom.value,(e=document.createElement("div")).appendChild(document.createTextNode(t)),t=e.innerHTML,Ext.removeNode(e),e=null,t+="&#160;",i=Math.min(this.growMax,Math.max(this.metrics.getWidth(t)+10,this.growMin)),this.el.setWidth(i),this.fireEvent("autosize",this,i))},onDestroy:function(){this.validationTask&&(this.validationTask.cancel(),this.validationTask=null),Ext.form.TextField.superclass.onDestroy.call(this)}}),Ext.reg("textfield",Ext.form.TextField),Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:!1,editable:!0,readOnly:!1,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:!0,deferHeight:!0,mimicing:!1,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(t,e){Ext.form.TriggerField.superclass.onResize.call(this,t,e);var i=this.getTriggerWidth();Ext.isNumber(t)&&this.el.setWidth(t-i),this.wrap.setWidth(this.el.getWidth()+i)},getTriggerWidth:function(){var t=this.trigger.getWidth();return this.hideTrigger||this.readOnly||0!==t||(t=this.defaultTriggerWidth),t},alignErrorIcon:function(){this.wrap&&this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(t,e){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc(),Ext.form.TriggerField.superclass.onRender.call(this,t,e),this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"}),this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.triggerClass}),this.initTrigger(),this.width||this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()),this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return this.el.getWidth()+this.trigger.getWidth()},updateEditState:function(){this.rendered&&(this.readOnly?(this.el.dom.readOnly=!0,this.el.addClass("x-trigger-noedit"),this.mun(this.el,"click",this.onTriggerClick,this),this.trigger.setDisplayed(!1)):(this.editable?(this.el.dom.readOnly=!1,this.el.removeClass("x-trigger-noedit"),this.mun(this.el,"click",this.onTriggerClick,this)):(this.el.dom.readOnly=!0,this.el.addClass("x-trigger-noedit"),this.mon(this.el,"click",this.onTriggerClick,this)),this.trigger.setDisplayed(!this.hideTrigger)),this.onResize(this.width||this.wrap.getWidth()))},setHideTrigger:function(t){t!=this.hideTrigger&&(this.hideTrigger=t,this.updateEditState())},setEditable:function(t){t!=this.editable&&(this.editable=t,this.updateEditState())},setReadOnly:function(t){t!=this.readOnly&&(this.readOnly=t,this.updateEditState())},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this),this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:!0}),this.trigger.addClassOnOver("x-form-trigger-over"),this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap),this.mimicing&&this.doc.un("mousedown",this.mimicBlur,this),delete this.doc,Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this),this.mimicing||(this.wrap.addClass(this.wrapFocusClass),this.mimicing=!0,this.doc.on("mousedown",this.mimicBlur,this,{delay:10}),this.monitorTab&&this.on("specialkey",this.checkTab,this))},checkTab:function(t,e){e.getKey()==e.TAB&&this.triggerBlur()},onBlur:Ext.emptyFn,mimicBlur:function(t){this.isDestroyed||this.wrap.contains(t.target)||!this.validateBlur(t)||this.triggerBlur()},triggerBlur:function(){this.mimicing=!1,this.doc.un("mousedown",this.mimicBlur,this),this.monitorTab&&this.el&&this.un("specialkey",this.checkTab,this),Ext.form.TriggerField.superclass.onBlur.call(this),this.wrap&&this.wrap.removeClass(this.wrapFocusClass)},beforeBlur:Ext.emptyFn,validateBlur:function(t){return!0},onTriggerClick:Ext.emptyFn}),Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this),this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(t){return this.triggers[t]},afterRender:function(){Ext.form.TwinTriggerField.superclass.afterRender.call(this);for(var t=this.triggers,e=0,i=t.length;e<i;++e)this["hideTrigger"+(e+1)]&&t[e].hide()},initTrigger:function(){var t=this.trigger.select(".x-form-trigger",!0),n=this;t.each(function(t,e,i){var s="Trigger"+(i+1);t.hide=function(){var t=n.wrap.getWidth();this.dom.style.display="none",n.el.setWidth(t-n.trigger.getWidth()),n["hidden"+s]=!0},t.show=function(){var t=n.wrap.getWidth();this.dom.style.display="",n.el.setWidth(t-n.trigger.getWidth()),n["hidden"+s]=!1},this.mon(t,"click",this["on"+s+"Click"],this,{preventDefault:!0}),t.addClassOnOver("x-form-trigger-over"),t.addClassOnClick("x-form-trigger-click")},this),this.triggers=t.elements},getTriggerWidth:function(){var n=0;return Ext.each(this.triggers,function(t,e){var i="Trigger"+(e+1),s=t.getWidth();0!==s||this["hidden"+i]?n+=s:n+=this.defaultTriggerWidth},this),n},onDestroy:function(){Ext.destroy(this.triggers),Ext.form.TwinTriggerField.superclass.onDestroy.call(this)},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn}),Ext.reg("trigger",Ext.form.TriggerField),Ext.reg("twintrigger",Ext.form.TwinTriggerField),Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1e3,growAppend:"&#160;\n&#160;",enterIsSpecial:!1,preventScrollbars:!1,onRender:function(t,e){this.el||(this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}),Ext.form.TextArea.superclass.onRender.call(this,t,e),this.grow&&(this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"}),this.preventScrollbars&&this.el.setStyle("overflow","hidden"),this.el.setHeight(this.growMin))},onDestroy:function(){Ext.removeNode(this.textSizeEl),Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(t){t.isSpecialKey()&&(this.enterIsSpecial||t.getKey()!=t.ENTER||t.hasModifier())&&this.fireEvent("specialkey",this,t)},doAutoSize:function(t){return!t.isNavKeyPress()||t.getKey()==t.ENTER},filterValidation:function(t){t.isNavKeyPress()&&(this.enterIsSpecial||t.keyCode!=t.ENTER)||this.validationTask.delay(this.validationDelay)},autoSize:function(){var t,e,i,s;this.grow&&this.textSizeEl&&(t=this.el,e=Ext.util.Format.htmlEncode(t.dom.value),i=this.textSizeEl,Ext.fly(i).setWidth(this.el.getWidth()),e.length<1?e="&#160;&#160;":(e+=this.growAppend,Ext.isIE&&(e=e.replace(/\n/g,"&#160;<br />"))),i.innerHTML=e,(s=Math.min(this.growMax,Math.max(i.offsetHeight,this.growMin)))!=this.lastHeight&&(this.lastHeight=s,this.el.setHeight(s),this.fireEvent("autosize",this,s)))}}),Ext.reg("textarea",Ext.form.TextArea),Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:!0,decimalSeparator:".",decimalPrecision:2,allowNegative:!0,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,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",baseChars:"0123456789",autoStripChars:!1,initEvents:function(){var t=this.baseChars+"";this.allowDecimals&&(t+=this.decimalSeparator),this.allowNegative&&(t+="-"),t=Ext.escapeRe(t),this.maskRe=new RegExp("["+t+"]"),this.autoStripChars&&(this.stripCharsRe=new RegExp("[^"+t+"]","gi")),Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(t){var e=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);if((t=Ext.isDefined(t)?t:this.processValue(this.getRawValue())).length<1)return e;t=String(t).replace(this.decimalSeparator,"."),isNaN(t)&&e.push(String.format(this.nanText,t));var i=this.parseValue(t);return i<this.minValue&&e.push(String.format(this.minText,this.minValue)),i>this.maxValue&&e.push(String.format(this.maxText,this.maxValue)),e},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(t){return t=Ext.isNumber(t)?t:parseFloat(String(t).replace(this.decimalSeparator,".")),t=this.fixPrecision(t),t=isNaN(t)?"":String(t).replace(".",this.decimalSeparator),Ext.form.NumberField.superclass.setValue.call(this,t)},setMinValue:function(t){this.minValue=Ext.num(t,Number.NEGATIVE_INFINITY)},setMaxValue:function(t){this.maxValue=Ext.num(t,Number.MAX_VALUE)},parseValue:function(t){return t=parseFloat(String(t).replace(this.decimalSeparator,".")),isNaN(t)?"":t},fixPrecision:function(t){var e=isNaN(t);return this.allowDecimals&&-1!=this.decimalPrecision&&!e&&t?parseFloat(parseFloat(t).toFixed(this.decimalPrecision)):e?"":t},beforeBlur:function(){var t=this.parseValue(this.getRawValue());Ext.isEmpty(t)||this.setValue(t)}}),Ext.reg("numberfield",Ext.form.NumberField),Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{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}",triggerClass:"x-form-date-trigger",showToday:!0,startDay:0,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(t,e){if(Date.formatContainsHourInfo(e))return Date.parseDate(t,e);var i=Date.parseDate(t+" "+this.initTime,e+" "+this.initTimeFormat);return i?i.clearTime():void 0},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this),this.addEvents("select"),Ext.isString(this.minValue)&&(this.minValue=this.parseDate(this.minValue)),Ext.isString(this.maxValue)&&(this.maxValue=this.parseDate(this.maxValue)),this.disabledDatesRE=null,this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this),this.keyNav=new Ext.KeyNav(this.el,{down:function(t){this.onTriggerClick()},scope:this,forceKeyDown:!0})},initDisabledDays:function(){var i,s,n;this.disabledDates&&(i=this.disabledDates,s=i.length-1,n="(?:",Ext.each(i,function(t,e){n+=Ext.isDate(t)?"^"+Ext.escapeRe(t.dateFormat(this.format))+"$":i[e],e!=s&&(n+="|")},this),this.disabledDatesRE=new RegExp(n+")"))},setDisabledDates:function(t){this.disabledDates=t,this.initDisabledDays(),this.menu&&this.menu.picker.setDisabledDates(this.disabledDatesRE)},setDisabledDays:function(t){this.disabledDays=t,this.menu&&this.menu.picker.setDisabledDays(t)},setMinValue:function(t){this.minValue=Ext.isString(t)?this.parseDate(t):t,this.menu&&this.menu.picker.setMinDate(this.minValue)},setMaxValue:function(t){this.maxValue=Ext.isString(t)?this.parseDate(t):t,this.menu&&this.menu.picker.setMaxDate(this.maxValue)},getErrors:function(t){var e=Ext.form.DateField.superclass.getErrors.apply(this,arguments);if((t=this.formatDate(t||this.processValue(this.getRawValue()))).length<1)return e;var i=t;if(!(t=this.parseDate(t)))return e.push(String.format(this.invalidText,i,this.format)),e;var s=t.getTime();if(this.minValue&&s<this.minValue.clearTime().getTime()&&e.push(String.format(this.minText,this.formatDate(this.minValue))),this.maxValue&&s>this.maxValue.clearTime().getTime()&&e.push(String.format(this.maxText,this.formatDate(this.maxValue))),this.disabledDays)for(var n=t.getDay(),r=0;r<this.disabledDays.length;r++)if(n===this.disabledDays[r]){e.push(this.disabledDaysText);break}var o=this.formatDate(t);return this.disabledDatesRE&&this.disabledDatesRE.test(o)&&e.push(String.format(this.disabledDatesText,o)),e},validateBlur:function(){return!this.menu||!this.menu.isVisible()},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""},setValue:function(t){return Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(t)))},parseDate:function(t){if(!t||Ext.isDate(t))return t;var e=this.safeParse(t,this.format),i=this.altFormats,s=this.altFormatsArray;if(!e&&i)for(var n=0,r=(s=s||i.split("|")).length;n<r&&!e;n++)e=this.safeParse(t,s[n]);return e},onDestroy:function(){Ext.destroy(this.menu,this.keyNav),Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(t){return Ext.isDate(t)?t.dateFormat(this.format):t},onTriggerClick:function(){this.disabled||(null==this.menu&&(this.menu=new Ext.menu.DateMenu({hideOnClick:!1,focusOnSelect:!1})),this.onFocus(),Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,startDay:this.startDay,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))}),this.menu.picker.setValue(this.getValue()||new Date),this.menu.show(this.el,"tl-bl?"),this.menuEvents("on"))},menuEvents:function(t){this.menu[t]("select",this.onSelect,this),this.menu[t]("hide",this.onMenuHide,this),this.menu[t]("show",this.onFocus,this)},onSelect:function(t,e){this.setValue(e),this.fireEvent("select",this,e),this.menu.hide()},onMenuHide:function(){this.focus(!1,60),this.menuEvents("un")},beforeBlur:function(){var t=this.parseDate(this.getRawValue());t&&this.setValue(t)}}),Ext.reg("datefield",Ext.form.DateField),Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:!1,validateOnBlur:!1,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:!1,initEvents:Ext.emptyFn,isValid:function(){return!0},validate:function(){return!0},getRawValue:function(){var t=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,"");return t===this.emptyText&&(t=""),this.htmlEncode&&(t=Ext.util.Format.htmlDecode(t)),t},getValue:function(){return this.getRawValue()},getName:function(){return this.name},setRawValue:function(t){return this.htmlEncode&&(t=Ext.util.Format.htmlEncode(t)),this.rendered?this.el.dom.innerHTML=Ext.isEmpty(t)?"":t:this.value=t},setValue:function(t){return this.setRawValue(t),this}}),Ext.reg("displayfield",Ext.form.DisplayField),Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",listEmptyText:"",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,autoSelect:!0,typeAhead:!1,queryDelay:500,pageSize:0,selectOnFocus:!1,queryParam:"query",loadingText:"Loading...",resizable:!1,handleHeight:8,allQuery:"",mode:"remote",minListWidth:70,forceSelection:!1,typeAheadDelay:250,lazyInit:!0,clearFilterOnReset:!0,submitValue:void 0,initComponent:function(){if(Ext.form.ComboBox.superclass.initComponent.call(this),this.addEvents("expand","collapse","beforeselect","select","beforequery"),this.transform){var t=Ext.getDom(this.transform);if(this.hiddenName||(this.hiddenName=t.name),!this.store){this.mode="local";for(var e=[],i=t.options,s=0,n=i.length;s<n;s++){var r=i[s],o=(r.hasAttribute?r.hasAttribute("value"):r.getAttributeNode("value").specified)?r.value:r.text;r.selected&&Ext.isEmpty(this.value,!0)&&(this.value=o),e.push([o,r.text])}this.store=new Ext.data.ArrayStore({idIndex:0,fields:["value","text"],data:e,autoDestroy:!0}),this.valueField="value",this.displayField="text"}t.name=Ext.id(),this.lazyRender||(this.target=!0,this.el=Ext.DomHelper.insertBefore(t,this.autoCreate||this.defaultAutoCreate),this.render(this.el.parentNode,t)),Ext.removeNode(t)}else this.store&&(this.store=Ext.StoreMgr.lookup(this.store),this.store.autoCreated&&(this.displayField=this.valueField="field1",this.store.expandData||(this.displayField="field2"),this.mode="local"));this.selectedIndex=-1,"local"==this.mode&&(Ext.isDefined(this.initialConfig.queryDelay)||(this.queryDelay=10),Ext.isDefined(this.initialConfig.minChars)||(this.minChars=0))},onRender:function(t,e){this.hiddenName&&!Ext.isDefined(this.submitValue)&&(this.submitValue=!1),Ext.form.ComboBox.superclass.onRender.call(this,t,e),this.hiddenName&&(this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:this.hiddenId||Ext.id()},"before",!0)),Ext.isGecko&&this.el.dom.setAttribute("autocomplete","off"),this.lazyInit?this.on("focus",this.initList,this,{single:!0}):this.initList()},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this),this.hiddenField&&(this.hiddenField.value=Ext.value(Ext.isDefined(this.hiddenValue)?this.hiddenValue:this.value,""))},getParentZIndex:function(){var e;return this.ownerCt&&this.findParentBy(function(t){return!!(e=parseInt(t.getPositionEl().getStyle("z-index"),10))}),e},getZIndex:function(t){return t=t||Ext.getDom(this.getListParent()||Ext.getBody()),(parseInt(Ext.fly(t).getStyle("z-index"),10)||this.getParentZIndex()||12e3)+5},initList:function(){var t,e,i;this.list||(t="x-combo-list",e=Ext.getDom(this.getListParent()||Ext.getBody()),this.list=new Ext.Layer({parentEl:e,shadow:this.shadow,cls:[t,this.listClass].join(" "),constrain:!1,zindex:this.getZIndex(e)}),i=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth),this.list.setSize(i,0),this.list.swallowEvent("mousewheel"),this.assetHeight=0,!1!==this.syncFont&&this.list.setStyle("font-size",this.el.getStyle("font-size")),this.title&&(this.header=this.list.createChild({cls:t+"-hd",html:this.title}),this.assetHeight+=this.header.getHeight()),this.innerList=this.list.createChild({cls:t+"-inner"}),this.mon(this.innerList,"mouseover",this.onViewOver,this),this.mon(this.innerList,"mousemove",this.onViewMove,this),this.innerList.setWidth(i-this.list.getFrameWidth("lr")),this.pageSize&&(this.footer=this.list.createChild({cls:t+"-ft"}),this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer}),this.assetHeight+=this.footer.getHeight()),this.tpl||(this.tpl='<tpl for="."><div class="'+t+'-item">{'+this.displayField+"}</div></tpl>"),this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:!0,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+t+"-item",emptyText:this.listEmptyText,deferEmptyText:!1}),this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this}),this.bindStore(this.store,!0),this.resizable&&(this.resizer=new Ext.Resizable(this.list,{pinned:!0,handles:"se"}),this.mon(this.resizer,"resize",function(t,e,i){this.maxHeight=i-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight,this.listWidth=e,this.innerList.setWidth(e-this.list.getFrameWidth("lr")),this.restrictHeight()},this),this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")))},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(t,e){this.store&&!e&&(this.store!==t&&this.store.autoDestroy?this.store.destroy():(this.store.un("beforeload",this.onBeforeLoad,this),this.store.un("load",this.onLoad,this),this.store.un("exception",this.collapse,this)),t||(this.store=null,this.view&&this.view.bindStore(null),this.pageTb&&this.pageTb.bindStore(null))),t&&(e||(this.lastQuery=null,this.pageTb&&this.pageTb.bindStore(t)),this.store=Ext.StoreMgr.lookup(t),this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse}),this.view&&this.view.bindStore(t))},reset:function(){this.clearFilterOnReset&&"local"==this.mode&&this.store.clearFilter(),Ext.form.ComboBox.superclass.reset.call(this)},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this),this.keyNav=new Ext.KeyNav(this.el,{up:function(t){this.inKeyMode=!0,this.selectPrev()},down:function(t){this.isExpanded()?(this.inKeyMode=!0,this.selectNext()):this.onTriggerClick()},enter:function(t){this.onViewClick()},esc:function(t){this.collapse()},tab:function(t){return!0===this.forceSelection?this.collapse():this.onViewClick(!1),!0},scope:this,doRelay:function(t,e,i){if("down"==i||this.scope.isExpanded()){var s=Ext.KeyNav.prototype.doRelay.apply(this,arguments);return(Ext.isIE9&&Ext.isStrict||Ext.isIE10p||!Ext.isIE)&&Ext.EventManager.useKeydown&&this.scope.fireKey(t),s}return!0},forceKeyDown:!0,defaultEventAction:"stopEvent"}),this.queryDelay=Math.max(this.queryDelay||10,"local"==this.mode?10:250),this.dqTask=new Ext.util.DelayedTask(this.initQuery,this),this.typeAhead&&(this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)),this.enableKeyEvents||this.mon(this.el,"keyup",this.onKeyUp,this)},onDestroy:function(){this.dqTask&&(this.dqTask.cancel(),this.dqTask=null),this.bindStore(null),Ext.destroy(this.resizer,this.view,this.pageTb,this.list),Ext.destroyMembers(this,"hiddenField"),Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(t){this.isExpanded()||Ext.form.ComboBox.superclass.fireKey.call(this,t)},onResize:function(t,e){Ext.form.ComboBox.superclass.onResize.apply(this,arguments),!isNaN(t)&&this.isVisible()&&this.list?this.doResize(t):this.bufferSize=t},doResize:function(t){var e;Ext.isDefined(this.listWidth)||(e=Math.max(t,this.minListWidth),this.list.setWidth(e),this.innerList.setWidth(e-this.list.getFrameWidth("lr")))},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments),this.hiddenField&&(this.hiddenField.disabled=!1)},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments),this.hiddenField&&(this.hiddenField.disabled=!0)},onBeforeLoad:function(){this.hasFocus&&(this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":""),this.restrictHeight(),this.selectedIndex=-1)},onLoad:function(){this.hasFocus&&(0<this.store.getCount()||this.listEmptyText?(this.expand(),this.restrictHeight(),this.lastQuery==this.allQuery?(this.editable&&this.el.dom.select(),!1===this.autoSelect||this.selectByValue(this.value,!0)||this.select(0,!0)):(!1!==this.autoSelect&&this.selectNext(),this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE&&this.taTask.delay(this.typeAheadDelay))):this.collapse())},onTypeAhead:function(){var t,e,i;0<this.store.getCount()&&(e=(t=this.store.getAt(0).data[this.displayField]).length,(i=this.getRawValue().length)!=e&&(this.setRawValue(t),this.selectText(i,t.length)))},assertValue:function(){var t,e=this.getRawValue();if(this.valueField&&Ext.isDefined(this.value)&&(t=this.findRecord(this.valueField,this.value)),t&&t.get(this.displayField)==e||(t=this.findRecord(this.displayField,e)),!t&&this.forceSelection)0<e.length&&e!=this.emptyText?(this.el.dom.value=Ext.value(this.lastSelectionText,""),this.applyEmptyText()):this.clearValue();else{if(t&&this.valueField){if(this.value==e)return;e=t.get(this.valueField||this.displayField)}this.setValue(e)}},onSelect:function(t,e){!1!==this.fireEvent("beforeselect",this,t,e)&&(this.setValue(t.data[this.valueField||this.displayField]),this.collapse(),this.fireEvent("select",this,t,e))},getName:function(){var t=this.hiddenField;return t&&t.name?t.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){return this.valueField?Ext.isDefined(this.value)?this.value:"":Ext.form.ComboBox.superclass.getValue.call(this)},clearValue:function(){this.hiddenField&&(this.hiddenField.value=""),this.setRawValue(""),this.lastSelectionText="",this.applyEmptyText(),this.value=""},setValue:function(t){var e,i=t;return this.valueField&&((e=this.findRecord(this.valueField,t))?i=e.data[this.displayField]:Ext.isDefined(this.valueNotFoundText)&&(i=this.valueNotFoundText)),this.lastSelectionText=i,this.hiddenField&&(this.hiddenField.value=Ext.value(t,"")),Ext.form.ComboBox.superclass.setValue.call(this,i),this.value=t,this},findRecord:function(e,i){var s;return 0<this.store.getCount()&&this.store.each(function(t){if(t.data[e]==i)return s=t,!1}),s},onViewMove:function(t,e){this.inKeyMode=!1},onViewOver:function(t,e){var i,s;this.inKeyMode||(i=this.view.findItemFromChild(e))&&(s=this.view.indexOf(i),this.select(s,!1))},onViewClick:function(t){var e=this.view.getSelectedIndexes()[0],i=this.store.getAt(e);i?this.onSelect(i,e):this.collapse(),!1!==t&&this.el.focus()},restrictHeight:function(){this.innerList.dom.style.height="";var t=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,i=Math.max(t.clientHeight,t.offsetHeight,t.scrollHeight),s=this.getPosition()[1]-Ext.getBody().getScroll().top,n=Ext.lib.Dom.getViewHeight()-s-this.getSize().height,r=Math.max(s,n,this.minHeight||0)-this.list.shadowOffset-e-5,i=Math.min(i,r,this.maxHeight);this.innerList.setHeight(i),this.list.beginUpdate(),this.list.setHeight(i+e),this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign)),this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(t,e){if(!Ext.isEmpty(t,!0)){var i=this.findRecord(this.valueField||this.displayField,t);if(i)return this.select(this.store.indexOf(i),e),!0}return!1},select:function(t,e){var i;this.selectedIndex=t,this.view.select(t),!1===e||(i=this.view.getNode(t))&&this.innerList.scrollChildIntoView(i,!1)},selectNext:function(){var t=this.store.getCount();0<t&&(-1==this.selectedIndex?this.select(0):this.selectedIndex<t-1&&this.select(this.selectedIndex+1))},selectPrev:function(){0<this.store.getCount()&&(-1==this.selectedIndex?this.select(0):0!==this.selectedIndex&&this.select(this.selectedIndex-1))},onKeyUp:function(t){var e=t.getKey();!1===this.editable||!0===this.readOnly||e!=t.BACKSPACE&&t.isSpecialKey()||(this.lastKey=e,this.dqTask.delay(this.queryDelay)),Ext.form.ComboBox.superclass.onKeyUp.call(this,t)},validateBlur:function(){return!this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this),this.collapse(),this.inKeyMode=!1},doQuery:function(t,e){var i={query:t=Ext.isEmpty(t)?"":t,forceAll:e,combo:this,cancel:!1};if(!1===this.fireEvent("beforequery",i)||i.cancel)return!1;t=i.query,(!0===(e=i.forceAll)||t.length>=this.minChars)&&(this.lastQuery!==t?(this.lastQuery=t,"local"==this.mode?(this.selectedIndex=-1,e?this.store.clearFilter():this.store.filter(this.displayField,t),this.onLoad()):(this.store.baseParams[this.queryParam]=t,this.store.load({params:this.getParams(t)}),this.expand())):(this.selectedIndex=-1,this.onLoad()))},getParams:function(t){var e={},i=this.store.paramNames;return this.pageSize&&(e[i.start]=0,e[i.limit]=this.pageSize),e},collapse:function(){this.isExpanded()&&(this.list.hide(),Ext.getDoc().un("mousewheel",this.collapseIf,this),Ext.getDoc().un("mousedown",this.collapseIf,this),this.fireEvent("collapse",this))},collapseIf:function(t){this.isDestroyed||t.within(this.wrap)||t.within(this.list)||this.collapse()},expand:function(){!this.isExpanded()&&this.hasFocus&&((this.title||this.pageSize)&&(this.assetHeight=0,this.title&&(this.assetHeight+=this.header.getHeight()),this.pageSize&&(this.assetHeight+=this.footer.getHeight())),this.bufferSize&&(this.doResize(this.bufferSize),delete this.bufferSize),this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign)),this.list.setZIndex(this.getZIndex()),this.list.show(),Ext.isGecko2&&this.innerList.setOverflow("auto"),this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf}),this.fireEvent("expand",this))},onTriggerClick:function(){this.readOnly||this.disabled||(this.isExpanded()?this.collapse():(this.onFocus({}),"all"==this.triggerAction?this.doQuery(this.allQuery,!0):this.doQuery(this.getRawValue())),this.el.focus())}}),Ext.reg("combo",Ext.form.ComboBox),Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:void 0,fieldClass:"x-form-field",checked:!1,boxLabel:"&#160;",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this),this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments),this.boxLabel||this.fieldLabel||this.el.alignTo(this.wrap,"c-c")},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this),this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(t,e){Ext.form.Checkbox.superclass.onRender.call(this,t,e),void 0!==this.inputValue&&(this.el.dom.value=this.inputValue),this.wrap=this.el.wrap({cls:"x-form-check-wrap"}),this.boxLabel&&this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel}),this.checked?this.setValue(!0):this.checked=this.el.dom.checked,Ext.isIEQuirks&&this.wrap.repaint(),this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap),Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){return this.rendered?this.el.dom.checked:this.checked},onClick:function(){this.el.dom.checked!=this.checked&&this.setValue(this.el.dom.checked)},setValue:function(t){var e=this.checked,i=this.inputValue;return this.checked=!1!==t&&(!0===t||"true"===t||"1"==t||(i?t==i:"on"==String(t).toLowerCase())),this.rendered&&(this.el.dom.checked=this.checked,this.el.dom.defaultChecked=this.checked),e!=this.checked&&(this.fireEvent("check",this,this.checked),this.handler&&this.handler.call(this.scope||this,this,this.checked)),this}}),Ext.reg("checkbox",Ext.form.Checkbox),Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:!1,allowBlank:!0,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change"),this.on("change",this.validate,this),Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(t,e){if(!this.el){var i,s={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:t,bufferResize:!1},n={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:!0,anchor:"100%"}};if(this.items[0].items){Ext.apply(s,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var r=0,o=this.items.length;r<o;r++)Ext.applyIf(this.items[r],n)}else{var a,l=[];if("string"==typeof this.columns&&(this.columns=this.items.length),!Ext.isArray(this.columns)){for(var h=[],r=0;r<this.columns;r++)h.push(100/this.columns*.01);this.columns=h}a=this.columns.length;for(r=0;r<a;r++){var d=Ext.apply({items:[]},n);d[this.columns[r]<=1?"columnWidth":"width"]=this.columns[r],this.defaults&&(d.defaults=Ext.apply(d.defaults||{},this.defaults)),l.push(d)}if(this.vertical)for(var c=Math.ceil(this.items.length/a),u=0,r=0,o=this.items.length;r<o;r++)0<r&&r%c==0&&u++,this.items[r].fieldLabel&&(this.items[r].hideLabel=!1),l[u].items.push(this.items[r]);else for(r=0,o=this.items.length;r<o;r++){var f=r%a;this.items[r].fieldLabel&&(this.items[r].hideLabel=!1),l[f].items.push(this.items[r])}Ext.apply(s,{layoutConfig:{columns:a},items:l})}this.panel=new Ext.Container(s),(this.panel.ownerCt=this).el=this.panel.getEl(),this.forId&&this.itemCls&&((i=this.el.up(this.itemCls).child("label",!0))&&i.setAttribute("htmlFor",this.forId));var p=this.panel.findBy(function(t){return t.isFormField},this);this.items=new Ext.util.MixedCollection,this.items.addAll(p)}Ext.form.CheckboxGroup.superclass.onRender.call(this,t,e)},initValue:function(){this.value&&(this.setValue.apply(this,this.buffered?this.value:[this.value]),delete this.buffered,delete this.value)},afterRender:function(){Ext.form.CheckboxGroup.superclass.afterRender.call(this),this.eachItem(function(t){t.on("check",this.fireChecked,this),t.inGroup=!0})},doLayout:function(){this.rendered&&(this.panel.forceLayout=this.ownerCt.forceLayout,this.panel.doLayout())},fireChecked:function(){var e=[];this.eachItem(function(t){t.checked&&e.push(t)}),this.fireEvent("change",this,e)},getErrors:function(){var e,t=Ext.form.CheckboxGroup.superclass.getErrors.apply(this,arguments);return this.allowBlank||(e=!0,this.eachItem(function(t){if(t.checked)return e=!1}),e&&t.push(this.blankText)),t},isDirty:function(){if(this.disabled||!this.rendered)return!1;var e=!1;return this.eachItem(function(t){if(t.isDirty())return!(e=!0)}),e},setReadOnly:function(e){this.rendered&&this.eachItem(function(t){t.setReadOnly(e)}),this.readOnly=e},onDisable:function(){this.eachItem(function(t){t.disable()})},onEnable:function(){this.eachItem(function(t){t.enable()})},onResize:function(t,e){this.panel.setSize(t,e),this.panel.doLayout()},reset:function(){this.originalValue?(this.eachItem(function(t){t.setValue&&(t.setValue(!1),t.originalValue=t.getValue())}),this.resetOriginal=!0,this.setValue(this.originalValue),delete this.resetOriginal):this.eachItem(function(t){t.reset&&t.reset()}),function(){this.clearInvalid()}.defer(50,this)},setValue:function(){return this.rendered?this.onSetValue.apply(this,arguments):(this.buffered=!0,this.value=arguments),this},onSetValue:function(t,e){var i;if(1==arguments.length)if(Ext.isArray(t))Ext.each(t,function(t,e){var i;Ext.isObject(t)&&t.setValue?(t.setValue(!0),!0===this.resetOriginal&&(t.originalValue=t.getValue())):(i=this.items.itemAt(e))&&i.setValue(t)},this);else if(Ext.isObject(t))for(var s in t){(i=this.getBox(s))&&i.setValue(t[s])}else this.setValueForItem(t);else(i=this.getBox(t))&&i.setValue(e)},beforeDestroy:function(){Ext.destroy(this.panel),this.rendered||Ext.destroy(this.items),Ext.form.CheckboxGroup.superclass.beforeDestroy.call(this)},setValueForItem:function(e){e=String(e).split(","),this.eachItem(function(t){-1<e.indexOf(t.inputValue)&&t.setValue(!0)})},getBox:function(e){var i=null;return this.eachItem(function(t){if(e==t||t.dataIndex==e||t.id==e||t.getName()==e)return i=t,!1}),i},getValue:function(){var e=[];return this.eachItem(function(t){t.checked&&e.push(t)}),e},eachItem:function(t,e){this.items&&this.items.each&&this.items.each(t,e||this)},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn}),Ext.reg("checkboxgroup",Ext.form.CheckboxGroup),Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:!0,isComposite:!0,combineErrors:!0,labelConnector:", ",initComponent:function(){for(var t,e=[],i=this.items,s=0,n=i.length;s<n;s++)t=i[s],Ext.isEmpty(t.ref)||(t.ref="../"+t.ref),e.push(t.fieldLabel),Ext.applyIf(t,this.defaults),s==n-1&&this.skipLastItemMargin||Ext.applyIf(t,{margins:this.defaultMargins});this.fieldLabel=this.fieldLabel||this.buildLabel(e),this.fieldErrors=new Ext.util.MixedCollection(!0,function(t){return t.field}),this.fieldErrors.on({scope:this,add:this.updateInvalidMark,remove:this.updateInvalidMark,replace:this.updateInvalidMark}),Ext.form.CompositeField.superclass.initComponent.apply(this,arguments),this.innerCt=new Ext.Container({layout:"hbox",items:this.items,cls:"x-form-composite",defaultMargins:"0 3 0 0",ownerCt:this}),delete this.innerCt.ownerCt;var r=this.innerCt.findBy(function(t){return t.isFormField},this);this.items=new Ext.util.MixedCollection,this.items.addAll(r)},onRender:function(t,e){var i,s;this.el||((i=this.innerCt).render(t),(this.innerCt.ownerCt=this).el=i.getEl(),this.combineErrors&&this.eachItem(function(t){Ext.apply(t,{markInvalid:this.onFieldMarkInvalid.createDelegate(this,[t],0),clearInvalid:this.onFieldClearInvalid.createDelegate(this,[t],0)})}),(s=this.el.parent().parent().child("label",!0))&&s.setAttribute("for",this.items.items[0].id)),Ext.form.CompositeField.superclass.onRender.apply(this,arguments)},onFieldMarkInvalid:function(t,e){var i=t.getName(),s={field:i,errorName:t.fieldLabel||i,error:e};this.fieldErrors.replace(i,s),t.preventMark||t.el.addClass(t.invalidClass)},onFieldClearInvalid:function(t){this.fieldErrors.removeKey(t.getName()),t.el.removeClass(t.invalidClass)},updateInvalidMark:function(){var t,e=Ext.isIE6&&Ext.isStrict;0==this.fieldErrors.length?(this.clearInvalid(),e&&this.clearInvalid.defer(50,this)):(t=this.buildCombinedErrorMessage(this.fieldErrors.items),this.sortErrors(),this.markInvalid(t),e&&this.markInvalid(t))},validateValue:function(t,e){var i=!0;return this.eachItem(function(t){t.isValid(e)||(i=!1)}),i},buildCombinedErrorMessage:function(t){for(var e,i=[],s=0,n=t.length;s<n;s++)e=t[s],i.push(String.format("{0}: {1}",e.errorName,e.error));return i.join("<br />")},sortErrors:function(){var s=this.items;this.fieldErrors.sort("ASC",function(t,e){function i(e){return function(t){return t.getName()==e}}return s.findIndexBy(i(t.field))<s.findIndexBy(i(e.field))?-1:1})},reset:function(){this.eachItem(function(t){t.reset()}),function(){this.clearInvalid()}.defer(50,this)},clearInvalidChildren:function(){this.eachItem(function(t){t.clearInvalid()})},buildLabel:function(t){return Ext.clean(t).join(this.labelConnector)},isDirty:function(){if(this.disabled||!this.rendered)return!1;var e=!1;return this.eachItem(function(t){if(t.isDirty())return!(e=!0)}),e},eachItem:function(t,e){this.items&&this.items.each&&this.items.each(t,e||this)},onResize:function(t,e,i,s){var n=this.innerCt;this.rendered&&n.rendered&&n.setSize(t,e),Ext.form.CompositeField.superclass.onResize.apply(this,arguments)},doLayout:function(t,e){var i;this.rendered&&((i=this.innerCt).forceLayout=this.ownerCt.forceLayout,i.doLayout(t,e))},beforeDestroy:function(){Ext.destroy(this.innerCt),Ext.form.CompositeField.superclass.beforeDestroy.call(this)},setReadOnly:function(e){null==e&&(e=!0),e=!!e,this.rendered&&this.eachItem(function(t){t.setReadOnly(e)}),this.readOnly=e},onShow:function(){Ext.form.CompositeField.superclass.onShow.call(this),this.doLayout()},onDisable:function(){this.eachItem(function(t){t.disable()})},onEnable:function(){this.eachItem(function(t){t.enable()})}}),Ext.reg("compositefield",Ext.form.CompositeField),Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var t=(this.el.up("form")||Ext.getBody()).child('input[name="'+this.el.dom.name+'"]:checked',!0);return t?t.value:null},setValue:function(t){var e,i;return"boolean"==typeof t?Ext.form.Radio.superclass.setValue.call(this,t):this.rendered&&(i=(e=this.getCheckEl()).child('input[name="'+this.el.dom.name+'"][value="'+t+'"]',!0))&&Ext.getCmp(i.id).setValue(!0),this.rendered&&this.checked&&(e=e||this.getCheckEl(),this.getCheckEl().select('input[name="'+this.el.dom.name+'"]').each(function(t){t.dom.id!=this.id&&Ext.getCmp(t.dom.id).setValue(!1)},this)),this},getCheckEl:function(){return this.inGroup?this.el.up(".x-form-radio-group"):this.el.up("form")||Ext.getBody()}}),Ext.reg("radio",Ext.form.Radio),Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:!0,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group",getValue:function(){var e=null;return this.eachItem(function(t){if(t.checked)return e=t,!1}),e},onSetValue:function(t,e){var i;1<arguments.length?(i=this.getBox(t))&&(i.setValue(e),i.checked&&this.eachItem(function(t){t!==i&&t.setValue(!1)})):this.setValueForItem(t)},setValueForItem:function(e){e=String(e).split(",")[0],this.eachItem(function(t){t.setValue(e==t.inputValue)})},fireChecked:function(){this.checkTask||(this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)),this.checkTask.delay(10)},bufferChecked:function(){var e=null;this.eachItem(function(t){if(t.checked)return e=t,!1}),this.fireEvent("change",this,e)},onDestroy:function(){this.checkTask&&(this.checkTask.cancel(),this.checkTask=null),Ext.form.RadioGroup.superclass.onDestroy.call(this)}}),Ext.reg("radiogroup",Ext.form.RadioGroup),Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",shouldLayout:!1,onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn}),Ext.reg("hidden",Ext.form.Hidden),Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(t,e){Ext.apply(this,e),Ext.isString(this.paramOrder)&&(this.paramOrder=this.paramOrder.split(/[\s,|]/)),this.items=new Ext.util.MixedCollection(!1,function(t){return t.getItemId()}),this.addEvents("beforeaction","actionfailed","actioncomplete"),t&&this.initEl(t),Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:void 0,paramsAsHash:!1,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:!1,initEl:function(t){this.el=Ext.get(t),this.id=this.el.id||Ext.id(),this.standardSubmit||this.el.on("submit",this.onSubmit,this),this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(t){t.stopEvent()},destroy:function(t){!0!==t&&(this.items.each(function(t){Ext.destroy(t)}),Ext.destroy(this.el)),this.items.clear(),this.purgeListeners()},isValid:function(){var e=!0;return this.items.each(function(t){t.validate()||(e=!1)}),e},isDirty:function(){var e=!1;return this.items.each(function(t){if(t.isDirty())return!(e=!0)}),e},doAction:function(t,e){return Ext.isString(t)&&(t=new Ext.form.Action.ACTION_TYPES[t](this,e)),!1!==this.fireEvent("beforeaction",this,t)&&(this.beforeAction(t),t.run.defer(100,t)),this},submit:function(t){if(t=t||{},this.standardSubmit){var e,i=!1===t.clientValidation||this.isValid();return i&&(e=this.el.dom,this.url&&Ext.isEmpty(e.action)&&(e.action=this.url),e.submit()),i}var s=String.format("{0}submit",this.api?"direct":"");return this.doAction(s,t),this},load:function(t){var e=String.format("{0}load",this.api?"direct":"");return this.doAction(e,t),this},updateRecord:function(e){var i,s;return e.beginEdit(),e.fields.each(function(t){(i=this.findField(t.name))&&(s=i.getValue(),!1!==Ext.type(s)&&s.getGroupValue?s=s.getGroupValue():i.eachItem&&(s=[],i.eachItem(function(t){s.push(t.getValue())})),e.set(t.name,s))},this),e.endEdit(),this},loadRecord:function(t){return this.setValues(t.data),this},beforeAction:function(t){this.items.each(function(t){t.isFormField&&t.syncValue&&t.syncValue()});var e=t.options;e.waitMsg&&(!0===this.waitMsgTarget?this.el.mask(e.waitMsg,"x-mask-loading"):this.waitMsgTarget?(this.waitMsgTarget=Ext.get(this.waitMsgTarget),this.waitMsgTarget.mask(e.waitMsg,"x-mask-loading")):Ext.MessageBox.wait(e.waitMsg,e.waitTitle||this.waitTitle))},afterAction:function(t,e){this.activeAction=null;var i=t.options;i.waitMsg&&(!0===this.waitMsgTarget?this.el.unmask():this.waitMsgTarget?this.waitMsgTarget.unmask():(Ext.MessageBox.updateProgress(1),Ext.MessageBox.hide())),e?(i.reset&&this.reset(),Ext.callback(i.success,i.scope,[this,t]),this.fireEvent("actioncomplete",this,t)):(Ext.callback(i.failure,i.scope,[this,t]),this.fireEvent("actionfailed",this,t))},findField:function(e){var i,s=this.items.get(e);return Ext.isObject(s)||(i=function(t){if(t.isFormField){if(t.dataIndex==e||t.id==e||t.getName()==e)return s=t,!1;if(t.isComposite)return t.items.each(i);if(t instanceof Ext.form.CheckboxGroup&&t.rendered)return t.eachItem(i)}},this.items.each(i)),s||null},markInvalid:function(t){var e,i;if(Ext.isArray(t))for(var s=0,n=t.length;s<n;s++){var r=t[s],o=this.findField(r.id);o&&o.markInvalid(r.msg)}else for(i in t)!Ext.isFunction(t[i])&&(e=this.findField(i))&&e.markInvalid(t[i]);return this},setValues:function(t){var e,i;if(Ext.isArray(t))for(var s=0,n=t.length;s<n;s++){var r=t[s],o=this.findField(r.id);o&&(o.setValue(r.value),this.trackResetOnLoad&&(o.originalValue=o.getValue()))}else for(i in t)!Ext.isFunction(t[i])&&(e=this.findField(i))&&(e.setValue(t[i]),this.trackResetOnLoad&&(e.originalValue=e.getValue()));return this},getValues:function(t){var e=Ext.lib.Ajax.serializeForm(this.el.dom);return!0===t?e:Ext.urlDecode(e)},getFieldValues:function(e){var i,s,n,r={};return this.items.each(function(t){t.disabled||!0===e&&!t.isDirty()||(i=t.getName(),s=r[i],n=t.getValue(),Ext.isDefined(s)?Ext.isArray(s)?r[i].push(n):r[i]=[s,n]:r[i]=n)}),r},clearInvalid:function(){return this.items.each(function(t){t.clearInvalid()}),this},reset:function(){return this.items.each(function(t){t.reset()}),this},add:function(){return this.items.addAll(Array.prototype.slice.call(arguments,0)),this},remove:function(t){return this.items.remove(t),this},cleanDestroyed:function(){this.items.filterBy(function(t){return!!t.isDestroyed}).each(this.remove,this)},render:function(){return this.items.each(function(t){t.isFormField&&!t.rendered&&document.getElementById(t.id)&&t.applyToMarkup(t.id)}),this},applyToFields:function(e){return this.items.each(function(t){Ext.apply(t,e)}),this},applyIfToFields:function(e){return this.items.each(function(t){Ext.applyIf(t,e)}),this},callFieldMethod:function(e,i){return i=i||[],this.items.each(function(t){Ext.isFunction(t[e])&&t[e].apply(t,i)}),this}}),Ext.BasicForm=Ext.form.BasicForm,Ext.FormPanel=Ext.extend(Ext.Panel,{minButtonWidth:75,labelAlign:"left",monitorValid:!1,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm(),Ext.FormPanel.superclass.initComponent.call(this),this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()},this.fileUpload&&(this.bodyCfg.enctype="multipart/form-data"),this.initItems(),this.addEvents("clientvalidation"),this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){var t=Ext.applyIf({listeners:{}},this.initialConfig);return new Ext.form.BasicForm(null,t)},initFields:function(){var e=this.form,i=this,s=function(t){i.isField(t)?e.add(t):t.findBy&&t!=i&&(i.applySettings(t),t.items&&t.items.each&&t.items.each(s,this))};this.items.each(s,this)},applySettings:function(t){var e=t.ownerCt;Ext.applyIf(t,{labelAlign:e.labelAlign,labelWidth:e.labelWidth,itemCls:e.itemCls})},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(t,e){this.initFields(),Ext.FormPanel.superclass.onRender.call(this,t,e),this.form.initEl(this.body)},beforeDestroy:function(){this.stopMonitoring(),this.form.destroy(!0),Ext.FormPanel.superclass.beforeDestroy.call(this)},isField:function(t){return!!(t.setValue&&t.getValue&&t.markInvalid&&t.clearInvalid)},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this),this.on({scope:this,add:this.onAddEvent,remove:this.onRemoveEvent}),this.monitorValid&&this.startMonitoring()},onAdd:function(t){Ext.FormPanel.superclass.onAdd.call(this,t),this.processAdd(t)},onAddEvent:function(t,e){t!==this&&this.processAdd(e)},processAdd:function(t){this.isField(t)?this.form.add(t):t.findBy&&(this.applySettings(t),this.form.add.apply(this.form,t.findBy(this.isField)))},onRemove:function(t){Ext.FormPanel.superclass.onRemove.call(this,t),this.processRemove(t)},onRemoveEvent:function(t,e){t!==this&&this.processRemove(e)},processRemove:function(t){this.destroying||(this.isField(t)?this.form.remove(t):t.findBy&&(Ext.each(t.findBy(this.isField),this.form.remove,this.form),this.form.cleanDestroyed()))},startMonitoring:function(){this.validTask||(this.validTask=new Ext.util.TaskRunner,this.validTask.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this}))},stopMonitoring:function(){this.validTask&&(this.validTask.stopAll(),this.validTask=null)},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this),this.form&&this.form.items.each(function(){this.disable()})},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this),this.form&&this.form.items.each(function(){this.enable()})},bindHandler:function(){var e=!0;if(this.form.items.each(function(t){if(!t.isValid(!0))return e=!1}),this.fbar)for(var t=this.fbar.items.items,i=0,s=t.length;i<s;i++){var n=t[i];!0===n.formBind&&n.disabled===e&&n.setDisabled(!e)}this.fireEvent("clientvalidation",this,e)}}),Ext.reg("form",Ext.FormPanel),Ext.form.FormPanel=Ext.FormPanel,Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",animCollapse:!1,onRender:function(t,e){var i;this.el||(this.el=document.createElement("fieldset"),this.el.id=this.id,(this.title||this.header||this.checkboxToggle)&&(this.el.appendChild(document.createElement("legend")).className=this.baseCls+"-header")),Ext.form.FieldSet.superclass.onRender.call(this,t,e),this.checkboxToggle&&(i="object"==typeof this.checkboxToggle?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"},this.checkbox=this.header.insertFirst(i),this.checkbox.dom.checked=!this.collapsed,this.mon(this.checkbox,"click",this.onCheckClick,this))},onCollapse:function(t,e){this.checkbox&&(this.checkbox.dom.checked=!1),Ext.form.FieldSet.superclass.onCollapse.call(this,t,e)},onExpand:function(t,e){this.checkbox&&(this.checkbox.dom.checked=!0),Ext.form.FieldSet.superclass.onExpand.call(this,t,e)},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}}),Ext.reg("fieldset",Ext.form.FieldSet),Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:!0,enableFontSize:!0,enableColors:!0,enableAlignments:!0,enableLists:!0,enableSourceEdit:!0,enableLinks:!0,enableFont:!0,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;",actionMode:"wrap",validationEvent:!1,deferHeight:!0,initialized:!1,activated:!1,sourceEditMode:!1,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange"),Ext.form.HtmlEditor.superclass.initComponent.call(this)},createFontOptions:function(){for(var t,e,i=[],s=this.fontFamilies,n=0,r=s.length;n<r;n++)e=(t=s[n]).toLowerCase(),i.push('<option value="',e,'" style="font-family:',t,';"',this.defaultFont==e?' selected="true">':">",t,"</option>");return i.join("")},createToolbar:function(s){var t,e=[],n=Ext.QuickTips&&Ext.QuickTips.isEnabled();function i(t,e,i){return{itemId:t,cls:"x-btn-icon",iconCls:"x-edit-"+t,enableToggle:!1!==e,scope:s,handler:i||s.relayBtnCmd,clickEvent:"mousedown",tooltip:n&&s.buttonTips[t]||void 0,overflowText:s.buttonTips[t].title||void 0,tabIndex:-1}}this.enableFont&&!Ext.isSafari2&&(t=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}}),e.push(t,"-")),this.enableFormat&&e.push(i("bold"),i("italic"),i("underline")),this.enableFontSize&&e.push("-",i("increasefontsize",!1,this.adjustFont),i("decreasefontsize",!1,this.adjustFont)),this.enableColors&&e.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:n&&s.buttonTips.forecolor||void 0,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:!0,focus:Ext.emptyFn,value:"000000",plain:!0,listeners:{scope:this,select:function(t,e){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+e:e),this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:n&&s.buttonTips.backcolor||void 0,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:!0,allowReselect:!0,listeners:{scope:this,select:function(t,e){Ext.isGecko?(this.execCmd("useCSS",!1),this.execCmd("hilitecolor",e),this.execCmd("useCSS",!0)):this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+e:e),this.deferFocus()}},clickEvent:"mousedown"})}),this.enableAlignments&&e.push("-",i("justifyleft"),i("justifycenter"),i("justifyright")),Ext.isSafari2||(this.enableLinks&&e.push("-",i("createlink",!1,this.createLink)),this.enableLists&&e.push("-",i("insertorderedlist"),i("insertunorderedlist")),this.enableSourceEdit&&e.push("-",i("sourceedit",!0,function(t){this.toggleSourceEdit(!this.sourceEditMode)})));var r=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:e});t&&(this.fontSelect=t.el,this.mon(this.fontSelect,"change",function(){var t=this.fontSelect.dom.value;this.relayCmd("fontname",t),this.deferFocus()},this)),this.mon(r.el,"click",function(t){t.preventDefault()}),this.tb=r,this.tb.doLayout()},onDisable:function(){this.wrap.mask(),Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask(),Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(t){var e;Ext.form.HtmlEditor.superclass.setReadOnly.call(this,t),this.initialized&&(Ext.isIE?this.getEditorBody().contentEditable=!t:this.setDesignMode(!t),(e=this.getEditorBody())&&(e.style.cursor=this.readOnly?"default":"text"),this.disableItems(t))},getDocMarkup:function(){var t=Ext.fly(this.iframe).getHeight()-2*this.iframePad;return String.format('<html><head><style type="text/css">body{border: 0; margin: 0; padding: {0}px; height: {1}px; cursor: text}</style></head><body></body></html>',this.iframePad,t)},getEditorBody:function(){var t=this.getDoc();return t.body||t.documentElement},getDoc:function(){return!Ext.isIE&&this.iframe.contentDocument||this.getWin().document},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(t,e){var i;Ext.form.HtmlEditor.superclass.onRender.call(this,t,e),this.el.dom.style.border="0 none",this.el.dom.setAttribute("tabIndex",-1),this.el.addClass("x-hidden"),Ext.isIE&&this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;"),this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}}),this.createToolbar(this),this.disableItems(!0),this.tb.doLayout(),this.createIFrame(),this.width||(i=this.el.getSize(),this.setSize(i.width,this.height||i.height)),this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var t=document.createElement("iframe");t.name=Ext.id(),t.frameBorder="0",t.style.overflow="auto",t.src=Ext.SSL_SECURE_URL,this.wrap.dom.appendChild(t),this.iframe=t,this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var t=this.getDoc();this.win=this.getWin(),t.open(),t.write(this.getDocMarkup()),t.close(),this.readyTask={run:function(){var t=this.getDoc();!t.body&&"complete"!=t.readyState||(Ext.TaskMgr.stop(this.readyTask),this.setDesignMode(!0),this.initEditor.defer(10,this))},interval:10,duration:1e4,scope:this},Ext.TaskMgr.start(this.readyTask)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var t=this.getDoc();if(!t)return;t.editorInitialized&&"on"==this.getDesignMode()||this.initFrame()}},setDesignMode:function(t){var e=this.getDoc();e&&(this.readOnly&&(t=!1),e.designMode=/on|true/i.test(String(t).toLowerCase())?"on":"off")},getDesignMode:function(){var t=this.getDoc();return t?String(t.designMode).toLowerCase():""},disableItems:function(e){this.fontSelect&&(this.fontSelect.dom.disabled=e),this.tb.items.each(function(t){"sourceedit"!=t.getItemId()&&t.setDisabled(e)})},onResize:function(t,e){var i,s,n;Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments),this.el&&this.iframe&&(Ext.isNumber(t)&&(i=t-this.wrap.getFrameWidth("lr"),this.el.setWidth(i),this.tb.setWidth(i),this.iframe.style.width=Math.max(i,0)+"px"),Ext.isNumber(e)&&(s=e-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight(),this.el.setHeight(s),this.iframe.style.height=Math.max(s,0)+"px",(n=this.getEditorBody())&&(n.style.height=Math.max(s-2*this.iframePad,0)+"px")))},toggleSourceEdit:function(t){var e,i;void 0===t&&(t=!this.sourceEditMode),this.sourceEditMode=!0===t;var s=this.tb.getComponent("sourceedit");s.pressed!==this.sourceEditMode&&(s.toggle(this.sourceEditMode),!s.xtbHidden)||(this.sourceEditMode?(this.previousSize=this.getSize(),e=Ext.get(this.iframe).getHeight(),this.disableItems(!0),this.syncValue(),this.iframe.className="x-hidden",this.el.removeClass("x-hidden"),this.el.dom.removeAttribute("tabIndex"),this.el.focus(),this.el.dom.style.height=e+"px"):(i=parseInt(this.el.dom.style.height,10),this.initialized&&this.disableItems(this.readOnly),this.pushValue(),this.iframe.className="",this.el.addClass("x-hidden"),this.el.dom.setAttribute("tabIndex",-1),this.deferFocus(),this.setSize(this.previousSize),delete this.previousSize,this.iframe.style.height=i+"px"),this.fireEvent("editmodechange",this,this.sourceEditMode))},createLink:function(){var t=prompt(this.createLinkText,this.defaultLinkValue);t&&"http://"!=t&&this.relayCmd("createlink",t)},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(t){return Ext.form.HtmlEditor.superclass.setValue.call(this,t),this.pushValue(),this},cleanHtml:function(t){return t=String(t),Ext.isWebKit&&(t=t.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")),t.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")&&(t=t.substring(1)),t},syncValue:function(){var t,e,i;this.initialized&&(e=(t=this.getEditorBody()).innerHTML,!Ext.isWebKit||(i=t.getAttribute("style").match(/text-align:(.*?);/i))&&i[1]&&(e='<div style="'+i[0]+'">'+e+"</div>"),e=this.cleanHtml(e),!1!==this.fireEvent("beforesync",this,e)&&(this.el.dom.value=e,this.fireEvent("sync",this,e)))},getValue:function(){return this[this.sourceEditMode?"pushValue":"syncValue"](),Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){var t;this.initialized&&(t=this.el.dom.value,!this.activated&&t.length<1&&(t=this.defaultValue),!1!==this.fireEvent("beforepush",this,t)&&(this.getEditorBody().innerHTML=t,Ext.isGecko&&(this.setDesignMode(!1),this.setDesignMode(!0)),this.fireEvent("push",this,t)))},deferFocus:function(){this.focus.defer(10,this)},focus:function(){this.win&&!this.sourceEditMode?this.win.focus():this.el.focus()},initEditor:function(){try{var t,e,i=this.getEditorBody(),s=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color");if(s["background-attachment"]="fixed",i.bgProperties="fixed",Ext.DomHelper.applyStyles(i,s),t=this.getDoc())try{Ext.EventManager.removeAll(t)}catch(t){}e=this.onEditorEvent.createDelegate(this),Ext.EventManager.on(t,{mousedown:e,dblclick:e,click:e,keyup:e,buffer:100}),Ext.isGecko&&Ext.EventManager.on(t,"keypress",this.applyCommand,this),(Ext.isIE||Ext.isWebKit||Ext.isOpera)&&Ext.EventManager.on(t,"keydown",this.fixKeys,this),t.editorInitialized=!0,this.initialized=!0,this.pushValue(),this.setReadOnly(this.readOnly),this.fireEvent("initialize",this)}catch(t){}},beforeDestroy:function(){if(this.monitorTask&&Ext.TaskMgr.stop(this.monitorTask),this.readyTask&&Ext.TaskMgr.stop(this.readyTask),this.rendered){Ext.destroy(this.tb);var t=this.getDoc();if(Ext.EventManager.removeFromSpecialCache(t),t)try{for(var e in Ext.EventManager.removeAll(t),t)delete t[e]}catch(t){}this.wrap&&(this.wrap.dom.innerHTML="",this.wrap.remove())}Ext.form.HtmlEditor.superclass.beforeDestroy.call(this)},onFirstFocus:function(){if(this.activated=!0,this.disableItems(this.readOnly),Ext.isGecko){this.win.focus();var t,e=this.win.getSelection();e.focusNode&&3==e.focusNode.nodeType||((t=e.getRangeAt(0)).selectNodeContents(this.getEditorBody()),t.collapse(!0),this.deferFocus());try{this.execCmd("useCSS",!0),this.execCmd("styleWithCSS",!1)}catch(t){}}this.fireEvent("activate",this)},adjustFont:function(t){var e="increasefontsize"==t.getItemId()?1:-1,i=this.getDoc(),s=parseInt(i.queryCommandValue("FontSize")||2,10),s=Ext.isSafari&&!Ext.isSafari2||Ext.isChrome||Ext.isAir?(s=s<=10?1+e:s<=13?2+e:s<=16?3+e:s<=18?4+e:s<=24?5+e:6+e).constrain(1,6):(Ext.isSafari&&(e*=2),Math.max(1,s+e)+(Ext.isSafari?"px":0));this.execCmd("FontSize",s)},onEditorEvent:function(t){this.updateToolbar()},updateToolbar:function(){var t,e,i;this.readOnly||(this.activated?(t=this.tb.items.map,e=this.getDoc(),!this.enableFont||Ext.isSafari2||(i=(e.queryCommandValue("FontName")||this.defaultFont).toLowerCase())!=this.fontSelect.dom.value&&(this.fontSelect.dom.value=i),this.enableFormat&&(t.bold.toggle(e.queryCommandState("bold")),t.italic.toggle(e.queryCommandState("italic")),t.underline.toggle(e.queryCommandState("underline"))),this.enableAlignments&&(t.justifyleft.toggle(e.queryCommandState("justifyleft")),t.justifycenter.toggle(e.queryCommandState("justifycenter")),t.justifyright.toggle(e.queryCommandState("justifyright"))),!Ext.isSafari2&&this.enableLists&&(t.insertorderedlist.toggle(e.queryCommandState("insertorderedlist")),t.insertunorderedlist.toggle(e.queryCommandState("insertunorderedlist"))),Ext.menu.MenuMgr.hideAll(),this.syncValue()):this.onFirstFocus())},relayBtnCmd:function(t){this.relayCmd(t.getItemId())},relayCmd:function(t,e){(function(){this.focus(),this.execCmd(t,e),this.updateToolbar()}).defer(10,this)},execCmd:function(t,e){this.getDoc().execCommand(t,!1,void 0===e?null:e),this.syncValue()},applyCommand:function(t){if(t.ctrlKey){var e,i=t.getCharCode();if(0<i){switch(i=String.fromCharCode(i)){case"b":e="bold";break;case"i":e="italic";break;case"u":e="underline"}e&&(this.win.focus(),this.execCmd(e),this.deferFocus(),t.preventDefault())}}},insertAtCursor:function(t){var e;this.activated&&(Ext.isIE?(this.win.focus(),(e=this.getDoc().selection.createRange())&&(e.pasteHTML(t),this.syncValue(),this.deferFocus())):(this.win.focus(),this.execCmd("InsertHTML",t),this.deferFocus()))},fixKeys:Ext.isIE?function(t){var e,i,s=t.getKey(),n=this.getDoc();s==t.TAB?(t.stopEvent(),(i=n.selection.createRange())&&(i.collapse(!0),i.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;"),this.deferFocus())):s==t.ENTER&&(i=n.selection.createRange())&&((e=i.parentElement())&&"li"==e.tagName.toLowerCase()||(t.stopEvent(),i.pasteHTML("<br />"),i.collapse(!1),i.select()))}:Ext.isOpera?function(t){t.getKey()==t.TAB&&(t.stopEvent(),this.win.focus(),this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"),this.deferFocus())}:Ext.isWebKit?function(t){var e=t.getKey();e==t.TAB?(t.stopEvent(),this.execCmd("InsertText","\t"),this.deferFocus()):e==t.ENTER&&(t.stopEvent(),this.execCmd("InsertHtml","<br /><br />"),this.deferFocus())}:void 0,getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}}),Ext.reg("htmleditor",Ext.form.HtmlEditor),Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:void 0,maxValue:void 0,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,mode:"local",triggerAction:"all",typeAhead:!1,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){Ext.isDefined(this.minValue)&&this.setMinValue(this.minValue,!0),Ext.isDefined(this.maxValue)&&this.setMaxValue(this.maxValue,!0),this.store||this.generateStore(!0),Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(t,e){return this.setLimit(t,!0,e),this},setMaxValue:function(t,e){return this.setLimit(t,!1,e),this},generateStore:function(t){for(var e=this.minValue||new Date(this.initDate).clearTime(),i=this.maxValue||new Date(this.initDate).clearTime().add("mi",1439),s=[];e<=i;)s.push(e.dateFormat(this.format)),e=e.add("mi",this.increment);this.bindStore(s,t)},setLimit:function(t,e,i){var s,n;Ext.isString(t)?s=this.parseDate(t):Ext.isDate(t)&&(s=t),s&&((n=new Date(this.initDate).clearTime()).setHours(s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),this[e?"minValue":"maxValue"]=n,i||this.generateStore())},getValue:function(){var t=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(t))||""},setValue:function(t){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(t)))},validateValue:Ext.form.DateField.prototype.validateValue,formatDate:Ext.form.DateField.prototype.formatDate,parseDate:function(t){if(!t||Ext.isDate(t))return t;var e=this.initDate+" ",i=this.initDateFormat+" ",s=Date.parseDate(e+t,i+this.format),n=this.altFormats;if(!s&&n){this.altFormatsArray||(this.altFormatsArray=n.split("|"));for(var r=0,o=this.altFormatsArray,a=o.length;r<a&&!s;r++)s=Date.parseDate(e+t,i+o[r])}return s}}),Ext.reg("timefield",Ext.form.TimeField),Ext.form.SliderField=Ext.extend(Ext.form.Field,{useTips:!0,tipText:null,actionMode:"wrap",initComponent:function(){var t,e=Ext.copyTo({id:this.id+"-slider"},this.initialConfig,["vertical","minValue","maxValue","decimalPrecision","keyIncrement","increment","clickToChange","animate"]);this.useTips&&(t=this.tipText?{getText:this.tipText}:{},e.plugins=[new Ext.slider.Tip(t)]),this.slider=new Ext.Slider(e),Ext.form.SliderField.superclass.initComponent.call(this)},onRender:function(t,e){this.autoCreate={id:this.id,name:this.name,type:"hidden",tag:"input"},Ext.form.SliderField.superclass.onRender.call(this,t,e),this.wrap=this.el.wrap({cls:"x-form-field-wrap"}),this.resizeEl=this.positionEl=this.wrap,this.slider.render(this.wrap)},onResize:function(t,e,i,s){Ext.form.SliderField.superclass.onResize.call(this,t,e,i,s),this.slider.setSize(t,e)},initEvents:function(){Ext.form.SliderField.superclass.initEvents.call(this),this.slider.on("change",this.onChange,this)},onChange:function(t,e){this.setValue(e,void 0,!0)},onEnable:function(){Ext.form.SliderField.superclass.onEnable.call(this),this.slider.enable()},onDisable:function(){Ext.form.SliderField.superclass.onDisable.call(this),this.slider.disable()},beforeDestroy:function(){Ext.destroy(this.slider),Ext.form.SliderField.superclass.beforeDestroy.call(this)},alignErrorIcon:function(){this.errorIcon.alignTo(this.slider.el,"tl-tr",[2,0])},setMinValue:function(t){return this.slider.setMinValue(t),this},setMaxValue:function(t){return this.slider.setMaxValue(t),this},setValue:function(t,e,i){return i||this.slider.setValue(t,e),Ext.form.SliderField.superclass.setValue.call(this,this.slider.getValue())},getValue:function(){return this.slider.getValue()}}),Ext.reg("sliderfield",Ext.form.SliderField),Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(t,e){this.el||(this.el=document.createElement("label"),this.el.id=this.getId(),this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):this.html||"",this.forId&&this.el.setAttribute("for",this.forId)),Ext.form.Label.superclass.onRender.call(this,t,e)},setText:function(t,e){var i=!1===e;return this[i?"html":"text"]=t,delete this[i?"text":"html"],this.rendered&&(this.el.dom.innerHTML=!1!==e?Ext.util.Format.htmlEncode(t):t),this}}),Ext.reg("label",Ext.form.Label),Ext.form.Action=function(t,e){this.form=t,this.options=e||{}},Ext.form.Action.CLIENT_INVALID="client",Ext.form.Action.SERVER_INVALID="server",Ext.form.Action.CONNECT_FAILURE="connect",Ext.form.Action.LOAD_FAILURE="load",Ext.form.Action.prototype={type:"default",run:function(t){},success:function(t){},handleResponse:function(t){},failure:function(t){this.response=t,this.failureType=Ext.form.Action.CONNECT_FAILURE,this.form.afterAction(this,!1)},processResponse:function(t){return!(this.response=t).responseText&&!t.responseXML||(this.result=this.handleResponse(t),this.result)},decodeResponse:function(t){try{return Ext.decode(t.responseText)}catch(t){return!1}},getUrl:function(t){var e,i=this.options.url||this.form.url||this.form.el.dom.action;return!t||(e=this.getParams())&&(i=Ext.urlAppend(i,e)),i},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var t=this.form.baseParams,e=this.options.params;return e?"object"==typeof e?e=Ext.urlEncode(Ext.applyIf(e,t)):"string"==typeof e&&t&&(e+="&"+Ext.urlEncode(t)):t&&(e=Ext.urlEncode(t)),e},createCallback:function(t){t=t||{};return{success:this.success,failure:this.failure,scope:this,timeout:1e3*t.timeout||1e3*this.form.timeout,upload:this.form.fileUpload?this.success:void 0}}},Ext.form.Action.Submit=function(t,e){Ext.form.Action.Submit.superclass.constructor.call(this,t,e)},Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var t,e,i,s=this.options,n=this.getMethod(),r="GET"==n;!1===s.clientValidation||this.form.isValid()?(!1===s.submitEmptyText&&(t=this.form.items,e=[],i=function(t){t.el.getValue()==t.emptyText&&(e.push(t),t.el.dom.value=""),t.isComposite&&t.rendered&&t.items.each(i)},t.each(i)),Ext.Ajax.request(Ext.apply(this.createCallback(s),{form:this.form.el.dom,url:this.getUrl(r),method:n,headers:s.headers,params:r?null:this.getParams(),isUpload:this.form.fileUpload})),!1===s.submitEmptyText&&Ext.each(e,function(t){t.applyEmptyText&&t.applyEmptyText()})):!1!==s.clientValidation&&(this.failureType=Ext.form.Action.CLIENT_INVALID,this.form.afterAction(this,!1))},success:function(t){var e=this.processResponse(t);!0===e||e.success?this.form.afterAction(this,!0):(e.errors&&this.form.markInvalid(e.errors),this.failureType=Ext.form.Action.SERVER_INVALID,this.form.afterAction(this,!1))},handleResponse:function(t){if(this.form.errorReader){var e=this.form.errorReader.read(t),i=[];if(e.records)for(var s=0,n=e.records.length;s<n;s++){var r=e.records[s];i[s]=r.data}return i.length<1&&(i=null),{success:e.success,errors:i}}return this.decodeResponse(t)}}),Ext.form.Action.Load=function(t,e){Ext.form.Action.Load.superclass.constructor.call(this,t,e),this.reader=this.form.reader},Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(!1),headers:this.options.headers,params:this.getParams()}))},success:function(t){var e=this.processResponse(t);if(!0===e||!e.success||!e.data)return this.failureType=Ext.form.Action.LOAD_FAILURE,void this.form.afterAction(this,!1);this.form.clearInvalid(),this.form.setValues(e.data),this.form.afterAction(this,!0)},handleResponse:function(t){if(this.form.reader){var e=this.form.reader.read(t),i=e.records&&e.records[0]?e.records[0].data:null;return{success:e.success,data:i}}return this.decodeResponse(t)}}),Ext.form.Action.DirectLoad=Ext.extend(Ext.form.Action.Load,{constructor:function(t,e){Ext.form.Action.DirectLoad.superclass.constructor.call(this,t,e)},type:"directload",run:function(){var t=this.getParams();t.push(this.success,this),this.form.api.load.apply(window,t)},getParams:function(){var t=[],e={},i=this.form.baseParams,s=this.options.params;Ext.apply(e,s,i);var n=this.form.paramOrder;if(n)for(var r=0,o=n.length;r<o;r++)t.push(e[n[r]]);else this.form.paramsAsHash&&t.push(e);return t},processResponse:function(t){return this.result=t},success:function(t,e){e.type==Ext.Direct.exceptions.SERVER&&(t={}),Ext.form.Action.DirectLoad.superclass.success.call(this,t)}}),Ext.form.Action.DirectSubmit=Ext.extend(Ext.form.Action.Submit,{constructor:function(t,e){Ext.form.Action.DirectSubmit.superclass.constructor.call(this,t,e)},type:"directsubmit",run:function(){var t=this.options;!1===t.clientValidation||this.form.isValid()?(this.success.params=this.getParams(),this.form.api.submit(this.form.el.dom,this.success,this)):!1!==t.clientValidation&&(this.failureType=Ext.form.Action.CLIENT_INVALID,this.form.afterAction(this,!1))},getParams:function(){var t={},e=this.form.baseParams,i=this.options.params;return Ext.apply(t,i,e),t},processResponse:function(t){return this.result=t},success:function(t,e){e.type==Ext.Direct.exceptions.SERVER&&(t={}),Ext.form.Action.DirectSubmit.superclass.success.call(this,t)}}),Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit,directload:Ext.form.Action.DirectLoad,directsubmit:Ext.form.Action.DirectSubmit},Ext.form.VTypes=function(){var e=/^[a-zA-Z_]+$/,i=/^[a-zA-Z0-9_]+$/,s=/^(\w+)([\-+.\'][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,}$/,n=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{email:function(t){return s.test(t)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-\+\'@]/i,url:function(t){return n.test(t)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(t){return e.test(t)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(t){return i.test(t)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}(),Ext.grid.GridPanel=Ext.extend(Ext.Panel,{autoExpandColumn:!1,autoExpandMax:1e3,autoExpandMin:50,columnLines:!1,ddText:"{0} selected row{1}",deferRowRender:!0,enableColumnHide:!0,enableColumnMove:!0,enableDragDrop:!1,enableHdMenu:!0,loadMask:!1,minColumnWidth:25,stripeRows:!1,trackMouseOver:!0,stateEvents:["columnmove","columnresize","sortchange","groupchange"],view:null,bubbleEvents:[],rendered:!1,viewReady:!1,initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this),this.columnLines&&(this.cls=(this.cls||"")+" x-grid-with-col-lines"),this.autoScroll=!1,this.autoWidth=!1,Ext.isArray(this.columns)&&(this.colModel=new Ext.grid.ColumnModel(this.columns),delete this.columns),this.ds&&(this.store=this.ds,delete this.ds),this.cm&&(this.colModel=this.cm,delete this.cm),this.sm&&(this.selModel=this.sm,delete this.sm),this.store=Ext.StoreMgr.lookup(this.store),this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","groupmousedown","rowbodymousedown","containermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","groupclick","groupdblclick","containerclick","containerdblclick","rowbodyclick","rowbodydblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","groupcontextmenu","containercontextmenu","rowbodycontextmenu","bodyscroll","columnresize","columnmove","sortchange","groupchange","reconfigure","viewready")},onRender:function(t,e){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var i=this.getGridEl();this.el.addClass("x-grid-panel"),this.mon(i,{scope:this,mousedown:this.onMouseDown,click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu}),this.relayEvents(i,["mousedown","mouseup","mouseover","mouseout","keypress","keydown"]);var s=this.getView();s.init(this),s.render(),this.getSelectionModel().init(this)},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this),this.loadMask&&(this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask)))},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this),this.mon(this.colModel,"hiddenchange",this.saveState,this,{delay:100})},applyState:function(t){var e,i,s,n=this.colModel,r=t.columns,o=this.store;if(r)for(var a=0,l=r.length;a<l;a++)e=r[a],(i=n.getColumnById(e.id))&&(s=n.getIndexById(e.id),n.setState(s,{hidden:e.hidden,width:e.width,sortable:i.sortable,editable:i.editable}),s!=a&&n.moveColumn(s,a));o&&((e=t.sort)&&o[o.remoteSort?"setDefaultSort":"sort"](e.field,e.direction),e=t.group,o.groupBy&&(e?o.groupBy(e):o.clearGrouping()));var h=Ext.apply({},t);delete h.columns,delete h.sort,Ext.grid.GridPanel.superclass.applyState.call(this,h)},getState:function(){for(var t,e,i,s={columns:[]},n=this.store,r=0;i=this.colModel.config[r];r++)s.columns[r]={id:i.id,width:i.width},i.hidden&&(s.columns[r].hidden=!0);return n&&((t=n.getSortState())&&(s.sort=t),n.getGroupState&&(e=n.getGroupState())&&(s.group=e)),s},afterRender:function(){Ext.grid.GridPanel.superclass.afterRender.call(this);var t=this.view;this.on("bodyresize",t.layout,t),t.layout(!0),this.deferRowRender?(this.deferRowRenderTask||(this.deferRowRenderTask=new Ext.util.DelayedTask(t.afterRender,this.view)),this.deferRowRenderTask.delay(10)):t.afterRender(),this.viewReady=!0},reconfigure:function(t,e){var i=this.rendered;i&&this.loadMask&&(this.loadMask.destroy(),this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},{store:t},this.initialConfig.loadMask))),this.view&&this.view.initData(t,e),this.store=t,this.colModel=e,i&&this.view.refresh(!0),this.fireEvent("reconfigure",this,t,e)},onDestroy:function(){this.deferRowRenderTask&&this.deferRowRenderTask.cancel&&this.deferRowRenderTask.cancel(),this.rendered?Ext.destroy(this.view,this.loadMask):this.store&&this.store.autoDestroy&&this.store.destroy(),Ext.destroy(this.colModel,this.selModel),this.store=this.selModel=this.colModel=this.view=this.loadMask=null,Ext.grid.GridPanel.superclass.onDestroy.call(this)},processEvent:function(t,e){this.view.processEvent(t,e)},onClick:function(t){this.processEvent("click",t)},onMouseDown:function(t){this.processEvent("mousedown",t)},onContextMenu:function(t,e){this.processEvent("contextmenu",t)},onDblClick:function(t){this.processEvent("dblclick",t)},walkCells:function(t,e,i,s,n){var r=this.colModel,o=r.getColumnCount(),a=this.store.getCount(),l=!0;if(i<0)for(e<0&&(t--,l=!1);0<=t;){for(l||(e=o-1),l=!1;0<=e;){if(!0===s.call(n||this,t,e,r))return[t,e];e--}t--}else for(o<=e&&(t++,l=!1);t<a;){for(l||(e=0),l=!1;e<o;){if(!0===s.call(n||this,t,e,r))return[t,e];e++}t++}return null},getGridEl:function(){return this.body},stopEditing:Ext.emptyFn,getSelectionModel:function(){return this.selModel||(this.selModel=new Ext.grid.RowSelectionModel(this.disableSelection?{selectRow:Ext.emptyFn}:null)),this.selModel},getStore:function(){return this.store},getColumnModel:function(){return this.colModel},getView:function(){return this.view||(this.view=new Ext.grid.GridView(this.viewConfig)),this.view},getDragDropText:function(){var t=this.selModel.getCount?this.selModel.getCount():1;return String.format(this.ddText,t,1==t?"":"s")}}),Ext.reg("grid",Ext.grid.GridPanel),Ext.grid.PivotGrid=Ext.extend(Ext.grid.GridPanel,{aggregator:"sum",renderer:void 0,initComponent:function(){Ext.grid.PivotGrid.superclass.initComponent.apply(this,arguments),this.initAxes(),this.enableColumnResize=!1,this.viewConfig=Ext.apply(this.viewConfig||{},{forceFit:!0}),this.colModel=new Ext.grid.ColumnModel({})},getAggregator:function(){return"string"==typeof this.aggregator?Ext.grid.PivotAggregatorMgr.types[this.aggregator]:this.aggregator},setAggregator:function(t){this.aggregator=t},setMeasure:function(t){this.measure=t},setLeftAxis:function(t,e){this.leftAxis=t,e&&this.view.refresh()},setTopAxis:function(t,e){this.topAxis=t,e&&this.view.refresh()},initAxes:function(){var t=Ext.grid.PivotAxis;this.leftAxis instanceof t||this.setLeftAxis(new t({orientation:"vertical",dimensions:this.leftAxis||[],store:this.store})),this.topAxis instanceof t||this.setTopAxis(new t({orientation:"horizontal",dimensions:this.topAxis||[],store:this.store}))},extractData:function(){var t,e,i,s=this.store.data.items,n=s.length,r=[];if(0==n)return[];for(var o=this.leftAxis.getTuples(),a=o.length,l=this.topAxis.getTuples(),h=l.length,d=this.getAggregator(),c=0;c<n;c++)for(t=s[c],e=0;e<a;e++)if(r[e]=r[e]||[],!0===o[e].matcher(t))for(i=0;i<h;i++)r[e][i]=r[e][i]||[],l[i].matcher(t)&&r[e][i].push(t);var u,f=r.length;for(c=0;c<f;c++)for(u=r[c].length,e=0;e<u;e++)r[c][e]=d(r[c][e],this.measure);return r},getView:function(){return this.view||(this.view=new Ext.grid.PivotGridView(this.viewConfig)),this.view}}),Ext.reg("pivotgrid",Ext.grid.PivotGrid),Ext.grid.PivotAggregatorMgr=new Ext.AbstractManager,Ext.grid.PivotAggregatorMgr.registerType("sum",function(t,e){for(var i=t.length,s=0,n=0;n<i;n++)s+=t[n].get(e);return s}),Ext.grid.PivotAggregatorMgr.registerType("avg",function(t,e){for(var i=t.length,s=0,n=0;n<i;n++)s+=t[n].get(e);return s/i||"n/a"}),Ext.grid.PivotAggregatorMgr.registerType("min",function(t,e){for(var i=[],s=t.length,n=0;n<s;n++)i.push(t[n].get(e));return Math.min.apply(this,i)||"n/a"}),Ext.grid.PivotAggregatorMgr.registerType("max",function(t,e){for(var i=[],s=t.length,n=0;n<s;n++)i.push(t[n].get(e));return Math.max.apply(this,i)||"n/a"}),Ext.grid.PivotAggregatorMgr.registerType("count",function(t,e){return t.length}),Ext.grid.GridView=Ext.extend(Ext.util.Observable,{deferEmptyText:!0,scrollOffset:void 0,autoFill:!1,forceFit:!1,sortClasses:["sort-asc","sort-desc"],sortAscText:"Sort Ascending",sortDescText:"Sort Descending",hideSortIcons:!1,columnsText:"Columns",selectedRowClass:"x-grid3-row-selected",borderWidth:2,tdClass:"x-grid3-cell",hdCls:"x-grid3-hd",markDirty:!0,cellSelectorDepth:4,rowSelectorDepth:10,rowBodySelectorDepth:10,cellSelector:"td.x-grid3-cell",rowSelector:"div.x-grid3-row",rowBodySelector:"div.x-grid3-row-body",firstRowCls:"x-grid3-row-first",lastRowCls:"x-grid3-row-last",rowClsRe:/(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,headerMenuOpenCls:"x-grid3-hd-menu-open",rowOverCls:"x-grid3-row-over",constructor:function(t){Ext.apply(this,t),this.addEvents("beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh"),Ext.grid.GridView.superclass.constructor.call(this)},masterTpl:new Ext.Template('<div class="x-grid3" hidefocus="true">','<div class="x-grid3-viewport">','<div class="x-grid3-header">','<div class="x-grid3-header-inner">','<div class="x-grid3-header-offset" style="{ostyle}">{header}</div>',"</div>",'<div class="x-clear"></div>',"</div>",'<div class="x-grid3-scroller">','<div class="x-grid3-body" style="{bstyle}">{body}</div>','<a href="#" class="x-grid3-focus" tabIndex="-1"></a>',"</div>","</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>"),headerTpl:new Ext.Template('<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<thead>",'<tr class="x-grid3-hd-row">{cells}</tr>',"</thead>","</table>"),bodyTpl:new Ext.Template("{rows}"),cellTpl:new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>','<div class="x-grid3-cell-inner x-grid3-col-{id} x-unselectable" unselectable="on" {attr}>{value}</div>',"</td>"),initTemplates:function(){var t,e,i=this.templates||{},s=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}">','<div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"","{value}",'<img alt="" class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div>","</td>"),n=['<tr class="x-grid3-row-body-tr" style="{bodyStyle}">','<td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on">','<div class="x-grid3-row-body">{body}</div>',"</td>","</tr>"].join(""),r=['<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody>","<tr>{cells}</tr>",this.enableRowBody?n:"","</tbody>","</table>"].join("");for(e in Ext.applyIf(i,{hcell:s,cell:this.cellTpl,body:this.bodyTpl,header:this.headerTpl,master:this.masterTpl,row:new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}">'+r+"</div>"),rowInner:new Ext.Template(r)}),i)(t=i[e])&&Ext.isFunction(t.compile)&&!t.compiled&&(t.disableFormats=!0,t.compile());this.templates=i,this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(t){return this._flyweight||(this._flyweight=new Ext.Element.Flyweight(document.body)),this._flyweight.dom=t,this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var t=Ext.Element,e=Ext.get(this.grid.getGridEl().dom.firstChild),i=new t(e.child("div.x-grid3-viewport")),s=new t(i.child("div.x-grid3-header")),n=new t(i.child("div.x-grid3-scroller"));this.grid.hideHeaders&&s.setDisplayed(!1),this.forceFit&&n.setStyle("overflow-x","hidden"),Ext.apply(this,{el:e,mainWrap:i,scroller:n,mainHd:s,innerHd:s.child("div.x-grid3-header-inner").dom,mainBody:new t(t.fly(n).child("div.x-grid3-body")),focusEl:new t(t.fly(n).child("a")),resizeMarker:new t(e.child("div.x-grid3-resize-marker")),resizeProxy:new t(e.child("div.x-grid3-resize-proxy"))}),this.focusEl.swallowEvent("click",!0)},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(t){return!!t&&this.fly(t).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(t,e){var i,s=this.findCell(t);return!(!s||(i=this.fly(s).hasClass(e),e&&!i))&&this.getCellIndex(s)},getCellIndex:function(t){if(t){var e=t.className.match(this.colRe);if(e&&e[1])return this.cm.getIndexById(e[1])}return!1},findHeaderCell:function(t){var e=this.findCell(t);return e&&this.fly(e).hasClass(this.hdCls)?e:null},findHeaderIndex:function(t){return this.findCellIndex(t,this.hdCls)},findRow:function(t){return!!t&&this.fly(t).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(t){var e=this.findRow(t);return!!e&&e.rowIndex},findRowBody:function(t){return!!t&&this.fly(t).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(t){return this.getRows()[t]},getCell:function(t,e){return Ext.fly(this.getRow(t)).query(this.cellSelector)[e]},getHeaderCell:function(t){return this.mainHd.dom.getElementsByTagName("td")[t]},addRowClass:function(t,e){var i=this.getRow(t);i&&this.fly(i).addClass(e)},removeRowClass:function(t,e){var i=this.getRow(t);i&&this.fly(i).removeClass(e)},removeRow:function(t){Ext.removeNode(this.getRow(t)),this.syncFocusEl(t)},removeRows:function(t,e){for(var i=this.mainBody.dom,s=t;s<=e;s++)Ext.removeNode(i.childNodes[t]);this.syncFocusEl(t)},getScrollState:function(){var t=this.scroller.dom;return{left:t.scrollLeft,top:t.scrollTop}},restoreScroll:function(t){var e=this.scroller.dom;e.scrollLeft=t.left,e.scrollTop=t.top},scrollToTop:function(){var t=this.scroller.dom;t.scrollTop=0,t.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var t=this.scroller.dom;this.grid.fireEvent("bodyscroll",t.scrollLeft,t.scrollTop)},syncHeaderScroll:function(){var t=this.innerHd,e=this.scroller.dom.scrollLeft;t.scrollLeft=e,t.scrollLeft=e},updateSortIcon:function(t,e){var i=this.sortClasses,s=i["DESC"==e?1:0];this.mainHd.select("td").removeClass(i).item(t).addClass(s)},updateAllColumnWidths:function(){for(var t,e,i,s,n=this.getTotalWidth(),r=this.cm.getColumnCount(),o=this.getRows(),a=o.length,l=[],h=0;h<r;h++)l[h]=this.getColumnWidth(h),this.getHeaderCell(h).style.width=l[h];for(this.updateHeaderWidth(),h=0;h<a;h++)if((t=o[h]).style.width=n,e=t.firstChild)for(e.style.width=n,i=e.rows[0],s=0;s<r;s++)i.childNodes[s].style.width=l[s];this.onAllColumnWidthsUpdated(l,n)},updateColumnWidth:function(t,e){var i,s,n,r=this.getColumnWidth(t),o=this.getTotalWidth(),a=this.getHeaderCell(t),l=this.getRows(),h=l.length;for(this.updateHeaderWidth(),a.style.width=r,s=0;s<h;s++)n=(i=l[s]).firstChild,i.style.width=o,n&&(n.style.width=o,n.rows[0].childNodes[t].style.width=r);this.onColumnWidthUpdated(t,r,o)},updateColumnHidden:function(t,e){var i,s,n,r=this.getTotalWidth(),o=e?"none":"",a=this.getHeaderCell(t),l=this.getRows(),h=l.length;for(this.updateHeaderWidth(),a.style.display=o,n=0;n<h;n++)(i=l[n]).style.width=r,(s=i.firstChild)&&(s.style.width=r,s.rows[0].childNodes[t].style.display=o);this.onColumnHiddenUpdated(t,e,r),delete this.lastViewWidth,this.layout()},doRender:function(t,e,i,s,n,r){for(var o,a,l,h,d,c=this.templates,u=c.cell,f=c.row,p=n-1,g=[],m=[],x={tstyle:"width:"+this.getTotalWidth()+";"},E={},v=e.length,y=0;y<v;y++){for(l=e[y],m=[],d=y+s,h=0;h<n;h++)a=t[h],E.id=a.id,E.css=0===h?"x-grid3-cell-first ":h==p?"x-grid3-cell-last ":"",E.attr=E.cellAttr="",E.style=a.style,E.value=a.renderer.call(a.scope,l.data[a.name],E,l,d,h,i),Ext.isEmpty(E.value)&&(E.value="&#160;"),this.markDirty&&l.dirty&&void 0!==l.modified[a.name]&&(E.css+=" x-grid3-dirty-cell"),m[m.length]=u.apply(E);o=[],r&&(d+1)%2==0&&(o[0]="x-grid3-row-alt"),l.dirty&&(o[1]=" x-grid3-dirty-row"),x.cols=n,this.getRowClass&&(o[2]=this.getRowClass(l,d,x,i)),x.alt=o.join(" "),x.cells=m.join(""),g[g.length]=f.apply(x)}return g.join("")},processRows:function(t,e){if(this.ds&&!(this.ds.getCount()<1)){var i,s,n=this.getRows(),r=n.length;for(e=e||!this.grid.stripeRows,t=t||0,s=0;s<r;s++)(i=n[s])&&(i.rowIndex=s,e||(i.className=i.className.replace(this.rowClsRe," "),(s+1)%2==0&&(i.className+=" x-grid3-row-alt")));0===t&&Ext.fly(n[0]).addClass(this.firstRowCls),Ext.fly(n[r-1]).addClass(this.lastRowCls)}},afterRender:function(){this.ds&&this.cm&&(this.mainBody.dom.innerHTML=this.renderBody()||"&#160;",this.processRows(0,!0),!0!==this.deferEmptyText&&this.applyEmptyText(),this.grid.fireEvent("viewready",this.grid))},afterRenderUI:function(){var t=this.grid;this.initElements(),Ext.fly(this.innerHd).on("click",this.handleHdDown,this),this.mainHd.on({scope:this,mouseover:this.handleHdOver,mouseout:this.handleHdOut,mousemove:this.handleHdMove}),this.scroller.on("scroll",this.syncScroll,this),!1!==t.enableColumnResize&&(this.splitZone=new Ext.grid.GridView.SplitDragZone(t,this.mainHd.dom)),t.enableColumnMove&&(this.columnDrag=new Ext.grid.GridView.ColumnDragZone(t,this.innerHd),this.columnDrop=new Ext.grid.HeaderDropZone(t,this.mainHd.dom)),!1!==t.enableHdMenu&&(this.hmenu=new Ext.menu.Menu({id:t.id+"-hctx"}),this.hmenu.add({itemId:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{itemId:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"}),!1!==t.enableColumnHide&&(this.colMenu=new Ext.menu.Menu({id:t.id+"-hcols-menu"}),this.colMenu.on({scope:this,beforeshow:this.beforeColMenuShow,itemclick:this.handleHdMenuClick}),this.hmenu.add({itemId:"sortSep",xtype:"menuseparator"},{itemId:"columns",hideOnClick:!1,text:this.columnsText,menu:this.colMenu,iconCls:"x-cols-icon"})),this.hmenu.on("itemclick",this.handleHdMenuClick,this)),t.trackMouseOver&&this.mainBody.on({scope:this,mouseover:this.onRowOver,mouseout:this.onRowOut}),(t.enableDragDrop||t.enableDrag)&&(this.dragZone=new Ext.grid.GridDragZone(t,{ddGroup:t.ddGroup||"GridDD"})),this.updateHeaderSortState()},renderUI:function(){var t=this.templates;return t.master.apply({body:t.body.apply({rows:"&#160;"}),header:this.renderHeaders(),ostyle:"width:"+this.getOffsetWidth()+";",bstyle:"width:"+this.getTotalWidth()+";"})},processEvent:function(t,e){var i,s,n,r=e.getTarget(),o=this.grid,a=this.findHeaderIndex(r);o.fireEvent(t,e),!1!==a?o.fireEvent("header"+t,o,a,e):!1!==(i=this.findRowIndex(r))?!1!==(s=this.findCellIndex(r))?(n=o.colModel.getColumnAt(s),!1!==o.fireEvent("cell"+t,o,i,s,e)&&(!n||n.processEvent&&!1!==n.processEvent(t,e,o,i,s))&&o.fireEvent("row"+t,o,i,e)):!1!==o.fireEvent("row"+t,o,i,e)&&this.findRowBody(r)&&o.fireEvent("rowbody"+t,o,i,e):o.fireEvent("container"+t,o,e)},layout:function(t){var e,i,s,n,r,o,a;this.mainBody&&(s=(i=(e=this.grid).getGridEl().getSize(!0)).width,n=i.height,r=this.scroller,s<20||n<20||(e.autoHeight?((o=r.dom.style).overflow="visible",Ext.isWebKit&&(o.position="static")):(this.el.setSize(s,n),a=n-this.mainHd.getHeight(),r.setSize(s,a),this.innerHd&&(this.innerHd.style.width=s+"px")),this.forceFit||!0===t&&this.autoFill?this.lastViewWidth!=s&&(this.fitColumns(!1,!1),this.lastViewWidth=s):(this.autoExpand(),this.syncHeaderScroll()),this.onLayout(s,a)))},onLayout:function(t,e){},onColumnWidthUpdated:function(t,e,i){},onAllColumnWidthsUpdated:function(t,e){},onColumnHiddenUpdated:function(t,e,i){},updateColumnText:function(t,e){},afterMove:function(t){},init:function(t){this.grid=t,this.initTemplates(),this.initData(t.store,t.colModel),this.initUI(t)},getColumnId:function(t){return this.cm.getColumnId(t)},getOffsetWidth:function(){return this.cm.getTotalWidth()+this.getScrollOffset()+"px"},getScrollOffset:function(){return Ext.num(this.scrollOffset,Ext.getScrollBarWidth())},renderHeaders:function(){for(var t,e=this.cm,i=this.templates,s=i.hcell,n={},r=e.getColumnCount(),o=r-1,a=[],l=0;l<r;l++)t=0==l?"x-grid3-cell-first ":l==o?"x-grid3-cell-last ":"",n={id:e.getColumnId(l),value:e.getColumnHeader(l)||"",style:this.getColumnStyle(l,!0),css:t,tooltip:this.getColumnTooltip(l)},"right"==e.config[l].align?n.istyle="padding-right: 16px;":delete n.istyle,a[l]=s.apply(n);return i.header.apply({cells:a.join(""),tstyle:String.format("width: {0};",this.getTotalWidth())})},getColumnTooltip:function(t){var e=this.cm.getColumnTooltip(t);return e?Ext.QuickTips.isEnabled()?'ext:qtip="'+e+'"':'title="'+e+'"':""},beforeUpdate:function(){this.grid.stopEditing(!0)},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders(),this.updateHeaderWidth(!1)},updateHeaderWidth:function(t){var e=this.innerHd.firstChild,i=this.getTotalWidth();e.style.width=this.getOffsetWidth(),e.firstChild.style.width=i,!1!==t&&(this.mainBody.dom.style.width=i)},focusRow:function(t){this.focusCell(t,0,!1)},focusCell:function(t,e,i){this.syncFocusEl(this.ensureVisible(t,e,i));var s=this.focusEl;Ext.isGecko?s.focus():s.focus.defer(1,s)},resolveCell:function(t,e,i){if(Ext.isNumber(t)||(t=t.rowIndex),!this.ds)return null;if(t<0||t>=this.ds.getCount())return null;e=void 0!==e?e:0;var s,n=this.getRow(t),r=this.cm,o=r.getColumnCount();if(!1!==i||0!==e){for(;e<o&&r.isHidden(e);)e++;s=this.getCell(t,e)}return{row:n,cell:s}},getResolvedXY:function(t){if(!t)return null;var e=t.cell,i=t.row;return e?Ext.fly(e).getXY():[this.el.getX(),Ext.fly(i).getY()]},syncFocusEl:function(t,e,i){var s=t;if(!Ext.isArray(s)){if(t=Math.min(t,Math.max(0,this.getRows().length-1)),isNaN(t))return;s=this.getResolvedXY(this.resolveCell(t,e,i))}this.focusEl.setXY(s||this.scroller.getXY())},ensureVisible:function(t,e,i){var s=this.resolveCell(t,e,i);if(!s||!s.row)return null;for(var n=s.row,r=s.cell,o=this.scroller.dom,a=n,l=0,h=this.el.dom;a&&a!=h;)l+=a.offsetTop,a=a.offsetParent;l-=this.mainHd.dom.offsetHeight,h=parseInt(o.scrollTop,10);var d,c,u,f,p=l+n.offsetHeight,g=o.clientHeight,m=h+g;return l<h?o.scrollTop=l:m<p&&(o.scrollTop=p-g),!1!==i&&(c=(d=parseInt(r.offsetLeft,10))+r.offsetWidth,f=(u=parseInt(o.scrollLeft,10))+o.clientWidth,d<u?o.scrollLeft=d:f<c&&(o.scrollLeft=c-o.clientWidth)),this.getResolvedXY(s)},insertRows:function(t,e,i,s){var n,r,o,a=t.getCount()-1;!s&&0===e&&a<=i?(this.fireEvent("beforerowsinserted",this,e,i),this.refresh(),this.fireEvent("rowsinserted",this,e,i)):(s||this.fireEvent("beforerowsinserted",this,e,i),n=this.renderRows(e,i),(r=this.getRow(e))?(0===e&&Ext.fly(this.getRow(0)).removeClass(this.firstRowCls),Ext.DomHelper.insertHtml("beforeBegin",r,n)):((o=this.getRow(a-1))&&Ext.fly(o).removeClass(this.lastRowCls),Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,n)),s?(0===e||a<=e)&&Ext.fly(this.getRow(e)).addClass(0===e?this.firstRowCls:this.lastRowCls):(this.processRows(e),this.fireEvent("rowsinserted",this,e,i))),this.syncFocusEl(e)},deleteRows:function(t,e,i){t.getRowCount()<1?this.refresh():(this.fireEvent("beforerowsdeleted",this,e,i),this.removeRows(e,i),this.processRows(e),this.fireEvent("rowsdeleted",this,e,i))},getColumnStyle:function(t,e){var i=this.cm,s=i.config,n=!e&&s[t].css||"",r=s[t].align;return n+=String.format("width: {0};",this.getColumnWidth(t)),i.isHidden(t)&&(n+="display: none; "),r&&(n+=String.format("text-align: {0};",r)),n},getColumnWidth:function(t){var e=this.cm.getColumnWidth(t),i=this.borderWidth;return Ext.isNumber(e)?Ext.isBorderBox?e+"px":Math.max(e-i,0)+"px":e},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(t,e,i){var s,n,r,o=this.grid,a=this.cm,l=a.getTotalWidth(!1),h=this.getGridInnerWidth(),d=[],c=0,u=0;if(h<20||0==h-l)return!1;var f,p,g=a.getColumnCount(!0),m=a.getColumnCount(!1),x=g-(Ext.isNumber(i)?1:0);for(0===x&&(x=1,i=void 0),r=0;r<m;r++)a.isFixed(r)||r===i||(s=a.getColumnWidth(r),d.push(r,s),a.isHidden(r)||(c=r,u+=s));for(n=(h-a.getTotalWidth())/u;d.length;)s=d.pop(),r=d.pop(),a.setColumnWidth(r,Math.max(o.minColumnWidth,Math.floor(s+s*n)),!0);return h<(l=a.getTotalWidth(!1))&&(f=x==g?c:i,p=Math.max(1,a.getColumnWidth(f)-(l-h)),a.setColumnWidth(f,p,!0)),!0!==t&&this.updateAllColumnWidths(),!0},autoExpand:function(t){var e,i,s,n,r=this.grid,o=this.cm,a=this.getGridInnerWidth(),l=o.getTotalWidth(!1),h=r.autoExpandColumn;!this.userResized&&h&&a!=l&&(e=o.getIndexById(h),s=a-l+(i=o.getColumnWidth(e)),i!=(n=Math.min(Math.max(s,r.autoExpandMin),r.autoExpandMax))&&(o.setColumnWidth(e,n,!0),!0!==t&&this.updateColumnWidth(e,n)))},getGridInnerWidth:function(){return this.grid.getGridEl().getWidth(!0)-this.getScrollOffset()},getColumnData:function(){for(var t,e=[],i=this.cm,s=i.getColumnCount(),n=this.ds.fields,r=0;r<s;r++)t=i.getDataIndex(r),e[r]={name:Ext.isDefined(t)?t:n.get(r)?n.get(r).name:void 0,renderer:i.getRenderer(r),scope:i.getRendererScope(r),id:i.getColumnId(r),style:this.getColumnStyle(r)};return e},renderRows:function(t,e){var i,s=this.grid,n=s.store,r=s.stripeRows,o=s.colModel.getColumnCount(),a=n.getCount();return a<1?"":(t=t||0,e=Ext.isDefined(e)?e:a-1,i=n.getRange(t,e),this.doRender(this.getColumnData(),i,n,t,o,r))},renderBody:function(){var t=this.renderRows()||"&#160;";return this.templates.body.apply({rows:t})},refreshRow:function(t){var e,i,s,n,r,o,a=this.ds,l=this.cm.getColumnCount(),h=this.getColumnData(),d=l-1,c=["x-grid3-row"],u={tstyle:String.format("width: {0};",this.getTotalWidth())},f=[],p=this.templates.cell;if(Ext.isNumber(t)?(e=t,t=a.getAt(e)):e=a.indexOf(t),t&&!(e<0)){for(o=0;o<l;o++)r=0==o?"x-grid3-cell-first":o==d?"x-grid3-cell-last ":"",(n={id:(s=h[o]).id,style:s.style,css:r,attr:"",cellAttr:""}).value=s.renderer.call(s.scope,t.data[s.name],n,t,e,o,a),Ext.isEmpty(n.value)&&(n.value="&#160;"),this.markDirty&&t.dirty&&void 0!==t.modified[s.name]&&(n.css+=" x-grid3-dirty-cell"),f[o]=p.apply(n);(i=this.getRow(e)).className="",this.grid.stripeRows&&(e+1)%2==0&&c.push("x-grid3-row-alt"),this.getRowClass&&(u.cols=l,c.push(this.getRowClass(t,e,u,a))),this.fly(i).addClass(c).setStyle(u.tstyle),u.cells=f.join(""),i.innerHTML=this.templates.rowInner.apply(u),this.fireEvent("rowupdated",this,e,t)}},refresh:function(t){this.fireEvent("beforerefresh",this),this.grid.stopEditing(!0);var e=this.renderBody();this.mainBody.update(e).setWidth(this.getTotalWidth()),!0===t&&(this.updateHeaders(),this.updateHeaderSortState()),this.processRows(0,!0),this.layout(),this.applyEmptyText(),this.fireEvent("refresh",this)},applyEmptyText:function(){this.emptyText&&!this.hasRows()&&this.mainBody.update('<div class="x-grid-empty">'+this.emptyText+"</div>")},updateHeaderSortState:function(){var t,e,i=this.ds.getSortState();i&&(this.sortState&&this.sortState.field==i.field&&this.sortState.direction==i.direction||this.grid.fireEvent("sortchange",this.grid,i),this.sortState=i,-1!=(t=this.cm.findColumnIndex(i.field))&&(e=i.direction,this.updateSortIcon(t,e)))},clearHeaderSortState:function(){this.sortState&&(this.grid.fireEvent("sortchange",this.grid,null),this.mainHd.select("td").removeClass(this.sortClasses),delete this.sortState)},destroy:function(){var t,e,i=this,s=i.grid,n=s.getGridEl(),r=i.dragZone,o=i.splitZone,a=i.columnDrag,l=i.columnDrop,h=i.scrollToTopTask;h&&h.cancel&&h.cancel(),Ext.destroyMembers(i,"colMenu","hmenu"),i.initData(null,null),i.purgeListeners(),Ext.fly(i.innerHd).un("click",i.handleHdDown,i),s.enableColumnMove&&(t=a.dragData,e=a.proxy,Ext.destroy(a.el,e.ghost,e.el,l.el,l.proxyTop,l.proxyBottom,t.ddel,t.header),e.anim&&Ext.destroy(e.anim),delete e.ghost,delete t.ddel,delete t.header,a.destroy(),delete Ext.dd.DDM.locationCache[a.id],delete a._domRef,delete l.proxyTop,delete l.proxyBottom,l.destroy(),delete Ext.dd.DDM.locationCache["gridHeader"+n.id],delete l._domRef,delete Ext.dd.DDM.ids[l.ddGroup]),o&&(o.destroy(),delete o._domRef,delete Ext.dd.DDM.ids["gridSplitters"+n.id]),Ext.fly(i.innerHd).removeAllListeners(),Ext.removeNode(i.innerHd),delete i.innerHd,Ext.destroy(i.el,i.mainWrap,i.mainHd,i.scroller,i.mainBody,i.focusEl,i.resizeMarker,i.resizeProxy,i.activeHdBtn,i._flyweight,r,o),delete s.container,r&&r.destroy(),Ext.dd.DDM.currentTarget=null,delete Ext.dd.DDM.locationCache[n.id],Ext.EventManager.removeResizeListener(i.onWindowResize,i)},onDenyColumnHide:function(){},render:function(){var t;this.autoFill?(t=this.grid.ownerCt)&&t.getLayout()&&t.on("afterlayout",function(){this.fitColumns(!0,!0),this.updateHeaders(),this.updateHeaderSortState()},this,{single:!0}):this.forceFit?this.fitColumns(!0,!1):this.grid.autoExpandColumn&&this.autoExpand(!0),this.grid.getGridEl().dom.innerHTML=this.renderUI(),this.afterRenderUI()},initData:function(t,e){var i,s,n=this;n.ds&&((i=n.ds).un("add",n.onAdd,n),i.un("load",n.onLoad,n),i.un("clear",n.onClear,n),i.un("remove",n.onRemove,n),i.un("update",n.onUpdate,n),i.un("datachanged",n.onDataChange,n),i!==t&&i.autoDestroy&&i.destroy()),t&&t.on({scope:n,load:n.onLoad,add:n.onAdd,remove:n.onRemove,update:n.onUpdate,clear:n.onClear,datachanged:n.onDataChange}),n.cm&&((s=n.cm).un("configchange",n.onColConfigChange,n),s.un("widthchange",n.onColWidthChange,n),s.un("headerchange",n.onHeaderChange,n),s.un("hiddenchange",n.onHiddenChange,n),s.un("columnmoved",n.onColumnMove,n)),e&&(delete n.lastViewWidth,e.on({scope:n,configchange:n.onColConfigChange,widthchange:n.onColWidthChange,headerchange:n.onHeaderChange,hiddenchange:n.onHiddenChange,columnmoved:n.onColumnMove})),n.ds=t,n.cm=e},onDataChange:function(){this.refresh(!0),this.updateHeaderSortState(),this.syncFocusEl(0)},onClear:function(){this.refresh(),this.syncFocusEl(0)},onUpdate:function(t,e){this.refreshRow(e)},onAdd:function(t,e,i){this.insertRows(t,i,i+(e.length-1))},onRemove:function(t,e,i,s){!0!==s&&this.fireEvent("beforerowremoved",this,i,e),this.removeRow(i),!0!==s&&(this.processRows(i),this.applyEmptyText(),this.fireEvent("rowremoved",this,i,e))},onLoad:function(){Ext.isGecko?(this.scrollToTopTask||(this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)),this.scrollToTopTask.delay(1)):this.scrollToTop()},onColWidthChange:function(t,e,i){this.updateColumnWidth(e,i)},onHeaderChange:function(t,e,i){this.updateHeaders()},onHiddenChange:function(t,e,i){this.updateColumnHidden(e,i)},onColumnMove:function(t,e,i){this.indexMap=null,this.refresh(!0),this.restoreScroll(this.getScrollState()),this.afterMove(i),this.grid.fireEvent("columnmove",e,i)},onColConfigChange:function(){delete this.lastViewWidth,this.indexMap=null,this.refresh(!0)},initUI:function(t){t.on("headerclick",this.onHeaderClick,this)},initEvents:Ext.emptyFn,onHeaderClick:function(t,e){!this.headersDisabled&&this.cm.isSortable(e)&&(t.stopEditing(!0),t.store.sort(this.cm.getDataIndex(e)))},onRowOver:function(t,e){var i=this.findRowIndex(e);!1!==i&&this.addRowClass(i,this.rowOverCls)},onRowOut:function(t,e){var i=this.findRowIndex(e);!1===i||t.within(this.getRow(i),!0)||this.removeRowClass(i,this.rowOverCls)},onRowSelect:function(t){this.addRowClass(t,this.selectedRowClass)},onRowDeselect:function(t){this.removeRowClass(t,this.selectedRowClass)},onCellSelect:function(t,e){var i=this.getCell(t,e);i&&this.fly(i).addClass("x-grid3-cell-selected")},onCellDeselect:function(t,e){var i=this.getCell(t,e);i&&this.fly(i).removeClass("x-grid3-cell-selected")},handleWheel:function(t){t.stopPropagation()},onColumnSplitterMoved:function(t,e){this.userResized=!0,this.grid.colModel.setColumnWidth(t,e,!0),this.forceFit?(this.fitColumns(!0,!1,t),this.updateAllColumnWidths()):(this.updateColumnWidth(t,e),this.syncHeaderScroll()),this.grid.fireEvent("columnresize",t,e)},beforeColMenuShow:function(){var t,e=this.cm,i=e.getColumnCount(),s=this.colMenu;for(s.removeAll(),t=0;t<i;t++)!1!==e.config[t].hideable&&s.add(new Ext.menu.CheckItem({text:e.getColumnHeader(t),itemId:"col-"+e.getColumnId(t),checked:!e.isHidden(t),disabled:!1===e.config[t].hideable,hideOnClick:!1}))},handleHdMenuClick:function(t){var e=this.ds,i=this.cm.getDataIndex(this.hdCtxIndex);switch(t.getItemId()){case"asc":e.sort(i,"ASC");break;case"desc":e.sort(i,"DESC");break;default:this.handleHdMenuClickDefault(t)}return!0},handleHdMenuClickDefault:function(t){var e=this.cm,i=t.getItemId(),s=e.getIndexById(i.substr(4));if(-1!=s){if(t.checked&&e.getColumnsBy(this.isHideableColumn,this).length<=1)return void this.onDenyColumnHide();e.setHidden(s,t.checked)}},handleHdDown:function(t,e){var i,s,n,r,o,a,l,h;Ext.fly(e).hasClass("x-grid3-hd-btn")&&(t.stopEvent(),i=this.cm,s=this.findHeaderCell(e),n=this.getCellIndex(s),r=i.isSortable(n),a=(o=this.hmenu).items,l=this.headerMenuOpenCls,this.hdCtxIndex=n,Ext.fly(s).addClass(l),this.hideSortIcons?(a.get("asc").setVisible(r),a.get("desc").setVisible(r),(h=a.get("sortSep"))&&h.setVisible(r)):(a.get("asc").setDisabled(!r),a.get("desc").setDisabled(!r)),o.on("hide",function(){Ext.fly(s).removeClass(l)},this,{single:!0}),o.show(e,"tl-bl?"))},handleHdMove:function(t){var e,i,s,n,r,o,a,l,h,d,c,u,f=this.findHeaderCell(this.activeHdRef);f&&!this.headersDisabled&&(e=this.splitHandleWidth||5,i=this.activeHdRegion,s=f.style,n=this.cm,r="",o=t.getPageX(),!1!==this.grid.enableColumnResize&&(a=this.activeHdIndex,l=this.getPreviousVisible(a),h=n.isResizable(a),d=l&&n.isResizable(l),c=o-i.left<=e,u=i.right-o<=(this.activeHdBtn?2:e),c&&d?r=Ext.isAir?"move":Ext.isWebKit?"e-resize":"col-resize":u&&h&&(r=Ext.isAir?"move":Ext.isWebKit?"w-resize":"col-resize")),s.cursor=r)},getPreviousVisible:function(t){for(;0<t;){if(!this.cm.isHidden(t-1))return t;t--}},handleHdOver:function(t,e){var i,s=this.findHeaderCell(e);s&&!this.headersDisabled&&(i=this.fly(s),this.activeHdRef=e,this.activeHdIndex=this.getCellIndex(s),this.activeHdRegion=i.getRegion(),this.isMenuDisabled(this.activeHdIndex,i)||(i.addClass("x-grid3-hd-over"),this.activeHdBtn=i.child(".x-grid3-hd-btn"),this.activeHdBtn&&(this.activeHdBtn.dom.style.height=s.firstChild.offsetHeight-1+"px")))},handleHdOut:function(t,e){var i=this.findHeaderCell(e);!i||Ext.isIE9m&&t.within(i,!0)||(this.activeHdRef=null,this.fly(i).removeClass("x-grid3-hd-over"),i.style.cursor="")},isMenuDisabled:function(t,e){return this.cm.isMenuDisabled(t)},hasRows:function(){var t=this.mainBody.dom.firstChild;return t&&1==t.nodeType&&"x-grid-empty"!=t.className},isHideableColumn:function(t){return!t.hidden},bind:function(t,e){this.initData(t,e)}}),Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(t,e){this.grid=t,this.view=t.getView(),this.marker=this.view.resizeMarker,this.proxy=this.view.resizeProxy,Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,e,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:!1}),this.scroll=!1,this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(t,e){this.dragHeadersDisabled=this.view.headersDisabled,this.view.headersDisabled=!0;var i=this.view.mainWrap.getHeight();this.marker.setHeight(i),this.marker.show(),this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]),this.proxy.setHeight(i);var s=this.cm.getColumnWidth(this.cellIndex),n=Math.max(s-this.grid.minColumnWidth,0);this.resetConstraints(),this.setXConstraint(n,1e3),this.setYConstraint(0,0),this.minX=t-n,this.maxX=t+1e3,this.startPos=t,Ext.dd.DDProxy.prototype.b4StartDrag.call(this,t,e)},allowHeaderDrag:function(t){return!0},handleMouseDown:function(t){var e=this.view.findHeaderCell(t.getTarget());if(e&&this.allowHeaderDrag(t)){var i=this.view.fly(e).getXY()[0],s=t.getXY()[0],n=e.offsetWidth,r=!1;if(s-i<=this.hw?r=-1:i+n-s<=this.hw&&(r=0),!1!==r){this.cm=this.grid.colModel;var o=this.view.getCellIndex(e);if(-1==r){if(o+r<0)return;for(;this.cm.isHidden(o+r);)if(o+--r<0)return}this.cellIndex=o+r,this.split=e.dom,this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)&&Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}else this.view.columnDrag&&this.view.columnDrag.callHandleMouseDown(t)}},endDrag:function(t){this.marker.hide();var e=this.view,i=Math.max(this.minX,t.getPageX())-this.startPos,s=this.dragHeadersDisabled;e.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+i),setTimeout(function(){e.headersDisabled=s},50)},autoOffset:function(){this.setDelta(0,0)}}),Ext.grid.PivotGridView=Ext.extend(Ext.grid.GridView,{colHeaderCellCls:"grid-hd-group-cell",title:"",getColumnHeaders:function(){return this.grid.topAxis.buildHeaders()},getRowHeaders:function(){return this.grid.leftAxis.buildHeaders()},renderRows:function(t,e){var i,s,n,r,o=this.grid,a=o.extractData(),l=a.length,h=this.templates,d=o.renderer,c="function"==typeof d,u=this.getCellCls,f="function"==typeof u,p=h.cell,g=h.row,m=[],x={},E="width:"+this.getGridInnerWidth()+"px;";for(e=Ext.isDefined(e)?e:l-1,n=0;n<l;n++){s=(r=a[n]).length,i=[];for(var v=0;v<s;v++)x.id=n+"-"+v,x.css=0===v?"x-grid3-cell-first ":v==s-1?"x-grid3-cell-last ":"",x.attr=x.cellAttr="",x.value=r[v],Ext.isEmpty(x.value)&&(x.value="&#160;"),c&&(x.value=d(x.value)),f&&(x.css+=u(x.value)+" "),i[i.length]=p.apply(x);m[m.length]=g.apply({tstyle:E,cols:s,cells:i.join(""),alt:""})}return m.join("")},masterTpl:new Ext.Template('<div class="x-grid3 x-pivotgrid" hidefocus="true">','<div class="x-grid3-viewport">','<div class="x-grid3-header">','<div class="x-grid3-header-title"><span>{title}</span></div>','<div class="x-grid3-header-inner">','<div class="x-grid3-header-offset" style="{ostyle}"></div>',"</div>",'<div class="x-clear"></div>',"</div>",'<div class="x-grid3-scroller">','<div class="x-grid3-row-headers"></div>','<div class="x-grid3-body" style="{bstyle}">{body}</div>','<a href="#" class="x-grid3-focus" tabIndex="-1"></a>',"</div>","</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>"),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var t=this.templates||{};t.gcell||(t.gcell=new Ext.XTemplate('<td class="x-grid3-hd x-grid3-gcell x-grid3-td-{id} ux-grid-hd-group-row-{row} '+this.colHeaderCellCls+'" style="{style}">','<div {tooltip} class="x-grid3-hd-inner x-grid3-hd-{id} x-unselectable" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"","{value}","</div>","</td>")),this.templates=t,this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments),this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers")),this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){return Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments)-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){for(var t=this.getRowHeaders(),e=t.length,i=0,s=0;s<e;s++)i+=t[s].width;return i},getTotalColumnHeaderHeight:function(){return 21*this.getColumnHeaders().length},getCellIndex:function(t){if(t){var e,i=t.className.match(this.colRe);if(i&&(e=i[1]))return parseInt(e.split("-")[1],10)}return!1},renderUI:function(){var t=this.templates,e=this.getGridInnerWidth();return t.master.apply({body:t.body.apply({rows:"&#160;"}),ostyle:"width:"+e+"px",bstyle:"width:"+e+"px"})},onLayout:function(t,e){Ext.grid.PivotGridView.superclass.onLayout.apply(this,arguments);t=this.getGridInnerWidth();this.resizeColumnHeaders(t),this.resizeAllRows(t)},refresh:function(t){this.fireEvent("beforerefresh",this),this.grid.stopEditing(!0);var e=this.renderBody();this.mainBody.update(e).setWidth(this.getGridInnerWidth()),!0===t&&(this.updateHeaders(),this.updateHeaderSortState()),this.processRows(0,!0),this.layout(),this.applyEmptyText(),this.fireEvent("refresh",this)},renderHeaders:Ext.emptyFn,fitColumns:Ext.emptyFn,resizeColumnHeaders:function(t){var e=this.grid.topAxis;e.rendered&&e.el.setWidth(t)},resizeRowHeaders:function(){var t=this.getTotalRowHeaderWidth(),e=String.format("margin-left: {0}px;",t);this.rowHeadersEl.setWidth(t),this.mainBody.applyStyles(e),Ext.fly(this.innerHd).applyStyles(e),this.headerTitleEl.setWidth(t),this.headerTitleEl.setHeight(this.getTotalColumnHeaderHeight())},resizeAllRows:function(t){for(var e=this.getRows(),i=e.length,s=0;s<i;s++)Ext.fly(e[s]).setWidth(t),Ext.fly(e[s]).child("table").setWidth(t)},updateHeaders:function(){this.renderGroupRowHeaders(),this.renderGroupColumnHeaders()},renderGroupRowHeaders:function(){var t=this.grid.leftAxis;this.resizeRowHeaders(),t.rendered=!1,t.render(this.rowHeadersEl),this.setTitle(this.title)},setTitle:function(t){this.headerTitleEl.child("span").dom.innerHTML=t},renderGroupColumnHeaders:function(){var t=this.grid.topAxis;t.rendered=!1,t.render(this.innerHd.firstChild)},isMenuDisabled:function(t,e){return!0}}),Ext.grid.PivotAxis=Ext.extend(Ext.Component,{orientation:"horizontal",defaultHeaderWidth:80,paddingWidth:7,setDimensions:function(t){this.dimensions=t},onRender:function(t,e){var i="horizontal"==this.orientation?this.renderHorizontalRows():this.renderVerticalRows();this.el=Ext.DomHelper.overwrite(t.dom,{tag:"table",cn:i},!0)},renderHorizontalRows:function(){for(var t,e,i,s,n=this.buildHeaders(),r=n.length,o=[],a=0;a<r;a++){for(t=[],i=(e=n[a].items).length,s=0;s<i;s++)t.push({tag:"td",html:e[s].header,colspan:e[s].span});o[a]={tag:"tr",cn:t}}return o},renderVerticalRows:function(){for(var t,e,i,s,n,r=this.buildHeaders(),o=r.length,a=[],l=[],h=0;h<o;h++)for(s=(e=r[h]).width||80,t=e.items.length,n=0;n<t;n++)a[(i=e.items[n]).start]=a[i.start]||[],a[i.start].push({tag:"td",html:i.header,rowspan:i.span,width:Ext.isBorderBox?s:s-this.paddingWidth});for(t=a.length,h=0;h<t;h++)l[h]={tag:"tr",cn:a[h]};return l},getTuples:function(){var t=new Ext.data.Store({});t.data=this.store.data.clone(),t.fields=this.store.fields;for(var e=[],i=this.dimensions,s=i.length,n=0;n<s;n++)e.push({field:i[n].dataIndex,direction:i[n].direction||"ASC"});t.sort(e);var r,o,a,l,h=t.data.items,d=[],c=[],s=h.length;for(n=0;n<s;n++){for(l in r="",a=(o=this.getRecordInfo(h[n])).data)r+=a[l]+"---";-1==d.indexOf(r)&&(d.push(r),c.push(o))}return t.destroy(),c},getRecordInfo:function(t){for(var e,i=this.dimensions,s=i.length,n={},r=0;r<s;r++)n[e=i[r].dataIndex]=t.get(e);var o;return{data:n,matcher:(o=n,function(t){for(var e in o)if(t.get(e)!=o[e])return!1;return!0})}},buildHeaders:function(){for(var t,e,i,s,n,r,o,a,l,h,d=this.getTuples(),c=d.length,u=this.dimensions,f=u.length,p=[],g=0;g<f;g++){for(t=u[g],i=[],h=o=r=0;h<c;h++)a=h==c-1,s=(e=d[h]).data[t.dataIndex],l=null!=n&&n!=s,0<g&&0<h&&(l=l||e.data[u[g-1].dataIndex]!=d[h-1].data[u[g-1].dataIndex]),l&&(i.push({header:n,span:r,start:o}),o+=r,r=0),a&&(i.push({header:s,span:r+1,start:o}),o+=r,r=0),n=s,r++;p.push({items:i,width:t.width||this.defaultHeaderWidth}),n=void 0}return p}}),Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(t,e,i){this.grid=t,this.view=t.getView(),this.ddGroup="gridHeader"+this.grid.getGridEl().id,Ext.grid.HeaderDragZone.superclass.constructor.call(this,e),i&&(this.setHandleElId(Ext.id(e)),this.setOuterHandleElId(Ext.id(i))),this.scroll=!1},getDragData:function(t){var e=Ext.lib.Event.getTarget(t),i=this.view.findHeaderCell(e);return!!i&&{ddel:i.firstChild,header:i}},onInitDrag:function(t){this.dragHeadersDisabled=this.view.headersDisabled,this.view.headersDisabled=!0;var e=this.dragData.ddel.cloneNode(!0);return e.id=Ext.id(),e.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px",this.proxy.update(e),!0},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var t=this.view,e=this.dragHeadersDisabled;setTimeout(function(){t.headersDisabled=e},50)}}),Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(t,e,i){this.grid=t,this.view=t.getView(),this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},!0),this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},!0),this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100),this.setStyle("visibility","hidden")},this.ddGroup="gridHeader"+this.grid.getGridEl().id,Ext.grid.HeaderDropZone.superclass.constructor.call(this,t.getGridEl().dom)},getTargetFromEvent:function(t){var e=Ext.lib.Event.getTarget(t),i=this.view.findCellIndex(e);if(!1!==i)return this.view.getHeaderCell(i)},nextVisible:function(t){var e=this.view,i=this.grid.colModel;for(t=t.nextSibling;t;){if(!i.isHidden(e.getCellIndex(t)))return t;t=t.nextSibling}return null},prevVisible:function(t){var e=this.view,i=this.grid.colModel;for(t=t.prevSibling;t;){if(!i.isHidden(e.getCellIndex(t)))return t;t=t.prevSibling}return null},positionIndicator:function(t,e,i){var s,n=Ext.lib.Event.getPageX(i),r=Ext.lib.Dom.getRegion(e.firstChild),o=r.top+this.proxyOffsets[1],a=r.right-n<=(r.right-r.left)/2?(s=r.right+this.view.borderWidth,"after"):(s=r.left,"before");return!this.grid.colModel.isFixed(this.view.getCellIndex(e))&&(s+=this.proxyOffsets[0],this.proxyTop.setLeftTop(s,o),this.proxyTop.show(),this.bottomOffset||(this.bottomOffset=this.view.mainHd.getHeight()),this.proxyBottom.setLeftTop(s,o+this.proxyTop.dom.offsetHeight+this.bottomOffset),this.proxyBottom.show(),a)},onNodeEnter:function(t,e,i,s){s.header!=t&&this.positionIndicator(s.header,t,i)},onNodeOver:function(t,e,i,s){var n=!1;return s.header!=t&&(n=this.positionIndicator(s.header,t,i)),n||(this.proxyTop.hide(),this.proxyBottom.hide()),n?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(t,e,i,s){this.proxyTop.hide(),this.proxyBottom.hide()},onNodeDrop:function(t,e,i,s){var n=s.header;if(n==t)return!1;var r=this.grid.colModel,o=Ext.lib.Event.getPageX(i),a=Ext.lib.Dom.getRegion(t.firstChild),l=a.right-o<=(a.right-a.left)/2?"after":"before",h=this.view.getCellIndex(n),d=this.view.getCellIndex(t);return"after"==l&&d++,h<d&&d--,r.moveColumn(h,d),!0}}),Ext.grid.GridView.ColumnDragZone=Ext.extend(Ext.grid.HeaderDragZone,{constructor:function(t,e){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,t,e,null),this.proxy.el.addClass("x-grid3-col-dd")},handleMouseDown:function(t){},callHandleMouseDown:function(t){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,t)}}),Ext.grid.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{fly:Ext.Element.fly,constructor:function(t,e,i){this.grid=t,this.view=t.getView(),this.proxy=this.view.resizeProxy,Ext.grid.SplitDragZone.superclass.constructor.call(this,e,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:!1}),this.setHandleElId(Ext.id(e)),this.setOuterHandleElId(Ext.id(i)),this.scroll=!1},b4StartDrag:function(t,e){this.view.headersDisabled=!0,this.proxy.setHeight(this.view.mainWrap.getHeight());var i=this.cm.getColumnWidth(this.cellIndex),s=Math.max(i-this.grid.minColumnWidth,0);this.resetConstraints(),this.setXConstraint(s,1e3),this.setYConstraint(0,0),this.minX=t-s,this.maxX=t+1e3,this.startPos=t,Ext.dd.DDProxy.prototype.b4StartDrag.call(this,t,e)},handleMouseDown:function(t){var e=Ext.EventObject.setEvent(t),i=this.fly(e.getTarget());i.hasClass("x-grid-split")&&(this.cellIndex=this.view.getCellIndex(i.dom),this.split=i.dom,this.cm=this.grid.colModel,this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)&&Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments))},endDrag:function(t){this.view.headersDisabled=!1;var e=Math.max(this.minX,Ext.lib.Event.getPageX(t))-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+e)},autoOffset:function(){this.setDelta(0,0)}}),Ext.grid.GridDragZone=function(t,e){this.view=t.getView(),Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,e),this.scroll=!1,this.grid=t,this.ddel=document.createElement("div"),this.ddel.className="x-grid-dd-wrap",this.preventDefault=!0},Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(t){var e,i,s,n,r=Ext.lib.Event.getTarget(t),o=this.view.findRowIndex(r);return!1!==o&&((e=this.grid.selModel).getSelectedCell?(i=this.view.findCellIndex(r),(s=e.getSelectedCell())&&s[0]===o&&s[1]===i||e.handleMouseDown(this.grid,o,i,t),this.grid.dragCell?(n=e.getSelectedCell(),this.grid.hasOwnProperty("ddText")||(this.grid.ddText="{0} selected cell{1}")):n=[this.grid.store.getAt(o)]):(e.isSelected(o)&&!t.hasModifier()||e.handleMouseDown(this.grid,o,t),n=e.getSelections()),{grid:this.grid,ddel:this.ddel,rowIndex:o,selections:n})},onInitDrag:function(t){this.dragData;this.ddel.innerHTML=this.grid.getDragDropText(),this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=!1},getRepairXY:function(t,e){return!1},onEndDrag:function(t,e){},onValidDrop:function(t,e,i){this.hideProxy()},beforeInvalidDrop:function(t,e){}}),Ext.grid.ColumnModel=Ext.extend(Ext.util.Observable,{defaultWidth:100,defaultSortable:!1,constructor:function(t){t.columns?(Ext.apply(this,t),this.setConfig(t.columns,!0)):this.setConfig(t,!0),this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","configchange"),Ext.grid.ColumnModel.superclass.constructor.call(this)},getColumnId:function(t){return this.config[t].id},getColumnAt:function(t){return this.config[t]},setConfig:function(t,e){var i,s,n;if(!e)for(delete this.totalWidth,i=0,s=this.config.length;i<s;i++)(n=this.config[i]).setEditor&&n.setEditor(null);for(this.defaults=Ext.apply({width:this.defaultWidth,sortable:this.defaultSortable},this.defaults),this.config=t,this.lookup={},i=0,s=t.length;i<s;i++){n=Ext.applyIf(t[i],this.defaults),Ext.isEmpty(n.id)&&(n.id=i),n.isColumn||(n=new Ext.grid.Column.types[n.xtype||"gridcolumn"](n),t[i]=n),this.lookup[n.id]=n}e||this.fireEvent("configchange",this)},getColumnById:function(t){return this.lookup[t]},getIndexById:function(t){for(var e=0,i=this.config.length;e<i;e++)if(this.config[e].id==t)return e;return-1},moveColumn:function(t,e){var i=this.config,s=i[t];i.splice(t,1),i.splice(e,0,s),this.dataMap=null,this.fireEvent("columnmoved",this,t,e)},getColumnCount:function(t){var e,i=this.config.length,s=0;if(!0!==t)return i;for(e=0;e<i;e++)this.isHidden(e)||s++;return s},getColumnsBy:function(t,e){for(var i,s=this.config,n=s.length,r=[],o=0;o<n;o++)i=s[o],!0===t.call(e||this,i,o)&&(r[r.length]=i);return r},isSortable:function(t){return!!this.config[t].sortable},isMenuDisabled:function(t){return!!this.config[t].menuDisabled},getRenderer:function(t){return this.config[t].renderer||Ext.grid.ColumnModel.defaultRenderer},getRendererScope:function(t){return this.config[t].scope},setRenderer:function(t,e){this.config[t].renderer=e},getColumnWidth:function(t){var e=this.config[t].width;return"number"!=typeof e&&(e=this.defaultWidth),e},setColumnWidth:function(t,e,i){this.config[t].width=e,this.totalWidth=null,i||this.fireEvent("widthchange",this,t,e)},getTotalWidth:function(t){if(!this.totalWidth)for(var e=this.totalWidth=0,i=this.config.length;e<i;e++)!t&&this.isHidden(e)||(this.totalWidth+=this.getColumnWidth(e));return this.totalWidth},getColumnHeader:function(t){return this.config[t].header},setColumnHeader:function(t,e){this.config[t].header=e,this.fireEvent("headerchange",this,t,e)},getColumnTooltip:function(t){return this.config[t].tooltip},setColumnTooltip:function(t,e){this.config[t].tooltip=e},getDataIndex:function(t){return this.config[t].dataIndex},setDataIndex:function(t,e){this.config[t].dataIndex=e},findColumnIndex:function(t){for(var e=this.config,i=0,s=e.length;i<s;i++)if(e[i].dataIndex==t)return i;return-1},isCellEditable:function(t,e){var i=this.config[t],s=i.editable;return!!(s||!Ext.isDefined(s)&&i.editor)},getCellEditor:function(t,e){return this.config[t].getCellEditor(e)},setEditable:function(t,e){this.config[t].editable=e},isHidden:function(t){return!!this.config[t].hidden},isFixed:function(t){return!!this.config[t].fixed},isResizable:function(t){return 0<=t&&!1!==this.config[t].resizable&&!0!==this.config[t].fixed},setHidden:function(t,e){var i=this.config[t];i.hidden!==e&&(i.hidden=e,this.totalWidth=null,this.fireEvent("hiddenchange",this,t,e))},setEditor:function(t,e){this.config[t].setEditor(e)},destroy:function(){for(var t=this.config.length,e=0;e<t;e++)this.config[e].destroy();delete this.config,delete this.lookup,this.purgeListeners()},setState:function(t,e){e=Ext.applyIf(e,this.defaults),Ext.apply(this.config[t],e)}}),Ext.grid.ColumnModel.defaultRenderer=function(t){return"string"==typeof t&&t.length<1?"&#160;":t},Ext.grid.AbstractSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(){this.locked=!1,Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)},init:function(t){this.grid=t,this.lockOnInit&&(delete this.lockOnInit,this.locked=!1,this.lock()),this.initEvents()},lock:function(){var t;this.locked||(this.locked=!0,(t=this.grid)?t.getView().on({scope:this,beforerefresh:this.sortUnLock,refresh:this.sortLock}):this.lockOnInit=!0)},sortLock:function(){this.locked=!0},sortUnLock:function(){this.locked=!1},unlock:function(){var t,e;this.locked&&(this.locked=!1,(t=this.grid)?((e=t.getView()).un("beforerefresh",this.sortUnLock,this),e.un("refresh",this.sortLock,this)):delete this.lockOnInit)},isLocked:function(){return this.locked},destroy:function(){this.unlock(),this.purgeListeners()}}),Ext.grid.RowSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{singleSelect:!1,constructor:function(t){Ext.apply(this,t),this.selections=new Ext.util.MixedCollection(!1,function(t){return t.id}),this.last=!1,this.lastActive=!1,this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect"),Ext.grid.RowSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.enableDragDrop||this.grid.enableDrag||this.grid.on("rowmousedown",this.handleMouseDown,this),this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{up:this.onKeyPress,down:this.onKeyPress,scope:this}),this.grid.getView().on({scope:this,refresh:this.onRefresh,rowupdated:this.onRowUpdated,rowremoved:this.onRemove})},onKeyPress:function(t,e){var i,s="up"==e,n=s?"selectPrevious":"selectNext",r=s?-1:1;!t.shiftKey||this.singleSelect?this[n](!1):!1!==this.last&&!1!==this.lastActive?(i=this.last,this.selectRange(this.last,this.lastActive+r),this.grid.getView().focusRow(this.lastActive),!1!==i&&(this.last=i)):this.selectFirstRow()},onRefresh:function(){var t,e,i=this.grid.store,s=this.getSelections(),n=0,r=s.length;for(this.silent=!0,this.clearSelections(!0);n<r;n++)e=s[n],-1!=(t=i.indexOfId(e.id))&&this.selectRow(t,!0);s.length!=this.selections.getCount()&&this.fireEvent("selectionchange",this),this.silent=!1},onRemove:function(t,e,i){!1!==this.selections.remove(i)&&this.fireEvent("selectionchange",this)},onRowUpdated:function(t,e,i){this.isSelected(i)&&t.onRowSelect(e)},selectRecords:function(t,e){e||this.clearSelections();for(var i=this.grid.store,s=0,n=t.length;s<n;s++)this.selectRow(i.indexOf(t[s]),!0)},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(t){this.selectRow(this.grid.store.getCount()-1,t)},selectNext:function(t){return!!this.hasNext()&&(this.selectRow(this.last+1,t),this.grid.getView().focusRow(this.last),!0)},selectPrevious:function(t){return!!this.hasPrevious()&&(this.selectRow(this.last-1,t),this.grid.getView().focusRow(this.last),!0)},hasNext:function(){return!1!==this.last&&this.last+1<this.grid.store.getCount()},hasPrevious:function(){return!!this.last},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},each:function(t,e){for(var i=this.getSelections(),s=0,n=i.length;s<n;s++)if(!1===t.call(e||this,i[s],s))return!1;return!0},clearSelections:function(t){var e,i;this.isLocked()||(!0!==t?(e=this.grid.store,(i=this.selections).each(function(t){this.deselectRow(e.indexOfId(t.id))},this),i.clear()):this.selections.clear(),this.last=!1)},selectAll:function(){if(!this.isLocked()){this.selections.clear();for(var t=0,e=this.grid.store.getCount();t<e;t++)this.selectRow(t,!0)}},hasSelection:function(){return 0<this.selections.length},isSelected:function(t){var e=Ext.isNumber(t)?this.grid.store.getAt(t):t;return!(!e||!this.selections.key(e.id))},isIdSelected:function(t){return!!this.selections.key(t)},handleMouseDown:function(t,e,i){var s,n,r;0!==i.button||this.isLocked()||(s=this.grid.getView(),i.shiftKey&&!this.singleSelect&&!1!==this.last?(n=this.last,this.selectRange(n,e,i.ctrlKey),this.last=n,s.focusRow(e)):(r=this.isSelected(e),i.ctrlKey&&r?this.deselectRow(e):(!r||1<this.getCount())&&(this.selectRow(e,i.ctrlKey||i.shiftKey),s.focusRow(e))))},selectRows:function(t,e){e||this.clearSelections();for(var i=0,s=t.length;i<s;i++)this.selectRow(t[i],!0)},selectRange:function(t,e,i){var s;if(!this.isLocked())if(i||this.clearSelections(),t<=e)for(s=t;s<=e;s++)this.selectRow(s,!0);else for(s=t;e<=s;s--)this.selectRow(s,!0)},deselectRange:function(t,e,i){if(!this.isLocked())for(var s=t;s<=e;s++)this.deselectRow(s,i)},selectRow:function(t,e,i){var s;this.isLocked()||t<0||t>=this.grid.store.getCount()||e&&this.isSelected(t)||(s=this.grid.store.getAt(t))&&!1!==this.fireEvent("beforerowselect",this,t,e,s)&&(e&&!this.singleSelect||this.clearSelections(),this.selections.add(s),this.last=this.lastActive=t,i||this.grid.getView().onRowSelect(t),this.silent||(this.fireEvent("rowselect",this,t,s),this.fireEvent("selectionchange",this)))},deselectRow:function(t,e){var i;this.isLocked()||(this.last==t&&(this.last=!1),this.lastActive==t&&(this.lastActive=!1),(i=this.grid.store.getAt(t))&&(this.selections.remove(i),e||this.grid.getView().onRowDeselect(t),this.fireEvent("rowdeselect",this,t,i),this.fireEvent("selectionchange",this)))},acceptsNav:function(t,e,i){return!i.isHidden(e)&&i.isCellEditable(e,t)},onEditorKey:function(t,e){var i,s,n,r,o=e.getKey(),a=this.grid,l=a.lastEdit,h=a.activeEditor,d=e.shiftKey;o==e.TAB?(e.stopEvent(),h.completeEdit(),i=d?a.walkCells(h.row,h.col-1,-1,this.acceptsNav,this):a.walkCells(h.row,h.col+1,1,this.acceptsNav,this)):o==e.ENTER&&!1!==this.moveEditorOnEnter&&(i=d?a.walkCells(l.row-1,l.col,-1,this.acceptsNav,this):a.walkCells(l.row+1,l.col,1,this.acceptsNav,this)),i&&(n=i[0],r=i[1],this.onEditorSelect(n,l.row),a.isEditor&&a.editing&&(s=a.activeEditor)&&s.field.triggerBlur&&s.field.triggerBlur(),a.startEditing(n,r))},onEditorSelect:function(t,e){e!=t&&this.selectRow(t)},destroy:function(){Ext.destroy(this.rowNav),this.rowNav=null,Ext.grid.RowSelectionModel.superclass.destroy.call(this)}}),Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:!0,constructor:function(t){Ext.apply(this,t),Ext.isString(this.renderer)?this.renderer=Ext.util.Format[this.renderer]:Ext.isObject(this.renderer)&&(this.scope=this.renderer.scope,this.renderer=this.renderer.fn),this.scope||(this.scope=this);var e=this.editor;delete this.editor,this.setEditor(e),this.addEvents("click","contextmenu","dblclick","mousedown"),Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(t,e,i,s,n){return this.fireEvent(t,this,i,s,e)},destroy:function(){this.setEditor&&this.setEditor(null),this.purgeListeners()},renderer:function(t){return t},getEditor:function(t){return!1!==this.editable?this.editor:null},setEditor:function(t){var e=this.editor;e&&(e.gridEditor?(e.gridEditor.destroy(),delete e.gridEditor):e.destroy()),this.editor=null,t&&(t.isXType||(t=Ext.create(t,"textfield")),this.editor=t)},getCellEditor:function(t){var e=this.getEditor(t);return e&&(e.startEdit||(e.gridEditor||(e.gridEditor=new Ext.grid.GridEditor(e)),e=e.gridEditor)),e}}),Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(t){Ext.grid.BooleanColumn.superclass.constructor.call(this,t);var e=this.trueText,i=this.falseText,s=this.undefinedText;this.renderer=function(t){return void 0===t?s:t&&"false"!==t?e:i}}}),Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(t){Ext.grid.NumberColumn.superclass.constructor.call(this,t),this.renderer=Ext.util.Format.numberRenderer(this.format)}}),Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(t){Ext.grid.DateColumn.superclass.constructor.call(this,t),this.renderer=Ext.util.Format.dateRenderer(this.format)}}),Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(t){Ext.grid.TemplateColumn.superclass.constructor.call(this,t);var s=!Ext.isPrimitive(this.tpl)&&this.tpl.compile?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(t,e,i){return s.apply(i.data)},this.tpl=s}}),Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:"&#160;",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(i){var s,n,r=this,o=i.items||(r.items=[r]),a=o.length;Ext.grid.ActionColumn.superclass.constructor.call(r,i),r.renderer=function(t,e){for(t=Ext.isFunction(i.renderer)&&i.renderer.apply(this,arguments)||"",e.css+=" x-action-col-cell",s=0;s<a;s++)t+='<img alt="'+((n=o[s]).altText||r.altText)+'" src="'+(n.icon||Ext.BLANK_IMAGE_URL)+'" class="x-action-col-icon x-action-col-'+String(s)+" "+(n.iconCls||"")+" "+(Ext.isFunction(n.getClass)?n.getClass.apply(n.scope||this.scope||this,arguments):"")+'"'+(n.tooltip?' ext:qtip="'+n.tooltip+'"':"")+" />";return t}},destroy:function(){return delete this.items,delete this.renderer,Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(t,e,i,s,n){var r,o,a=e.getTarget().className.match(this.actionIdRe);if(a&&(r=this.items[parseInt(a[1],10)]))if("click"==t)(o=r.handler||this.handler)&&o.call(r.scope||this.scope||this,i,s,n,r,e);else if("mousedown"==t&&!1!==r.stopSelection)return!1;return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}}),Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn},Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:!1,constructor:function(t){Ext.apply(this,t),this.rowspan&&(this.renderer=this.renderer.createDelegate(this))},fixed:!0,hideable:!1,menuDisabled:!0,dataIndex:"",id:"numberer",rowspan:void 0,renderer:function(t,e,i,s){return this.rowspan&&(e.cellAttr='rowspan="'+this.rowspan+'"'),s+1}}),Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'<div class="x-grid3-hd-checker">&#160;</div>',width:20,sortable:!1,menuDisabled:!0,fixed:!0,hideable:!1,dataIndex:"",id:"checker",isColumn:!0,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments),this.checkOnly&&(this.handleMouseDown=Ext.emptyFn)},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this),this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(t,e,i,s,n){return"mousedown"==t?(this.onMouseDown(e,e.getTarget()),!1):Ext.grid.Column.prototype.processEvent.apply(this,arguments)},onMouseDown:function(t,e){var i,s;0===t.button&&"x-grid3-row-checker"==e.className&&(t.stopEvent(),(i=t.getTarget(".x-grid3-row"))&&(s=i.rowIndex,this.isSelected(s)?this.deselectRow(s):(this.selectRow(s,!0),this.grid.getView().focusRow(s))))},onHdMouseDown:function(t,e){var i;"x-grid3-hd-checker"==e.className&&(t.stopEvent(),(i=Ext.fly(e.parentNode)).hasClass("x-grid3-hd-checker-on")?(i.removeClass("x-grid3-hd-checker-on"),this.clearSelections()):(i.addClass("x-grid3-hd-checker-on"),this.selectAll()))},renderer:function(t,e,i){return'<div class="x-grid3-row-checker">&#160;</div>'},onEditorSelect:function(t,e){e==t||this.checkOnly||this.selectRow(t)}}),Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(t){Ext.apply(this,t),this.selection=null,this.addEvents("beforecellselect","cellselect","selectionchange"),Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this),this.grid.on(Ext.EventManager.getKeyEvent(),this.handleKeyDown,this),this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections}),this.grid.isEditor&&this.grid.on("beforeedit",this.beforeEdit,this)},beforeEdit:function(t){this.select(t.row,t.column,!1,!0,t.record)},onRowUpdated:function(t,e,i){this.selection&&this.selection.record==i&&t.onCellSelect(e,this.selection.cell[1])},onViewChange:function(){this.clearSelections(!0)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(t){var e=this.selection;e&&(!0!==t&&this.grid.view.onCellDeselect(e.cell[0],e.cell[1]),this.selection=null,this.fireEvent("selectionchange",this,null))},hasSelection:function(){return!!this.selection},handleMouseDown:function(t,e,i,s){0!==s.button||this.isLocked()||this.select(e,i)},select:function(t,e,i,s,n){var r;!1!==this.fireEvent("beforecellselect",this,t,e)&&(this.clearSelections(),n=n||this.grid.store.getAt(t),this.selection={record:n,cell:[t,e]},i||((r=this.grid.getView()).onCellSelect(t,e),!0!==s&&r.focusCell(t,e)),this.fireEvent("cellselect",this,t,e),this.fireEvent("selectionchange",this,this.selection))},isSelectable:function(t,e,i){return!i.isHidden(e)},onEditorKey:function(t,e){e.getKey()==e.TAB&&this.handleKeyDown(e)},handleKeyDown:function(t){if(t.isNavKeyPress()){function e(t,e,i){return l.walkCells(t,e,i,l.isEditor&&l.editing?d.acceptsNav:d.isSelectable,d)}var i,s,n,r,o,a=t.getKey(),l=this.grid,h=this.selection,d=this;switch(a){case t.ESC:case t.PAGE_UP:case t.PAGE_DOWN:break;default:t.stopEvent()}if(h){switch(n=(i=h.cell)[0],r=i[1],a){case t.TAB:s=t.shiftKey?e(n,r-1,-1):e(n,r+1,1);break;case t.DOWN:s=e(n+1,r,1);break;case t.UP:s=e(n-1,r,-1);break;case t.RIGHT:s=e(n,r+1,1);break;case t.LEFT:s=e(n,r-1,-1);break;case t.ENTER:if(l.isEditor&&!l.editing)return void l.startEditing(n,r)}s&&(n=s[0],r=s[1],this.select(n,r),l.isEditor&&l.editing&&((o=l.activeEditor)&&o.field.triggerBlur&&o.field.triggerBlur(),l.startEditing(n,r)))}else(i=e(0,0,1))&&this.select(i[0],i[1])}},acceptsNav:function(t,e,i){return!i.isHidden(e)&&i.isCellEditable(e,t)}}),Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:!1,isEditor:!0,detectEdit:!1,autoEncode:!1,trackMouseOver:!1,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this),this.selModel||(this.selModel=new Ext.grid.CellSelectionModel),this.activeEditor=null,this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){var t;Ext.grid.EditorGridPanel.superclass.initEvents.call(this),this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[!0]),this),this.on("columnresize",this.stopEditing,this,[!0]),1==this.clicksToEdit?this.on("cellclick",this.onCellDblClick,this):(t=this.getView(),"auto"==this.clicksToEdit&&t.mainBody&&t.mainBody.on("mousedown",this.onAutoEditClick,this),this.on("celldblclick",this.onCellDblClick,this))},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var t=this.activeEditor;this.editing&&t&&t.realign(!0)},onCellDblClick:function(t,e,i){this.startEditing(e,i)},onAutoEditClick:function(t,e){var i,s,n;0===t.button&&(i=this.view.findRowIndex(e),s=this.view.findCellIndex(e),!1!==i&&!1!==s&&(this.stopEditing(),this.selModel.getSelectedCell?(n=this.selModel.getSelectedCell())&&n[0]===i&&n[1]===s&&this.startEditing(i,s):this.selModel.isSelected(i)&&this.startEditing(i,s)))},onEditComplete:function(t,e,i){this.editing=!1,this.lastActiveEditor=this.activeEditor,this.activeEditor=null;var s,n=t.record,r=this.colModel.getDataIndex(t.col);e=this.postEditValue(e,i,n,r),!0!==this.forceValidation&&String(e)===String(i)||(!(s={grid:this,record:n,field:r,originalValue:i,value:e,row:t.row,column:t.col,cancel:!1})===this.fireEvent("validateedit",s)||s.cancel||String(e)===String(i)||(n.set(r,s.value),delete s.cancel,this.fireEvent("afteredit",s))),this.view.focusCell(t.row,t.col)},startEditing:function(t,e){if(this.stopEditing(),this.colModel.isCellEditable(e,t)){this.view.ensureVisible(t,e,!0);var i=this.store.getAt(t),s=this.colModel.getDataIndex(e),n={grid:this,record:i,field:s,value:i.data[s],row:t,column:e,cancel:!1};if(!1!==this.fireEvent("beforeedit",n)&&!n.cancel){this.editing=!0;var r=this.colModel.getCellEditor(e,t);if(!r)return;r.rendered||(r.parentEl=this.view.getEditorParent(r),r.on({scope:this,render:{fn:function(t){t.field.focus(!1,!0)},single:!0,scope:this},specialkey:function(t,e){this.getSelectionModel().onEditorKey(t,e)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[!0])})),Ext.apply(r,{row:t,col:e,record:i}),this.lastEdit={row:t,col:e},(this.activeEditor=r).field.isXType("checkbox")&&(r.allowBlur=!1,this.setupCheckbox(r.field)),r.selectSameEditor=this.activeEditor==this.lastActiveEditor;var o=this.preEditValue(i,s);r.startEdit(this.view.getCell(t,e).firstChild,Ext.isDefined(o)?o:""),function(){delete r.selectSameEditor}.defer(50)}}},setupCheckbox:function(t){function e(){t.el.on("click",i.onCheckClick,i,{single:!0})}var i=this;t.rendered?e():t.on("render",e,null,{single:!0})},onCheckClick:function(){var t=this.activeEditor;t.allowBlur=!0,t.field.focus(!1,10)},preEditValue:function(t,e){var i=t.data[e];return this.autoEncode&&Ext.isString(i)?Ext.util.Format.htmlDecode(i):i},postEditValue:function(t,e,i,s){return this.autoEncode&&Ext.isString(t)?Ext.util.Format.htmlEncode(t):t},stopEditing:function(t){var e;this.editing&&((e=this.lastActiveEditor=this.activeEditor)&&(e[!0===t?"cancelEdit":"completeEdit"](),this.view.focusCell(e.row,e.col)),this.activeEditor=null),this.editing=!1}}),Ext.reg("editorgrid",Ext.grid.EditorGridPanel),Ext.grid.GridEditor=function(t,e){Ext.grid.GridEditor.superclass.constructor.call(this,t,e),t.monitorTab=!1},Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:!1,cls:"x-small-editor x-grid-editor",shim:!1,shadow:!1}),Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]),Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(t,e){this.grid=t,this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord}),this.store.on("update",this.onUpdate,this),e&&this.setSource(e),Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(t){this.source=t,this.store.removeAll();var e=[];for(var i in t)this.isEditableValue(t[i])&&e.push(new Ext.grid.PropertyRecord({name:i,value:t[i]},i));this.store.loadRecords({records:e},{},!0)},onUpdate:function(t,e,i){var s,n;i==Ext.data.Record.EDIT&&(s=e.data.value,n=e.modified.value,!1!==this.grid.fireEvent("beforepropertychange",this.source,e.id,s,n)?(this.source[e.id]=s,e.commit(),this.grid.fireEvent("propertychange",this.source,e.id,s,n)):e.reject())},getProperty:function(t){return this.store.getAt(t)},isEditableValue:function(t){return Ext.isPrimitive(t)||Ext.isDate(t)},setValue:function(t,e,i){var s=this.getRec(t);s?(s.set("value",e),this.source[t]=e):i&&(this.source[t]=e,s=new Ext.grid.PropertyRecord({name:t,value:e},t),this.store.add(s))},remove:function(t){var e=this.getRec(t);e&&(this.store.remove(e),delete this.source[t])},getRec:function(t){return this.store.getById(t)},getSource:function(){return this.source}}),Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(t,e){var i=Ext.grid,s=Ext.form;this.grid=t,i.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:!0,dataIndex:"name",id:"name",menuDisabled:!0},{header:this.valueText,width:50,resizable:!1,dataIndex:"value",id:"value",menuDisabled:!0}]),this.store=e;var n=new s.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return"true"==this.el.dom.value}});this.editors={date:new i.GridEditor(new s.DateField({selectOnFocus:!0})),string:new i.GridEditor(new s.TextField({selectOnFocus:!0})),number:new i.GridEditor(new s.NumberField({selectOnFocus:!0,style:"text-align:left;"})),boolean:new i.GridEditor(n,{autoSize:"both"})},this.renderCellDelegate=this.renderCell.createDelegate(this),this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(t){return t.dateFormat(this.dateFormat)},renderBool:function(t){return this[t?"trueText":"falseText"]},isCellEditable:function(t,e){return 1==t},getRenderer:function(t){return 1==t?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(t){return this.getPropertyName(t)},renderCell:function(t,e,i){var s=this.grid.customRenderers[i.get("name")];if(s)return s.apply(this,arguments);var n=t;return Ext.isDate(t)?n=this.renderDate(t):"boolean"==typeof t&&(n=this.renderBool(t)),Ext.util.Format.htmlEncode(n)},getPropertyName:function(t){var e=this.grid.propertyNames;return e&&e[t]?e[t]:t},getCellEditor:function(t,e){var i=this.store.getProperty(e),s=i.data.name,n=i.data.value;return this.grid.customEditors[s]?this.grid.customEditors[s]:Ext.isDate(n)?this.editors.date:"number"==typeof n?this.editors.number:"boolean"==typeof n?this.editors.boolean:this.editors.string},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this),this.destroyEditors(this.editors),this.destroyEditors(this.grid.customEditors)},destroyEditors:function(t){for(var e in t)Ext.destroy(t[e])}}),Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:!1,stripeRows:!1,trackMouseOver:!1,clicksToEdit:1,enableHdMenu:!1,viewConfig:{forceFit:!0},initComponent:function(){this.customRenderers=this.customRenderers||{},this.customEditors=this.customEditors||{},this.lastEditRow=null;var t=new Ext.grid.PropertyStore(this);this.propStore=t;var e=new Ext.grid.PropertyColumnModel(this,t);t.store.sort("name","ASC"),this.addEvents("beforepropertychange","propertychange"),this.cm=e,this.ds=t.store,Ext.grid.PropertyGrid.superclass.initComponent.call(this),this.mon(this.selModel,"beforecellselect",function(t,e,i){if(0===i)return this.startEditing.defer(200,this,[e,1]),!1},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments),this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments),this.source&&this.setSource(this.source)},setSource:function(t){this.propStore.setSource(t)},getSource:function(){return this.propStore.getSource()},setProperty:function(t,e,i){this.propStore.setValue(t,e,i)},removeProperty:function(t){this.propStore.remove(t)}}),Ext.reg("propertygrid",Ext.grid.PropertyGrid),Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:!1,showGroupName:!0,startCollapsed:!1,enableGrouping:!0,enableGroupingMenu:!0,enableNoGroups:!0,emptyGroupText:"(None)",ignoreAdd:!1,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:!0,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this),this.state={};var t=this.grid.getSelectionModel();t.on(t.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this),this.startGroup||(this.startGroup=new Ext.XTemplate('<div id="{groupId}" class="x-grid-group {cls}">','<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">',this.groupTextTpl,"</div></div>",'<div id="{groupId}-bd" class="x-grid-group-body">')),this.startGroup.compile(),this.endGroup||(this.endGroup="</div></div>")},findGroup:function(t){return Ext.fly(t).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(t,e,i){var s;this.canGroup()&&!this.ignoreAdd?(s=this.getScrollState(),this.fireEvent("beforerowsinserted",t,i,i+(e.length-1)),this.refresh(),this.restoreScroll(s),this.fireEvent("rowsinserted",t,i,i+(e.length-1))):this.canGroup()||Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)},onRemove:function(t,e,i,s){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var n=document.getElementById(e._groupId);n&&n.childNodes[1].childNodes.length<1&&Ext.removeNode(n),this.applyEmptyText()},refreshRow:function(t){1==this.ds.getCount()?this.refresh():(this.isUpdating=!0,Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments),this.isUpdating=!1)},beforeMenuShow:function(){var t,e=this.hmenu.items,i=!1===this.cm.config[this.hdCtxIndex].groupable;(t=e.get("groupBy"))&&t.setDisabled(i),(t=e.get("showGroups"))&&(t.setDisabled(i),t.setChecked(this.canGroup(),!0))},renderUI:function(){var t=Ext.grid.GroupingView.superclass.renderUI.call(this);return this.enableGroupingMenu&&this.hmenu&&(this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"}),this.enableNoGroups&&this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:!0,checkHandler:this.onShowGroupsClick,scope:this}),this.hmenu.on("beforeshow",this.beforeMenuShow,this)),t},processEvent:function(t,e){Ext.grid.GroupingView.superclass.processEvent.call(this,t,e);var i,s,n,r,o=e.getTarget(".x-grid-group-hd",this.mainBody);o&&(i=this.getGroupField(),s=this.getPrefix(i),r=o.id.substring(s.length),n=new RegExp("gp-"+Ext.escapeRe(i)+"--hd"),((r=r.substr(0,r.length-3))||n.test(o.id))&&this.grid.fireEvent("group"+t,this.grid,i,r,e),"mousedown"==t&&0==e.button&&this.toggleGroup(o.parentNode))},onGroupByClick:function(){var t=this.grid;this.enableGrouping=!0,t.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)),t.fireEvent("groupchange",t,t.store.getGroupState()),this.beforeMenuShow(),this.refresh()},onShowGroupsClick:function(t,e){(this.enableGrouping=e)?this.onGroupByClick():(this.grid.store.clearGrouping(),this.grid.fireEvent("groupchange",this,null))},toggleRowIndex:function(t,e){var i;!this.canGroup()||(i=this.getRow(t))&&this.toggleGroup(this.findGroup(i),e)},toggleGroup:function(t,e){var i=Ext.get(t),s=Ext.util.Format.htmlEncode(i.id);e=Ext.isDefined(e)?e:i.hasClass("x-grid-group-collapsed"),this.state[s]!==e&&(!1!==this.cancelEditOnToggle&&this.grid.stopEditing(!0),i[(this.state[s]=e)?"removeClass":"addClass"]("x-grid-group-collapsed"))},toggleAllGroups:function(t){for(var e=this.getGroups(),i=0,s=e.length;i<s;i++)this.toggleGroup(e[i],t)},expandAllGroups:function(){this.toggleAllGroups(!0)},collapseAllGroups:function(){this.toggleAllGroups(!1)},getGroup:function(t,e,i,s,n,r){var o=this.cm.config[n],a=i?i.call(o.scope,t,{},e,s,n,r):String(t);return""!==a&&"&#160;"!==a||(a=o.emptyGroupText||this.emptyGroupText),a},getGroupField:function(){return this.grid.store.getGroupState()},afterRender:function(){this.ds&&this.cm&&(Ext.grid.GroupingView.superclass.afterRender.call(this),this.grid.deferRowRender&&this.updateGroupWidths())},afterRenderUI:function(){Ext.grid.GroupingView.superclass.afterRenderUI.call(this),this.enableGroupingMenu&&this.hmenu&&(this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"}),this.enableNoGroups&&this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:!0,checkHandler:this.onShowGroupsClick,scope:this}),this.hmenu.on("beforeshow",this.beforeMenuShow,this))},renderRows:function(){var t,e,i,s=this.getGroupField(),n=!!s;return this.hideGroupedColumn&&(t=this.cm.findColumnIndex(s),e=Ext.isDefined(this.lastGroupField),!n&&e?(this.mainBody.update(""),this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField),!1),delete this.lastGroupField):n&&!e?(this.lastGroupField=s,this.cm.setHidden(t,!0)):n&&e&&s!==this.lastGroupField&&(this.mainBody.update(""),i=this.cm.findColumnIndex(this.lastGroupField),this.cm.setHidden(i,!1),this.lastGroupField=s,this.cm.setHidden(t,!0))),Ext.grid.GroupingView.superclass.renderRows.apply(this,arguments)},doRender:function(t,e,i,s,n,r){if(e.length<1)return"";if(!this.canGroup()||this.isUpdating)return Ext.grid.GroupingView.superclass.doRender.apply(this,arguments);for(var o,a,l=this.getGroupField(),h=this.cm.findColumnIndex(l),d="width:"+this.getTotalWidth()+";",c=this.cm.config[h],u=c.groupRenderer||c.renderer,f=this.showGroupName?(c.groupName||c.header)+": ":"",p=[],g=0,m=e.length;g<m;g++){var x=s+g,E=e[g],v=E.data[l],y=this.getGroup(v,E,u,x,h,i);o&&o.group==y?o.rs.push(E):(a=this.constructId(v,l,h),this.state[a]=!(Ext.isDefined(this.state[a])?!this.state[a]:this.startCollapsed),o={group:y,gvalue:v,text:f+y,groupId:a,startRow:x,rs:[E],cls:this.state[a]?"":"x-grid-group-collapsed",style:d},p.push(o)),E._groupId=a}var b=[];for(g=0,m=p.length;g<m;g++)y=p[g],this.doGroupStart(b,y,t,i,n),b[b.length]=Ext.grid.GroupingView.superclass.doRender.call(this,t,y.rs,i,y.startRow,n,r),this.doGroupEnd(b,y,t,i,n);return b.join("")},getGroupId:function(t){var e=this.getGroupField();return this.constructId(t,e,this.cm.findColumnIndex(e))},constructId:function(t,e,i){var s=this.cm.config[i],n=s.groupRenderer||s.renderer,r="value"==this.groupMode?t:this.getGroup(t,{data:{}},n,0,i,this.ds);return this.getPrefix(e)+Ext.util.Format.htmlEncode(r)},canGroup:function(){return this.enableGrouping&&!!this.getGroupField()},getPrefix:function(t){return this.grid.getGridEl().id+"-gp-"+t+"-"},doGroupStart:function(t,e,i,s,n){t[t.length]=this.startGroup.apply(e)},doGroupEnd:function(t,e,i,s,n){t[t.length]=this.endGroup},getRows:function(){if(!this.canGroup())return Ext.grid.GroupingView.superclass.getRows.call(this);for(var t,e,i,s=[],n=this.getGroups(),r=0,o=n.length;r<o;++r)if(t=n[r].childNodes[1])for(e=0,i=(t=t.childNodes).length;e<i;++e)s[s.length]=t[e];return s},updateGroupWidths:function(){if(this.canGroup()&&this.hasRows())for(var t=Math.max(this.cm.getTotalWidth(),this.el.dom.offsetWidth-this.getScrollOffset())+"px",e=this.getGroups(),i=0,s=e.length;i<s;i++)e[i].firstChild.style.width=t},onColumnWidthUpdated:function(t,e,i){Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this,t,e,i),this.updateGroupWidths()},onAllColumnWidthsUpdated:function(t,e){Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this,t,e),this.updateGroupWidths()},onColumnHiddenUpdated:function(t,e,i){Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this,t,e,i),this.updateGroupWidths()},onLayout:function(){this.updateGroupWidths()},onBeforeRowSelect:function(t,e){this.toggleRowIndex(e,!0)}}),Ext.grid.GroupingView.GROUP_ID=1e3;
