--- /dev/null
+/*
+Copyright(c) 2011 Sencha Inc.
+licensing@sencha.com
+*/
+Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.listeners){b.on(b.listeners);delete b.listeners}b.events=b.events||{};if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal)$/,addManagedListener:function(h,d,f,e,c){var g=this,a=g.managedListeners=g.managedListeners||[],b;if(Ext.isObject(d)){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!g.eventOptionsRe.test(d)){g.addManagedListener(h,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:h,ename:d,fn:f,scope:e,options:c});h.on(d,f,e,c)}},removeManagedListener:function(j,d,g,k){var f=this,l,c,h,b,a,e;if(Ext.isObject(d)){l=d;for(d in l){if(l.hasOwnProperty(d)){c=l[d];if(!f.eventOptionsRe.test(d)){f.removeManagedListener(j,d,c.fn||c,c.scope||l.scope)}}}}h=f.managedListeners?f.managedListeners.slice():[];a=h.length;for(e=0;e<a;e++){b=h[e];if(b.item===j&&b.ename===d&&(!g||b.fn===g)&&(!k||b.scope===k)){Ext.Array.remove(f.managedListeners,b);j.un(b.ename,b.fn,b.scope)}}},fireEvent:function(){var g=this,c=Ext.Array.toArray(arguments),d=c[0].toLowerCase(),b=true,f=g.events[d],a=g.eventQueue,e;if(g.eventsSuspended===true){if(a){a.push(c)}}else{if(f&&Ext.isObject(f)&&f.bubble){if(f.fire.apply(f,c.slice(1))===false){return false}e=g.getBubbleTarget&&g.getBubbleTarget();if(e&&e.isObservable){if(!e.events[d]||!Ext.isObject(e.events[d])||!e.events[d].bubble){e.enableBubble(d)}return e.fireEvent.apply(e,c)}}else{if(f&&Ext.isObject(f)){c.shift();b=f.fire.apply(f,c)}}}return b},addListener:function(c,e,d,b){var g=this,a,f;if(Ext.isObject(c)){b=c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(!g.eventOptionsRe.test(c)){g.addListener(c,a.fn||a,a.scope||b.scope,a.fn?a:b)}}}}else{c=c.toLowerCase();g.events[c]=g.events[c]||true;f=g.events[c]||true;if(Ext.isBoolean(f)){g.events[c]=f=new Ext.util.Event(g,c)}f.addListener(e,d,Ext.isObject(b)?b:{})}},removeListener:function(c,e,d){var g=this,b,f,a;if(Ext.isObject(c)){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!g.eventOptionsRe.test(c)){g.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();f=g.events[c];if(f.isEvent){f.removeListener(e,d)}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var c=this.managedListeners||[],d=0,b=c.length,a;for(;d<b;d++){a=c[d];a.item.un(a.ename,a.fn,a.scope)}this.managedListeners=[]},addEvents:function(e){var d=this,b,a,c;d.events=d.events||{};if(Ext.isString(e)){b=arguments;c=b.length;while(c--){d.events[b[c]]=d.events[b[c]]||true}}else{Ext.applyIf(d.events,e)}},hasListener:function(a){var b=this.events[a.toLowerCase()];return b&&b.isEvent===true&&b.listeners.length>0},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue||[];a.eventsSuspended=false;delete a.eventQueue;Ext.each(b,function(c){a.fireEvent.apply(a,c)})},relayEvents:function(c,e,h){h=h||"";var g=this,a=e.length,d=0,f,b;for(;d<a;d++){f=e[d].substr(h.length);b=h+f;g.events[b]=g.events[b]||true;c.on(f,g.createRelayer(b))}},createRelayer:function(a){var b=this;return function(){return b.fireEvent.apply(b,[a].concat(Array.prototype.slice.call(arguments,0,-1)))}},enableBubble:function(a){var b=this;if(!Ext.isEmpty(a)){a=Ext.isArray(a)?a:Ext.Array.toArray(arguments);Ext.each(a,function(c){c=c.toLowerCase();var d=b.events[c]||true;if(Ext.isBoolean(d)){d=new Ext.util.Event(b,c);b.events[c]=d}d.bubble=true})}}},function(){this.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});this.observeClass=this.observe;Ext.apply(Ext.util.Observable.prototype,function(){function a(i){var h=(this.methodEvents=this.methodEvents||{})[i],d,c,f,g=this;if(!h){this.methodEvents[i]=h={};h.originalFn=this[i];h.methodName=i;h.before=[];h.after=[];var b=function(k,j,e){if((c=k.apply(j||g,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}f=!!c.cancel}else{if(c===false){f=true}else{d=c}}}};this[i]=function(){var k=Array.prototype.slice.call(arguments,0),j,l,e;d=c=undefined;f=false;for(l=0,e=h.before.length;l<e;l++){j=h.before[l];b(j.fn,j.scope,k);if(f){return d}}if((c=h.originalFn.apply(g,k))!==undefined){d=c}for(l=0,e=h.after.length;l<e;l++){j=h.after[l];b(j.fn,j.scope,k);if(f){return d}}return d}}return h}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(h,f,d){var g=this.getMethodEvent(h),c,b;for(c=0,b=g.before.length;c<b;c++){if(g.before[c].fn==f&&g.before[c].scope==d){g.before.splice(c,1);return}}for(c=0,b=g.after.length;c<b;c++){if(g.after[c].fn==f&&g.after[c].scope==d){g.after.splice(c,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}())});Ext.define("Ext.data.Association",{primaryKey:"id",defaultReaderType:"json",statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return Ext.create("Ext.data.BelongsToAssociation",a);case"hasMany":return Ext.create("Ext.data.HasManyAssociation",a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,f=b.associatedModel,e=c[d],g=c[f],a;this.ownerModel=e;this.associatedModel=g;Ext.applyIf(this,{ownerName:d,associatedName:f})},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,group:undefined,start:undefined,limit:undefined,batch:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){Ext.apply(this,a||{})},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return(a===undefined?this.records:a.records)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",presence:function(a,b){if(b===undefined){b=a}return !!b},length:function(b,e){if(e===undefined){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;b.addEvents("add","clear","remove","replace");b.mixins.observable.constructor.call(b,a);b.clear(true)},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.addEvents("beforerequest","requestcomplete","requestexception");this.requests={};this.mixins.observable.constructor.call(this)},request:function(j){j=j||{};var f=this,i=j.scope||window,e=j.username||f.username,g=j.password||f.password||"",b,c,d,a,h;if(f.fireEvent("beforerequest",f,j)!==false){c=f.setOptions(j,i);if(this.isFormUpload(j)===true){this.upload(j.form,c.url,c.data,j);return null}if(j.autoAbort===true||f.autoAbort){f.abort()}h=this.getXhrInstance();b=j.async!==false?(j.async||f.async):false;if(e){h.open(c.method,c.url,b,e,g)}else{h.open(c.method,c.url,b)}a=f.setupHeaders(h,j,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:h,headers:a,options:j,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},j.timeout||f.timeout)};f.requests[d.id]=d;if(b){h.onreadystatechange=Ext.Function.bind(f.onStateChange,f,[d])}h.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(j.callback,j.scope,[j,undefined,undefined]);return null}},upload:function(d,b,h,j){d=Ext.getDom(d);j=j||{};var c=Ext.id(),f=document.createElement("iframe"),i=[],g="multipart/form-data",e={target:d.target,method:d.method,encoding:d.encoding,enctype:d.enctype,action:d.action},a;Ext.fly(f).set({id:c,name:c,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(f);if(document.frames){document.frames[c].name=c}Ext.fly(d).set({target:c,method:"POST",enctype:g,encoding:g,action:b||e.action});if(h){Ext.iterate(Ext.Object.fromQueryString(h),function(k,l){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:l,name:k});d.appendChild(a);i.push(a)})}Ext.fly(f).on("load",Ext.Function.bind(this.onUploadComplete,this,[f,j]),null,{single:true});d.submit();Ext.fly(d).set(e);Ext.each(i,function(k){Ext.removeNode(k)})},onUploadComplete:function(h,b){var c=this,a={responseText:"",responseXML:null},g,f;try{g=h.contentWindow.document||h.contentDocument||window.frames[id].document;if(g){if(g.body){if(/textarea/i.test((f=g.body.firstChild||{}).tagName)){a.responseText=f.value}else{a.responseText=g.body.innerHTML}}a.responseXML=g.XMLDocument||g}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(h)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(k,j){var h=this,e=k.params||{},g=h.extraParams,d=k.urlParams,c=k.url||h.url,i=k.jsonData,b,a,f;if(Ext.isFunction(e)){e=e.call(j,k)}if(Ext.isFunction(c)){c=c.call(j,k)}c=this.setupUrl(k,c);f=k.rawData||k.xmlData||i||null;if(i&&!Ext.isPrimitive(i)){f=Ext.encode(f)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(g)){g=Ext.Object.toQueryString(g)}e=e+((g)?((e)?"&":"")+g:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(k,e);b=(k.method||h.method||((e||f)?"POST":"GET")).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(k.disableCachingParam||h.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||f)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:f||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.core.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(l,m,d,c){var h=this,b=Ext.apply({},m.headers||{},h.defaultHeaders||{}),k=h.defaultPostHeader,i=m.jsonData,a=m.xmlData,j,f;if(!b["Content-Type"]&&(d||c)){if(d){if(m.rawData){k="text/plain"}else{if(a&&Ext.isDefined(a)){k="text/xml"}else{if(i&&Ext.isDefined(i)){k="application/json"}}}}b["Content-Type"]=k}if(h.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=h.defaultXhrHeader}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent("exception",j,f)}return b},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,f;for(;c<a;++c){try{f=b[c];f();break}catch(d){}}return f})(),isLoading:function(a){if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this,d=a.requests,c;if(b&&a.isLoading(b)){b.xhr.onreadystatechange=null;b.xhr.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}else{if(!b){for(c in d){if(d.hasOwnProperty(c)){a.abort(d[c])}}}}},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(e){var d=this,c=e.options,a=d.parseStatus(e.xhr.status),f=a.success,b;if(f){b=d.createResponse(e);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||e.aborted||e.timedout){b=d.createException(e)}else{b=d.createResponse(e)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,f,b]);delete d.requests[e.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var h=c.xhr,a={},i=h.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=i.length,j,e,g,f,b;while(d--){j=i[d];e=j.indexOf(":");if(e>=0){g=j.substr(0,e).toLowerCase();if(j.charAt(e+1)==" "){++e}a[g]=j.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:h.status,statusText:h.statusText,getResponseHeader:function(k){return a[k.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:h.responseText,responseXML:h.responseXML};h=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){Ext.apply(this,a);this.filter=this.filter||this.filterFn;if(this.filter==undefined){if(this.property==undefined||this.value==undefined){}else{this.filter=this.createFilterFn()}this.filterFn=this.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){return c.test(a.getRoot.call(a,d)[b])}},getRoot:function(a){return this.root==undefined?a:a[this.root]},createValueMatcher:function(){var d=this,e=d.value,f=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(!e.exec){e=String(e);if(f===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(g,f){return a*b.call(c,g,f)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,f=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){f=a(f);e=a(e)}return f>e?1:(f<e?-1:0)},getRoot:function(a){return this.root==undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(){var a=this;a.sort=a.createSortFunction(a.sorterFn||a.defaultSorterFn)}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,f=[];for(;d<a;d++){f.push(this.getRecordData(b[d]))}return this.writeRecords(e,f)},getRecordData:function(e){var i=e.phantom===true,b=this.writeAllFields||i,c=this.nameProperty,f=e.fields,d={},h,a,g,j;if(b){f.each(function(k){if(k.persist){a=k[c]||k.name;d[a]=e.get(k.name)}})}else{h=e.getChanges();for(j in h){if(h.hasOwnProperty(j)){g=f.get(j);a=g[c]||g.name;d[a]=h[j]}}if(!i){d[e.idProperty]=e.getId()}}return d}});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",constructor:function(b,d,a){var c=this;Ext.apply(c,{el:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},eventName:"keydown",addBinding:function(g){if(Ext.isArray(g)){Ext.each(g,this.addBinding,this);return}var f=g.key,h=false,d,e,b,c,a;if(Ext.isString(f)){e=[];b=f.toLowerCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}f=e;h=true}if(!Ext.isArray(f)){f=[f]}if(!h){for(c=0,a=f.length;c<a;++c){d=f[c];if(Ext.isString(d)){f[c]=d.toLowerCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:f},g))},handleKeyDown:function(c){if(this.enabled){var d=this.bindings,b=0,a=d.length;c=this.processEvent(c);for(;b<a;++b){this.processBinding(d[b],c)}}},processEvent:function(a){return a},processBinding:function(f,a){if(this.checkModifiers(f,a)){var g=a.getKey(),j=f.fn||f.handler,k=f.scope||this,h=f.keyCode,b=f.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=h.length;c<e;++c){if(g===h[c]){if(j.call(k,g,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(h,f){var d=["shift","ctrl","alt"],c=0,a=d.length,g,b;for(;c<a;++c){b=d[c];g=h[b];if(!(g===undefined||(g===f[b+"Key"]))){return false}}return true},on:function(b,d,c){var g,a,e,f;if(Ext.isObject(b)&&!Ext.isArray(b)){g=b.key;a=b.shift;e=b.ctrl;f=b.alt}else{g=b}this.addBinding({key:g,shift:a,ctrl:e,alt:f,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.el.remove()}delete a.el}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(n,d,b,m,l,h){var i=3*d,k=3*(m-d)-i,a=1-i-k,g=3*b,j=3*(l-b)-g,o=1-g-j;function f(p){return((a*p+k)*p+i)*p}function c(p,r){var q=e(p,r);return((o*q+j)*q+g)*q}function e(p,w){var v,u,s,q,t,r;for(s=p,r=0;r<8;r++){q=f(s)-p;if(Math.abs(q)<w){return s}t=(3*a*s+2*k)*s+i;if(Math.abs(t)<0.000001){break}s=s-q/t}v=0;u=1;s=p;if(s<v){return v}if(s>u){return u}while(v<u){q=f(s);if(Math.abs(q-p)<w){return s}if(p>q){v=s}else{u=s}s=(u-v)/2+v}return s}return c(n,1/(200*h))},cubicBezier:function(b,e,a,c){var d=function(f){return Ext.fx.CubicBezier.cubicBezierAtTime(f,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.unghost(null,false);delete this.ghost}},show:function(){if(!this.ghost){var a=this.panel.getSize();this.panel.el.setVisibilityMode(Ext.core.Element.DISPLAY);this.ghost=this.panel.ghost();if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});this.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.Template",{requires:["Ext.core.DomHelper","Ext.util.Format"],statics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;c<e;c++){g=b[c];if(typeof g=="object"){Ext.apply(f.initialConfig,g);Ext.apply(f,g)}else{a.push(g)}}d=a.join("")}else{if(Ext.isArray(d)){a.push(d.join(""))}else{a.push(d)}}f.html=a.join("");if(f.compiled){f.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,applyTemplate:function(a){var f=this,c=f.disableFormats!==true,e=Ext.util.Format,b=f;if(f.compiled){return f.compiled(a)}function d(g,i,j,h){if(j&&c){if(h){h=[a[i]].concat(Ext.functionFactory("return ["+h+"];")())}else{h=[a[i]]}if(j.substr(0,5)=="this."){return b[j.substr(5)].apply(b,h)}else{return e[j].apply(e,h)}}else{return a[i]!==undefined?a[i]:""}}return f.html.replace(f.re,d)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'].join('');};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.core.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}},function(){this.createAlias("apply","applyTemplate")});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=Ext.create("Ext.util.HashMap");this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var f=Ext.get(e.id);if(f){f.remove()}}}},this);a.push(d)}});Ext.define("Ext.dd.StatusProxy",{animRepair:false,constructor:function(a){Ext.apply(this,a);this.id=this.id||Ext.id();this.proxy=Ext.createWidget("component",{floating:true,id:this.id,html:'<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>',cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:document.body});this.el=this.proxy.el;this.el.show();this.el.setVisibilityMode(Ext.core.Element.VISIBILITY);this.el.hide();this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className=Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.proxy.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.proxy.show();this.proxy.toFront()},sync:function(){this.proxy.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.animate({duration:this.repairDuration||500,easing:"ease-out",to:{x:b[0],y:b[1]},stopAnimation:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.proxy,this.el)}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(a.getEl().getStyle("zIndex"),b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(a){this.zseed=a;return this.assignZIndices()},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,f=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){f=d.setZIndex(f)}}this._activateLast();return f},_setActiveChild:function(a){if(a!=this.front){if(this.front){this.front.setActive(false,a)}this.front=a;if(a){a.setActive(true);if(a.modal){this._showModalMask(a.el.getStyle("zIndex")-4)}}}},_activateLast:function(a){var b,d=false,c;for(c=this.zIndexStack.length-1;c>=0;--c){b=this.zIndexStack[c];if(!b.hidden){if(!d){this._setActiveChild(b);d=true}if(b.modal){this._showModalMask(b.el.getStyle("zIndex")-4);return}}}this._hideModalMask();if(!d){this._setActiveChild(null)}},_showModalMask:function(a){if(!this.mask){this.mask=this.targetEl.createChild({cls:Ext.baseCSSPrefix+"mask"});this.mask.setVisibilityMode(Ext.core.Element.DISPLAY);this.mask.on("click",this._onMaskClick,this)}Ext.getBody().addCls(Ext.baseCSSPrefix+"body-masked");this.mask.setSize(this.targetEl.getViewSize(true));this.mask.setStyle("zIndex",a);this.mask.show()},_hideModalMask:function(){if(this.mask){Ext.getBody().removeCls(Ext.baseCSSPrefix+"body-masked");this.mask.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){if(this.mask&&this.mask.isVisible()){this.mask.setSize(this.targetEl.getViewSize(true))}},register:function(a){if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=this;this.list[a.id]=a;this.zIndexStack.push(a);a.on("hide",this._activateLast,this)},unregister:function(a){delete a.zIndexManager;if(this.list&&this.list[a.id]){delete this.list[a.id];a.un("hide",this._activateLast);Ext.Array.remove(this.zIndexStack,a);this._activateLast(a)}},get:function(a){return typeof a=="object"?a:this.list[a]},bringToFront:function(a){a=this.get(a);if(a!=this.front){Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.push(a);this.assignZIndices();return true}if(a.modal){Ext.getBody().addCls(Ext.baseCSSPrefix+"body-masked");this.mask.setSize(Ext.core.Element.getViewWidth(true),Ext.core.Element.getViewHeight(true));this.mask.show()}return false},sendToBack:function(a){a=this.get(a);Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.unshift(a);this.assignZIndices();return a},hideAll:function(){for(var a in this.list){if(this.list[a].isComponent&&this.list[a].isVisible()){this.list[a].hide()}}},hide:function(){var b=0,c=this.zIndexStack.length,a;this.tempHidden=[];for(;b<c;b++){a=this.zIndexStack[b];if(a.isVisible()){this.tempHidden.push(a);a.hide()}}},show:function(){var c=0,d=this.tempHidden.length,b,a,e;for(;c<d;c++){b=this.tempHidden[c];a=b.x;e=b.y;b.show();b.setPosition(a,e)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(e,d){var f=[],c=0,a=this.zIndexStack.length,b;for(;c<a;c++){b=this.zIndexStack[c];if(e.call(d||b,b)!==false){f.push(b)}}return f},each:function(c,b){var a;for(var d in this.list){a=this.list[d];if(a.isComponent&&c.call(b||a,a)===false){return}}},eachBottomUp:function(e,d){var b,a=this.zIndexStack,c,f;for(c=0,f=a.length;c<f;c++){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},eachTopDown:function(e,d){var b,a=this.zIndexStack,c;for(c=a.length;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){delete this.zIndexStack;delete this.list;delete this.container;delete this.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";for(;q<s;q++){r=p[q];if(r.getRefItems){n=n.concat(r.getRefItems(o))}}return n},f=function(o){var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];while(!!(q=(q.ownerCt||q.floatParent))){n.push(q)}}return n},l=function(o,t,s){if(t==="*"){return o.slice()}else{var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];if(q.isXType(t,s)){n.push(q)}}return n}},i=function(o,r){var t=Ext.Array,n=[],p=0,s=o.length,q;for(;p<s;p++){q=o[p];if(q.el?q.el.hasCls(r):t.contains(q.initCls(),r)){n.push(q)}}return n},m=function(p,u,o,t){var n=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(!t?!!r[u]:(String(r[u])===t)){n.push(r)}}return n},d=function(o,s){var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];if(q.getItemId()===s){n.push(q)}}return n},k=function(n,o,p){return g.pseudos[o](n,p)},h=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r<s;r++){p=q[r];if(p.mode==="^"){n=f(n||[o])}else{if(p.mode){n=a(n||[o],p.mode)}else{n=e(n||a([o]),p)}}if(r===s-1){return n}}return[]},is:function(p){var o=this.operations,s=Ext.isArray(p)?p:[p],n=s.length,t=o[o.length-1],r,q;s=e(s,t);if(s.length===n){if(o.length>1){for(q=0,r=s.length;q<r;q++){if(Ext.Array.indexOf(this.execute(),s[q])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(t,n){var u=Ext.ComponentQuery,r=0,s=t.length,q=[],p=-1,o;for(;r<s;++r){o=t[r];if(!u.is(o,n)){q[++p]=o}}return q}},query:function(o,v){var w=o.split(","),n=w.length,p=0,q=[],x=[],u={},s,r,t;for(;p<n;p++){o=Ext.String.trim(w[p]);s=this.cache[o];if(!s){this.cache[o]=s=this.parse(o)}q=q.concat(s.execute(v))}if(n>1){r=q.length;for(p=0;p<r;p++){t=q[p];if(!u[t.id]){x.push(t);u[t.id]=true}}q=x}return q},is:function(o,n){if(!n){return true}var p=this.cache[n];if(!p){this.cache[n]=p=this.parse(n)}return p.is(o)},parse:function(q){var o=[],p=b.length,u,r,v,w,x,s,t,n;while(q&&u!==q){u=q;r=q.match(c);if(r){v=r[1];if(v==="#"){o.push({method:d,args:[Ext.String.trim(r[2])]})}else{if(v==="."){o.push({method:i,args:[Ext.String.trim(r[2])]})}else{o.push({method:l,args:[Ext.String.trim(r[2]),Boolean(r[3])]})}}q=q.replace(r[0],"")}while(!(w=q.match(h))){for(s=0;q&&s<p;s++){t=b[s];x=q.match(t.re);n=t.method;if(x){o.push({method:Ext.isString(t.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[n].concat(x.slice(1)))):t.method,args:x.slice(1)});q=q.replace(x[0],"");break}}}if(w[1]){o.push({mode:w[2]||w[1]});q=q.replace(w[0],"")}}return new g.Query({operations:o})}})});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(b,a){this.setConfig(b,a||{})},setConfig:function(d,a){if(this.map){this.map.destroy()}var f=Ext.create("Ext.util.KeyMap",d,null,this.getKeyEvent("forceKeyDown" in a?a.forceKeyDown:this.forceKeyDown)),e=Ext.util.KeyNav.keyOptions,c=a.scope||this,b;this.map=f;for(b in e){if(e.hasOwnProperty(b)){if(a[b]){f.addBinding({scope:c,key:e[b],handler:Ext.Function.bind(this.handleEvent,c,[a[b]],true),defaultEventAction:a.defaultEventAction||this.defaultEventAction})}}}f.disable();if(!a.disabled){f.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(a){return(a||Ext.EventManager.useKeyDown)?"keydown":"keypress"}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var i=this,a=i.r/255,f=i.g/255,j=i.b/255,k=Math.max(a,f,j),d=Math.min(a,f,j),m=k-d,e,n=0,c=0.5*(k+d);if(d!=k){n=(c<0.5)?m/(k+d):m/(2-k-d);if(a==k){e=60*(f-j)/m}else{if(f==k){e=120+60*(j-a)/m}else{e=240+60*(a-f)/m}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,n,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var f=this,c=Math.round,e=c(f.r).toString(16),d=c(f.g).toString(16),a=c(f.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b);if(Ext.isArray(e)){var f=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d<<8)|(f<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return""}},fromString:function(h){var c,e,d,a,f=parseInt;if((h.length==4||h.length==7)&&h.substr(0,1)==="#"){c=h.match(this.hexRe);if(c){e=f(c[1],16)>>0;d=f(c[2],16)>>0;a=f(c[3],16)>>0;if(h.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=h.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:Ext.create("Ext.draw.Color",e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(f,n,d){var a,b,c,e,j=[],k=Math.abs,g=Math.floor;if(n==0||f==null){j=[d,d,d]}else{f/=60;a=n*(1-k(2*d-1));b=a*(1-k(f-2*g(f/2)-1));c=d-a/2;switch(g(f)){case 0:j=[a,b,0];break;case 1:j=[b,a,0];break;case 2:j=[0,a,b];break;case 3:j=[0,b,a];break;case 4:j=[b,0,a];break;case 5:j=[a,0,b];break}j=[j[0]+c,j[1]+c,j[2]+c]}return Ext.create("Ext.draw.Color",j[0]*255,j[1]*255,j[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.layout.Layout",{isLayout:true,initialized:false,statics:{create:function(b,c){var a;if(b instanceof Ext.layout.Layout){return Ext.createByAlias("layout."+b)}else{if(Ext.isObject(b)){a=b.type}else{a=b||c;b={}}return Ext.createByAlias("layout."+a,b||{})}}},constructor:function(a){this.id=Ext.id(null,this.type+"-");Ext.apply(this,a)},layout:function(){var a=this;a.layoutBusy=true;a.initLayout();if(a.beforeLayout.apply(a,arguments)!==false){a.layoutCancelled=false;a.onLayout.apply(a,arguments);a.childrenChanged=false;a.owner.needsLayout=false;a.layoutBusy=false;a.afterLayout.apply(a,arguments)}else{a.layoutCancelled=true}a.layoutBusy=false;a.doOwnerCtLayouts()},beforeLayout:function(){this.renderItems(this.getLayoutItems(),this.getRenderTarget());return true},renderItems:function(a,e){var d=a.length,b=0,c;for(;b<d;b++){c=a[b];if(c&&!c.rendered){this.renderItem(c,e,b)}else{if(!this.isValidParent(c,e,b)){this.moveItem(c,e,b)}}}},isValidParent:function(b,c,a){var d=b.el?b.el.dom:Ext.getDom(b);if(d&&c&&c.dom){if(Ext.isNumber(a)&&d!==c.dom.childNodes[a]){return false}return(d.parentNode==(c.dom||c))}return false},renderItem:function(b,c,a){if(!b.rendered){b.render(c,a);this.configureItem(b);this.childrenChanged=true}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b);this.childrenChanged=true},initLayout:function(){if(!this.initialized&&!Ext.isEmpty(this.targetCls)){this.getTarget().addCls(this.targetCls)}this.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},configureItem:function(d){var c=this,b=d.el,a=c.owner;if(c.itemCls){b.addCls(c.itemCls)}if(a.itemCls){b.addCls(a.itemCls)}},onLayout:Ext.emptyFn,afterLayout:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,doOwnerCtLayouts:Ext.emptyFn,afterRemove:function(d){var c=this,b=d.el,a=c.owner;if(d.rendered){if(c.itemCls){b.removeCls(c.itemCls)}if(a.itemCls){b.removeCls(a.itemCls)}}},destroy:function(){if(!Ext.isEmpty(this.targetCls)){var a=this.getTarget();if(a){a.removeCls(this.targetCls)}}this.onDestroy()}});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(a){this.floating=true;this.el=Ext.create("Ext.Layer",Ext.apply({},a,{hideMode:this.hideMode,hidden:this.hidden,shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},onFloatRender:function(){var a=this;a.zIndexParent=a.getZIndexParent();a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onFloatParentHide:function(){this.showOnParentShow=this.isVisible();this.hide()},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},getZIndexParent:function(){var a=this.ownerCt,b;if(a){while(a){b=a;a=a.ownerCt}if(b.floating){return b}}},setZIndex:function(a){var b=this;this.el.setZIndex(a);a+=10;if(b.floatingItems){a=Math.floor(b.floatingItems.setBase(a)/100)*100+10000}return a},doConstrain:function(c){var d=this,a,b,e;if(d.constrain||d.constrainHeader){if(d.constrainHeader){a=d.header.el}else{a=d.el}b=a.getConstrainVector(c||(d.floatParent&&d.floatParent.getTargetEl())||d.container);if(b){e=d.getPosition();e[0]+=b[0];e[1]+=b[1];d.setPosition(e)}}},alignTo:function(b,a,c){if(b.isComponent){b=b.getEl()}var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d);return this},toFront:function(b){var a=this;if(a.zIndexParent){a.zIndexParent.toFront(true)}if(a.zIndexManager.bringToFront(a)){if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(!b){a.focus(false,true)}}return a},setActive:function(a,b){if(a){if((this instanceof Ext.window.Window)&&!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{if((this instanceof Ext.window.Window)&&(b instanceof Ext.window.Window)){this.el.disableShadow()}this.fireEvent("deactivate",this)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a);return this},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{})},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)}});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim",b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id)},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true})},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false})},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}});Ext.applyIf(Ext.core.Element.prototype,Ext.util.Animate.prototype);Ext.define("Ext.layout.container.AbstractContainer",{extend:"Ext.layout.Layout",type:"container",fixedLayout:true,managedHeight:true,managedWidth:true,bindToOwnerCtComponent:false,bindToOwnerCtContainer:false,isManaged:function(d){d=Ext.String.capitalize(d);var b=this,e=b,c=b["managed"+d],a=b.owner.ownerCt;if(a&&a.layout){while(a&&a.layout){if(c===false||a.layout["managed"+d]===false){c=false;break}a=a.ownerCt}}return c},layout:function(){var b=this,a=b.owner;if(Ext.isNumber(a.height)||a.isViewport){b.managedHeight=false}if(Ext.isNumber(a.width)||a.isViewport){b.managedWidth=false}b.callParent(arguments)},setItemSize:function(c,b,a){if(Ext.isObject(b)){a=b.height;b=b.width}c.setCalculatedSize(b,a,this.owner)},getLayoutItems:function(){return this.owner&&this.owner.items&&this.owner.items.items||[]},afterLayout:function(){this.owner.afterLayout(this)},getTarget:function(){return this.owner.getTargetEl()},getRenderTarget:function(){return this.owner.getTargetEl()}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on("click",this.handler,this.scope||this)}this.callParent()},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(h){h=Ext.apply({},h);var e=this,d=e.target,i=Ext.isDefined(h.loadMask)?h.loadMask:e.loadMask,b=Ext.apply({},h.params),a=Ext.apply({},h.ajaxOptions),f=h.callback||e.callback,g=h.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(h,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(h,{url:e.url});Ext.apply(h,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,h)===false){return}if(i){e.addMask(i)}c=Ext.Ajax.request(h);e.active={request:c,options:h,mask:i,scope:g,callback:f,success:h.success||e.success,failure:h.failure||e.failure,renderer:h.renderer||e.renderer,scripts:Ext.isDefined(h.scripts)?h.scripts:e.scripts};e.setOptions(e.active,h)},setOptions:Ext.emptyFn,onComplete:function(b,g,a){var d=this,f=d.active,c=f.scope,e=d.getRenderer(f.renderer);if(g){g=e.call(d,d,a,f)}if(g){Ext.callback(f.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(f.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(f.callback,c,[d,g,a,b]);if(f.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:"x-textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.core.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(f){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(f)),b,a,f,g;if(!e||!e[1]){return}a=e[1];f=e[2];switch(a){case"e":return null;case"n":return parseFloat(f);case"d":return new Date(Date.parse(f));case"b":return(f=="1");case"a":b=[];if(f!=""){Ext.each(f.split("^"),function(h){b.push(d.decodeValue(h))},d)}return b;case"o":b={};if(f!=""){Ext.each(f.split("^"),function(h){g=h.split("=");b[g[0]]=d.decodeValue(g[1])},d)}return b;default:return f}},encodeValue:function(e){var f="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){f+=this.encodeValue(e[d]);if(d!=a-1){f+="^"}}b="a:"+f}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){f+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+f.substring(0,f.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(h,c){var g=Ext.getClassName(h),d=g.match(/^(.*)\.controller\./);if(d!==null){var a=Ext.Loader.getPrefix(g)||d[1],f=c.onBeforeClassCreated,i=[],b=["model","view","store"],e;c.onBeforeClassCreated=function(s,m){var n,p,k,q,l,o,r;for(n=0,p=b.length;n<p;n++){k=b[n];q=Ext.Array.from(m[k+"s"]);for(l=0,o=q.length;l<o;l++){r=q[l];e=Ext.Loader.getPrefix(r);if(e===""||e===r){i.push(a+"."+k+"."+r)}else{i.push(r)}}}Ext.require(i,Ext.Function.pass(f,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(b,a){b=Ext.String.capitalize(b);Ext.Array.each(a,function(d){var c="get",e=d.split(".");Ext.Array.each(e,function(f){c+=Ext.String.capitalize(f)});c+=b;if(!this[c]){this[c]=Ext.Function.pass(this["get"+b],[d],this)}this[c](d)},this)},ref:function(a){var b=this;a=Ext.Array.from(a);Ext.Array.each(a,function(e){var d=e.ref,c="get"+Ext.String.capitalize(d);if(!b[c]){b[c]=Ext.Function.pass(b.getRef,[d,e],b)}})},getRef:function(e,f,b){this.refCache=this.refCache||{};f=f||{};b=b||{};Ext.apply(f,b);if(f.forceCreate){return Ext.ComponentManager.create(f,"component")}var d=this,a=f.selector,c=d.refCache[e];if(!c){d.refCache[e]=c=Ext.ComponentQuery.query(f.selector)[0];if(!c&&f.autoCreate){d.refCache[e]=c=Ext.ComponentManager.create(f,"component")}if(c){c.on("beforedestroy",function(){d.refCache[e]=null})}}return c},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(k,f,j){var g=this.bus,l=g[k],d,c,b,m,a,e,h;if(l){for(d in l){if(f.is(d)){c=l[d];for(b in c){m=c[b];for(e=0,h=m.length;e<h;e++){a=m[e];return a.fire.apply(a,Array.prototype.slice.call(j,1))}}}}}},control:function(d,f,c){var b=this.bus,a,e;if(Ext.isString(d)){a=d;d={};d[a]=f;this.control(d,null,c);return}Ext.Object.each(d,function(g,h){Ext.Object.each(h,function(l,m){var i={},j=c,k=Ext.create("Ext.util.Event",c,l);if(Ext.isObject(m)){i=m;m=i.fn;j=i.scope||c;delete i.fn;delete i.scope}k.addListener(m,j,i);b[l]=b[l]||{};b[l][g]=b[l][g]||{};b[l][g][c.id]=b[l][g][c.id]||[];b[l][g][c.id].push(k)})})}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=Ext.create("Ext.util.HashMap");this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(h,f,g){if(f==e){c.call(b||g,g);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,f=a.length,e=[],b,d,g;for(d=0;d<f;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,f=e.length;d<f;d++){g=e[d];this.types[g.ownerModel].prototype.associations.add(Ext.data.Association.create(g));Ext.Array.remove(a,g)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(b,d){if(b instanceof Ext.AbstractComponent){return b}else{if(Ext.isString(b)){return Ext.createByAlias("widget."+b)}else{var c=b.xtype||d,a=b;return Ext.createByAlias("widget."+c,a)}}},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{convert:function(b){return b},sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&b===undefined||b===null||b===""){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}var b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=d[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.addEvents("clear","add","replace","remove");c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in f){if(f.hasOwnProperty(c)){if(e.allowFunctions||typeof f[c]!="function"){e.add(c,f[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,f;for(;c<a;c++){f=b[c];if(e.call(d||f,f,c,a)===false){break}}},eachKey:function(e,d){var f=this.keys,b=this.items,c=0,a=f.length;for(;c<a;c++){e.call(d||window,f[c],b[c],c,a)}},findBy:function(e,d){var f=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],f[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,f=e;if(arguments.length==2){f=c;c=d.getKey(f)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,f)}d.length++;d.items.splice(a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}d.keys.splice(a,0,c);d.fireEvent("add",a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];c.items.splice(a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}c.keys.splice(a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d<a;d++){h=k[d];f=String(h);if((g||!Ext.isEmpty(h))&&!b[f]){b[f]=true;c.push(h)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(f,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}f=f||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(f<=a){for(d=f;d<=a;d++){b[b.length]=c[d]}}else{for(d=f;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h<n;h++){var l=b[h],k=l.filterFn,j=l.scope;m=m&&k.call(j,g)}return m};return this.filterBy(e)},filterBy:function(e,d){var h=this,a=new this.self(),g=h.keys,b=h.items,f=b.length,c;a.getKey=h.getKey;for(c=0;c<f;c++){if(e.call(d||h,b[c],g[c])){a.add(g[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(f){return f&&b.test(f[c])},null,e)},findIndexBy:function(e,d,h){var g=this,f=g.keys,b=g.items,c=h||0,a=b.length;for(;c<a;c++){if(e.call(d||g,b[c],f[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,f=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){f.add(d[c],b[c])}f.getKey=e.getKey;return f}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],sortRoot:null,initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}if(e!==false){d.onBeforeSort(a)}}if(e!==false){g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;m<n;m++){j=j||g[m].sort.call(this,l,k)}return j};d.doSort(b)}}return g},onBeforeSort:Ext.emptyFn,decodeSorters:function(f){if(!Ext.isArray(f)){if(f===undefined){f=[]}else{f=[f]}}var d=f.length,g=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=f[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}f[c]=Ext.create("Ext.util.Sorter",b)}}return f},getSorters:function(){return this.sorters.items},getSortState:function(){return this.sortInfo}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(k,a,j){var h=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,g=[],l=h.keys,f=h.items;j=j||function(i,c){return i-c};for(d=0,e=f.length;d<e;d++){g[g.length]={key:l[d],value:f[d],index:d}}Ext.Array.sort(g,function(i,c){var m=j(i[k],c[k])*b;if(m===0){m=(i.index<c.index?-1:1)}return m});for(d=0,e=g.length;d<e;d++){f[d]=g[d].value;l[d]=g[d].key}h.fireEvent("sort",h)},sortBy:function(c){var g=this,b=g.items,f=g.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:f[d],value:b[d],index:d}}Ext.Array.sort(a,function(i,h){var j=c(i.value,h.value);if(j===0){j=(i.index<h.index?-1:1)}return j});for(d=0;d<e;d++){b[d]=a[d].value;f[d]=a[d].key}g.fireEvent("sort",g,b,f)},reorder:function(d){var g=this,b=g.items,c=0,f=b.length,a=[],e=[],h;g.suspendEvents();for(h in d){a[d[h]]=b[h]}for(c=0;c<f;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<f;c++){if(a[c]==undefined){a[c]=e.shift()}}g.clear();g.addAll(a);g.resumeEvents();g.fireEvent("sort",g)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var f=String(d).toUpperCase(),e=String(c).toUpperCase();return f>e?1:(f<e?-1:0)})}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),f=c,d,a;if(e){f=[];for(d=0,a=c.length;d<a;++d){f.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return Ext.create("Ext.data.ArrayStore",{data:f,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=Ext.create("Ext.data.Store",b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,isReader:true,constructor:function(a){var b=this;Ext.apply(b,a||{});b.fieldCount=0;b.model=Ext.ModelManager.getModel(a.model);if(b.model){b.buildExtractors()}},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b=a;if(a&&a.responseText){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);var f=Ext.isArray(c)?c:d.getRoot(c),h=true,b=0,e,g,a,i;if(f){e=f.length}if(d.totalProperty){g=parseInt(d.getTotal(c),10);if(!isNaN(g)){e=g}}if(d.successProperty){g=d.getSuccess(c);if(g===false||g==="false"){h=false}}if(d.messageProperty){i=d.getMessage(c)}if(f){a=d.extractData(f);b=a.length}else{b=0;a=[]}return Ext.create("Ext.data.ResultSet",{total:e||b,count:b,records:a,success:h,message:i})},extractData:function(j){var h=this,k=[],e=[],d=h.model,f=0,b=j.length,l=h.getIdProperty(),c,a,g;if(!j.length&&Ext.isObject(j)){j=[j];b=1}for(;f<b;f++){c=j[f];k=h.extractValues(c);a=h.getId(c);g=new d(k,a);g.raw=c;e.push(g);if(h.implicitIncludes){h.readAssociated(g,c)}}return e},readAssociated:function(g,e){var d=g.associations.items,f=0,a=d.length,c,b,j,h;for(;f<a;f++){c=d[f];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){h=c.getReader();if(!h){j=c.associatedModel.proxy;if(j){h=j.getReader()}else{h=new this.constructor({model:c.associatedName})}}c.read(g,h,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},extractValues:function(f){var a=this.getFields(),c=0,d=a.length,b={},g,e;for(;c<d;c++){g=a[c];e=this.extractorFunctions[c](f);b[g.name]=e}return b},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(c){var a=c.fields,b;Ext.apply(this,c);if(a){b=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:a});this.setModel(b,true)}else{this.buildExtractors(true)}},getIdProperty:function(){var a=this.idProperty;if(Ext.isEmpty(a)){a=this.model.prototype.idProperty}return a},buildExtractors:function(e){var c=this,g=c.getIdProperty(),d=c.totalProperty,b=c.successProperty,f=c.messageProperty,a;if(e===true){delete c.extractorFunctions}if(c.extractorFunctions){return}if(d){c.getTotal=c.createAccessor(d)}if(b){c.getSuccess=c.createAccessor(b)}if(f){c.getMessage=c.createAccessor(f)}if(g){a=c.createAccessor(g);c.getId=function(h){var i=a.call(c,h);return(i===undefined||i==="")?null:i}}else{c.getId=function(){return null}}c.buildFieldExtractors()},buildFieldExtractors:function(){var d=this,a=d.getFields(),c=a.length,b=0,g=[],f,e;for(;b<c;b++){f=a[b];e=(f.mapping!==undefined&&f.mapping!==null)?f.mapping:f.name;g.push(d.createAccessor(e))}d.fieldCount=c;d.extractorFunctions=g}},function(){Ext.apply(this,{nullResultSet:Ext.create("Ext.data.ResultSet",{total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){try{var c=Ext.decode(a.responseText)}catch(b){Ext.Error.raise({response:a,json:a.responseText,parseError:b,msg:"Unable to parse the JSON returned by the server: "+b.toString()})}return c},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}this.mixins.observable.constructor.call(this,a);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a=="string"){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}b.reader=a;return b.reader},getReader:function(){return this.reader},setWriter:function(a){if(a===undefined||typeof a=="string"){a={type:a}}if(!(a instanceof Ext.data.writer.Writer)){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias("writer."+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(d,e){var f=this,c=Ext.create("Ext.data.Batch",{proxy:f,listeners:e||{}}),b=f.batchActions,a;Ext.each(f.batchOrder.split(","),function(g){a=d[g];if(a){if(b){c.add(Ext.create("Ext.data.Operation",{action:g,records:a}))}else{Ext.each(a,function(h){c.add(Ext.create("Ext.data.Operation",{action:g,records:[h]}))})}}},f);c.start();return c}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};this.addEvents("exception");b.callParent([a]);b.extraParams=a.extraParams||{};b.api=a.api||{};b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},buildRequest:function(a){var c=Ext.applyIf(a.params||{},this.extraParams||{}),b;c=Ext.applyIf(c,this.getParams(c,a));if(a.id&&!c.id){c.id=a.id}b=Ext.create("Ext.data.Request",{params:c,action:a.action,records:a.records,operation:a,url:a.url});b.url=this.buildUrl(b);a.request=b;return b},processResponse:function(m,c,e,d,l,n){var j=this,h,o,b,a,k,g,f;if(m===true){h=j.getReader();o=h.read(j.extractResponseData(d));b=o.records;a=b.length;if(o.success!==false){k=Ext.create("Ext.util.MixedCollection",true,function(i){return i.getId()});k.addAll(c.records);for(f=0;f<a;f++){g=k.get(b[f].getId());if(g){g.beginEdit();g.set(g.data);g.endEdit(true)}}Ext.apply(c,{response:d,resultSet:o});c.setCompleted();c.setSuccessful()}else{c.setException(o.message);j.fireEvent("exception",this,d,c)}}else{j.setException(c,d);j.fireEvent("exception",this,d,c)}if(typeof l=="function"){l.call(n||j,c)}j.afterRequest(e,m)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(q,k){q=q||{};var r=this,n=Ext.isDefined,o=k.groupers,a=k.sorters,i=k.filters,g=k.page,f=k.start,p=k.limit,h=r.simpleSortMode,m=r.pageParam,d=r.startParam,b=r.limitParam,c=r.groupParam,e=r.sortParam,l=r.filterParam,j=r.directionParam;if(m&&n(g)){q[m]=g}if(d&&n(f)){q[d]=f}if(b&&n(p)){q[b]=p}if(c&&o&&o.length>0){q[c]=r.encodeSorters(o)}if(e&&a&&a.length>0){if(h){q[e]=a[0].property;q[j]=a[0].direction}else{q[e]=r.encodeSorters(a)}}if(l&&i&&i.length>0){q[l]=r.encodeFilters(i)}return q},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(g,h,f){c.processResponse(h,a,d,f,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.data.proxy.Ajax","Ext.util.MixedCollection"],onClassExtended:function(a,b){var c=b.onBeforeClassCreated;b.onBeforeClassCreated=function(d,w){var v=this,x=Ext.getClassName(d),l=d.prototype,p=d.prototype.superclass,e=w.validations||[],n=w.fields||[],r=w.associations||[],q=w.belongsTo,m=w.hasMany,t=new Ext.util.MixedCollection(false,function(i){return i.name}),s=new Ext.util.MixedCollection(false,function(i){return i.name}),k=p.validations,u=p.fields,g=p.associations,f,o,h,j=[];d.modelName=x;l.modelName=x;if(k){e=k.concat(e)}w.validations=e;if(u){n=u.items.concat(n)}for(o=0,h=n.length;o<h;++o){t.add(new Ext.data.Field(n[o]))}w.fields=t;if(q){q=Ext.Array.from(q);for(o=0,h=q.length;o<h;++o){f=q[o];if(!Ext.isObject(f)){f={model:f}}f.type="belongsTo";r.push(f)}delete w.belongsTo}if(m){m=Ext.Array.from(m);for(o=0,h=m.length;o<h;++o){f=m[o];if(!Ext.isObject(f)){f={model:f}}f.type="hasMany";r.push(f)}delete w.hasMany}if(g){r=g.items.concat(r)}for(o=0,h=r.length;o<h;++o){j.push("association."+r[o].type.toLowerCase())}if(w.proxy){if(typeof w.proxy==="string"){j.push("proxy."+w.proxy)}else{if(typeof w.proxy.type==="string"){j.push("proxy."+w.proxy.type)}}}Ext.require(j,function(){Ext.ModelManager.registerType(x,d);for(o=0,h=r.length;o<h;++o){f=r[o];Ext.apply(f,{ownerModel:x,associatedModel:f.model});if(Ext.ModelManager.getModel(f.model)===undefined){Ext.ModelManager.registerDeferredAssociation(f)}else{s.add(Ext.data.Association.create(f))}}w.associations=s;c.call(v,d,w);d.setProxy(d.prototype.proxy||d.prototype.defaultProxyType);Ext.ModelManager.onModelDefined(d)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},load:function(f,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:f});var b=Ext.create("Ext.data.Operation",c),d=c.scope||this,a=null,e;e=function(g){if(g.wasSuccessful()){a=g.getRecords()[0];Ext.callback(c.success,d,[a,g])}else{Ext.callback(c.failure,d,[a,g])}Ext.callback(c.callback,d,[a,g])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},editing:false,dirty:false,persistanceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",defaultProxyType:"ajax",constructor:function(d,b){d=d||{};var h=this,g,c,j,a,e,f=Ext.isArray(d),k=f?{}:null;h.internalId=(b||b===0)?b:Ext.data.Model.id(h);Ext.applyIf(h,{data:{}});h.modified={};h[h.persistanceProperty]={};h.mixins.observable.constructor.call(h);g=h.fields.items;c=g.length;for(e=0;e<c;e++){j=g[e];a=j.name;if(f){k[a]=d[e]}else{if(d[a]===undefined){d[a]=j.defaultValue}}}h.set(k||d);h.dirty=false;h.modified={};if(h.getId()){h.phantom=false}if(typeof h.init=="function"){h.init()}h.id=h.modelName+"-"+h.internalId;Ext.ModelManager.register(h)},get:function(a){return this[this.persistanceProperty][a]},set:function(k,f){var d=this,c=d.fields,j=d.modified,b=[],e,h,a,g;if(arguments.length==1&&Ext.isObject(k)){for(h in k){if(k.hasOwnProperty(h)){e=c.get(h);if(e&&e.convert!==e.type.convert){b.push(h);continue}d.set(h,k[h])}}for(a=0;a<b.length;a++){e=b[a];d.set(e,k[e])}}else{if(c){e=c.get(k);if(e&&e.convert){f=e.convert(f,d)}}g=d.get(k);d[d.persistanceProperty][k]=f;if(e&&e.persist&&!d.isEqual(g,f)){d.dirty=true;d.modified[k]=g}if(!d.editing){d.afterEdit()}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistanceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistanceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a){var b=this;if(b.editing){b.editing=false;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(a!==true&&b.dirty){b.afterEdit()}}},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.persist){a=c.name;b.modified[a]=b.get(a)}},b)},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistanceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.dirty=false;b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistanceProperty]),a||b.internalId)},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var j=Ext.create("Ext.data.Errors"),c=this.validations,e=Ext.data.validations,b,d,h,a,g,f;if(c){b=c.length;for(f=0;f<b;f++){d=c[f];h=d.field||d.name;g=d.type;a=e[g](d,this.get(h));if(!a){j.add({field:h,message:d.message||e[g+"Message"]})}}}return j},isValid:function(){return this.validate().isValid()},save:function(c){c=Ext.apply({},c);var e=this,f=e.phantom?"create":"update",a=null,d=c.scope||e,b,g;Ext.apply(c,{records:[e],action:f});b=Ext.create("Ext.data.Operation",c);g=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];e.set(a.data);a.dirty=false;Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};e.getProxy()[f](b,g,e);return e},destroy:function(c){c=Ext.apply({},c);var e=this,a=null,d=c.scope||e,b,f;Ext.apply(c,{records:[e],action:"destroy"});b=Ext.create("Ext.data.Operation",c);f=function(g){if(g.wasSuccessful()){Ext.callback(c.success,d,[a,g])}else{Ext.callback(c.failure,d,[a,g])}Ext.callback(c.callback,d,[a,g])};e.getProxy().destroy(b,f,e);return e},getId:function(){return this.get(this.idProperty)},setId:function(a){this.set(this.idProperty,a)},join:function(a){this.store=a},unjoin:function(){delete this.store},afterEdit:function(){this.callStore("afterEdit")},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(b){var a=this.store;if(a!==undefined&&typeof a[b]=="function"){a[b](this)}},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(p,b,o){var k=p.associations.items,m=k.length,f={},g,a,h,r,s,e,d,n,l,q,c;for(n=0;n<m;n++){e=k[n];q=e.type;c=true;if(o){c=q==o}if(c&&q=="hasMany"){g=p[e.storeName];f[e.name]=[];if(g&&g.data.length>0){h=g.data.items;s=h.length;for(l=0;l<s;l++){r=h[l];d=r.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);f[e.name][l]=r.data;Ext.apply(f[e.name][l],this.prepareAssociatedData(r,b,q))}}}}else{if(c&&q=="belongsTo"){r=p[e.instanceName];if(r!==undefined){d=r.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);f[e.name]=r.data;Ext.apply(f[e.name],this.prepareAssociatedData(r,b,q))}}}}}return f}});Ext.define("Ext.XTemplate",{extend:"Ext.Template",statics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||{})}},argsRe:/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,nameRe:/^<tpl\b[^>]*?for="(.*?)"/,ifRe:/^<tpl\b[^>]*?if="(.*?)"/,execRe:/^<tpl\b[^>]*?exec="(.*?)"/,constructor:function(){this.callParent(arguments);var x=this,h=x.html,u=x.argsRe,c=x.nameRe,s=x.ifRe,w=x.execRe,o=0,j=[],n="values",v="parent",k="xindex",l="xcount",d="return ",b="with(values){ ",p,f,t,a,e,g,q,y,r;h=["<tpl>",h,"</tpl>"].join("");while((p=h.match(u))){e=null;g=null;q=null;f=p[0].match(c);t=p[0].match(s);a=p[0].match(w);e=t?t[1]:null;if(e){g=Ext.functionFactory(n,v,k,l,b+"try{"+d+Ext.String.htmlDecode(e)+";}catch(e){return;}}")}e=a?a[1]:null;if(e){q=Ext.functionFactory(n,v,k,l,b+Ext.String.htmlDecode(e)+";}")}y=f?f[1]:null;if(y){if(y==="."){y=n}else{if(y===".."){y=v}}y=Ext.functionFactory(n,v,"try{"+b+d+y+";}}catch(e){return;}")}j.push({id:o,target:y,exec:q,test:g,body:p[1]||""});h=h.replace(p[0],"{xtpl"+o+"}");o=o+1}for(r=j.length-1;r>=0;--r){x.compileTpl(j[r])}x.master=j[j.length-1];x.tpls=j},applySubTemplate:function(g,a,c,e,f){var d=this,b=d.tpls[g];return b.compiled.call(d,a,c,e,f)},codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?\}/g,compileTpl:function(tpl){var fm=Ext.util.Format,me=this,useFormat=me.disableFormats!==true,body,bodyReturn,evaluatedFn;function fn(m,name,format,args,math){var v;if(name.substr(0,4)=="xtpl"){return"',this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount),'"}if(name=="."){v='Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'}else{if(name=="#"){v="xindex"}else{if(name.substr(0,7)=="parent."){v=name}else{if(name.indexOf(".")!=-1){v="values."+name}else{v="values['"+name+"']"}}}}if(math){v="("+v+math+")"}if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="("+v+" === undefined ? '' : "}return"',"+format+v+args+"),'"}function codeFn(m,code){return"',("+code.replace(me.compileARe,"'")+"),'"}bodyReturn=tpl.body.replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn).replace(me.codeRe,codeFn);body="evaluatedFn = function(values, parent, xindex, xcount){return ['"+bodyReturn+"'].join('');};";eval(body);tpl.compiled=function(values,parent,xindex,xcount){var vs,length,buffer,i;if(tpl.test&&!tpl.test.call(me,values,parent,xindex,xcount)){return""}vs=tpl.target?tpl.target.call(me,values,parent):values;if(!vs){return""}parent=tpl.target?values:parent;if(tpl.target&&Ext.isArray(vs)){buffer=[];length=vs.length;if(tpl.exec){for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length);tpl.exec.call(me,vs[i],parent,i+1,length)}}else{for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length)}}return buffer.join("")}if(tpl.exec){tpl.exec.call(me,vs,parent,xindex,xcount)}return evaluatedFn.call(me,vs,parent,xindex,xcount)};return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}},function(){this.createAlias("apply","applyTemplate")});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,g=e.PI,d=e.pow,b=e.sin,f=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(h){return h},ease:function(k){var h=0.07813-k/2,l=-0.25,m=f(0.0066+h*h),p=m-h,j=d(a(p),1/3)*(p<0?-1:1),o=-m-h,i=d(a(o),1/3)*(o<0?-1:1),r=j+i+0.25;return d(1-r,2)*3*r*0.1+(1-r)*3*r*r+r*r*r},easeIn:function(h){return d(h,1.7)},easeOut:function(h){return d(h,0.48)},easeInOut:function(p){var k=0.48-p/1.04,j=f(0.1734+k*k),h=j-k,o=d(a(h),1/3)*(h<0?-1:1),m=-j-k,l=d(a(m),1/3)*(m<0?-1:1),i=o+l+0.5;return(1-i)*3*i*i+i*i*i},backIn:function(h){return h*h*((c+1)*h-c)},backOut:function(h){h=h-1;return h*h*((c+1)*h+c)+1},elasticIn:function(j){if(j===0||j===1){return j}var i=0.3,h=i/4;return d(2,-10*j)*b((j-h)*(2*g)/i)+1},elasticOut:function(h){return 1-Ext.fx.Easing.elasticIn(1-h)},bounceIn:function(h){return 1-Ext.fx.Easing.bounceOut(1-h)},bounceOut:function(k){var i=7.5625,j=2.75,h;if(k<(1/j)){h=i*k*k}else{if(k<(2/j)){k-=(1.5/j);h=i*k*k+0.75}else{if(k<(2.5/j)){k-=(2.25/j);h=i*k*k+0.9375}else{k-=(2.625/j);h=i*k*k+0.984375}}}return h}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:"Ext.FocusMgr",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],tabIndexWhitelist:["a","button","embed","frame","iframe","img","input","object","select","textarea"],constructor:function(){var a=this,b=Ext.ComponentQuery;a.addEvents("beforecomponentfocus","componentfocus","disable","enable");a.keyNav=Ext.create("Ext.util.KeyNav",Ext.getDoc(),{disabled:true,scope:a,backspace:a.focusLast,enter:a.navigateIn,esc:a.navigateOut,tab:a.navigateSiblings});a.focusData={};a.subscribers=Ext.create("Ext.util.HashMap");a.focusChain={};Ext.apply(b.pseudos,{focusable:function(f){var d=f.length,h=[],g=0,j,e=function(c){return c&&c.focusable!==false&&b.is(c,"[rendered]:not([destroying]):not([isDestroyed]):not([disabled]){isVisible(true)}{el && c.el.dom && c.el.isVisible()}")};for(;g<d;g++){j=f[g];if(e(j)){h.push(j)}}return h},nextFocus:function(f,e,h){h=h||1;e=parseInt(e,10);var d=f.length,g=e+h,j;for(;g!=e;g+=h){if(g>=d){g=0}else{if(g<0){g=d-1}}j=f[g];if(b.is(j,":focusable")){return[j]}else{if(j.placeholder&&b.is(j.placeholder,":focusable")){return[j.placeholder]}}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,g=[],f=0,h;for(;f<d;f++){h=e[f];if(!h.ownerCt){g.push(h)}}return g}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;Ext.ComponentManager.all.un("add",a.onComponentCreated,a);a.removeDOM();a.keyNav.disable();a.setFocusAll(false);a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}Ext.ComponentManager.all.on("add",b.onComponentCreated,b);b.initDOM(a);b.keyNav.enable();b.setFocusAll(true,a);b.focusEl.focus();delete b.focusedCmp;b.enabled=true;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(f,e){return f.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(b){var c=this,d=" ",a=c.focusFrameCls;if(!Ext.isReady){Ext.onReady(c.initDOM,c);return}if(!c.focusEl){c.focusEl=Ext.getBody().createChild({tabIndex:"-1",cls:c.focusElementCls,html:d})}if(!c.focusFrame&&b.focusFrame){c.focusFrame=Ext.getBody().createChild({cls:a,children:[{cls:a+"-top"},{cls:a+"-bottom"},{cls:a+"-left"},{cls:a+"-right"}],style:"top: -100px; left: -100px;"});c.focusFrame.setVisibilityMode(Ext.core.Element.DISPLAY);c.focusFrameWidth=c.focusFrame.child("."+a+"-top").getHeight();c.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(d){var b=this,a=b.focusedCmp,f,c;if(!a){f=b.getRootComponents();if(f.length){f[0].focus()}}else{c=Ext.ComponentQuery.query(">:focusable",a)[0];if(c){c.focus()}else{if(Ext.isFunction(a.onClick)){d.button=0;a.onClick(d);a.focus()}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus();return}a.focus()},navigateSiblings:function(h,b,m){var i=this,a=b||i,n=h.getKey(),f=Ext.EventObject,j=h.shiftKey||n==f.LEFT||n==f.UP,c=n==f.LEFT||n==f.RIGHT||n==f.UP||n==f.DOWN,g=j?"prev":"next",l,d,k;k=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!k&&!m){return}if(c&&i.isWhitelisted(k)){return true}m=m||k.up();if(m){l=k?Ext.Array.indexOf(m.getRefItems(),k):-1;d=Ext.ComponentQuery.query(">:"+g+"Focus("+l+")",m)[0];if(d&&k!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentCreated:function(b,c,a){this.setFocus(a,true,this.options)},onComponentDestroy:function(a){this.setFocus(a,false)},onComponentFocus:function(n,k){var l=this,a=l.focusChain;if(!Ext.ComponentQuery.is(n,":focusable")){l.clearComponent(n);if(a[n.id]){return}var p=n.up();if(p){a[n.id]=true;p.focus()}return}l.focusChain={};clearTimeout(l.cmpFocusDelay);if(arguments.length!==2){l.cmpFocusDelay=Ext.defer(l.onComponentFocus,90,l,[n,k]);return}if(l.fireEvent("beforecomponentfocus",l,n,l.previousFocusedCmp)===false){l.clearComponent(n);return}l.focusedCmp=n;if(l.shouldShowFocusFrame(n)){var r="."+l.focusFrameCls+"-",b=l.focusFrame,f=l.focusFrameWidth,i=n.el.getPageBox(),q=i.top,c=i.left,m=i.width,g=i.height,h=b.child(r+"top"),d=b.child(r+"bottom"),o=b.child(r+"left"),j=b.child(r+"right");h.setWidth(m-2).setLeftTop(c+1,q);d.setWidth(m-2).setLeftTop(c+1,q+g-f);o.setHeight(g-2).setLeftTop(c,q+1);j.setHeight(g-2).setLeftTop(c+m-f,q+1);b.show()}l.fireEvent("componentfocus",l,n,l.previousFocusedCmp)},onComponentHide:function(e){var d=this,f=Ext.ComponentQuery,b=false,a,c;if(d.focusedCmp){a=f.query("[id="+d.focusedCmp.id+"]",e)[0];b=d.focusedCmp.id===e.id||a;if(a){d.clearComponent(a)}}d.clearComponent(e);if(b){c=f.query("^:focusable",e)[0];if(c){c.focus()}}},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusEl,a.focusFrame);delete a.focusEl;delete a.focusFrame;delete a.focusFrameWidth},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setFocus:function(e,h,b){var d=this,c,g,f,a=function(i){return !Ext.Array.contains(d.tabIndexWhitelist,i.tagName.toLowerCase())&&i.tabIndex<=0};b=b||{};if(!e.rendered){e.on("afterrender",Ext.pass(d.setFocus,arguments,d),d,{single:true});return}c=e.getFocusEl();g=c.dom;if((h&&!d.focusData[e.id])||(!h&&d.focusData[e.id])){if(h){f={focusFrame:b.focusFrame};if(a(g)){f.tabIndex=g.tabIndex;g.tabIndex=-1}c.on({focus:f.focusFn=Ext.bind(d.onComponentFocus,d,[e],0),blur:f.blurFn=Ext.bind(d.onComponentBlur,d,[e],0),scope:d});e.on({hide:d.onComponentHide,close:d.onComponentHide,beforedestroy:d.onComponentDestroy,scope:d});d.focusData[e.id]=f}else{f=d.focusData[e.id];if("tabIndex" in f){g.tabIndex=f.tabIndex}c.un("focus",f.focusFn,d);c.un("blur",f.blurFn,d);e.un("hide",d.onComponentHide,d);e.un("close",d.onComponentHide,d);e.un("beforedestroy",d.onComponentDestroy,d);delete d.focusData[e.id]}}},setFocusAll:function(g,c){var f=this,b=Ext.ComponentManager.all.getArray(),a=b.length,e,d=0;for(;d<a;d++){f.setFocus(b[d],g,c)}},setupSubscriberKeys:function(a,f){var e=this,d=a.getFocusEl(),c=f.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},g=function(h){if(e.focusedCmp===a){return e.navigateSiblings(h,e,a)}else{return e.navigateSiblings(h)}};Ext.iterate(f,function(i,h){b[i]=function(k){var j=g(k);if(Ext.isFunction(h)&&h.call(c||a,k,j)===true){return true}return j}},e);return Ext.create("Ext.util.KeyNav",d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{};if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false},subscribe:function(a,c){var f=this,e=Ext.Array,g={},d=f.subscribers,b=function(h){if(h.isContainer&&!d.containsKey(h.id)){e.forEach(h.query(">"),b);f.setFocus(h,true,c);h.on("add",g.onAdd,f)}else{if(!h.isContainer){f.setFocus(h,true,c)}}};if(!a||!a.isContainer){return}if(!a.rendered){a.on("afterrender",Ext.pass(f.subscribe,arguments,f),f,{single:true});return}f.initDOM(c);g.keyNav=f.setupSubscriberKeys(a,c.keys);g.onAdd=function(i,j,h){b(j)};a.on("beforedestroy",f.unsubscribe,f);b(a);d.add(a.id,g)},unsubscribe:function(a){var e=this,d=Ext.Array,c=e.subscribers,f,b=function(g){if(g.isContainer&&!c.containsKey(g.id)){d.forEach(g.query(">"),b);e.setFocus(g,false);g.un("add",f.onAdd,e)}else{if(!g.isContainer){e.setFocus(g,false)}}};if(!a||!c.containsKey(a.id)){return}f=c.get(a.id);f.keyNav.destroy();a.un("beforedestroy",e.unsubscribe,e);c.removeAtKey(a.id);b(a);e.removeDOM()}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(k){var f=this.target,h=k.length,m,g,b,e,c,a,d,l;for(e=0;e<h;e++){m=k[e].attrs;for(g in m){if(m.hasOwnProperty(g)){a=m[g].length;for(c=0;c<a;c++){b=m[g][c];d=b[0];l=b[1];if(g==="x"){d.setX(l)}else{if(g==="y"){d.setY(l)}else{if(g==="scrollTop"){d.scrollTo("top",l)}else{if(g==="scrollLeft"){d.scrollTo("left",l)}else{d.setStyle(g,l)}}}}}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,this.getElVal(e,a,d)])},this);return b}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;if(a=="translate"){c={x:b.attr.translation.x||0,y:b.attr.translation.y||0}}else{if(a=="rotate"){c={degrees:b.attr.rotation.degrees||0,x:b.attr.rotation.x,y:b.attr.rotation.y}}else{c=b.attr[a]}}return c},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(m){var g=m.length,k=[],q,f,p,e,b,o,n,d,c,l,h,a;for(d=0;d<g;d++){q=m[d].attrs;for(f in q){p=q[f];a=p.length;for(c=0;c<a;c++){b=p[c][0];e=p[c][1];if(f==="translate"){n={x:e.x,y:e.y}}else{if(f==="rotate"){l=e.x;if(isNaN(l)){l=null}h=e.y;if(isNaN(h)){h=null}n={degrees:e.degrees,x:l,y:h}}else{if(f==="width"||f==="height"||f==="x"||f==="y"){n=parseFloat(e)}else{n=e}}}o=Ext.Array.indexOf(k,b);if(o==-1){k.push([b,{}]);o=k.length-1}k[o][1][f]=n}}}g=k.length;for(d=0;d<g;d++){b=k[d];b[0].setAttributes(b[1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,d!=undefined?d:this.getFromPrim(e,a)])},this);return b}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(s,e,b){var q=this,l=q.target,p=s.length,u,m,a,f,d,n,k,c,r,t,g;for(f=0;f<p;f++){u=s[f].attrs;for(m in u){k=u[m].length;n={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<k;d++){a=u[m][d];n[q.compMethod[m]].target=a[0];n[q.compMethod[m]][m]=a[1]}if(n.setPosition.target){a=n.setPosition;c=(a.left===undefined)?undefined:parseInt(a.left,10);r=(a.top===undefined)?undefined:parseInt(a.top,10);a.target.setPosition(c,r)}if(n.setPagePosition.target){a=n.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(n.setSize.target){a=n.setSize;t=(a.width===undefined)?a.target.getWidth():parseInt(a.width,10);g=(a.height===undefined)?a.target.getHeight():parseInt(a.height,10);if(b||q.dynamic){a.target.componentLayout.childrenChanged=true;if(q.layoutAnimation){a.target.setCalculatedSize(t,g)}else{a.target.setSize(t,g)}}else{a.target.el.setSize(t,g)}}if(n.setOpacity.target){a=n.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.CompositeElement","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=Ext.create("Ext.util.MixedCollection");this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(Ext.isString(d)){d=Ext.get(d)}if(d&&d.tagName){d=Ext.get(d);a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d);b.targets.add(a);return a}if(Ext.isObject(d)){if(d.dom){a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d)}else{if(d.isComposite){a=Ext.create("Ext.fx.target.CompositeElement"+(c?"CSS":""),d)}else{if(d.isSprite){a=Ext.create("Ext.fx.target.Sprite",d)}else{if(d.isCompositeSprite){a=Ext.create("Ext.fx.target.CompositeSprite",d)}else{if(d.isComponent){a=Ext.create("Ext.fx.target.Component",d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(c){var b=this.items,a=this.task;b.remove(c);if(a&&!b.length){Ext.TaskManager.stop(a);delete this.task}},startingFilter:function(a){return a.paused===false&&a.running===false&&a.iterations>0},runningFilter:function(a){return a.paused===false&&a.running===true&&a.isAnimator!==true},runner:function(){var b=this,a=b.items;b.targetData={};b.targetArr={};b.timestamp=new Date();a.filterBy(b.startingFilter).each(b.startAnim,b);a.filterBy(b.runningFilter).each(b.runAnim,b);b.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(d){if(!d){return}var c=this,b=d.target.getId(),f=c.useCSS3&&d.target.type=="element",a=c.timestamp-d.startTime,e,g;this.collectTargetData(d,a,f);if(f){d.target.setAttr(c.targetData[b],true);c.targetData[b]=[];c.collectTargetData(d,d.duration,f);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}g={};g[Ext.supports.CSS3TransitionEnd]=d.lastFrame;g.scope=d;g.single=true;e.on(g)}else{if(a>=d.duration){c.applyPendingAttrs(true);delete c.targetData[b];delete c.targetArr[b];d.lastFrame()}}},collectTargetData:function(d,a,e){var b=d.target.getId(),f=this.targetData[b],c;if(!f){f=this.targetData[b]=[];this.targetArr[b]=d.target}c={duration:d.duration,easing:(e&&d.reverse)?d.easingFn.reverse().toCSS3():d.easing,attrs:{}};Ext.apply(c.attrs,d.runAnim(a));f.push(c)},applyPendingAttrs:function(d){var c=this.targetData,b=this.targetArr,a;for(a in c){if(c.hasOwnProperty(a)){b[a].setAttr(c[a],false,d)}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(f){var j=this,m=[],k=j.to||{},c=j.duration,n,a,e,h,l,b,d,g;for(l in f){if(f.hasOwnProperty(l)&&j.animKeyFramesRE.test(l)){g={attrs:Ext.apply(f[l],k)};if(l=="from"){l=0}else{if(l=="to"){l=100}}g.pct=parseInt(l,10);m.push(g)}}Ext.Array.sort(m,j.sorter);h=m.length;for(e=0;e<h;e++){n=(m[e-1])?c*(m[e-1].pct/100):0;a=c*(m[e].pct/100);j.timeline.push({duration:a-n,attrs:m[e].attrs})}},applyAnimator:function(e){var j=this,k=[],n=j.timeline,f=j.reverse,h=n.length,b,g,a,d,m,l,c;if(j.fireEvent("beforeanimate",j)!==false){for(c=0;c<h;c++){b=n[c];m=b.attrs;g=m.easing||j.easing;a=m.damper||j.damper;delete m.easing;delete m.damper;b=Ext.create("Ext.fx.Anim",{target:e,easing:g,damper:a,duration:b.duration,paused:true,to:m});k.push(b)}j.animations=k;j.target=b.target;for(c=0;c<h-1;c++){b=k[c];b.nextAnim=k[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},j)}k[h-1].on("afteranimate",function(){this.lastFrame()},j)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)}});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}l{2},0,0,{3},{4},0z",a.x,a.y,a.width,a.height,-a.width)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(f,e,i){var h=[],g=e.toLowerCase();i.replace(b.pathValuesRE,function(k,j){j&&h.push(+j)});if(g=="m"&&h.length>2){c.push([e].concat(h.splice(0,2)));g="l";e=(e=="m")?"l":"L"}while(h.length>=d[g]){c.push([e].concat(h.splice(0,d[g])));if(!d[g]){break}}})}c.toString=b.path2string;return c},mapPath:function(k,f){if(!f){return k}var g,e,c,h,a,d,b;k=this.path2curve(k);for(c=0,h=k.length;c<h;c++){b=k[c];for(a=1,d=b.length;a<d-1;a+=2){g=f.x(b[a],b[a+1]);e=f.y(b[a],b[a+1]);b[a]=g;b[a+1]=e}}return k},pathClone:function(f){var c=[],a,e,b,d;if(!this.is(f,"array")||!this.is(f&&f[0],"array")){f=this.parsePathString(f)}for(b=0,d=f.length;b<d;b++){c[b]=[];for(a=0,e=f[b].length;a<e;a++){c[b][a]=f[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var l=[],n=0,m=0,q=0,p=0,c=0,g,s,a,o,f,h,e,b;if(d[0][0]=="M"){n=+d[0][1];m=+d[0][2];q=n;p=m;c++;l[0]=["M",n,m]}for(g=c,s=d.length;g<s;g++){a=l[g]=[];o=d[g];if(o[0]!=o[0].toUpperCase()){a[0]=o[0].toUpperCase();switch(a[0]){case"A":a[1]=o[1];a[2]=o[2];a[3]=o[3];a[4]=o[4];a[5]=o[5];a[6]=+(o[6]+n);a[7]=+(o[7]+m);break;case"V":a[1]=+o[1]+m;break;case"H":a[1]=+o[1]+n;break;case"M":q=+o[1]+n;p=+o[2]+m;default:for(f=1,h=o.length;f<h;f++){a[f]=+o[f]+((f%2)?n:m)}}}else{for(e=0,b=o.length;e<b;e++){l[g][e]=o[e]}}switch(a[0]){case"Z":n=q;m=p;break;case"H":n=a[1];break;case"V":m=a[1];break;case"M":q=l[g][l[g].length-2];p=l[g][l[g].length-1];default:n=l[g][l[g].length-2];m=l[g][l[g].length-1]}}l.toString=this.path2string;return l},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var m=[],o=0,n=0,s=0,q=0,c=0;if(d[0][0]=="M"){o=d[0][1];n=d[0][2];s=o;q=n;c++;m.push(["M",o,n])}for(var g=c,t=d.length;g<t;g++){var a=m[g]=[],p=d[g];if(p[0]!=p[0].toLowerCase()){a[0]=p[0].toLowerCase();switch(a[0]){case"a":a[1]=p[1];a[2]=p[2];a[3]=p[3];a[4]=p[4];a[5]=p[5];a[6]=+(p[6]-o).toFixed(3);a[7]=+(p[7]-n).toFixed(3);break;case"v":a[1]=+(p[1]-n).toFixed(3);break;case"m":s=p[1];q=p[2];default:for(var f=1,h=p.length;f<h;f++){a[f]=+(p[f]-((f%2)?o:n)).toFixed(3)}}}else{a=m[g]=[];if(p[0]=="m"){s=p[1]+o;q=p[2]+n}for(var e=0,b=p.length;e<b;e++){m[g][e]=p[e]}}var l=m[g].length;switch(m[g][0]){case"z":o=s;n=q;break;case"h":o+=+m[g][l-1];break;case"v":n+=+m[g][l-1];break;default:o+=+m[g][l-2];n+=+m[g][l-1]}}m.toString=this.path2string;return m},path2curve:function(j){var d=this,g=d.pathToAbsolute(j),c=g.length,h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,f,e;for(b=0;b<c;b++){g[b]=d.command2curve(g[b],h);if(g[b].length>7){g[b].shift();e=g[b];while(e.length){g.splice(b++,0,["C"].concat(e.splice(0,6)))}g.splice(b,1);c=g.length}a=g[b];f=a.length;h.x=a[f-2];h.y=a[f-1];h.bx=parseFloat(a[f-4])||h.x;h.by=parseFloat(a[f-3])||h.y}return g},interpolatePaths:function(q,k){var h=this,d=h.pathToAbsolute(q),l=h.pathToAbsolute(k),m={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,r){if(p[r].length>7){p[r].shift();var s=p[r];while(s.length){p.splice(r++,0,["C"].concat(s.splice(0,6)))}p.splice(r,1);n=Math.max(d.length,l.length||0)}},c=function(u,t,r,p,s){if(u&&t&&u[s][0]=="M"&&t[s][0]!="M"){t.splice(s,0,["M",p.x,p.y]);r.bx=0;r.by=0;r.x=u[s][1];r.y=u[s][2];n=Math.max(d.length,l.length||0)}};for(var g=0,n=Math.max(d.length,l.length||0);g<n;g++){d[g]=h.command2curve(d[g],m);b(d,g);(l[g]=h.command2curve(l[g],a));b(l,g);c(d,l,m,a,g);c(l,d,a,m,g);var f=d[g],o=l[g],e=f.length,j=o.length;m.x=f[e-2];m.y=f[e-1];m.bx=parseFloat(f[e-4])||m.x;m.by=parseFloat(f[e-3])||m.y;a.bx=(parseFloat(o[j-4])||a.x);a.by=(parseFloat(o[j-3])||a.y);a.x=o[j-2];a.y=o[j-1]}return[d,l]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,g,e,a,c){var f=1/3,h=2/3;return[f*b+h*g,f*d+h*e,f*a+h*g,f*c+h*e,a,c]},rotate:function(b,g,a){var d=Math.cos(a),c=Math.sin(a),f=b*d-g*c,e=b*c+g*d;return{x:f,y:e}},arc2curve:function(u,ag,I,G,A,n,g,s,af,B){var w=this,e=Math.PI,z=w.radian,F=e*120/180,b=z*(+A||0),N=[],K=Math,U=K.cos,a=K.sin,W=K.sqrt,v=K.abs,o=K.asin,J,c,q,P,O,ab,d,S,V,D,C,m,l,r,j,ae,f,ad,Q,T,R,ac,aa,Z,X,M,Y,L,E,H,p;if(!B){J=w.rotate(u,ag,-b);u=J.x;ag=J.y;J=w.rotate(s,af,-b);s=J.x;af=J.y;c=U(z*A);q=a(z*A);P=(u-s)/2;O=(ag-af)/2;ab=(P*P)/(I*I)+(O*O)/(G*G);if(ab>1){ab=W(ab);I=ab*I;G=ab*G}d=I*I;S=G*G;V=(n==g?-1:1)*W(v((d*S-d*O*O-S*P*P)/(d*O*O+S*P*P)));D=V*I*O/G+(u+s)/2;C=V*-G*P/I+(ag+af)/2;m=o(((ag-C)/G).toFixed(7));l=o(((af-C)/G).toFixed(7));m=u<D?e-m:m;l=s<D?e-l:l;if(m<0){m=e*2+m}if(l<0){l=e*2+l}if(g&&m>l){m=m-e*2}if(!g&&l>m){l=l-e*2}}else{m=B[0];l=B[1];D=B[2];C=B[3]}r=l-m;if(v(r)>F){E=l;H=s;p=af;l=m+F*(g&&l>m?1:-1);s=D+I*U(l);af=C+G*a(l);N=w.arc2curve(s,af,I,G,A,0,g,H,p,[l,E,D,C])}r=l-m;j=U(m);ae=a(m);f=U(l);ad=a(l);Q=K.tan(r/4);T=4/3*I*Q;R=4/3*G*Q;ac=[u,ag];aa=[u+T*ae,ag-R*j];Z=[s+T*ad,af-R*f];X=[s,af];aa[0]=2*ac[0]-aa[0];aa[1]=2*ac[1]-aa[1];if(B){return[aa,Z,X].concat(N)}else{N=[aa,Z,X].concat(N).join().split(",");M=[];L=N.length;for(Y=0;Y<L;Y++){M[Y]=Y%2?w.rotate(N[Y-1],N[Y],b).y:w.rotate(N[Y],N[Y+1],b).x}return M}},rotatePoint:function(b,g,e,a,f){if(!e){return{x:b,y:g}}a=a||0;f=f||0;b=b-a;g=g-f;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-g*c+a,y:b*c+g*d+f}},rotateAndTranslatePath:function(h){var c=h.rotation.degrees,d=h.rotation.x,b=h.rotation.y,n=h.translation.x,k=h.translation.y,m,f,a,l,e,g=[];if(!c&&!n&&!k){return this.pathToAbsolute(h.attr.path)}n=n||0;k=k||0;m=this.pathToAbsolute(h.attr.path);for(f=m.length;f--;){a=g[f]=m[f].slice();if(a[0]=="A"){l=this.rotatePoint(a[6],a[7],c,d,b);a[6]=l.x+n;a[7]=l.y+k}else{e=1;while(a[e+1]!=null){l=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=l.x+n;a[e+1]=l.y+k;e+=2}}}return g},pathDimensions:function(l){if(!l||!(l+"")){return{x:0,y:0,width:0,height:0}}l=this.path2curve(l);var h=0,g=0,d=[],b=[],c,e,k,a,j,f;for(e=0,k=l.length;e<k;e++){c=l[e];if(c[0]=="M"){h=c[1];g=c[2];d.push(h);b.push(g)}else{f=this.curveDim(h,g,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(f.min.x,f.max.x);b=b.concat(f.min.y,f.max.y);h=c[5];g=c[6]}}a=Math.min.apply(0,d);j=Math.min.apply(0,b);return{x:a,y:j,path:l,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-j}},intersect:function(p,d){var m,h,t,n,q;var f=function(e){return(h[0]-m[0])*(e[1]-m[1])>(h[1]-m[1])*(e[0]-m[0])};var a=function(){var v=[];var u=m[0]-h[0],s=m[1]-h[1],e=t[0]-n[0],w=t[1]-n[1],l=m[0]*h[1]-m[1]*h[0],j=t[0]*n[1]-t[1]*n[0],i=1/(u*w-s*e);v[0]=(l*e-j*u)*i;v[1]=(l*w-j*s)*i;return v};var r=p;m=d[d.length-1];for(var k=0,c=d.length;k<c;++k){h=d[k];var b=r;r=[];t=b[b.length-1];for(var g=0,o=b.length;g<o;g++){n=b[g];if(f(n)){if(!f(t)){r.push(a())}r.push(n)}else{if(f(t)){r.push(a())}}t=n}m=h}return r},curveDim:function(f,d,h,g,s,r,o,l){var q=(s-2*h+f)-(o-2*s+h),n=2*(h-f)-2*(s-h),k=f-h,j=(-n+Math.sqrt(n*n-4*q*k))/2/q,i=(-n-Math.sqrt(n*n-4*q*k))/2/q,m=[d,l],p=[f,o],e;if(Math.abs(j)>1000000000000){j=0.5}if(Math.abs(i)>1000000000000){i=0.5}if(j>0&&j<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i>0&&i<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}q=(r-2*g+d)-(l-2*r+g);n=2*(g-d)-2*(r-g);k=d-g;j=(-n+Math.sqrt(n*n-4*q*k))/2/q;i=(-n-Math.sqrt(n*n-4*q*k))/2/q;if(Math.abs(j)>1000000000000){j=0.5}if(Math.abs(i)>1000000000000){i=0.5}if(j>0&&j<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i>0&&i<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}return{min:{x:Math.min.apply(0,p),y:Math.min.apply(0,m)},max:{x:Math.max.apply(0,p),y:Math.max.apply(0,m)}}},getAnchors:function(d,c,p,n,i,g,s){s=s||4;var e=Math.min(Math.sqrt(Math.pow(d-p,2)+Math.pow(c-n,2))/s,Math.sqrt(Math.pow(i-p,2)+Math.pow(g-n,2))/s),q=Math.atan((p-d)/Math.abs(n-c)),o=Math.atan((i-p)/Math.abs(n-g)),k=Math.PI;q=c<n?k-q:q;o=g<n?k-o:o;var f=k/2-((q+o)%(k*2))/2;f>k/2&&(f-=k);var t=e*Math.sin(f+q),m=e*Math.cos(f+q),r=e*Math.sin(f+o),j=e*Math.cos(f+o),h={x1:p-t,y1:n+m,x2:p+r,y2:n+j};return h},smooth:function(a,q){var p=this.path2curve(a),e=[p[0]],h=p[0][1],g=p[0][2],r,t,u=1,k=p.length,f=1,m=h,l=g,c=0,b=0;for(;u<k;u++){var z=p[u],w=z.length,v=p[u-1],n=v.length,s=p[u+1],o=s&&s.length;if(z[0]=="M"){m=z[1];l=z[2];r=u+1;while(p[r][0]!="C"){r++}c=p[r][5];b=p[r][6];e.push(["M",m,l]);f=e.length;h=m;g=l;continue}if(z[w-2]==m&&z[w-1]==l&&(!s||s[0]=="M")){var d=e[f].length;t=this.getAnchors(v[n-2],v[n-1],m,l,e[f][d-2],e[f][d-1],q);e[f][1]=t.x2;e[f][2]=t.y2}else{if(!s||s[0]=="M"){t={x1:z[w-2],y1:z[w-1]}}else{t=this.getAnchors(v[n-2],v[n-1],z[w-2],z[w-1],s[o-2],s[o-1],q)}}e.push(["C",h,g,t.x1,t.y1,z[w-2],z[w-1]]);h=t.x2;g=t.y2}return e},findDotAtSegment:function(b,a,d,c,i,h,g,f,j){var e=1-j;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*j*d+e*3*j*j*i+Math.pow(j,3)*g,y:Math.pow(e,3)*a+Math.pow(e,2)*3*j*c+e*3*j*j*h+Math.pow(j,3)*f}},snapEnds:function(p,q,d){var c=(q-p)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),r,n=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],g=0,o,j,h,f,k=1000000000,l=b.length;r=p=Math.floor(p/e)*e;for(h=0;h<l;h++){o=b[h][0];j=(o-n)<0?1000000:(o-n)/b[h][1];if(j<k){f=o;k=j}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+f*Math.pow(10,a-2);while(r<q){r+=c;g++}q=+r.toFixed(10);return{from:p,to:q,power:a,step:c,steps:g}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(j){var e=this,f=j.type||"linear",c=j.angle||0,h=e.radian,k=j.stops,a=[],i,b,g,d;if(f=="linear"){b=[0,0,Math.cos(c*h),Math.sin(c*h)];g=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=g;b[3]*=g;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(i in k){if(k.hasOwnProperty(i)&&e.stopsRE.test(i)){d={offset:parseInt(i,10),color:Ext.draw.Color.toHex(k[i].color)||"#ffffff",opacity:k[i].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(f=="linear"){return{id:j.id,type:f,vector:b,stops:a}}else{return{id:j.id,type:f,centerX:j.centerX,centerY:j.centerY,focalX:j.focalX,focalY:j.focalY,radius:j.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaults:["width","height","top","left"],unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,computeDelta:function(h,b,f,e,a){f=(typeof f=="number")?f:1;var d=this.unitRE.exec(h),g,c;if(d){h=d[1];c=d[2];if(!c&&Ext.Array.contains(this.pixelDefaults,a)){c="px"}}h=+h||0;d=this.unitRE.exec(b);if(d){b=d[1];c=d[2]||c}b=+b||0;g=(e!=null)?e:h;return{from:h,delta:(b-g)*f,units:c}},get:function(n,b,a,m,h){var l=n.length,d=[],e,g,k,c,f;for(e=0;e<l;e++){if(m){g=m[e][1].from}if(Ext.isArray(n[e][1])&&Ext.isArray(b)){k=[];c=0;f=n[e][1].length;for(;c<f;c++){k.push(this.computeDelta(n[e][1][c],b[c],a,g,h))}d.push([n[e][0],k])}else{d.push([n[e][0],this.computeDelta(n[e][1],b,a,g,h)])}}return d},set:function(k,f){var g=k.length,c=[],d,a,h,e,b;for(d=0;d<g;d++){a=k[d][1];if(Ext.isArray(a)){h=[];b=0;e=a.length;for(;b<e;b++){h.push(a[b].from+(a[b].delta*f)+(a[b].units||0))}c.push([k[d][0],h])}else{c.push([k[d][0],a.from+(a.delta*f)+(a.units||0)])}}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(a,d){d=(typeof d=="number")?d:1;var e,c=false,b;Ext.each([this.hexRE,this.rgbRE,this.hex3RE],function(g,f){e=(f%2==0)?16:10;b=g.exec(a);if(b&&b.length==4){if(f==2){b[1]+=b[1];b[2]+=b[2];b[3]+=b[3]}c={red:parseInt(b[1],e),green:parseInt(b[2],e),blue:parseInt(b[3],e)};return false}});return c||a},computeDelta:function(g,a,e,c){g=this.parseColor(g);a=this.parseColor(a,e);var f=c?c:g,b=typeof f,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||f}return{from:g,delta:{red:Math.round((a.red-f.red)*e),green:Math.round((a.green-f.green)*e),blue:Math.round((a.blue-f.blue)*e)}}},get:function(h,a,f,d){var g=h.length,c=[],e,b;for(e=0;e<g;e++){if(d){b=d[e][1].from}c.push([h[e][0],this.computeDelta(h[e][1],a,f,b)])}return c},set:function(j,e){var f=j.length,c=[],d,b,a,g,h;for(d=0;d<f;d++){b=j[d][1];if(b){g=b.from;h=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(g.red+Math.round(h.red*e))%256,(g.green+Math.round(h.green*e))%256,(g.blue+Math.round(h.blue*e))%256].join(",")+")";c.push([j[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseInt(d[c],10)*b}return a},computeDelta:function(g,a,c,b){g=this.interpolate(g);a=this.interpolate(a,c);var f=b?b:g,e={},d;for(d in a){e[d]=a[d]-f[d]}return{from:g,delta:e}},get:function(h,a,f,d){var g=h.length,c=[],e,b;for(e=0;e<g;e++){if(d){b=d[e][1].from}c.push([h[e][0],this.computeDelta(h[e][1],a,f,b)])}return c},set:function(k,f){var g=k.length,c=[],e={},d,h,j,b,a;for(d=0;d<g;d++){b=k[d][1];h=b.from;j=b.delta;for(a in h){e[a]=Math.round(h[a]+j[a]*f)}c.push([k[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,h,a,p){var c=this.forcePath(h),m=[],r=b.length,d,g,n,f,o,l,e,s,q;for(n=0;n<r;n++){q=this.forcePath(b[n][1]);f=Ext.draw.Draw.interpolatePaths(q,c);q=f[0];c=f[1];d=q.length;s=[];for(l=0;l<d;l++){f=[q[l][0]];g=q[l].length;for(e=1;e<g;e++){o=p&&p[0][1][l][e].from;f.push(this.computeDelta(q[l][e],c[l][e],a,o))}s.push(f)}m.push([b[n][0],s])}return m},set:function(o,m){var n=o.length,e=[],g,f,d,h,l,c,a,b;for(g=0;g<n;g++){c=o[g][1];h=[];a=c.length;for(f=0;f<a;f++){l=[c[f][0]];b=c[f].length;for(d=1;d<b;d++){l.push(c[f][d].from+c[f][d].delta*m)}h.push(l.join(","))}e.push([o[g][0],h.join(",")])}return e}}}},function(){Ext.each(["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],function(a){this[a]=this.color},this)});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,constructor:function(a){var b=this;a=a||{};if(a.keyframes){return Ext.create("Ext.fx.Animator",a)}a=Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){var c=b.easingFn;b.easingFn=Ext.fx.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");Ext.fx.Manager.addAnim(b);b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b,a);if(a.callback){b.on("afteranimate",a.callback,a.scope)}return b},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,g=e.from,h=e.to,f=e.initialFrom||{},c={},a,b,i,d;for(d in h){if(h.hasOwnProperty(d)){a=e.target.getAttr(d,g[d]);b=h[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){i=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{i=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{i=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=i.get(a,b,e.damper,f[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true}},runAnim:function(k){var h=this,j=h.currentAttrs,d=h.duration,c=h.easingFn,b=h.propHandlers,f={},g,i,e,a;if(k>=d){k=d;a=true}if(h.reverse){k=d-k}for(e in j){if(j.hasOwnProperty(e)){i=j[e];g=a?1:c(k/d);f[e]=b[e].set(i,g)}}return f},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},end:function(){var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime)}});Ext.enableFx=true;Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",monitorChildren:true,initLayout:function(){var c=this,a=c.owner,b=a.el;if(!c.initialized){if(a.frameSize){c.frameSize=a.frameSize}else{a.frameSize=c.frameSize={top:0,left:0,bottom:0,right:0}}}c.callParent(arguments)},beforeLayout:function(b,j,k,i){this.callParent(arguments);var g=this,c=g.owner,d=c.ownerCt,f=c.layout,e=c.isVisible(true),a=c.el.child,h;if(!k&&!(Ext.isNumber(b)&&Ext.isNumber(j))&&d&&d.layout&&d.layout.fixedLayout&&d!=i){g.doContainerLayout();return false}if(!e&&(c.hiddenAncestor||c.floating)){if(c.hiddenAncestor){h=c.hiddenAncestor.layoutOnShow;h.remove(c);h.add(c)}c.needsLayout={width:b,height:j,isSetSize:false}}if(e&&this.needsLayout(b,j)){g.rawWidth=b;g.rawHeight=j;return c.beforeComponentLayout(b,j,k,i)}else{return false}},needsLayout:function(b,a){this.lastComponentSize=this.lastComponentSize||{width:-Infinity,height:-Infinity};return(this.childrenChanged||this.lastComponentSize.width!==b||this.lastComponentSize.height!==a)},setElementSize:function(c,b,a){if(b!==undefined&&a!==undefined){c.setSize(b,a)}else{if(a!==undefined){c.setHeight(a)}else{if(b!==undefined){c.setWidth(b)}}}},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},setTargetSize:function(d,a){var e=this;e.setElementSize(e.owner.el,d,a);if(e.owner.frameBody){var g=e.getTargetInfo(),f=g.padding,c=g.border,b=e.frameSize;e.setElementSize(e.owner.frameBody,Ext.isNumber(d)?(d-b.left-b.right-f.left-f.right-c.left-c.right):d,Ext.isNumber(a)?(a-b.top-b.bottom-f.top-f.bottom-c.top-c.bottom):a)}e.autoSized={width:!Ext.isNumber(d),height:!Ext.isNumber(a)};e.lastComponentSize={width:d,height:a}},getTargetInfo:function(){if(!this.targetInfo){var b=this.getTarget(),a=this.owner.getTargetEl();this.targetInfo={padding:{top:b.getPadding("t"),right:b.getPadding("r"),bottom:b.getPadding("b"),left:b.getPadding("l")},border:{top:b.getBorderWidth("t"),right:b.getBorderWidth("r"),bottom:b.getBorderWidth("b"),left:b.getBorderWidth("l")},bodyMargin:{top:a.getMargin("t"),right:a.getMargin("r"),bottom:a.getMargin("b"),left:a.getMargin("l")}}}return this.targetInfo},doOwnerCtLayouts:function(){var a=this.owner,c=a.ownerCt,b,d;if(!c){return}b=c.componentLayout;d=c.layout;if(!a.floating&&b&&b.monitorChildren&&!b.layoutBusy){if(!c.suspendLayout&&d&&!d.layoutBusy){if(d.bindToOwnerCtComponent===true){c.doComponentLayout()}else{if(d.bindToOwnerCtContainer===true){d.layout()}}}}},doContainerLayout:function(){var e=this,a=e.owner,c=a.ownerCt,d=a.layout,b;if(!a.suspendLayout&&d&&d.isLayout&&!d.layoutBusy){d.layout()}if(c&&c.componentLayout){b=c.componentLayout;if(!a.floating&&b.monitorChildren&&!b.layoutBusy){b.childrenChanged=true}}},afterLayout:function(c,a,b,d){this.doContainerLayout();this.owner.afterComponentLayout(c,a,b,d)}});Ext.define("Ext.layout.component.AbstractDock",{extend:"Ext.layout.component.Component",type:"dock",autoSizing:true,beforeLayout:function(){var a=this.callParent(arguments);if(a!==false&&(!this.initializedBorders||this.childrenChanged)&&(!this.owner.border||this.owner.manageBodyBorders)){this.handleItemBorders();this.initializedBorders=true}return a},handleItemBorders:function(){var a=this.owner,e=a.body,l=this.getLayoutItems(),g={top:[],right:[],bottom:[],left:[]},b=this.borders,d={top:"bottom",right:"left",bottom:"top",left:"right"},c,h,k,j,f;for(c=0,h=l.length;c<h;c++){k=l[c];j=k.dock;if(k.ignoreBorderManagement){continue}if(!g[j].satisfied){g[j].push(k);g[j].satisfied=true}if(!g.top.satisfied&&d[j]!=="top"){g.top.push(k)}if(!g.right.satisfied&&d[j]!=="right"){g.right.push(k)}if(!g.bottom.satisfied&&d[j]!=="bottom"){g.bottom.push(k)}if(!g.left.satisfied&&d[j]!=="left"){g.left.push(k)}}if(b){for(f in b){if(b.hasOwnProperty(f)){h=b[f].length;if(!a.manageBodyBorders){for(c=0;c<h;c++){b[f][c].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+f)}if(!b[f].satisfied&&!a.bodyBorder){e.removeCls(Ext.baseCSSPrefix+"docked-noborder-"+f)}}else{if(b[f].satisfied){e.setStyle("border-"+f+"-width","")}}}}}for(f in g){if(g.hasOwnProperty(f)){h=g[f].length;if(!a.manageBodyBorders){for(c=0;c<h;c++){g[f][c].addCls(Ext.baseCSSPrefix+"docked-noborder-"+f)}if((!g[f].satisfied&&!a.bodyBorder)||a.bodyBorder===false){e.addCls(Ext.baseCSSPrefix+"docked-noborder-"+f)}}else{if(g[f].satisfied){e.setStyle("border-"+f+"-width","1px")}}}}this.borders=g},onLayout:function(a,m){var i=this,b=i.owner,g=b.body,f=b.layout,h=i.getTarget(),k=false,l=false,j,e,d;var c=i.info={boxes:[],size:{width:a,height:m},bodyBox:{}};Ext.applyIf(c,i.getTargetInfo());if(b&&b.ownerCt&&b.ownerCt.layout&&b.ownerCt.layout.isLayout){if(!Ext.isNumber(b.height)||!Ext.isNumber(b.width)){b.ownerCt.layout.bindToOwnerCtComponent=true}else{b.ownerCt.layout.bindToOwnerCtComponent=false}}if(m===undefined||m===null||a===undefined||a===null){j=c.padding;e=c.border;d=i.frameSize;if((m===undefined||m===null)&&(a===undefined||a===null)){l=true;k=true;i.setTargetSize(null);i.setBodyBox({width:null,height:null})}else{if(m===undefined||m===null){l=true;i.setTargetSize(a);i.setBodyBox({width:a-j.left-e.left-j.right-e.right-d.left-d.right,height:null})}else{k=true;i.setTargetSize(null,m);i.setBodyBox({width:null,height:m-j.top-j.bottom-e.top-e.bottom-d.top-d.bottom})}}if(f&&f.isLayout){f.bindToOwnerCtComponent=true;f.layout();c.autoSizedCtLayout=f.autoSize===true}i.dockItems(k,l);i.setTargetSize(c.size.width,c.size.height)}else{i.setTargetSize(a,m);i.dockItems()}i.callParent(arguments)},dockItems:function(g,a){this.calculateDockBoxes(g,a);var f=this.info,c=f.boxes,e=c.length,d,b;for(b=0;b<e;b++){d=c[b];d.item.setPosition(d.x,d.y);if((g||a)&&d.layout&&d.layout.isLayout){d.layout.bindToOwnerCtComponent=true}}if(!f.autoSizedCtLayout){if(g){f.bodyBox.width=null}if(a){f.bodyBox.height=null}}this.setBodyBox(f.bodyBox)},calculateDockBoxes:function(n,o){var k=this,g=k.getTarget(),j=k.getLayoutItems(),a=k.owner,q=a.body,b=k.info,r=b.size,h=j.length,m=b.padding,d=b.border,c=k.frameSize,p,e,f,l;if(o){r.height=q.getHeight()+m.top+d.top+m.bottom+d.bottom+c.top+c.bottom}else{r.height=g.getHeight()}if(n){r.width=q.getWidth()+m.left+d.left+m.right+d.right+c.left+c.right}else{r.width=g.getWidth()}b.bodyBox={x:m.left+c.left,y:m.top+c.top,width:r.width-m.left-d.left-m.right-d.right-c.left-c.right,height:r.height-d.top-m.top-d.bottom-m.bottom-c.top-c.bottom};for(e=0;e<h;e++){p=j[e];f=k.initBox(p);if(o===true){f=k.adjustAutoBox(f,e)}else{f=k.adjustSizedBox(f,e)}b.boxes.push(f)}},adjustSizedBox:function(e,d){var a=this.info.bodyBox,b=this.frameSize,g=this.info,f=g.padding,h=e.type,c=g.border;switch(h){case"top":e.y=a.y;break;case"left":e.x=a.x;break;case"bottom":e.y=(a.y+a.height)-e.height;break;case"right":e.x=(a.x+a.width)-e.width;break}if(e.ignoreFrame){if(h=="bottom"){e.y+=(b.bottom+f.bottom+c.bottom)}else{e.y-=(b.top+f.top+c.top)}if(h=="right"){e.x+=(b.right+f.right+c.right)}else{e.x-=(b.left+f.left+c.left)}}if(!e.overlay){switch(h){case"top":a.y+=e.height;a.height-=e.height;break;case"left":a.x+=e.width;a.width-=e.width;break;case"bottom":a.height-=e.height;break;case"right":a.width-=e.width;break}}return e},adjustAutoBox:function(g,k){var a=this.info,l=a.bodyBox,p=a.size,h=a.boxes,e=h.length,n=g.type,d=this.frameSize,o=a.padding,c=a.border,b=a.autoSizedCtLayout,m=(e<k)?e:k,f,j;if(n=="top"||n=="bottom"){for(f=0;f<m;f++){j=h[f];if(j.stretched&&j.type=="left"||j.type=="right"){j.height+=g.height}else{if(j.type=="bottom"){j.y+=g.height}}}}switch(n){case"top":g.y=l.y;if(!g.overlay){l.y+=g.height}p.height+=g.height;break;case"bottom":g.y=(l.y+l.height);p.height+=g.height;break;case"left":g.x=l.x;if(!g.overlay){l.x+=g.width;if(b){p.width+=g.width}else{l.width-=g.width}}break;case"right":if(!g.overlay){if(b){p.width+=g.width}else{l.width-=g.width}}g.x=(l.x+l.width);break}if(g.ignoreFrame){if(n=="bottom"){g.y+=(d.bottom+o.bottom+c.bottom)}else{g.y-=(d.top+o.top+c.top)}if(n=="right"){g.x+=(d.right+o.right+c.right)}else{g.x-=(d.left+o.left+c.left)}}return g},initBox:function(j){var h=this,g=h.info.bodyBox,a=(j.dock=="top"||j.dock=="bottom"),b=h.owner,e=h.frameSize,c=h.info,i=c.padding,d=c.border,f={item:j,overlay:j.overlay,type:j.dock,offsets:Ext.core.Element.parseBox(j.offsets||{}),ignoreFrame:j.ignoreParentFrame};if(j.stretch!==false){f.stretched=true;if(a){f.x=g.x+f.offsets.left;f.width=g.width-(f.offsets.left+f.offsets.right);if(f.ignoreFrame){f.width+=(e.left+e.right+d.left+d.right+i.left+i.right)}j.setCalculatedSize(f.width-j.el.getMargin("lr"),undefined,b)}else{f.y=g.y+f.offsets.top;f.height=g.height-(f.offsets.bottom+f.offsets.top);if(f.ignoreFrame){f.height+=(e.top+e.bottom+d.top+d.bottom+i.top+i.bottom)}j.setCalculatedSize(undefined,f.height-j.el.getMargin("tb"),b);if(!Ext.supports.ComputedStyle){j.el.repaint()}}}else{j.doComponentLayout();f.width=j.getWidth()-(f.offsets.left+f.offsets.right);f.height=j.getHeight()-(f.offsets.bottom+f.offsets.top);f.y+=f.offsets.top;if(a){f.x=(j.align=="right")?g.width-f.width:g.x;f.x+=f.offsets.left}}if(f.width==undefined){f.width=j.getWidth()+j.el.getMargin("lr")}if(f.height==undefined){f.height=j.getHeight()+j.el.getMargin("tb")}return f},getLayoutItems:function(){var c=this.owner.getDockedItems(),d=c.length,b=0,a=[];for(;b<d;b++){if(c[b].isVisible(true)){a.push(c[b])}}return a},renderItems:function(g,e){var a=e.dom.childNodes,d=a.length,f=g.length,k=0,c,b,h,l;for(c=0;c<d;c++){h=Ext.get(a[c]);for(b=0;b<f;b++){l=g[b];if(l.rendered&&(h.id==l.el.id||h.down("#"+l.el.id))){break}}if(b===f){k++}}for(c=0,b=0;c<f;c++,b++){l=g[c];if(c===b&&(l.dock==="right"||l.dock==="bottom")){b+=k}if(l&&!l.rendered){this.renderItem(l,e,b)}else{if(!this.isValidParent(l,e,b)){this.moveItem(l,e,b)}}}},setBodyBox:function(f){var h=this,a=h.owner,g=a.body,b=h.info,e=b.bodyMargin,i=b.padding,d=b.border,c=h.frameSize;if(a.collapsed){return}if(Ext.isNumber(f.width)){f.width-=e.left+e.right}if(Ext.isNumber(f.height)){f.height-=e.top+e.bottom}h.setElementSize(g,f.width,f.height);if(Ext.isNumber(f.x)){g.setLeft(f.x-i.left-c.left)}if(Ext.isNumber(f.y)){g.setTop(f.y-i.top-c.top)}},configureItem:function(a,b){this.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.layout.component.Dock",{alias:["layout.dock"],extend:"Ext.layout.component.AbstractDock"});Ext.define("Ext.layout.component.Tip",{alias:["layout.tip"],extend:"Ext.layout.component.Dock",type:"tip",onLayout:function(b,i){var g=this,c=g.owner,d=c.el,a,h,f,e,j=d.getXY();d.setXY([-9999,-9999]);this.callParent(arguments);if(!Ext.isNumber(b)){a=c.minWidth;h=c.maxWidth;if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){e=g.doAutoWidth()}else{f=d.getWidth()}if(f<a){e=a}else{if(f>h){e=h}}if(e){this.callParent([e,i])}}d.setXY(j)},doAutoWidth:function(){var d=this,b=d.owner,a=b.body,c=a.getTextWidth();if(b.header){c=Math.max(c,b.header.getWidth())}if(!Ext.isDefined(d.frameWidth)){d.frameWidth=b.el.getWidth()-a.getWidth()}c+=d.frameWidth+a.getPadding("lr");return c}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.y=e.top=e[1]=d;e.right=f;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.y,g.y),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.x,g.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.y,g.y),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.x,g.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=Ext.create("Ext.util.Offset");c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(c,b){for(var d in this.ids){for(var a in this.ids[d]){var e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(f,b){var e=[];for(var d in f.groups){for(var c in this.ids[d]){var a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true);for(var c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(b){for(var a in this.ids){if(this.ids[a][b]){return this.ids[a][b]}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}else{}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&&(c.button!==0&&c.button!==1&&c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}if(!this.dragThreshMet){var b=Math.abs(this.startX-c.getPageX());var a=Math.abs(this.startY-c.getPageY());if(b>this.clickPixelThresh||a>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(l,m){var o=this.dragCurrent;if(!o||o.isLocked()){return}var p=l.getPoint();var a=[];var d=[];var j=[];var g=[];var c=[];for(var f in this.dragOvers){var b=this.dragOvers[f];if(!this.isTypeOfDD(b)){continue}if(!this.isOverTarget(p,b,this.mode)){d.push(b)}a[f]=true;delete this.dragOvers[f]}for(var n in o.groups){if("string"!=typeof n){continue}for(f in this.ids[n]){var h=this.ids[n][f];if(!this.isTypeOfDD(h)){continue}if(h.isTarget&&!h.isLocked()&&((h!=o)||(o.ignoreSelf===false))){if(this.isOverTarget(p,h,this.mode)){if(m){g.push(h)}else{if(!a[h.id]){c.push(h)}else{j.push(h)}this.dragOvers[h.id]=h}}}}}if(this.mode){if(d.length){o.b4DragOut(l,d);o.onDragOut(l,d)}if(c.length){o.onDragEnter(l,c)}if(j.length){o.b4DragOver(l,j);o.onDragOver(l,j)}if(g.length){o.b4DragDrop(l,g);o.onDragDrop(l,g)}}else{var k=0;for(f=0,k=d.length;f<k;++f){o.b4DragOut(l,d[f].id);o.onDragOut(l,d[f].id)}for(f=0,k=c.length;f<k;++f){o.onDragEnter(l,c[f].id)}for(f=0,k=j.length;f<k;++f){o.b4DragOver(l,j[f].id);o.onDragOver(l,j[f].id)}for(f=0,k=g.length;f<k;++f){o.b4DragDrop(l,g[f].id);o.onDragDrop(l,g[f].id)}}if(m&&!g.length){o.onInvalidDrop(l)}},getBestMatch:function(c){var e=null;var b=c.length;if(b==1){e=c[0]}else{for(var d=0;d<b;++d){var a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){for(var a in b){if("string"!=typeof a){continue}for(var c in this.ids[a]){var d=this.ids[a][c];if(this.isTypeOfDD(d)){var e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(h){if(!this.isTypeOfDD(h)){return null}if(h.getRegion){return h.getRegion()}var f=h.getEl(),k,d,c,n,m,o,a,j,g;try{k=Ext.core.Element.getXY(f)}catch(i){}if(!k){return null}d=k[0];c=d+f.offsetWidth;n=k[1];m=n+f.offsetHeight;o=n-h.padding[0];a=c+h.padding[1];j=m+h.padding[2];g=d-h.padding[3];return Ext.create("Ext.util.Region",o,a,j,g)},isOverTarget:function(i,a,c){var e=this.locationCache[a.id];if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(i);var h=this.dragCurrent;if(!h||!h.getTargetCoord||(!c&&!h.constrainX&&!h.constrainY)){return a.cursorIsOver}a.overlap=null;var f=h.getTargetCoord(i.x,i.y);var b=h.getDragEl();var d=Ext.create("Ext.util.Region",f.y,f.x+b.offsetWidth,f.y+b.offsetHeight,f.x);var g=d.intersect(e);if(g){a.overlap=g;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.core.Element.getX(a)},getPosY:function(a){return Ext.core.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode;var b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.core.Element.getXY(c);Ext.core.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount>2000){}else{setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.container.AbstractContainer",alternateClassName:"Ext.layout.ContainerLayout",layoutItem:function(b,a){a=a||{};if(b.componentLayout.initialized!==true){this.setItemSize(b,a.width||b.width||undefined,a.height||b.height||undefined)}},getLayoutTargetSize:function(){var b=this.getTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},beforeLayout:function(){if(this.owner.beforeLayout(arguments)!==false){return this.callParent(arguments)}else{return false}},afterLayout:function(){this.owner.afterLayout(arguments);this.callParent(arguments)},getRenderedItems:function(){var e=this,g=e.getTarget(),a=e.getLayoutItems(),d=a.length,f=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,g,b)){f.push(c)}}return f},getVisibleItems:function(){var f=this.getTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,f,c)&&d.hidden!==true){a.push(d)}}return a}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",fixedLayout:false,bindToOwnerCtComponent:true,onLayout:function(a,f){var e=this,b=e.getLayoutItems(),d=b.length,c;if(d){if(!e.clearEl){e.clearEl=e.getRenderTarget().createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}for(c=0;c<d;c++){e.setItemSize(b[c])}}}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.core.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{});this.addEvents("scroll")},initCSSClasses:function(){var b=this,a=b.layout;if(!b.CSSinitialized){b.beforeCtCls=b.beforeCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelBefore;b.afterCtCls=b.afterCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelAfter;b.beforeScrollerCls=b.beforeScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelBefore;b.afterScrollerCls=b.afterScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelAfter;b.CSSinitializes=true}},handleOverflow:function(a,f){var e=this,d=e.layout,c="get"+d.parallelPrefixCap,b={};e.initCSSClasses();e.callParent(arguments);this.createInnerElements();this.showScrollers();b[d.perpendicularPrefix]=f[d.perpendicularPrefix];b[d.parallelPrefix]=f[d.parallelPrefix]-(e.beforeCt[c]()+e.afterCt[c]());return{targetSize:b}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!a.beforeCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");a.beforeCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls},"before");a.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls},"after");a.createWheelListener()}},createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons();this.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide();this.layout.owner.removeClsWithUI("scroller")}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:Ext.String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:Ext.String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClsOnOver(this.beforeScrollerCls+"-hover");b.addClsOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.core.Element.DISPLAY);b.setVisibilityMode(Ext.core.Element.DISPLAY);this.beforeRepeater=Ext.create("Ext.util.ClickRepeater",a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=Ext.create("Ext.util.ClickRepeater",b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeRepeater,this.afterRepeater,this.beforeScroller,this.afterScroller,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addCls":"removeCls",c=this.atExtremeAfter()?"addCls":"removeCls",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var a=this.layout;return parseInt(a.innerCt.dom["scroll"+a.parallelBeforeCap],10)||0},getMaxScrollPosition:function(){var a=this.layout;return a.innerCt.dom["scroll"+a.parallelPrefixCap]-this.layout.innerCt["get"+a.parallelPrefixCap]()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var f=this,e=f.layout,d=f.getScrollPosition(),c=Ext.Number.constrain(a,0,f.getMaxScrollPosition());if(c!=d&&!f.scrolling){if(b==undefined){b=f.animateScroll}e.innerCt.scrollTo(e.parallelBefore,c,b?f.getScrollAnim():false);if(b){f.scrolling=true}else{f.scrolling=false;f.updateScrollButtons()}f.fireEvent("scroll",f,c,b?f.getScrollAnim():false)}},scrollToItem:function(g,b){var f=this,e=f.layout,a,d,c;g=f.getItem(g);if(g!=undefined){a=this.getItemVisibility(g);if(!a.fullyVisible){d=g.getBox(true,true);c=d[e.parallelPosition];if(a.hiddenEnd){c-=(this.layout.innerCt["get"+e.parallelPrefixCap]()-d[e.parallelPrefix])}this.scrollTo(c,b)}}},getItemVisibility:function(f){var e=this,d=e.getItem(f).getBox(true,true),c=e.layout,b=d[c.parallelPosition],g=b+d[c.parallelPrefix],h=e.getScrollPosition(),a=h+c.innerCt["get"+c.parallelPrefixCap]();return{hiddenStart:b<h,hiddenEnd:g>a,fullyVisible:b>h&&g<a}}});Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(h,f,m){if(Ext.isNumber(f)){f={left:f,right:f,top:f,bottom:f}}f=f||this.defaultPadding;var j=Ext.get(this.getEl()).getBox(),a=Ext.get(h),l=a.getScroll(),i,d=a.dom;if(d==document.body){i={x:l.left,y:l.top,width:Ext.core.Element.getViewWidth(),height:Ext.core.Element.getViewHeight()}}else{var k=a.getXY();i={x:k[0],y:k[1],width:d.clientWidth,height:d.clientHeight}}var g=j.y-i.y,e=j.x-i.x;this.resetConstraints();this.setXConstraint(e-(f.left||0),i.width-e-j.width-(f.right||0),this.xTickSize);this.setYConstraint(g-(f.top||0),i.height-g-j.height-(f.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl();if(!this.DDMInstance.verifyEl(e)){return}var b=d||0;var a=c||0;var f=Ext.core.Element.getXY(e);this.initPageX=f[0]-b;this.initPageY=f[1]-a;this.lastPageX=f[0];this.lastPageY=f[1];this.setStartPosition(f)},setStartPosition:function(b){var a=b||Ext.core.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);var a=c.getPoint();if(!this.hasOuterHandles&&!this.DDMInstance.isOverTarget(a,this)){}else{if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}else{}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true;var g;try{g=d.nodeName.toUpperCase()}catch(f){g=d.nodeName}c=c&&!this.invalidHandleTypes[g];c=c&&!this.invalidHandleIds[d.id];for(var b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={};for(var b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={};for(var b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(g,d){if(!d){return g}else{if(d[0]>=g){return d[0]}else{for(var b=0,a=d.length;b<a;++b){var c=b+1;if(d[c]&&d[c]>=g){var f=g-d[b];var e=d[c]-g;return(e>f)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var f=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),k=d.getSize(),h=Ext.core.Element,i;if(!this.deltaSetXY){i=this.cachedViewportSize={width:h.getDocumentWidth(),height:h.getDocumentHeight()};var a=[Math.max(0,Math.min(f.x,i.width-k.width)),Math.max(0,Math.min(f.y,i.height-k.height))];d.setXY(a);var j=d.getLeft(true);var g=d.getTop(true);this.deltaSetXY=[j-f.x,g-f.y]}else{i=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(f.x+this.deltaSetXY[0],i.width-k.width)),Math.max(0,Math.min(f.y+this.deltaSetXY[1],i.height-k.height)))}this.cachePosition(f.x,f.y);this.autoScroll(f.x,f.y,b.offsetHeight,b.offsetWidth);return f},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.core.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=Ext.core.Element.getViewHeight();var b=Ext.core.Element.getViewWidth();var o=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i>m&&g<c){window.scrollTo(d,o+a)}if(j<o&&o>0&&j-o<c){window.scrollTo(d,o-a)}if(n>b&&f<c){window.scrollTo(d+a,o)}if(k<d&&d>0&&k-d<c){window.scrollTo(d-a,o)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=Ext.create("Ext.dd.StatusProxy",{animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){this.callParent(arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=Ext.create("Ext.panel.Proxy",b,a);this.callParent([b.el,a]);Ext.defer(function(){var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=d.el}c.setStyle("cursor","move");this.scroll=false},200,this)},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.el.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,f){var e=[],b=this.types;for(var a in b){if(!b.hasOwnProperty(a)){continue}var d=b[a];if(d.type==c&&(!f||(f===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.LoadMask",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",useMsg:true,disabled:false,constructor:function(b,a){var c=this;if(b.isComponent){c.bindComponent(b)}else{c.el=Ext.get(b)}Ext.apply(c,a);c.addEvents("beforeshow","show","hide");if(c.store){c.bindStore(c.store,true)}c.mixins.observable.constructor.call(c,a)},bindComponent:function(a){var c=this,b={resize:c.onComponentResize,scope:c};if(a.el){c.onComponentRender(a)}else{b.render={fn:c.onComponentRender,scope:c,single:true}}c.mon(a,b)},onComponentRender:function(a){this.el=a.getContentTarget()},onComponentResize:function(b,a,c){this.el.isMasked()},bindStore:function(a,b){var c=this;if(!b&&c.store){c.mun(c.store,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad});if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad})}c.store=a;if(a&&a.isLoading()){c.onBeforeLoad()}},disable:function(){var a=this;a.disabled=true;if(a.loading){a.onLoad()}},enable:function(){this.disabled=false},isDisabled:function(){return this.disabled},onLoad:function(){var a=this;a.loading=false;a.el.unmask();a.fireEvent("hide",a,a.el,a.store)},onBeforeLoad:function(){var a=this;if(!a.disabled&&!a.loading&&a.fireEvent("beforeshow",a,a.el,a.store)!==false){if(a.useMsg){a.el.mask(a.msg,a.msgCls,false)}else{a.el.mask()}a.fireEvent("show",a,a.el,a.store);a.loading=true}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){this.hide();this.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var f=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){f=false}return f},Component:function(a,c,g){var h=true,f=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){h=false}if(h){if(g.removeAll){f.removeAll()}f.add(b)}return h}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",onLayout:function(b,a){this.setTargetSize(b,a)}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=Ext.create("Ext.state.Provider")},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=[c]}var d=this,b=0,a=c.length;for(;b<a;++b){d.on(c[b],d.onStateChange,d)}},onStateChange:function(){var b=this,a=b.saveDelay;if(a>0){if(!b.stateTask){b.stateTask=Ext.create("Ext.util.DelayedTask",b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent("beforestatesave",a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent("statesave",a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent("beforestaterestore",a,b)!==false){a.applyState(b);a.fireEvent("staterestore",a,b)}}}}},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define("Ext.AbstractComponent",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",state:"Ext.state.Stateful"},requires:["Ext.PluginManager","Ext.ComponentManager","Ext.core.Element","Ext.core.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.LoadMask","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Layout","Ext.layout.component.Auto"],uses:["Ext.ZIndexManager"],statics:{AUTO_ID:1000},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},renderTpl:null,tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",allowDomMove:true,autoShow:false,autoRender:false,needsLayout:false,rendered:false,weight:0,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,maskOnDisable:true,constructor:function(b){var d=this,c,a;b=b||{};d.initialConfig=b;Ext.apply(d,b);d.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","resize","move");d.getId();d.mons=[];d.additionalCls=[];d.renderData=d.renderData||{};d.renderSelectors=d.renderSelectors||{};if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;c<a;c++){d.plugins[c]=d.constructPlugin(d.plugins[c])}}d.initComponent();Ext.ComponentManager.register(d);d.mixins.observable.constructor.call(d);d.mixins.state.constructor.call(d,b);if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;c<a;c++){d.plugins[c]=d.initPlugin(d.plugins[c])}}d.loader=d.getLoader();if(d.renderTo){d.render(d.renderTo)}if(d.autoShow){d.show()}},initComponent:Ext.emptyFn,show:Ext.emptyFn,animate:function(b){var f=this,j;b=b||{};j=b.to||{};if(Ext.fx.Manager.hasFxBlock(f.id)){return f}if(!b.dynamic&&(j.height||j.width)){var e=f.getWidth(),k=e,d=f.getHeight(),c=d,a=false;if(j.height&&j.height>d){c=j.height;a=true}if(j.width&&j.width>e){k=j.width;a=true}if(a){var i=!Ext.isNumber(f.width),g=!Ext.isNumber(f.height);f.componentLayout.childrenChanged=true;f.setSize(k,c,f.ownerCt);f.el.setSize(e,d);if(i){delete f.width}if(g){delete f.height}}}return f.mixins.animate.animate.apply(f,arguments)},findLayoutController:function(){return this.findParentBy(function(a){return !a.ownerCt||(a.layout.layoutBusy&&!a.ownerCt.layout.layoutBusy)})},onShow:function(){var a=this.needsLayout;if(Ext.isObject(a)){this.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},initPlugin:function(a){a.init(this);return a},doAutoRender:function(){var a=this;if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}},render:function(b,a){var c=this;if(!c.rendered&&c.fireEvent("beforerender",c)!==false){if(c.el){c.el=Ext.get(c.el)}if(c.floating){c.onFloatRender()}b=c.initContainer(b);c.onRender(b,a);c.el.setVisibilityMode(Ext.core.Element[c.hideMode.toUpperCase()]);if(c.overCls){c.el.hover(c.addOverCls,c.removeOverCls,c)}c.fireEvent("render",c);c.initContent();c.afterRender(b);c.fireEvent("afterrender",c);c.initEvents();if(c.hidden){c.el.hide()}if(c.disabled){c.disable(true)}}return c},onRender:function(a,d){var f=this,b=f.el,j=f.initCls(),h=f.initStyles(),e,g,c;d=f.getInsertPosition(d);if(!b){if(d){b=Ext.core.DomHelper.insertBefore(d,f.getElConfig(),true)}else{b=Ext.core.DomHelper.append(a,f.getElConfig(),true)}}else{if(f.allowDomMove!==false){if(d){a.dom.insertBefore(b.dom,d)}else{a.dom.appendChild(b.dom)}}}if(Ext.scopeResetCSS&&!f.ownerCt){if(b.dom==Ext.getBody().dom){b.parent().addCls(Ext.baseCSSPrefix+"reset")}else{f.resetEl=b.wrap({cls:Ext.baseCSSPrefix+"reset"})}}b.addCls(j);b.setStyle(h);f.el=b;f.rendered=true;f.addUIToElement(true);for(c=0;c<f.uiCls.length;c++){f.addUIClsToElement(f.uiCls[c],true)}f.rendered=false;f.initFrame();e=f.initRenderTpl();if(e){g=f.initRenderData();e.append(f.getTargetEl(),g)}f.applyRenderSelectors();f.rendered=true;f.setUI(f.ui)},afterRender:function(){var a=this,c,b;a.getComponentLayout();if(!a.ownerCt||(a.height||a.width)){a.setSize(a.width,a.height)}if(a.floating&&(a.x===undefined||a.y===undefined)){if(a.floatParent){b=a.el.getAlignToXY(a.floatParent.getTargetEl(),"c-c");c=a.floatParent.getTargetEl().translatePoints(b[0],b[1])}else{b=a.el.getAlignToXY(a.container,"c-c");c=a.container.translatePoints(b[0],b[1])}a.x=a.x===undefined?c.left:a.x;a.y=a.y===undefined?c.top:a.y}if(Ext.isDefined(a.x)||Ext.isDefined(a.y)){a.setPosition(a.x,a.y)}if(a.styleHtmlContent){a.getTargetEl().addCls(a.styleHtmlCls)}},frameCls:Ext.baseCSSPrefix+"frame",frameTpl:['<tpl if="top">','<tpl if="left"><div class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>"],frameTableTpl:["<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" style="background-position: 0 0;" role="presentation"></td>','<tpl if="right"><td class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>"],initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var d=this,c=d.getFrameInfo(),b=c.width,a=d.getFrameTpl(c.table);if(d.frame){a.insertFirst(d.el,Ext.apply({},{ui:d.ui,uiCls:d.uiCls,frameCls:d.frameCls,baseCls:d.baseCls,frameWidth:b,top:!!c.top,left:!!c.left,right:!!c.right,bottom:!!c.bottom},d.getFramePositions(c)));d.frameBody=d.el.down("."+d.frameCls+"-mc");Ext.apply(d.renderSelectors,{frameTL:"."+d.baseCls+"-tl",frameTC:"."+d.baseCls+"-tc",frameTR:"."+d.baseCls+"-tr",frameML:"."+d.baseCls+"-ml",frameMC:"."+d.baseCls+"-mc",frameMR:"."+d.baseCls+"-mr",frameBL:"."+d.baseCls+"-bl",frameBC:"."+d.baseCls+"-bc",frameBR:"."+d.baseCls+"-br"})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,g=this.frameSize&&this.frameSize.table,f=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){delete e.frameTL;delete e.frameTC;delete e.frameTR;delete e.frameML;delete e.frameMC;delete e.frameMR;delete e.frameBL;delete e.frameBC;delete e.frameBR;this.applyRenderSelectors();b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(g){e.el.query("> table")[1].remove()}else{if(f){f.remove()}if(d){d.remove()}c.remove()}}else{}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius){return false}var c=this,f=c.el.getStyle("background-position-x"),e=c.el.getStyle("background-position-y"),d,b=false,a;if(!f&&!e){d=c.el.getStyle("background-position").split(" ");f=d[0];e=d[1]}if(parseInt(f,10)>=1000000&&parseInt(e,10)>=1000000){a=Math.max;b={table:f.substr(0,3)=="110",vertical:e.substr(0,3)=="110",top:a(f.substr(3,2),f.substr(5,2)),right:a(f.substr(5,2),e.substr(3,2)),bottom:a(e.substr(3,2),e.substr(5,2)),left:a(e.substr(5,2),f.substr(3,2))};b.width=a(b.top,b.right,b.bottom,b.left);c.el.setStyle("background-image","none")}if(c.frame===true&&!b){}c.frame=c.frame||!!b;c.frameSize=b||false;return b},getFramePositions:function(e){var g=this,h=e.width,i=g.dock,d,b,f,c,a;if(e.vertical){b="0 -"+(h*0)+"px";f="0 -"+(h*1)+"px";if(i&&i=="right"){b="right -"+(h*0)+"px";f="right -"+(h*1)+"px"}d={tl:"0 -"+(h*0)+"px",tr:"0 -"+(h*1)+"px",bl:"0 -"+(h*2)+"px",br:"0 -"+(h*3)+"px",ml:"-"+(h*1)+"px 0",mr:"right 0",tc:b,bc:f}}else{c="-"+(h*0)+"px 0";a="right 0";if(i&&i=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(h*2)+"px",tr:"right -"+(h*3)+"px",bl:"0 -"+(h*4)+"px",br:"right -"+(h*5)+"px",ml:c,mr:a,tc:"0 -"+(h*0)+"px",bc:"0 -"+(h*1)+"px"}}return d},getFrameTpl:function(a){return a?this.getTpl("frameTableTpl"):this.getTpl("frameTpl")},initCls:function(){var b=this,a=[];a.push(b.baseCls);if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}if(b.cls){a.push(b.cls);delete b.cls}return a.concat(b.additionalCls)},setUI:function(e){var d=this,b=Ext.Array.clone(d.uiCls),f=[],a,c;for(c=0;c<b.length;c++){a=b[c];d.removeClsWithUI(a);f.push(a)}d.removeUIFromElement();d.ui=e;d.addUIToElement();for(c=0;c<f.length;c++){a=f[c];d.addClsWithUI(a)}},addClsWithUI:function(a){var c=this,b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&!c.hasUICls(a[b])){c.uiCls=Ext.Array.clone(c.uiCls);c.uiCls.push(a[b]);c.addUIClsToElement(a[b])}}},removeClsWithUI:function(a){var c=this,b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&c.hasUICls(a[b])){c.uiCls=Ext.Array.remove(c.uiCls,a[b]);c.removeUIClsFromElement(a[b])}}},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},addUIClsToElement:function(a,f){var e=this;e.addCls(Ext.baseCSSPrefix+a);e.addCls(e.baseCls+"-"+a);e.addCls(e.baseCls+"-"+e.ui+"-"+a);if(!f&&e.rendered&&e.frame&&!Ext.supports.CSS3BorderRadius){var c=["tl","tc","tr","ml","mc","mr","bl","bc","br"],b,d;for(b=0;b<c.length;b++){d=e["frame"+c[b].toUpperCase()];if(d&&d.dom){d.addCls(e.baseCls+"-"+e.ui+"-"+c[b]);d.addCls(e.baseCls+"-"+e.ui+"-"+a+"-"+c[b])}}}},removeUIClsFromElement:function(a,f){var e=this;e.removeCls(Ext.baseCSSPrefix+a);e.removeCls(e.baseCls+"-"+a);e.removeCls(e.baseCls+"-"+e.ui+"-"+a);if(!f&&e.rendered&&e.frame&&!Ext.supports.CSS3BorderRadius){var c=["tl","tc","tr","ml","mc","mr","bl","bc","br"],b,d;for(b=0;b<c.length;b++){d=e["frame"+c[b].toUpperCase()];if(d&&d.dom){d.removeCls(e.baseCls+"-"+e.ui+"-"+a+"-"+c[b])}}}},addUIToElement:function(e){var d=this;d.addCls(d.baseCls+"-"+d.ui);if(d.rendered&&d.frame&&!Ext.supports.CSS3BorderRadius){var b=["tl","tc","tr","ml","mc","mr","bl","bc","br"],a,c;for(a=0;a<b.length;a++){c=d["frame"+b[a].toUpperCase()];if(c){c.addCls(d.baseCls+"-"+d.ui+"-"+b[a])}}}},removeUIFromElement:function(){var d=this;d.removeCls(d.baseCls+"-"+d.ui);if(d.rendered&&d.frame&&!Ext.supports.CSS3BorderRadius){var b=["tl","tc","tr","ml","mc","mr","bl","bc","br"],a,c;for(a=0;a<b.length;a++){c=d["frame"+b[a].toUpperCase()];if(c){c.removeCls(d.baseCls+"-"+d.ui+"-"+b[a])}}}},getElConfig:function(){var a=this.autoEl||{tag:"div"};a.id=this.id;return a},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=Ext.get(a);if(b.ctCls){b.container.addCls(b.ctCls)}return b.container},initRenderData:function(){var a=this;return Ext.applyIf(a.renderData,{ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame})},getTpl:function(b){var a=this.self.prototype,c;if(this.hasOwnProperty(b)){if(!(this[b] instanceof Ext.XTemplate)){this[b]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",this[b])}return this[b]}if(!(a[b] instanceof Ext.XTemplate)){c=a;do{if(c.hasOwnProperty(b)){c[b]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",c[b]);break}c=c.superclass}while(c)}return a[b]},initRenderTpl:function(){return this.getTpl("renderTpl")},initStyles:function(){var b={},c=this,a=Ext.core.Element;if(Ext.isString(c.style)){b=a.parseStyles(c.style)}else{b=Ext.apply({},c.style)}if(c.padding!==undefined){b.padding=a.unitizeBox((c.padding===true)?5:c.padding)}if(c.margin!==undefined){b.margin=a.unitizeBox((c.margin===true)?5:c.margin)}delete c.style;return b},initContent:function(){var b=this,d=b.getTargetEl(),a,c;if(b.html){d.update(Ext.core.DomHelper.markup(b.html));delete b.html}if(b.contentEl){a=Ext.get(b.contentEl);c=Ext.baseCSSPrefix;a.removeCls([c+"hidden",c+"hide-display",c+"hide-offsets",c+"hide-nosize"]);d.appendChild(a.dom)}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=Ext.create("Ext.XTemplate",b.tpl)}if(b.data){b.tpl[b.tplWriteMode](d,b.data);delete b.data}}},initEvents:function(){var b=this,d=b.afterRenderEvents,c,a;if(d){for(c in d){if(d.hasOwnProperty(c)){a=d[c];if(b[c]&&b[c].on){b.mon(b[c],a)}}}}},applyRenderSelectors:function(){var b=this.renderSelectors||{},c=this.el.dom,a;for(a in b){if(b.hasOwnProperty(a)&&b[a]){this[a]=Ext.get(Ext.DomQuery.selectNode(b[a],c))}}},is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.ownerCt;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var f=this.ownerCt,d,e,a,g;if(f){d=f.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((g=d.getAt(a)).is(b)){return g}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,f;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((f=d.getAt(a)).is(b)){return f}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var g=this,b,f,a,e;if(d&&g.is(c)){return g}b=this.prev(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items.items,e=Ext.Array.indexOf(f,g)-1;e>-1;e--){if(f[e].query){b=f[e].query(c);b=b[b.length-1];if(b){return b}}}return g.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var g=this,b,f,a,e;if(d&&g.is(c)){return g}b=this.next(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items,e=f.indexOf(g)+1,f=f.items,a=f.length;e<a;e++){if(f[e].down){b=f[e].down(c);if(b){return b}}}return g.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},isXType:function(b,a){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.statics().xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.self.xtype==b},getXTypes:function(){var b=this.self,c=[],a=this,d;if(!b.xtypes){while(a&&Ext.getClass(a)){d=Ext.getClass(a).xtype;if(d!==undefined){c.unshift(d)}a=a.superclass}b.xtypeChain=c;b.xtypes=c.join("/")}return b.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.core.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.doComponentLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&c.rendered&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},enable:function(a){var b=this;if(b.rendered){b.el.removeCls(b.disabledCls);b.el.dom.disabled=false;b.onEnable()}b.disabled=false;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;if(b.rendered){b.el.addCls(b.disabledCls);b.el.dom.disabled=true;b.onDisable()}b.disabled=true;if(a!==true){b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.mask()}},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.addCls(a)}else{b.additionalCls=Ext.Array.unique(b.additionalCls.concat(a))}return b},addClass:function(){return this.addCls.apply(this,arguments)},removeCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.removeCls(a)}else{if(b.additionalCls.length){Ext.each(a,function(c){Ext.Array.remove(b.additionalCls,c)})}}return b},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,f,e,a){var g=this,d,c;if(Ext.isString(b)&&(Ext.isObject(f)||a&&a.element)){if(a.element){d=f;f={};f[b]=d;b=a.element;if(e){f.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(g.eventOptionsRe.test(c)){f[c]=a[c]}}}}if(g[b]&&g[b].on){g.mon(g[b],f)}else{g.afterRenderEvents=g.afterRenderEvents||{};g.afterRenderEvents[b]=f}}return g.mixins.observable.addListener.apply(g,arguments)},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,b){this.ownerCt=a;this.fireEvent("added",this,a,b)},onRemoved:function(){var a=this;a.fireEvent("removed",a,a.ownerCt);delete a.ownerCt},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this,d;if(Ext.isObject(b)){a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:true};if(!c.rendered){c.width=(b!==undefined)?b:c.width;c.height=(a!==undefined)?a:c.height}return c}c.doComponentLayout(b,a,true);return c},setCalculatedSize:function(c,a,b){var d=this,e;if(Ext.isObject(c)){b=c.ownerCt;a=c.height;c=c.width}if(Ext.isNumber(c)){c=Ext.Number.constrain(c,d.minWidth,d.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,d.minHeight,d.maxHeight)}if(!d.rendered||!d.isVisible()){if(d.hiddenAncestor){e=d.hiddenAncestor.layoutOnShow;e.remove(d);e.add(d)}d.needsLayout={width:c,height:a,isSetSize:false,ownerCt:b};return d}d.doComponentLayout(c,a,false,b);return d},doComponentLayout:function(e,a,b,d){var f=this,c=f.getComponentLayout();if(f.rendered&&c){e=(e!==undefined)?e:f.width;a=(a!==undefined)?a:f.height;if(b){f.width=e;f.height=a}c.layout(e,a,b,d)}return f},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,d){this.fireEvent("resize",this,c,a)},beforeComponentLayout:function(c,a,b,d){return true},setPosition:function(a,c){var b=this;if(Ext.isObject(a)){c=a.y;a=a.x}if(!b.rendered){return b}if(a!==undefined||c!==undefined){b.el.setBox(a,c);b.onPosition(a,c);b.fireEvent("move",b,a,c)}return b},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=Ext.create("Ext.ComponentLoader",Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setLoading:function(c,d){var b=this,a;if(b.rendered){if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=c}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}b.loadMask=b.loadMask||Ext.create("Ext.LoadMask",d?b.getTargetEl():b.el,a);b.loadMask.show()}else{if(b.loadMask){Ext.destroy(b.loadMask);b.loadMask=null}}}return b.loadMask},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.doComponentLayout()}return a},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask)},destroy:function(){var a=this;if(!a.isDestroyed){if(a.fireEvent("beforedestroy",a)!==false){a.destroying=true;a.beforeDestroy();if(a.floating){delete a.floatParent;if(a.zIndexManager){a.zIndexManager.unregister(a)}}else{if(a.ownerCt&&a.ownerCt.remove){a.ownerCt.remove(a,false)}}if(a.rendered){a.el.remove()}a.onDestroy();Ext.destroy(a.plugins);Ext.ComponentManager.unregister(a);a.fireEvent("destroy",a);a.mixins.state.destroy.call(a);a.clearListeners();a.destroying=false;a.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){this.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"})});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left"},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,ariaRole:"presentation",bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){a=a||{};if(a.initialConfig){if(a.isAction){this.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}this.callParent([a]);if(this.baseAction){this.baseAction.addComponent(this)}},initComponent:function(){var a=this;if(a.listeners){a.on(a.listeners);delete a.listeners}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var b=this,a=b.resizable;if(b.floating){b.makeFloating(b.floating)}else{b.el.setVisibilityMode(Ext.core.Element[b.hideMode.toUpperCase()])}b.setAutoScroll(b.autoScroll);b.callParent();if(!(b.x&&b.y)&&(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(a){b.initResizable(a)}if(b.draggable){b.initDraggable()}b.initAria()},initAria:function(){var a=this.getActionEl(),b=this.ariaRole;if(b){a.dom.setAttribute("role",b)}},setAutoScroll:function(a){var b=this,c;a=!!a;if(b.rendered){c=b.getTargetEl();c.setStyle("overflow",a?"auto":"");if(a&&(Ext.isIE6||Ext.isIE7)){c.position()}}b.autoScroll=a;return b},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},initResizable:function(a){a=Ext.apply({target:this,dynamic:false,constrainTo:this.constrainTo,handles:this.resizeHandles},a);a.target=this;this.resizer=Ext.create("Ext.resizer.Resizer",a)},getDragEl:function(){return this.el},initDraggable:function(){var b=this,a=Ext.applyIf({el:this.getDragEl(),constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.dom.parentNode)},this.draggable);if(b.constrain||b.constrainDelegate){a.constrain=b.constrain;a.constrainDelegate=b.constrainDelegate}this.dd=Ext.create("Ext.util.ComponentDragger",this,a)},setPosition:function(j,h,a){var f=this,b=f.el,k={},g,i,e,d,c;if(Ext.isArray(j)){a=h;h=j[1];j=j[0]}f.x=j;f.y=h;if(!f.rendered){return f}g=f.adjustPosition(j,h);i=g.x;e=g.y;d=Ext.isNumber(i);c=Ext.isNumber(e);if(d||c){if(a){if(d){k.left=i}if(c){k.top=e}f.stopAnimation();f.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(f.afterSetPosition,f,[i,e])},to:k},a))}else{if(!d){b.setTop(e)}else{if(!c){b.setLeft(i)}else{b.setLeftTop(i,e)}}f.afterSetPosition(i,e)}}return f},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,c,b){if(this.floating){this.setPosition(a,c,b)}else{this.setPagePosition(a,c,b)}this.show()},setPagePosition:function(a,e,b){var c=this,d;if(Ext.isArray(a)){e=a[1];a=a[0]}c.pageX=a;c.pageY=e;if(c.floating&&c.floatParent){d=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(d.left)){a-=d.left}if(Ext.isNumber(e)&&Ext.isNumber(d.top)){e-=d.top}c.setPosition(a,e,b)}else{d=c.el.translatePoints(a,e);c.setPosition(d.left,d.top,b)}return c},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,c){if(this.floating&&this.floatParent){var b=this.floatParent.getTargetEl().getViewRegion();a+=b.left;c+=b.top}return{x:a,y:c}},getPosition:function(a){var b=this.el,c;if(a===true){return[b.getLeft(true),b.getTop(true)]}c=this.xy||b.getXY();if(this.floating&&this.floatParent){var d=this.floatParent.getTargetEl().getViewRegion();c[0]-=d.left;c[1]-=d.top}return c},getId:function(){return this.id||(this.id=(this.getXType()||"ext-comp")+"-"+this.getAutoId())},onEnable:function(){var a=this.getActionEl();a.dom.removeAttribute("aria-disabled");a.dom.disabled=false;this.callParent()},onDisable:function(){var a=this.getActionEl();a.dom.setAttribute("aria-disabled",true);a.dom.disabled=true;this.callParent()},show:function(c,a,b){if(this.rendered&&this.isVisible()){if(this.toFrontOnShow&&this.floating){this.toFront()}}else{if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(!this.rendered&&(this.autoRender||this.floating)){this.doAutoRender()}if(this.rendered){this.beforeShow();this.onShow.apply(this,arguments);if(this.ownerCt&&!this.floating&&!(this.ownerCt.suspendLayout||this.ownerCt.layout.layoutBusy)){this.ownerCt.doLayout()}this.afterShow.apply(this,arguments)}}}return this},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();if(this.floating&&this.constrain){this.doConstrain()}a.callParent(arguments)},afterShow:function(g,b,e){var f=this,a,c,d;g=g||f.animateTarget;if(!f.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=f.el.getBox();a=g.getBox();a.width+="px";a.height+="px";c.width+="px";c.height+="px";f.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=f.ghost();d.el.stopAnimation();d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;f.unghost();f.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");if(f.floating){f.toFront()}Ext.callback(b,e||f)}}})}else{if(f.floating){f.toFront()}Ext.callback(b,e||f)}f.fireEvent("show",f)},hide:function(){this.showOnParentShow=false;if(!(this.rendered&&!this.isVisible())&&this.fireEvent("beforehide",this)!==false){this.hidden=true;if(this.rendered){this.onHide.apply(this,arguments);if(this.ownerCt&&!this.floating&&!(this.ownerCt.suspendLayout||this.ownerCt.layout.layoutBusy)){this.ownerCt.doLayout()}}}return this},onHide:function(f,a,d){var e=this,c,b;f=f||e.animateTarget;if(!e.ghost){f=null}if(f){f=f.el?f.el:Ext.get(f);c=e.ghost();c.el.stopAnimation();b=f.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!f){e.afterHide(a,d)}},afterHide:function(a,b){Ext.callback(a,b||this);this.fireEvent("hide",this)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.resizer);if(a.actionMode=="container"||a.removeMode=="container"){a.container.remove()}}a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a;if(b){c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if(c.rendered&&!c.isDestroyed){a=c.getFocusEl();a.focus();if(a.dom&&d===true){a.dom.select()}if(c.floating){c.toFront(true)}}return c},getFocusEl:function(){return this.el},blur:function(){if(this.rendered){this.getFocusEl().blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id();var a=Ext.applyIf(c,this.initialConfig);a.id=d;var b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.ownerCt;b&&!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},getProxy:function(){if(!this.proxy){this.proxy=this.el.createProxy(Ext.baseCSSPrefix+"proxy-el",Ext.getBody(),true)}return this.proxy}},function(){this.prototype.focusTask=Ext.create("Ext.util.DelayedTask",this.prototype.focus)});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],suspendLayout:false,autoDestroy:true,defaultType:"panel",isContainer:true,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove","beforecardswitch","cardswitch");a.layoutOnShow=Ext.create("Ext.util.MixedCollection");a.callParent();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},afterRender:function(){this.getLayout();this.callParent()},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,"autocontainer"))}return a.layout},doLayout:function(){var b=this,a=b.getLayout();if(b.rendered&&a&&!b.suspendLayout){if((!Ext.isNumber(b.width)||!Ext.isNumber(b.height))&&b.componentLayout.type!=="autocomponent"){if(b.componentLayout.layoutBusy!==true){b.doComponentLayout();if(b.componentLayout.layoutCancelled===true){a.layout()}}}else{if(a.layoutBusy!==true){a.layout()}}}return b},afterLayout:function(a){this.fireEvent("afterlayout",this,a)},prepareItems:function(b,d){if(!Ext.isArray(b)){b=[b]}var c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a);Ext.applyIf(a,b)}else{if(!a.isComponent){Ext.applyIf(a,b)}else{Ext.applyIf(a,b)}}}return a},lookupComponent:function(a){return Ext.isString(a)?Ext.ComponentManager.get(a):this.createComponent(a)},createComponent:function(a,b){return Ext.ComponentManager.create(a,b||this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var h=this,f=Array.prototype.slice.call(arguments),a,g,b=[],c,e,k,d=-1,j;if(typeof f[0]=="number"){d=f.shift()}a=f.length>1;if(a||Ext.isArray(f[0])){g=a?f:f[0];h.suspendLayout=true;for(c=0,e=g.length;c<e;c++){k=g[c];if(d!=-1){k=h.add(d+c,k)}else{k=h.add(k)}b.push(k)}h.suspendLayout=false;h.doLayout();return b}j=h.prepareItems(f[0],true)[0];if(j.floating){j.onAdded(h,d)}else{d=(d!==-1)?d:h.items.length;if(h.fireEvent("beforeadd",h,j,d)!==false&&h.onBeforeAdd(j)!==false){h.items.insert(d,j);j.onAdded(h,d);h.onAdd(j,d);h.fireEvent("add",h,j,d)}h.doLayout()}return j},registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=Ext.create("Ext.ZIndexManager",a)}a.floatingItems.register(b)},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(b){var a=this;if(b.ownerCt){b.ownerCt.remove(b,false)}if(a.border===false||a.border===0){b.border=(b.border===true)}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&d.fireEvent("beforeremove",d,e)!==false){d.doRemove(e,b);d.fireEvent("remove",d,e)}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered;e.items.remove(c);c.onRemoved();if(a){d.onRemove(c)}e.onRemove(c,b);if(b===true||(b!==false&&e.autoDestroy)){c.destroy()}if(a&&!b){d.afterRemove(c)}if(!e.destroying){e.doLayout()}},removeAll:function(c){var g=this,e=g.items.items.slice(),b=[],d=0,a=e.length,f;g.suspendLayout=true;for(;d<a;d++){f=e[d];g.remove(f,c);if(f.ownerCt!==g){b.push(f)}}g.suspendLayout=false;g.doLayout();return b},getRefItems:function(c){var g=this,d=g.items.items,b=d.length,e=0,f,a=[];for(;e<b;e++){f=d[e];a.push(f);if(c&&f.getRefItems){a.push.apply(a,f.getRefItems(true))}}if(g.floatingItems&&g.floatingItems.accessList){a.push.apply(a,g.floatingItems.accessList)}return a},cascade:function(k,l,a){var j=this,e=j.items?j.items.items:[],f=e.length,d=0,h,g=a?a.concat(j):[j],b=g.length-1;if(k.apply(l||j,g)!==false){for(;d<f;d++){h=e[d];if(h.cascade){h.cascade(k,l,a)}else{g[b]=h;k.apply(l||e,g)}}}return this},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){return Ext.ComponentQuery.query(a,this)},child:function(a){return this.query("> "+a)[0]||null},down:function(a){return this.query(a)[0]||null},show:function(){this.callParent(arguments);this.performDeferredLayouts();return this},performDeferredLayouts:function(){var e=this.layoutOnShow,d=e.getCount(),b=0,a,c;for(;b<d;b++){c=e.get(b);a=c.needsLayout;if(Ext.isObject(a)){c.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}}e.clear()},onEnable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable){a.enable();delete a.resetDisable}});this.callParent()},onDisable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable!==false&&!a.disabled){a.disable();a.resetDisable=true}});this.callParent()},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout,b.floatingItems);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",getChildByElement:function(d){var f,b,a=0,c=this.items.items,e=c.length;d=Ext.getDom(d);for(;a<e;a++){f=c[a];b=f.getEl();if((b.dom===d)||b.contains(d)){return f}}return null}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,renderTpl:['<div class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl><tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],initComponent:function(){var c=this,e,b,a,d;c.indicateDragCls=c.baseCls+"-draggable";c.title=c.title||" ";c.tools=c.tools||[];c.items=c.items||[];c.orientation=c.orientation||"horizontal";c.dock=(c.dock)?c.dock:(c.orientation=="horizontal")?"top":"left";c.addClsWithUI(c.orientation);c.addClsWithUI(c.dock);Ext.applyIf(c.renderSelectors,{body:"."+c.baseCls+"-body"});if(!Ext.isEmpty(c.iconCls)){c.initIconCmp();c.items.push(c.iconCmp)}if(c.orientation=="vertical"){if(Ext.isIE6||Ext.isIE7){c.width=this.width||24}else{if(Ext.isIEQuirks){c.width=this.width||25}}c.layout={type:"vbox",align:"center",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.textConfig={cls:c.baseCls+"-text",type:"text",text:c.title,rotate:{degrees:90}};d=c.ui;if(Ext.isArray(d)){d=d[0]}e=Ext.util.CSS.getRule("."+c.baseCls+"-text-"+d);if(e){b=e.style}if(b){Ext.apply(c.textConfig,{"font-family":b.fontFamily,"font-weight":b.fontWeight,"font-size":b.fontSize,fill:b.color})}c.titleCmp=Ext.create("Ext.draw.Component",{ariaRole:"heading",focusable:false,viewBox:false,autoSize:true,margins:"5 0 0 0",items:[c.textConfig],renderSelectors:{textEl:"."+c.baseCls+"-text"}})}else{c.layout={type:"hbox",align:"middle",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.titleCmp=Ext.create("Ext.Component",{xtype:"component",ariaRole:"heading",focusable:false,renderTpl:['<span class="{cls}-text {cls}-text-{ui}">{title}</span>'],renderData:{title:c.title,cls:c.baseCls,ui:c.ui},renderSelectors:{textEl:"."+c.baseCls+"-text"}})}c.items.push(c.titleCmp);c.items.push({xtype:"component",html:" ",flex:1,focusable:false});c.items=c.items.concat(c.tools);this.callParent()},initIconCmp:function(){this.iconCmp=Ext.create("Ext.Component",{focusable:false,renderTpl:['<img alt="" src="{blank}" class="{cls}-icon {iconCls}"/>'],renderData:{blank:Ext.BLANK_IMAGE_URL,cls:this.baseCls,iconCls:this.iconCls,orientation:this.orientation},renderSelectors:{iconEl:"."+this.baseCls+"-icon"},iconCls:this.iconCls})},afterRender:function(){var a=this;a.el.unselectable();if(a.indicateDrag){a.el.addCls(a.indicateDragCls)}a.mon(a.el,{click:a.onClick,scope:a});a.callParent()},afterLayout:function(){var a=this;a.callParent(arguments);if(Ext.isIE7){a.el.repaint()}},addUIClsToElement:function(a,c){var b=this;b.callParent(arguments);if(!c&&b.rendered){b.body.addCls(b.baseCls+"-body-"+a);b.body.addCls(b.baseCls+"-body-"+b.ui+"-"+a)}},removeUIClsFromElement:function(a,c){var b=this;b.callParent(arguments);if(!c&&b.rendered){b.body.removeCls(b.baseCls+"-body-"+a);b.body.removeCls(b.baseCls+"-body-"+b.ui+"-"+a)}},addUIToElement:function(b){var a=this;a.callParent(arguments);if(!b&&a.rendered){a.body.addCls(a.baseCls+"-body-"+a.ui)}if(!b&&a.titleCmp&&a.titleCmp.rendered&&a.titleCmp.textEl){a.titleCmp.textEl.addCls(a.baseCls+"-text-"+a.ui)}},removeUIFromElement:function(){var a=this;a.callParent(arguments);if(a.rendered){a.body.removeCls(a.baseCls+"-body-"+a.ui)}if(a.titleCmp&&a.titleCmp.rendered&&a.titleCmp.textEl){a.titleCmp.textEl.removeCls(a.baseCls+"-text-"+a.ui)}},onClick:function(a){if(!a.getTarget(Ext.baseCSSPrefix+"tool")){this.fireEvent("click",a)}},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";var b=c.titleCmp.surface.items.items[0],a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d||" ";c.titleCmp.textEl.update(c.title)}}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.on({render:function(){c.layout.layout();c.setTitle(d)},single:true})}},setIconCls:function(a){this.iconCls=a;if(!this.iconCmp){this.initIconCmp();this.insert(0,this.iconCmp)}else{if(!a||!a.length){this.iconCmp.destroy()}else{var c=this.iconCmp,b=c.iconEl;b.removeCls(c.iconCls);b.addCls(a);c.iconCls=a}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent([arguments]);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=Ext.create("Ext.util.MixedCollection");Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var a=this.active,b;if(a&&a.length>0){b=a.clone();b.each(function(c){c.hide()});return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,f=e.active,d=f.last(),c=e.attached,b=a.getEl(),g;e.lastShow=new Date();f.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e);e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(d){var b=this,c=b.active,a=b.lastShow;if(Ext.Date.getElapsed(a)>50&&c.length>0&&!d.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll()}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return Ext.create("Ext.menu.Menu",{items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,f){var a=this.groups,c=d.group,b=0,h,e,g;if(c&&f){h=a[c];e=h.length;for(;b<e;b++){g=h[b];if(g!=d){g.setChecked(false)}}}}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Component",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,beforeLayout:function(){return this.callParent(arguments)||this.lastText!==this.owner.text},onLayout:function(c,l){var i=this,f=Ext.isNumber,d=i.owner,k=d.el,g=d.btnEl,e=d.btnInnerEl,b=d.minWidth,j=d.maxWidth,a,m,h;i.getTargetInfo();i.callParent(arguments);e.unclip();i.setTargetSize(c,l);if(!f(c)){if(d.text&&Ext.isIE7&&Ext.isStrict&&g&&g.getWidth()>20){m=i.btnFrameWidth;h=Ext.util.TextMetrics.measure(e,d.text);k.setWidth(h.width+m+i.adjWidth);g.setWidth(h.width+m);e.setWidth(h.width+m)}else{k.setWidth(null);g.setWidth(null);e.setWidth(null)}if(b||j){a=k.getWidth();if(b&&(a<b)){i.setTargetSize(b,l)}else{if(j&&(a>j)){e.clip();i.setTargetSize(j,l)}}}}this.lastText=d.text},setTargetSize:function(a,k){var g=this,b=g.owner,e=Ext.isNumber,d=b.btnInnerEl,i=(e(a)?a-g.adjWidth:a),f=(e(k)?k-g.adjHeight:k),c=g.btnFrameHeight,j=b.getText(),h;g.callParent(arguments);g.setElementSize(b.btnEl,i,f);g.setElementSize(d,i,f);if(e(f)){d.setStyle("line-height",f-c+"px")}if(j&&this.htmlRE.test(j)){d.setStyle("line-height","normal");h=Ext.util.TextMetrics.measure(d,j).height;d.setStyle("padding-top",g.btnFrameTop+Math.max(d.getHeight()-c-h,0)/2+"px");g.setElementSize(d,i,f)}},getTargetInfo:function(){var e=this,a=e.owner,d=a.el,c=e.frameSize,g=a.frameBody,b=a.btnWrap,f=a.btnInnerEl;if(!("adjWidth" in e)){Ext.apply(e,{adjWidth:c.left+c.right+d.getBorderWidth("lr")+d.getPadding("lr")+b.getPadding("lr")+(g?g.getFrameWidth("lr"):0),adjHeight:c.top+c.bottom+d.getBorderWidth("tb")+d.getPadding("tb")+b.getPadding("tb")+(g?g.getFrameWidth("tb"):0),btnFrameWidth:f.getFrameWidth("lr"),btnFrameHeight:f.getFrameWidth("tb"),btnFrameTop:f.getFrameWidth("t")})}return e.callParent()}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",ariaRole:"button",renderTpl:'<em class="{splitCls}"><tpl if="href"><a href="{href}" target="{target}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link"><span class="{baseCls}-inner">{text}</span></a></tpl><tpl if="!href"><button type="{type}" hidefocus="true"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off"><span class="{baseCls}-inner" style="{innerSpanStyle}">{text}</span></button></tpl></em>',scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerCt=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},initAria:function(){this.callParent();var a=this.getActionEl();if(this.menu){a.dom.setAttribute("aria-haspopup",true)}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.btnEl},setButtonCls:function(){var c=this,b=c.el,a=[];if(c.useSetClass){if(!Ext.isEmpty(c.oldCls)){c.removeClsWithUI(c.oldCls);c.removeClsWithUI(c.pressedCls)}if(c.iconCls||c.icon){if(c.text){a.push("icon-text-"+c.iconAlign)}else{a.push("icon")}}else{if(c.text){a.push("noicon")}}c.oldCls=a;c.addClsWithUI(a);c.addClsWithUI(c.pressed?c.pressedCls:null)}},onRender:function(d,a){var e=this,c,b;Ext.applyIf(e.renderData,e.getTemplateArgs());Ext.applyIf(e.renderSelectors,{btnEl:e.href?"a":"button",btnWrap:"em",btnInnerEl:"."+e.baseCls+"-inner"});if(e.scale){e.ui=e.ui+"-"+e.scale}e.callParent(arguments);if(e.split&&e.arrowTooltip){e.arrowEl.dom[e.tooltipType]=e.arrowTooltip}e.mon(e.btnEl,{scope:e,focus:e.onFocus,blur:e.onBlur});b=e.el;if(e.icon){e.setIcon(e.icon)}if(e.iconCls){e.setIconCls(e.iconCls)}if(e.tooltip){e.setTooltip(e.tooltip,true)}if(e.handleMouseEvents){e.mon(b,{scope:e,mouseover:e.onMouseOver,mouseout:e.onMouseOut,mousedown:e.onMouseDown});if(e.split){e.mon(b,{mousemove:e.onMouseMove,scope:e})}}if(e.menu){e.mon(e.menu,{scope:e,show:e.onMenuShow,hide:e.onMenuHide});e.keyMap=Ext.create("Ext.util.KeyMap",e.el,{key:Ext.EventObject.DOWN,handler:e.onDownKey,scope:e})}if(e.repeat){c=Ext.create("Ext.util.ClickRepeater",b,Ext.isObject(e.repeat)?e.repeat:{});e.mon(c,"click",e.onRepeatClick,e)}else{e.mon(b,e.clickEvent,e.onClick,e)}Ext.ButtonToggleManager.register(e)},getTemplateArgs:function(){var c=this,b=c.getPersistentBtnPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),target:c.target||"_blank",type:c.type,splitCls:c.getSplitCls(),cls:c.cls,text:c.text||" ",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this;return a.href?Ext.urlAppend(a.href,a.params+Ext.Object.toQueryString(Ext.apply(Ext.apply({},a.baseParams)))):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},afterRender:function(){var a=this;a.useSetClass=true;a.setButtonCls();a.doc=Ext.getDoc();this.callParent(arguments)},setIconCls:function(a){var b=this,c=b.btnInnerEl;if(c){c.removeCls(b.iconCls);c.addCls(a||"");b.setButtonCls()}b.iconCls=a;return b},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute("data-"+this.tooltipType,c)}}else{b.tooltip=c}return b},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.btnEl,a.btnInnerEl,a.menu)}Ext.destroy(a.repeater)},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;delete a.btnEl;delete a.btnInnerEl;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.el){a.btnInnerEl.update(b||" ");a.setButtonCls()}a.doComponentLayout();return a},setIcon:function(a){var b=this,c=b.btnInnerEl;b.icon=a;if(c){c.setStyle("background-image",a?"url("+a+")":"");b.setButtonCls()}return b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.btnEl.dom.setAttribute("aria-pressed",c);b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}a.fireEvent("click",a,b);if(a.handler){a.handler.call(a.scope||a,a,b)}a.onBlur()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(g){var d=this,c=d.el,f=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=g.getX()-c.getX();a=c.getWidth()}else{b=g.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!f){d.onMenuTriggerOver(g)}}else{if(f){d.onMenuTriggerOut(g)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+(e.frameSize&&e.frameSize[b]||0)}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI("disabled");return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onFocus:function(b){var a=this;if(!a.disabled){a.addClsWithUI(a.focusCls)}},onBlur:function(b){var a=this;a.removeClsWithUI(a.focusCls)},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentBtnPadding:function(){var a=Ext.button.Button,e=a.persistentPadding,c,b,d,f;if(!e){e=a.persistentPadding=[0,0,0,0];if(!Ext.isIE){c=Ext.create("Ext.button.Button",{renderTo:Ext.getBody(),text:"test",style:"position:absolute;top:-999px;"});d=c.btnEl;f=c.btnInnerEl;d.setSize(null,null);b=f.getOffsetsTo(d);e[0]=b[1];e[1]=d.getWidth()-f.getWidth()-b[0];e[2]=d.getHeight()-f.getHeight()-b[1];e[3]=b[0];c.destroy()}}return e}},function(){var a={},e,d,b;function c(f,g){if(g){e=a[f.toggleGroup];for(d=0,b=e.length;d<b;d++){if(e[d]!==f){e[d].toggle(false)}}}}Ext.ButtonToggleManager={register:function(f){if(!f.toggleGroup){return}var g=a[f.toggleGroup];if(!g){g=a[f.toggleGroup]=[]}g.push(f);f.on("toggle",c)},unregister:function(f){if(!f.toggleGroup){return}var g=a[f.toggleGroup];if(g){Ext.Array.remove(g,f);f.un("toggle",c)}},getPressed:function(k){var j=a[k],h=0,f;if(j){for(f=j.length;h<f;h++){if(j[h].pressed===true){return j[h]}}}return null}}});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);b.beforeLayout=Ext.Function.createInterceptor(b.beforeLayout,this.clearOverflow,this);a.afterCtCls=a.afterCtCls||Ext.baseCSSPrefix+"box-menu-"+b.parallelAfter;a.menuItems=[]},handleOverflow:function(a,g){var f=this,e=f.layout,c="get"+e.parallelPrefixCap,b={},d=[null,null];f.callParent(arguments);this.createMenu(a,g);b[e.perpendicularPrefix]=g[e.perpendicularPrefix];b[e.parallelPrefix]=g[e.parallelPrefix]-f.afterCt[c]();d[e.perpendicularSizeIndex]=(a.meta.maxSize-f.menuTrigger["get"+e.perpendicularPrefixCap]())/2;f.menuTrigger.setPosition.apply(f.menuTrigger,d);return{targetSize:b}},clearOverflow:function(a,h){var g=this,f=h?h.width+(g.afterCt?g.afterCt.getWidth():0):0,b=g.menuItems,c=0,e=b.length,d;g.hideTrigger();for(;c<e;c++){b[c].show()}b.length=0;return h?{targetSize:{height:h.height,width:f}}:null},showTrigger:function(){this.menuTrigger.show()},hideTrigger:function(){if(this.menuTrigger!=undefined){this.menuTrigger.hide()}},beforeMenuShow:function(h){var g=this,b=g.menuItems,d=0,a=b.length,f,e;var c=function(j,i){return j.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};g.clearMenu();h.removeAll();for(;d<a;d++){f=b[d];if(!d&&(f instanceof Ext.toolbar.Separator)){continue}if(e&&(c(f,e)||c(e,f))){h.add("-")}g.addComponentToMenu(h,f);e=f}if(h.items.length<1){h.add(g.noItemsMenuText)}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(f,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(c,a){var b=this;if(a instanceof Ext.toolbar.Separator){c.add("-")}else{if(a.isComponent){if(a.isXType("splitbutton")){c.add(b.createMenuConfig(a,true))}else{if(a.isXType("button")){c.add(b.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(d){b.addComponentToMenu(c,d)})}else{c.add(Ext.create(Ext.getClassName(a),b.createMenuConfig(a)))}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){if(b.menu){delete b.menu}})}},createMenu:function(a,c){var k=this,h=k.layout,l=h.parallelBefore,e=h.parallelPrefix,b=c[e],g=a.boxes,d=0,j=g.length,f;if(!k.menuTrigger){k.createInnerElements();k.menu=Ext.create("Ext.menu.Menu",{hideMode:"offsets",listeners:{scope:k,beforeshow:k.beforeMenuShow}});k.menuTrigger=Ext.create("Ext.button.Button",{ownerCt:k.layout.owner,iconCls:Ext.baseCSSPrefix+h.owner.getXType()+"-more-icon",ui:h.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:k.menu,getSplitCls:function(){return""},renderTo:k.afterCt})}k.showTrigger();b-=k.afterCt.getWidth();k.menuItems.length=0;for(;d<j;d++){f=g[d];if(f[l]+f[e]>b){k.menuItems.push(f.component);f.component.hide()}}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!this.afterCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");this.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+this.afterCtCls},"before")}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:"0",pack:"start",type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",bindToOwnerCtContainer:true,fixedLayout:false,availableSpaceOffset:0,reserveOffset:true,clearInnerCtOnLayout:false,flexSortFn:function(d,c){var e="max"+this.parallelPrefixCap,f=Infinity;d=d.component[e]||f;c=c.component[e]||f;if(!isFinite(d)&&!isFinite(c)){return false}return d-c},minSizeSortFn:function(d,c){return c.available-d.available},constructor:function(a){var b=this;b.callParent(arguments);b.flexSortFn=Ext.Function.bind(b.flexSortFn,b);b.initOverflowHandler()},getChildBox:function(a){a=a.el||this.owner.getComponent(a).el;return{left:a.getLeft(true),top:a.getTop(true),width:a.getWidth(),height:a.getHeight()}},calculateChildBox:function(e){var d=this,b=d.calculateChildBoxes(d.getVisibleItems(),d.getLayoutTargetSize()).boxes,c=b.length,a=0;e=d.owner.getComponent(e);for(;a<c;a++){if(b[a].component===e){return b[a]}}},calculateChildBoxes:function(p,b){var x=this,J=Math,l=J.max,o=Infinity,v,s=x.parallelPrefix,n=x.parallelPrefixCap,M=x.perpendicularPrefix,t=x.perpendicularPrefixCap,C="min"+n,F="min"+t,aj="max"+t,c=b[s]-x.scrollOffset,Z=b[M],ae=x.padding,r=ae[x.parallelBefore],u=r+ae[x.parallelAfter],P=ae[x.perpendicularLeftTop],K=P+ae[x.perpendicularRightBottom],ah=l(0,Z-K),ab=x.pack=="start",am=x.pack=="center",E=x.pack=="end",ad=Ext.Number.constrain,N=p.length,d=0,ai=0,ak=0,w=0,G=0,Q=[],L=[],ag,af,h,aa,A,B,al,Y,W,X,m,e,z,I,y,O,j,R,ac,f,D,T,a,q,k,H,S,V,g,U;for(af=0;af<N;af++){h=p[af];A=h[M];x.layoutItem(h);B=h.margins;H=B[x.parallelBefore]+B[x.parallelAfter];W={component:h,margins:B};if(h.flex){ai+=h.flex;aa=v}else{if(!(h[s]&&A)){al=h.getSize()}aa=h[s]||al[s];A=A||al[M]}d+=H+(aa||0);ak+=H+(h.flex?h[C]||0:aa);w+=H+(h[C]||aa||0);if(typeof A!="number"){A=h["get"+t]()}G=l(G,A+B[x.perpendicularLeftTop]+B[x.perpendicularRightBottom]);W[s]=aa||v;W[M]=A||v;Q.push(W)}X=ak-c;m=w>c;e=l(0,c-d-u-(x.reserveOffset?x.availableSpaceOffset:0));if(m){for(af=0;af<N;af++){j=Q[af];z=p[af][C]||p[af][s]||j[s];j.dirtySize=j.dirtySize||j[s]!=z;j[s]=z}}else{if(X>0){for(af=0;af<N;af++){I=p[af];z=I[C]||0;if(I.flex){j=Q[af];j.dirtySize=j.dirtySize||j[s]!=z;j[s]=z}else{L.push({minSize:z,available:Q[af][s]-z,index:af})}}Ext.Array.sort(L,x.minSizeSortFn);for(af=0,y=L.length;af<y;af++){O=L[af].index;if(O==v){continue}I=p[O];z=L[af].minSize;j=Q[O];R=j[s];ac=l(z,R-J.ceil(X/(y-af)));f=R-ac;j.dirtySize=j.dirtySize||j[s]!=ac;j[s]=ac;X-=f}}else{a=e;q=ai;T=[];for(af=0;af<N;af++){h=p[af];if(ab&&h.flex){T.push(Q[Ext.Array.indexOf(p,h)])}}Ext.Array.sort(T,x.flexSortFn);for(af=0;af<T.length;af++){S=T[af];h=S.component;B=S.margins;k=J.ceil((h.flex/q)*a);k=Math.max(h["min"+n]||0,J.min(h["max"+n]||o,k));a-=k;q-=h.flex;S.dirtySize=S.dirtySize||S[s]!=k;S[s]=k}}}if(am){r+=e/2}else{if(E){r+=e}}if(x.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!x.owner.width&&x.direction=="vertical"){ag=G+x.owner.el.getPadding("lr")+x.owner.el.getBorderWidth("lr");if(x.owner.frameSize){ag+=x.owner.frameSize.left+x.owner.frameSize.right}ah=Math.min(ah,b.width=G+ae.left+ae.right)}for(af=0;af<N;af++){h=p[af];S=Q[af];B=S.margins;g=B[x.perpendicularLeftTop]+B[x.perpendicularRightBottom];r+=B[x.parallelBefore];S[x.parallelBefore]=r;S[x.perpendicularLeftTop]=P+B[x.perpendicularLeftTop];if(x.align=="stretch"){U=ad(ah-g,h[F]||0,h[aj]||o);S.dirtySize=S.dirtySize||S[M]!=U;S[M]=U}else{if(x.align=="stretchmax"){U=ad(G-g,h[F]||0,h[aj]||o);S.dirtySize=S.dirtySize||S[M]!=U;S[M]=U}else{if(x.align==x.alignCenteringString){D=l(ah,G)-x.innerCt.getBorderWidth(x.perpendicularLT+x.perpendicularRB)-S[M];if(D>0){S[x.perpendicularLeftTop]=P+Math.round(D/2)}}}}r+=(S[s]||0)+B[x.parallelAfter]}return{boxes:Q,meta:{calculatedWidth:ag,maxSize:G,nonFlexSize:d,desiredSize:ak,minimumSize:w,shortfall:X,tooNarrow:m}}},initOverflowHandler:function(){var c=this.overflowHandler;if(typeof c=="string"){c={type:c}}var b="None";if(c&&c.type!=undefined){b=c.type}var a=Ext.layout.container.boxOverflow[b];if(a[this.type]){a=a[this.type]}this.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,this,c)},onLayout:function(){this.callParent();if(this.clearInnerCtOnLayout===true&&this.adjustmentPass!==true){this.innerCt.setSize(null,null)}var g=this,c=g.getLayoutTargetSize(),f=g.getVisibleItems(),b=g.calculateChildBoxes(f,c),e=b.boxes,h=b.meta,i,a,d;if(g.autoSize&&b.meta.desiredSize){c[g.parallelPrefix]=b.meta.desiredSize}if(h.shortfall>0){i=g.overflowHandler;a=h.tooNarrow?"handleOverflow":"clearOverflow";d=i[a](b,c);if(d){if(d.targetSize){c=d.targetSize}if(d.recalculate){f=g.getVisibleItems(owner);b=g.calculateChildBoxes(f,c);e=b.boxes}}}else{g.overflowHandler.clearOverflow()}g.layoutTargetLastSize=c;g.childBoxCache=b;g.updateInnerCtSize(c,b);g.updateChildBoxes(e);g.handleTargetOverflow(c)},updateChildBoxes:function(g){var l=this,e=0,c=g.length,o=[],n=Ext.dd.DDM.getDDById(l.innerCt.id),a,f,d,h,j,b;for(;e<c;e++){f=g[e];h=f.component;if(n&&(n.getDragEl()===h.el.dom)){continue}d=false;a=l.getChildBox(h);if(l.animate){b=l.animate.callback||l.animate;j={layoutAnimation:true,target:h,from:{},to:{},listeners:{}};if(!isNaN(f.width)&&(f.width!=a.width)){d=true;j.to.width=f.width}if(!isNaN(f.height)&&(f.height!=a.height)){d=true;j.to.height=f.height}if(!isNaN(f.left)&&(f.left!=a.left)){d=true;j.to.left=f.left}if(!isNaN(f.top)&&(f.top!=a.top)){d=true;j.to.top=f.top}if(d){o.push(j)}}else{if(f.dirtySize){if(f.width!==a.width||f.height!==a.height){l.setItemSize(h,f.width,f.height)}}if(isNaN(f.left)||isNaN(f.top)){continue}h.setPosition(f.left,f.top)}}c=o.length;if(c){var m=function(i){c-=1;if(!c){l.layoutBusy=false;if(Ext.isFunction(b)){b()}}};var k=function(){l.layoutBusy=true};for(e=0,c=o.length;e<c;e++){j=o[e];j.listeners.afteranimate=m;if(!e){j.listeners.beforeanimate=k}if(l.animate.duration){j.duration=l.animate.duration}h=j.target;delete j.target;h.stopAnimation();h.animate(j)}}},updateInnerCtSize:function(c,a){var g=this,e=Math.max,f=g.align,h=g.padding,b=c.width,j=c.height,k=a.meta,d,i;if(g.direction=="horizontal"){d=b;i=k.maxSize+h.top+h.bottom+g.innerCt.getBorderWidth("tb");if(f=="stretch"){i=j}else{if(f=="middle"){i=e(j,i)}}}else{i=j;d=k.maxSize+h.left+h.right+g.innerCt.getBorderWidth("lr");if(f=="stretch"){d=b}else{if(f=="center"){d=e(b,d)}}}g.getRenderTarget().setSize(d||undefined,i||undefined);if(k.calculatedWidth&&g.owner.el.getWidth()>k.calculatedWidth){g.owner.el.setWidth(k.calculatedWidth)}if(g.innerCt.dom.scrollTop){g.innerCt.dom.scrollTop=0}},handleTargetOverflow:function(c){var b=this.getTarget(),d=b.getStyle("overflow"),a;if(d&&d!="hidden"&&!this.adjustmentPass){a=this.getLayoutTargetSize();if(a.width!=c.width||a.height!=c.height){this.adjustmentPass=true;this.onLayout();return true}}delete this.adjustmentPass},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&this.innerCt&&b.parentNode===this.innerCt.dom)||false},getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:this.innerCls,role:"presentation"});this.padding=Ext.util.Format.parseBox(this.padding)}return this.innerCt},renderItem:function(d,f){this.callParent(arguments);var c=this,a=d.getEl(),b=a.dom.style,e=d.margins||d.margin;if(e){if(Ext.isString(e)||Ext.isNumber(e)){e=Ext.util.Format.parseBox(e)}else{Ext.applyIf(e,{top:0,right:0,bottom:0,left:0})}}else{e=Ext.apply({},c.defaultMargins)}e.top+=a.getMargin("t");e.right+=a.getMargin("r");e.bottom+=a.getMargin("b");e.left+=a.getMargin("l");b.marginTop=b.marginRight=b.marginBottom=b.marginLeft="0";d.margins=e},destroy:function(){Ext.destroy(this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",alignCenteringString:"middle",type:"hbox",direction:"horizontal",parallelSizeIndex:0,perpendicularSizeIndex:1,parallelPrefix:"width",parallelPrefixCap:"Width",parallelLT:"l",parallelRB:"r",parallelBefore:"left",parallelBeforeCap:"Left",parallelAfter:"right",parallelPosition:"x",perpendicularPrefix:"height",perpendicularPrefixCap:"Height",perpendicularLT:"t",perpendicularRB:"b",perpendicularLeftTop:"top",perpendicularRightBottom:"bottom",perpendicularPosition:"y"});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",alignCenteringString:"center",type:"vbox",direction:"vertical",parallelSizeIndex:1,perpendicularSizeIndex:0,parallelPrefix:"height",parallelPrefixCap:"Height",parallelLT:"t",parallelRB:"b",parallelBefore:"top",parallelBeforeCap:"Top",parallelAfter:"bottom",parallelPosition:"y",perpendicularPrefix:"width",perpendicularPrefixCap:"Width",perpendicularLT:"l",perpendicularRB:"r",perpendicularLeftTop:"left",perpendicularRightBottom:"right",perpendicularPosition:"x"});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox","Ext.FocusManager"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle"});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange");a=b.vertical?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a})},lookupComponent:function(b){if(Ext.isString(b)){var a=Ext.toolbar.Toolbar.shortcuts[b];if(a){b={xtype:a}}else{b={xtype:"tbtext",text:b}}this.applyDefaults(b)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"menutriggerover",b.onButtonTriggerOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:this.createComponent(a,a.split?"splitbutton":this.defaultType)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a);if(this.disabled){a.disable()}},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},onButtonTriggerOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}},function(){this.shortcuts={"-":"tbseparator"," ":"tbspacer","->":"tbfill"}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",requires:["Ext.util.MixedCollection","Ext.core.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",renderTpl:['<div class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl> {baseCls}-body-{ui}<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");Ext.applyIf(a.renderSelectors,{body:"."+a.baseCls+"-body"});if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},initItems:function(){var b=this,a=b.dockedItems;b.callParent();b.dockedItems=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){b.addDocked(a)}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},initBodyStyles:function(){var d=this,a=d.bodyStyle,c=[],b=Ext.core.Element,e;if(Ext.isFunction(a)){a=a()}if(Ext.isString(a)){c=a.split(";")}else{for(e in a){if(a.hasOwnProperty(e)){c.push(e+":"+a[e])}}}if(d.bodyPadding!==undefined){c.push("padding: "+b.unitizeBox((d.bodyPadding===true)?5:d.bodyPadding))}if(d.frame&&d.bodyBorder){if(!Ext.isNumber(d.bodyBorder)){d.bodyBorder=1}c.push("border-width: "+b.unitizeBox(d.bodyBorder))}delete d.bodyStyle;return c.length?c.join(";"):undefined},initBodyCls:function(){var b=this,a="",c=b.bodyCls;if(c){Ext.each(c,function(d){a+=" "+d});delete b.bodyCls}return a.length>0?a:undefined},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyStyle:this.initBodyStyles(),bodyCls:this.initBodyCls()})},addDocked:function(a,f){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(e.border===false){}if(f!==undefined){e.dockedItems.insert(f+b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);e.onDockedAdd(d)}if(e.rendered){e.doComponentLayout()}return a},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,insertDocked:function(b,a){this.addDocked(a,b)},removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}if(a&&!b){c.afterRemove(e)}if(!this.destroying){d.doComponentLayout()}return e},getDockedItems:function(c){var d=this,b={top:1,left:3,right:5,bottom:7},a;if(d.dockedItems&&d.dockedItems.items.length){if(c){a=Ext.ComponentQuery.query(c,d.dockedItems.items)}else{a=d.dockedItems.items.slice()}Ext.Array.sort(a,function(f,e){var g=f.weight||b[f.dock],h=e.weight||b[e.dock];if(Ext.isNumber(g)&&Ext.isNumber(h)){return g-h}return 0});return a}return[]},addUIClsToElement:function(a,c){var b=this;b.callParent(arguments);if(!c&&b.rendered){b.body.addCls(Ext.baseCSSPrefix+a);b.body.addCls(b.baseCls+"-body-"+a);b.body.addCls(b.baseCls+"-body-"+b.ui+"-"+a)}},removeUIClsFromElement:function(a,c){var b=this;b.callParent(arguments);if(!c&&b.rendered){b.body.removeCls(Ext.baseCSSPrefix+a);b.body.removeCls(b.baseCls+"-body-"+a);b.body.removeCls(b.baseCls+"-body-"+b.ui+"-"+a)}},addUIToElement:function(b){var a=this;a.callParent(arguments);if(!b&&a.rendered){a.body.addCls(a.baseCls+"-body-"+a.ui)}},removeUIFromElement:function(){var a=this;a.callParent(arguments);if(a.rendered){a.body.removeCls(a.baseCls+"-body-"+a.ui)}},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments),d=this.getDockedItems(a?"*,* *":undefined),f=d.length,c=0,e;for(;c<f;c++){e=d[c];if(e.dock==="right"||e.dock==="bottom"){break}}return d.splice(0,c).concat(b).concat(d)},beforeDestroy:function(){var b=this.dockedItems,a;if(b){while((a=b.first())){this.removeDocked(a,true)}}this.callParent()},setBorder:function(a){var b=this;b.border=(a!==undefined)?a:true;if(b.rendered){b.doComponentLayout()}}});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,headerPosition:"top",frame:false,frameHeader:true,initComponent:function(){var b=this,a;b.addEvents("titlechange","iconchange");if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI("default-framed")}b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP;b.bridgeToolbars()},setBorder:function(a){this.callParent(arguments)},beforeDestroy:function(){Ext.destroy(this.ghostPanel,this.dd);this.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(c){var b=this,a=this.title;b.title=c;if(b.header){b.header.setTitle(c)}else{b.updateHeader()}if(b.reExpander){b.reExpander.setTitle(c)}b.fireEvent("titlechange",b,c,a)},setIconCls:function(a){var c=this,b=c.iconCls;c.iconCls=a;var d=c.header;if(d){d.setIconCls(a)}c.fireEvent("iconchange",c,a,b)},bridgeToolbars:function(){var a=this,c,b,e=a.minButtonWidth;function d(f,g){if(Ext.isArray(f)){f={xtype:"toolbar",items:f}}else{if(!f.xtype){f.xtype="toolbar"}}f.dock=g;if(g=="left"||g=="right"){f.vertical=true}return f}if(a.tbar){a.addDocked(d(a.tbar,"top"));a.tbar=null}if(a.bbar){a.addDocked(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom");c.ui="footer";if(e){b=c.defaults;c.defaults=function(f){var g=b||{};if((!f.xtype||f.xtype==="button"||(f.isComponent&&f.isXType("button")))&&!("minWidth" in g)){g=Ext.apply({minWidth:e},g)}return g}}c=a.addDocked(c)[0];c.insert(0,{flex:1,xtype:"component",focusable:false});a.fbar=null}if(a.lbar){a.addDocked(d(a.lbar,"left"));a.lbar=null}if(a.rbar){a.addDocked(d(a.rbar,"right"));a.rbar=null}},initTools:function(){var a=this;a.tools=a.tools||[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=a.createComponent({xtype:"tool",type:"collapse-"+a.collapseDirection,expandType:a.getOppositeDirection(a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,this,[])})}if(a.collapseTool&&!a.collapseFirst){a.tools.push(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},onRender:function(b,a){var d=this,c;d.initTools();d.updateHeader();if(d.collapsed){d.collapsed=false;c=d.findLayoutController();if(!d.hidden&&c){c.on({afterlayout:function(){d.collapse(null,false,true)},single:true})}else{d.afterComponentLayout=function(){delete d.afterComponentLayout;Ext.getClass(d).prototype.afterComponentLayout.apply(d,arguments);d.collapse(null,false,true)}}}d.callParent(arguments)},updateHeader:function(b){var a=this,e=a.header,d=a.title,c=a.tools;if(!a.preventHeader&&(b||d||(c&&c.length))){if(!e){e=a.header=Ext.create("Ext.panel.Header",{title:d,orientation:(a.headerPosition=="left"||a.headerPosition=="right")?"vertical":"horizontal",dock:a.headerPosition||"top",textCls:a.headerTextCls,iconCls:a.iconCls,baseCls:a.baseCls+"-header",tools:c,ui:a.ui,indicateDrag:a.draggable,border:a.border,frame:a.frame&&a.frameHeader,ignoreParentFrame:a.frame||a.overlapHeader,ignoreBorderManagement:a.frame||a.ignoreHeaderBorderManagement,listeners:a.collapsible&&a.titleCollapse?{click:a.toggleCollapse,scope:a}:null});a.addDocked(e,0);a.tools=e.tools}e.show();a.initHeaderAria()}else{if(e){e.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},addTool:function(a){this.tools.push(a);var b=this.header;if(b){b.addTool(a)}this.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},collapse:function(u,f,h){var v=this,t=Ext.Component,k=v.getHeight(),l=v.getWidth(),w,a=0,q=v.dockedItems.items,r=q.length,p=0,s,g,o={from:{height:k,width:l},to:{height:k,width:l},listeners:{afteranimate:v.afterCollapse,scope:v},duration:Ext.Number.from(f,Ext.fx.Anim.prototype.duration)},e,d,m,b,j,n;if(!u){u=v.collapseDirection}if(h){f=false}else{if(v.collapsed||v.fireEvent("beforecollapse",v,u,f)===false){return false}}m=u;v.expandDirection=v.getOppositeDirection(u);v.hiddenDocked=[];switch(u){case t.DIRECTION_TOP:case t.DIRECTION_BOTTOM:v.expandedSize=v.getHeight();d="horizontal";n="height";b="getHeight";j="setHeight";for(;p<r;p++){s=q[p];if(s.isVisible()){if(s.isHeader&&(!s.dock||s.dock=="top"||s.dock=="bottom")){e=s}else{v.hiddenDocked.push(s)}}}if(u==Ext.Component.DIRECTION_BOTTOM){g=v.getPosition()[1]-Ext.fly(v.el.dom.offsetParent).getRegion().top;o.from.top=g}break;case t.DIRECTION_LEFT:case t.DIRECTION_RIGHT:v.expandedSize=v.getWidth();d="vertical";n="width";b="getWidth";j="setWidth";for(;p<r;p++){s=q[p];if(s.isVisible()){if(s.isHeader&&(s.dock=="left"||s.dock=="right")){e=s}else{v.hiddenDocked.push(s)}}}if(u==Ext.Component.DIRECTION_RIGHT){g=v.getPosition()[0]-Ext.fly(v.el.dom.offsetParent).getRegion().left;o.from.left=g}break;default:throw ("Panel collapse must be passed a valid Component collapse direction")}v.setAutoScroll(false);v.suspendLayout=true;v.body.setVisibilityMode(Ext.core.Element.DISPLAY);if(f&&v.collapseTool){v.collapseTool.disable()}v.addClsWithUI(v.collapsedCls);if(e){e.addClsWithUI(v.collapsedCls);e.addClsWithUI(v.collapsedCls+"-"+e.dock);if(v.border&&(!v.frame||(v.frame&&Ext.supports.CSS3BorderRadius))){e.addClsWithUI(v.collapsedCls+"-border-"+e.dock)}w=e.getFrameInfo();a=e[b]()+(w?w[u]:0);e.removeClsWithUI(v.collapsedCls);e.removeClsWithUI(v.collapsedCls+"-"+e.dock);if(v.border&&(!v.frame||(v.frame&&Ext.supports.CSS3BorderRadius))){e.removeClsWithUI(v.collapsedCls+"-border-"+e.dock)}}else{e={hideMode:"offsets",temporary:true,title:v.title,orientation:d,dock:m,textCls:v.headerTextCls,iconCls:v.iconCls,baseCls:v.baseCls+"-header",ui:v.ui,frame:v.frame&&v.frameHeader,ignoreParentFrame:v.frame||v.overlapHeader,indicateDrag:v.draggable,cls:v.baseCls+"-collapsed-placeholder "+Ext.baseCSSPrefix+"docked "+v.baseCls+"-"+v.ui+"-collapsed",renderTo:v.el};e[(e.orientation=="horizontal")?"tools":"items"]=[{xtype:"tool",type:"expand-"+v.expandDirection,handler:v.toggleCollapse,scope:v}];e=v.reExpander=Ext.create("Ext.panel.Header",e);a=e[b]()+((e.frame)?e.frameSize[u]:0);e.hide();v.insertDocked(0,e)}v.reExpander=e;v.reExpander.addClsWithUI(v.collapsedCls);v.reExpander.addClsWithUI(v.collapsedCls+"-"+e.dock);if(v.border&&(!v.frame||(v.frame&&Ext.supports.CSS3BorderRadius))){v.reExpander.addClsWithUI(v.collapsedCls+"-border-"+v.reExpander.dock)}if(u==Ext.Component.DIRECTION_RIGHT){o.to.left=g+(l-a)}else{if(u==Ext.Component.DIRECTION_BOTTOM){o.to.top=g+(k-a)}}o.to[n]=a;v.savedFlex=v.flex;v.savedMinWidth=v.minWidth;v.savedMinHeight=v.minHeight;v.minWidth=0;v.minHeight=0;delete v.flex;if(f){v.animate(o)}else{v.setSize(o.to.width,o.to.height);if(Ext.isDefined(o.to.left)||Ext.isDefined(o.to.top)){v.setPosition(o.to.left,o.to.top)}v.afterCollapse(false,h)}return v},afterCollapse:function(e,b){var d=this,c=0,a=d.hiddenDocked.length;d.minWidth=d.savedMinWidth;d.minHeight=d.savedMinHeight;d.body.hide();for(;c<a;c++){d.hiddenDocked[c].hide()}if(d.reExpander){d.reExpander.updateFrame();d.reExpander.show()}d.collapsed=true;if(!b){d.doComponentLayout()}if(d.resizer){d.resizer.disable()}if(d.collapseTool){d.collapseTool.setType("expand-"+d.expandDirection)}if(!b){d.fireEvent("collapse",d)}if(e&&d.collapseTool){d.collapseTool.enable()}},expand:function(b){if(!this.collapsed||this.fireEvent("beforeexpand",this,b)===false){return false}var f=this,e=0,c=f.hiddenDocked.length,j=f.expandDirection,k=f.getHeight(),a=f.getWidth(),g,d,h;if(b&&f.collapseTool){f.collapseTool.disable()}for(;e<c;e++){f.hiddenDocked[e].hidden=false;f.hiddenDocked[e].el.show()}if(f.reExpander){if(f.reExpander.temporary){f.reExpander.hide()}else{f.reExpander.removeClsWithUI(f.collapsedCls);f.reExpander.removeClsWithUI(f.collapsedCls+"-"+f.reExpander.dock);if(f.border&&(!f.frame||(f.frame&&Ext.supports.CSS3BorderRadius))){f.reExpander.removeClsWithUI(f.collapsedCls+"-border-"+f.reExpander.dock)}f.reExpander.updateFrame()}}if(f.collapseTool){f.collapseTool.setType("collapse-"+f.collapseDirection)}f.collapsed=false;f.body.show();f.removeClsWithUI(f.collapsedCls);d={to:{},from:{height:k,width:a},listeners:{afteranimate:f.afterExpand,scope:f}};if((j==Ext.Component.DIRECTION_TOP)||(j==Ext.Component.DIRECTION_BOTTOM)){if(f.autoHeight){f.setCalculatedSize(f.width,null);d.to.height=f.getHeight();f.setCalculatedSize(f.width,d.from.height)}else{if(f.savedFlex){f.flex=f.savedFlex;d.to.height=f.ownerCt.layout.calculateChildBox(f).height;delete f.flex}else{d.to.height=f.expandedSize}}if(j==Ext.Component.DIRECTION_TOP){g=f.getPosition()[1]-Ext.fly(f.el.dom.offsetParent).getRegion().top;d.from.top=g;d.to.top=g-(d.to.height-k)}}else{if((j==Ext.Component.DIRECTION_LEFT)||(j==Ext.Component.DIRECTION_RIGHT)){if(f.autoWidth){f.setCalculatedSize(null,f.height);d.to.width=f.getWidth();f.setCalculatedSize(d.from.width,f.height)}else{if(f.savedFlex){f.flex=f.savedFlex;d.to.width=f.ownerCt.layout.calculateChildBox(f).width;delete f.flex}else{d.to.width=f.expandedSize}}if(j==Ext.Component.DIRECTION_LEFT){g=f.getPosition()[0]-Ext.fly(f.el.dom.offsetParent).getRegion().left;d.from.left=g;d.to.left=g-(d.to.width-a)}}}if(b){f.animate(d)}else{f.setSize(d.to.width,d.to.height);if(d.to.x){f.setLeft(d.to.x)}if(d.to.y){f.setTop(d.to.y)}f.afterExpand(false)}return f},afterExpand:function(b){var a=this;a.setAutoScroll(a.initialConfig.autoScroll);if(a.savedFlex){a.flex=a.savedFlex;delete a.savedFlex;delete a.width;delete a.height}delete a.suspendLayout;if(b&&a.ownerCt){a.ownerCt.doLayout()}if(a.resizer){a.resizer.enable()}a.fireEvent("expand",a);if(b&&a.collapseTool){a.collapseTool.enable()}},toggleCollapse:function(){if(this.collapsed){this.expand(this.animCollapse)}else{this.collapse(this.collapseDirection,this.animCollapse)}return this},getKeyMap:function(){if(!this.keyMap){this.keyMap=Ext.create("Ext.util.KeyMap",this.el,this.keys)}return this.keyMap},initDraggable:function(){this.dd=Ext.create("Ext.panel.DD",this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var b=[],a=this.initialConfig.tools;if(a){Ext.each(a,function(c){b.push({type:c.type})})}else{b=[{type:"placeholder"}]}return b},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox();if(!b){b=Ext.create("Ext.panel.Panel",{renderTo:document.body,floating:{shadow:false},frame:Ext.supports.CSS3BorderRadius?d.frame:false,title:d.title,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,width:d.getWidth(),height:d.getHeight(),iconCls:d.iconCls,baseCls:d.baseCls,tools:d.ghostTools(),cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}b.el.show();b.setPosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();if(d.floatingItems){d.floatingItems.hide()}return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPosition(c.ghostPanel.getPosition())}if(c.floatingItems){c.floatingItems.show()}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",requires:["Ext.layout.component.Tip"],alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,frame:false,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,componentLayout:"tip",closeAction:"hide",ariaRole:"tooltip",initComponent:function(){this.callParent(arguments);this.constrain=this.constrain||this.constrainPosition},showAt:function(b){var a=this;this.callParent();if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.dom.parentNode};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},afterRender:function(){var a=this,b;a.callParent(arguments);b=parseInt(a.el.getZIndex(),10)||0;a.anchorEl.setStyle("z-index",b+1).setVisibilityMode(Ext.core.Element.DISPLAY)},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.dom.parentNode)}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var i=this,d;if(i.delegate){i.anchorTarget=i.triggerElement}if(i.anchor){i.targetCounter++;var c=i.getOffsets(),m=(i.anchorToTarget&&!i.trackMouse)?i.el.getAlignToXY(i.anchorTarget,i.getAnchorAlign()):i.targetXY,a=Ext.core.Element.getViewWidth()-5,h=Ext.core.Element.getViewHeight()-5,k=document.documentElement,e=document.body,l=(k.scrollLeft||e.scrollLeft||0)+5,j=(k.scrollTop||e.scrollTop||0)+5,b=[m[0]+c[0],m[1]+c[1]],g=i.getSize(),f=i.constrainPosition;i.anchorEl.removeCls(i.anchorCls);if(i.targetCounter<2&&f){if(b[0]<l){if(i.anchorToTarget){i.defaultAlign="l-r";if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor="left";return i.getTargetXY()}if(b[0]+g.width>a){if(i.anchorToTarget){i.defaultAlign="r-l";if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor="right";return i.getTargetXY()}if(b[1]<j){if(i.anchorToTarget){i.defaultAlign="t-b";if(i.mouseOffset){i.mouseOffset[1]*=-1}}i.anchor="top";return i.getTargetXY()}if(b[1]+g.height>h){if(i.anchorToTarget){i.defaultAlign="b-t";if(i.mouseOffset){i.mouseOffset[1]*=-1}}i.anchor="bottom";return i.getTargetXY()}}i.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+i.getAnchorPosition();i.anchorEl.addCls(i.anchorCls);i.targetCounter=0;return b}else{d=i.getMouseOffset();return(i.targetXY)?[i.targetXY[0]+d[0],i.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}a.showAt(a.getTargetXY());if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(a.autoHide!==true&&!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:" ",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var g=Ext.isArray(c)?c:arguments,d=0,a=g.length,f,b,e;for(;d<a;d++){c=g[d];f=c.target;if(f){if(Ext.isArray(f)){for(b=0,e=f.length;b<e;b++){this.targets[Ext.id(f[b])]=c}}else{this.targets[Ext.id(f)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var b=d.getTarget(),c,a;if(this.interceptTitles&&b.title&&Ext.isString(b.title)){c=b.title;b.qtip=c;b.removeAttribute("title");d.preventDefault()}else{a=this.tagConfig;b=d.getTarget("["+a.namespace+a.attribute+"]");if(b){c=b.getAttribute(a.namespace+a.attribute)}}return c},onTargetOver:function(h){var d=this,g=h.getTarget(),i,b,c,f,a;if(d.disabled){return}d.targetXY=h.getXY();if(!g||g.nodeType!==1||g==document||g==document.body){return}if(d.activeTarget&&((g==d.activeTarget.el)||Ext.fly(d.activeTarget.el).contains(g))){d.clearTimer("hide");d.show();return}if(g){Ext.Object.each(d.targets,function(e,j){var k=Ext.fly(j.target);if(k&&(k.dom===g||k.contains(g))){i=k.dom;return false}});if(i){d.activeTarget=d.targets[i.id];d.activeTarget.el=g;d.anchor=d.activeTarget.anchor;if(d.anchor){d.anchorTarget=g}d.delayShow();return}}i=Ext.get(g);b=d.tagConfig;c=b.namespace;f=d.getTipCfg(h);if(f){a=i.getAttribute(c+b.hide);d.activeTarget={el:g,text:f,width:+i.getAttribute(c+b.width)||null,autoHide:a!="user"&&a!=="false",title:i.getAttribute(c+b.title),cls:i.getAttribute(c+b.cls),align:i.getAttribute(c+b.align)};d.anchor=i.getAttribute(c+b.anchor);if(d.anchor){d.anchorTarget=g}d.delayShow()}},onTargetOut:function(b){var a=this;if(a.activeTarget&&b.within(a.activeTarget.el)&&!a.getTipCfg(b)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},showAt:function(c){var a=this,b=a.activeTarget;if(b){if(!a.rendered){a.render(Ext.getBody());a.activeTarget=b}if(b.title){a.setTitle(b.title||"");a.header.show()}else{a.header.hide()}a.body.update(b.text);a.autoHide=b.autoHide;a.dismissDelay=b.dismissDelay||a.dismissDelay;if(a.lastCls){a.el.removeCls(a.lastCls);delete a.lastCls}if(b.cls){a.el.addCls(b.cls);a.lastCls=b.cls}a.setWidth(b.width);if(a.anchor){a.constrainPosition=false}else{if(b.align){c=a.el.getAlignToXY(b.el,b.align);a.constrainPosition=false}else{a.constrainPosition=true}}}a.callParent([c])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(c){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(c)});return}b=Ext.create("Ext.tip.QuickTip",{disabled:a,renderTo:c!==false?document.body:undefined})}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}());Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:true,constructor:function(b){b=b||{};Ext.apply(this,b);var d=b.requires||[];Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){Ext.Object.each(this.paths,function(g,h){Ext.Loader.setPath(g,h)})}this.callParent(arguments);this.eventbus=Ext.create("Ext.app.EventBus");var f=this.controllers,e=f.length,c,a;this.controllers=Ext.create("Ext.util.MixedCollection");if(this.autoCreateViewport){d.push(this.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){d.push(this.getModuleClassName(f[c],"controller"))}Ext.require(d);Ext.onReady(function(){for(c=0;c<e;c++){a=this.getController(f[c]);a.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){if(this.enableQuickTips){Ext.tip.QuickTipManager.init()}if(this.autoCreateViewport){this.getView("Viewport").create()}this.launch.call(this.scope||this);this.launched=true;this.fireEvent("launch",this);this.controllers.each(function(a){a.onLaunch(this)},this)},getModuleClassName:function(a,c){var b=Ext.Loader.getPrefix(a);if(b.length>0&&b!==a){return a}return this.name+"."+c+"."+a},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.Layer",{uses:["Ext.Shadow"],statics:{shims:[]},extend:"Ext.core.Element",constructor:function(b,a){b=b||{};var c=this,d=Ext.core.DomHelper,f=b.parentEl,e=f?Ext.getDom(f):document.body,g=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(g){c.setVisibilityMode(Ext.core.Element[g.toUpperCase()]);if(c.visibilityMode==Ext.core.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.core.Element.DISPLAY)}else{c.setVisibilityMode(Ext.core.Element.VISIBILITY)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}c.position("absolute");if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=Ext.create("Ext.Shadow",{offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{this.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);this.self.shims.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(a){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(a){this.sync(true)}}},sync:function(b){var i=this,m=i.shadow,g,e,a;if(!this.updating&&this.isVisible()&&(m||this.useShim)){var d=this.getShim(),c=this.getLeft(true),n=this.getTop(true),k=this.getWidth(),f=this.getHeight(),j;if(m&&!this.shadowDisabled){if(b&&!m.isVisible()){m.show(this)}else{m.realign(c,n,k,f)}if(d){j=d.getStyle("z-index");if(j>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}d.show();if(m.isVisible()){g=m.el.getXY();e=d.dom.style;a=m.el.getSize();e.left=(g[0])+"px";e.top=(g[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(k,f);d.setLeftTop(c,n)}}}else{if(d){j=d.getStyle("z-index");if(j>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}d.show();d.setSize(k,f);d.setLeftTop(c,n)}}}return this},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var f=Ext.core.Element.getViewWidth(),b=Ext.core.Element.getViewHeight(),k=Ext.getDoc().getScroll(),j=this.getXY(),g=j[0],e=j[1],a=this.shadowOffset,i=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((g+i)>f+k.left){g=f-i-a;d=true}if((e+c)>b+k.top){e=b-c-a;d=true}if(g<k.left){g=k.left;d=true}if(e<k.top){e=k.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[g,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,g,f){var c=this,a;a=function(){if(e){c.sync(true)}if(g){g()}};if(!e){this.hideUnders(true)}this.callParent([e,b,d,g,f]);if(!b){a()}return this},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(c,a,b,e,d){e=this.createCB(e);this.fixDisplay();this.beforeAction();this.callParent([c,a,b,e,d]);if(!a){e()}return this},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,d,f,e){f=this.createCB(f);this.beforeAction();this.callParent([a,c,b,d,f,e]);if(!b){f()}return this},setWidth:function(a,b,c,e,d){e=this.createCB(e);this.beforeAction();this.callParent([a,b,c,e,d]);if(!b){e()}return this},setHeight:function(b,a,c,e,d){e=this.createCB(e);this.beforeAction();this.callParent([b,a,c,e,d]);if(!a){e()}return this},setBounds:function(b,h,d,a,c,e,g,f){g=this.createCB(g);this.beforeAction();if(!c){Ext.Layer.superclass.setXY.call(this,[b,h]);Ext.Layer.superclass.setSize.call(this,d,a);g()}else{this.callParent([b,h,d,a,c,e,g,f])}return this},setZIndex:function(a){this.zindex=a;if(this.getShim()){this.shim.setStyle("z-index",a++)}if(this.shadow){this.shadow.setZIndex(a++)}this.setStyle("z-index",a);return this}});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,pauseOnException:true,constructor:function(a){var b=this;b.addEvents("complete","exception","operationcomplete");b.mixins.observable.constructor.call(b,a);b.operations=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a)},start:function(){this.hasException=false;this.isRunning=true;this.runNextOperation()},runNextOperation:function(){this.runOperation(this.current+1)},pause:function(){this.isRunning=false},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(f){var g=f.hasException();if(g){e.hasException=true;e.fireEvent("exception",e,f)}else{e.fireEvent("operationcomplete",e,f)}if(g&&e.pauseOnException){e.pause()}else{f.setCompleted();e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",proxyCls:Ext.baseCSSPrefix+"resizable-proxy",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(a){var g=this,f,l,k=g.handles,b,j,e,c=0,h;this.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(a)||Ext.isElement(a)||a.dom){f=a;a=arguments[1]||{};a.target=f}g.mixins.observable.constructor.call(g,a);f=g.target;if(f){if(f.isComponent){g.el=f.getEl();if(f.minWidth){g.minWidth=f.minWidth}if(f.minHeight){g.minHeight=f.minHeight}if(f.maxWidth){g.maxWidth=f.maxWidth}if(f.maxHeight){g.maxHeight=f.maxHeight}if(f.floating){if(!this.hasOwnProperty("handles")){this.handles="n ne e se s sw w nw"}}}else{g.el=g.target=Ext.get(f)}}else{g.target=g.el=Ext.get(g.el)}l=g.el.dom.tagName;if(l=="TEXTAREA"||l=="IMG"){g.originalTarget=g.target;g.target=g.el=g.el.wrap({cls:g.wrapCls,id:g.el.id+"-rzwrap"});g.el.setPositioning(g.originalTarget.getPositioning());g.originalTarget.clearPositioning();var d=g.originalTarget.getBox();g.el.setBox(d)}g.el.position();if(g.pinned){g.el.addCls(g.pinnedCls)}g.resizeTracker=Ext.create("Ext.resizer.ResizeTracker",{disabled:g.disabled,target:g.target,constrainTo:g.constrainTo,overCls:g.overCls,throttle:g.throttle,originalTarget:g.originalTarget,delegate:"."+g.handleCls,dynamic:g.dynamic,preserveRatio:g.preserveRatio,minHeight:g.minHeight,maxHeight:g.maxHeight,minWidth:g.minWidth,maxWidth:g.maxWidth});g.resizeTracker.on("mousedown",g.onBeforeResize,g);g.resizeTracker.on("drag",g.onResize,g);g.resizeTracker.on("dragend",g.onResizeEnd,g);if(g.handles=="all"){g.handles="n s e w ne nw se sw"}k=g.handles=g.handles.split(/ |\s*?[,;]\s*?/);j=g.possiblePositions;e=k.length;b=g.handleCls+" "+(this.target.isComponent?(g.target.baseCls+"-handle "):"")+g.handleCls+"-";for(;c<e;c++){if(k[c]&&j[k[c]]){h=j[k[c]];g[h]=Ext.create("Ext.Component",{owner:this,region:h,cls:b+h,renderTo:g.el});g[h].el.unselectable();if(g.transparent){g[h].el.setOpacity(0)}}}if(Ext.isNumber(g.width)){g.width=Ext.Number.constrain(g.width,g.minWidth,g.maxWidth)}if(Ext.isNumber(g.height)){g.height=Ext.Number.constrain(g.height,g.minHeight,g.maxHeight)}if(g.width!=null||g.height!=null){if(g.originalTarget){g.originalTarget.setWidth(g.width);g.originalTarget.setHeight(g.height)}g.resizeTo(g.width,g.height)}g.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(c,d){var a=this.target.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,d)},onResize:function(d,f){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resizedrag",c,a.width,a.height,f)},onResizeEnd:function(d,f){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resize",c,a.width,a.height,f)},resizeTo:function(b,a){this.target.setSize(b,a);this.fireEvent("resize",this,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var c;for(var b=0,a=this.handles.length;b<a;b++){c=this[this.possiblePositions[this.handles[b]]];delete c.owner;Ext.destroy(c)}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",renderTpl:['<img src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],stopEvent:true,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.renderSelectors.toolEl="."+a.baseCls+"-"+a.type;a.callParent()},afterRender:function(){var a=this;a.callParent(arguments);if(a.qtip){if(Ext.isObject(a.qtip)){Ext.tip.QuickTipManager.register(Ext.apply({target:a.id},a.qtip))}else{a.toolEl.dom.qtip=a.qtip}}a.mon(a.toolEl,{click:a.onClick,mousedown:a.onMouseDown,mouseover:a.onMouseOver,mouseout:a.onMouseOut,scope:a})},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.util.CSS",function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,f){return f.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(h,k){var g,f=c.getElementsByTagName("head")[0],j=c.createElement("style");j.setAttribute("type","text/css");if(k){j.setAttribute("id",k)}if(Ext.isIE){f.appendChild(j);g=j.styleSheet;g.cssText=h}else{try{j.appendChild(c.createTextNode(h))}catch(i){j.cssText=h}f.appendChild(j);g=j.styleSheet?j.styleSheet:(j.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(g);return g},removeStyleSheet:function(f){var e=document.getElementById(f);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){var g=document;this.removeStyleSheet(h);var f=g.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("type","text/css");f.setAttribute("id",h);f.setAttribute("href",e);g.getElementsByTagName("head")[0].appendChild(f)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(k){if(!d){d={}}try{var n=k.cssRules||k.rules,l,h=n.length-1,f,g;for(;h>=0;--h){l=n[h].selectorText;if(l){l=l.split(",");g=l.length;for(f=0;f<g;f++){d[Ext.String.trim(l[f]).toLowerCase()]=n[h]}}}}catch(m){}},getRules:function(g){if(d===null||g){d={};var j=c.styleSheets,h=0,f=j.length;for(;h<f;h++){try{if(!j[h].disabled){this.cacheStyleSheet(j[h])}}catch(k){}}}return d},getRule:function(e,g){var f=this.getRules(g);if(!Ext.isArray(e)){return f[e.toLowerCase()]}for(var h=0;h<e.length;h++){if(f[e[h]]){return f[e[h].toLowerCase()]}}return null},updateRule:function(e,h,g){if(!Ext.isArray(e)){var j=this.getRule(e);if(j){j.style[h.replace(b,a)]=g;return true}}else{for(var f=0;f<e.length;f++){if(this.updateRule(e[f],h,g)){return true}}}return false}}}());Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=Ext.create("Ext.util.Region",0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))>this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;delete a.dragTracked;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(c){var b=this.dragRegion,a=this.getConstrainRegion();if(!a){return c}b.x=b.left=b[0]=b.right=c[0];b.y=b.top=b[1]=b.bottom=c[1];b.constrainTo(a);return[b.left,b.top]},dragTarget:function(e){var b=this.startXY,d=this.startRegion.copy(),a=this.getConstrainRegion(),c;if(!a){return e}d.translateBy.apply(d,[e[0]-b[0],e[1]-b[1]]);if(d.right>a.right){e[0]+=c=(a.right-d.right);d.left+=c}if(d.left<a.left){e[0]+=(a.left-d.left)}if(d.bottom>a.bottom){e[1]+=c=(a.bottom-d.bottom);d.top+=c}if(d.top<a.top){e[1]+=(a.top-d.top)}return e}}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",onLayout:function(b,a){this.owner.surface.setSize(b,a);this.callParent(arguments)}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,renderTpl:['<tpl if="plain">',"{text}","</tpl>",'<tpl if="!plain">','<a class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="menu">style="margin-right: 17px;"</tpl> >{text}</span>','<tpl if="menu">','<img src="'+Ext.BLANK_IMAGE_URL+'" class="'+Ext.baseCSSPrefix+'menu-item-arrow" />',"</tpl>","</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},blur:function(){this.$focused=false;this.callParent(arguments)},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){clearTimeout(b.hideMenuTimer);if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},focus:function(){this.$focused=true;this.callParent(arguments)},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"];b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){b.menu=Ext.menu.Manager.get(b.menu)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);clearTimeout(a.hideMenuTimer);clearTimeout(a.deferHideParentMenusTimer);if(a.menu){delete a.menu.parentItem;delete a.menu.parentMenu;delete a.menu.ownerCt;if(a.destroyMenu!==false){a.menu.destroy()}}a.callParent(arguments)},onRender:function(a,d){var b=this,c="."+Ext.baseCSSPrefix;Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||Ext.BLANK_IMAGE_URL,iconCls:b.iconCls,menu:Ext.isDefined(b.menu),plain:b.plain,text:b.text});Ext.applyIf(b.renderSelectors,{itemEl:c+"menu-item-link",iconEl:c+"menu-item-icon",textEl:c+"menu-item-text",arrowEl:c+"menu-item-arrow"});b.callParent(arguments)},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIconCls:function(a){var b=this;if(b.iconEl){if(b.iconCls){b.iconEl.removeCls(b.iconCls)}if(a){b.iconEl.addCls(a)}}b.iconCls=a},setText:function(d){var c=this,a=c.textEl||c.el,b;if(d&&a){a.update(d);if(c.textEl){b=c.textEl.getWidth()+c.iconEl.getWidth()+25+(c.arrowEl?c.arrowEl.getWidth():0);if(b>c.itemEl.getWidth()){c.parentMenu.setWidth(b)}}}else{if(a){a.update("")}}c.text=d}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(a){var b=this.menu;if(b.activeItem){b.onClick(a)}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(f){var g=this.menu,b=g.items,d=g.focusedItem,c=d?b.indexOf(d):-1,a=c+f;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}var e=b.getAt(a);if(g.canActivateItem(e)){g.setActiveItem(e);break}a+=f}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,f=d.focusedItem,a=d.activeItem,b;if(f&&this.isWhitelisted(f)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:" ",onRender:function(b,d){var c=this,a=c.separatorCls;c.cls+=" "+a;Ext.applyIf(c.renderSelectors,{itemSepEl:"."+a});c.callParent(arguments)}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:false,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var b=this;b.addEvents("add","remove","update","datachanged","beforeload","load","beforesync","clear");Ext.apply(b,a);b.removed=[];b.mixins.observable.constructor.apply(b,arguments);b.model=Ext.ModelManager.getModel(a.model||b.model);Ext.applyIf(b,{modelDefaults:{}});if(!b.model&&b.fields){b.model=Ext.define("Ext.data.Store.ImplicitModel-"+(b.storeId||Ext.id()),{extend:"Ext.data.Model",fields:b.fields,proxy:b.proxy||b.defaultProxyType});delete b.fields;b.implicitModel=true}b.setProxy(a.proxy||b.proxy||b.model.getProxy());if(b.id&&!b.storeId){b.storeId=b.id;delete b.id}if(b.storeId){Ext.data.StoreManager.register(b)}b.mixins.sortable.initSortable.call(b);b.filters=Ext.create("Ext.util.MixedCollection");b.filters.addAll(b.decodeFilters(a.filters))},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=Ext.create("Ext.data.Operation",c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},onProxyRead:Ext.emptyFn,update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var f=this,b=c.operations,e=b.length,d;f.suspendEvents();for(d=0;d<e;d++){f.onProxyWrite(b[d])}f.resumeEvents();f.fireEvent("datachanged",f)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(){var d=this,b={},e=d.getNewRecords(),c=d.getUpdatedRecords(),a=d.getRemovedRecords(),f=false;if(e.length>0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&d.fireEvent("beforesync",b)!==false){d.proxy.batch(b,d.getBatchListeners())}},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.getSorters()});a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a){var b=this;if(b.autoSync){b.sync()}b.fireEvent("update",b,a,Ext.data.Model.EDIT)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT)},clearData:Ext.emptyFn,destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=null;a.tree=null;a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b)}},getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return this.loading}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});a.callParent(arguments)},getBBox:function(){var e=0,m,h,j=this.items,f=this.length,g=Infinity,c=g,l=-g,b=g,k=-g,d,a;for(;e<f;e++){m=j[e];if(m.el){h=m.getBBox();c=Math.min(c,h.x);b=Math.min(b,h.y);l=Math.max(l,h.height+h.y);k=Math.max(k,h.width+h.x)}}return{x:c,y:b,height:l-b,width:k-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(c){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].hide()}return this},show:function(c){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].show()}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(f){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(f)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var c=this,a=c.getSurface(),b;if(a){while(c.getCount()>0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});Ext.define("Ext.layout.container.AbstractFit",{extend:"Ext.layout.container.Container",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit"});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.getPosition();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}},calculateConstrainRegion:function(){var d=this,a=d.comp,g=d.initialConstrainTo,e,f,b=a.el.shadow?a.el.shadow.offset:0;if(!(g instanceof Ext.util.Region)){g=Ext.fly(g).getViewRegion()}if(b){g.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();f=d.proxy?d.proxy.el.getRegion():a.el.getRegion();g.adjust(e.top-f.top,e.right-f.right,e.bottom-f.bottom,e.left-f.left)}return g},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPosition.apply(a,[b.startPosition[0]+d[0],b.startPosition[1]+d[1]])},onEnd:function(a){if(this.proxy&&!this.comp.liveDrag){this.comp.unghost()}}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"visibility",floating:true,ariaRole:"alertdialog",itemCls:"x-window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,initComponent:function(){var a=this;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}},initStateEvents:function(){var a=this.stateEvents;Ext.each(["maximize","restore","resize","dragend"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(){if(this.floating){this.toFront()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:"el",scope:c}})}},afterRender:function(){var a=this,b=a.hidden,c;a.hidden=false;a.callParent();a.hidden=b;a.proxy=a.getProxy();a.mon(a.el,"mousedown",a.onMouseDown,a);if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){c=a.getKeyMap();c.on(27,a.onEsc,a);c.disable()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}a=Ext.applyIf({el:b.el,delegate:"#"+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=Ext.create("Ext.util.ComponentDragger",this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){var d=this,g=d.focusEl,e=d.defaultButton||d.defaultFocus,b=typeof db,c,a;if(Ext.isDefined(e)){if(Ext.isNumber(e)){g=d.query("button")[e]}else{if(Ext.isString(e)){g=d.down("#"+e)}else{g=e}}}return g||d.focusEl},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a;b.callParent(arguments);if(b.maximized){b.fitContainer()}if(b.monitorResize||b.constrain||b.constrainHeader){Ext.EventManager.onWindowResize(b.onWindowResize,b)}b.doConstrain();if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);a[a.closeAction]()}else{a.hide(a.animTarget,a.doClose,a)}},afterHide:function(){var a=this;if(a.monitorResize||a.constrain||a.constrainHeader){Ext.EventManager.removeResizeListener(a.onWindowResize,a)}if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.doConstrain();a.fireEvent("restore",a)}return a},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.ModelManager","Ext.data.Model","Ext.util.Grouper"],uses:["Ext.data.proxy.Memory"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",pageSize:25,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,isStore:true,constructor:function(a){a=a||{};var c=this,e=a.groupers,b,d;if(a.buffered||c.buffered){c.prefetchData=Ext.create("Ext.util.MixedCollection",false,function(f){return f.index});c.pendingRequests=[];c.pagesRequested=[];c.sortOnLoad=false;c.filterOnLoad=false}c.addEvents("beforeprefetch","groupchange","prefetch");d=a.data||c.data;c.data=Ext.create("Ext.util.MixedCollection",false,function(f){return f.internalId});if(d){c.inlineData=d;delete a.data}if(!e&&a.groupField){e=[{property:a.groupField,direction:a.groupDir}]}delete a.groupers;c.groupers=Ext.create("Ext.util.MixedCollection");c.groupers.addAll(c.decodeGroupers(e));this.callParent([a]);if(c.groupers.items.length){c.sort(c.groupers.items,"prepend",false)}b=c.proxy;d=c.inlineData;if(d){if(b instanceof Ext.data.proxy.Memory){b.data=d;c.read()}else{c.add.apply(c,d)}c.sort();delete c.inlineData}else{if(c.autoLoad){Ext.defer(c.load,10,c,[typeof c.autoLoad==="object"?c.autoLoad:undefined])}}},onBeforeSort:function(){this.sort(this.groupers.items,"prepend",false)},decodeGroupers:function(d){if(!Ext.isArray(d)){if(d===undefined){d=[]}else{d=[d]}}var c=d.length,e=Ext.util.Grouper,a,b;for(b=0;b<c;b++){a=d[b];if(!(a instanceof e)){if(Ext.isString(a)){a={property:a}}Ext.applyIf(a,{root:"data",direction:"ASC"});if(a.fn){a.sorterFn=a.fn}if(typeof a=="function"){a={sorterFn:a}}d[b]=new e(a)}}return d},group:function(d,e){var c=this,b,a;if(Ext.isArray(d)){a=d}else{if(Ext.isObject(d)){a=[d]}else{if(Ext.isString(d)){b=c.groupers.get(d);if(!b){b={property:d,direction:e};a=[b]}else{if(e===undefined){b.toggle()}else{b.setDirection(e)}}}}}if(a&&a.length){a=c.decodeGroupers(a);c.groupers.clear();c.groupers.addAll(a)}if(c.remoteGroup){c.load({scope:c,callback:c.fireGroupChange})}else{c.sort();c.fireEvent("groupchange",c,c.groupers)}},clearGrouping:function(){var a=this;a.groupers.each(function(b){a.sorters.remove(b)});a.groupers.clear();if(a.remoteGroup){a.load({scope:a,callback:a.fireGroupChange})}else{a.sort();a.fireEvent("groupchange",a,a.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],j={},f,g,h,e;for(e=0;e<a;e++){f=d[e];g=this.getGroupString(f);h=j[g];if(h===undefined){h={name:g,children:[]};c.push(h);j[g]=h}h.children.push(f)}return b?j[b]:c},getGroupsForGrouper:function(f,b){var d=f.length,e=[],a,c,h,j,g;for(g=0;g<d;g++){h=f[g];c=b.getGroupString(h);if(c!==a){j={name:c,grouper:b,records:[]};e.push(j)}j.records.push(h);a=c}return e},getGroupsForGrouperIndex:function(c,h){var f=this,g=f.groupers,b=g.getAt(h),a=f.getGroupsForGrouper(c,b),e=a.length,d;if(h+1<g.length){for(d=0;d<e;d++){a[d].children=f.getGroupsForGrouperIndex(a[d].records,h+1)}}for(d=0;d<e;d++){a[d].depth=h}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var g=this,f=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=g.createModel(c[e]);b.set(g.modelDefaults);c[e]=b;g.data.insert(d+e,b);b.join(g);f=f||b.phantom===true}if(g.snapshot){g.snapshot.addAll(c)}g.fireEvent("add",g,c,d);g.fireEvent("datachanged",g);if(g.autoSync&&f){g.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}var e=this,c=0,d=b.length,a;for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}e.insert(e.data.length,b);return b},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(b,a){this.data.each(b,a)},remove:function(b,j){if(!Ext.isArray(b)){b=[b]}j=j===true;var f=this,g=false,c=0,a=b.length,h,e,d;for(;c<a;c++){d=b[c];e=f.data.indexOf(d);if(f.snapshot){f.snapshot.remove(d)}if(e>-1){h=d.phantom===true;if(!j&&!h){f.removed.push(d)}d.unjoin(f);f.data.remove(d);g=g||!h;f.fireEvent("remove",f,d,e)}}f.fireEvent("datachanged",f);if(!j&&f.autoSync&&g){f.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(Ext.isFunction(a)){a={callback:a}}Ext.applyIf(a,{groupers:b.groupers.items,page:b.currentPage,start:(b.currentPage-1)*b.pageSize,limit:b.pageSize,addRecords:false});return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent("load",d,a,e);d.fireEvent("read",d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(d,e,l){if(l){var g=0,f=this.data,a=this.snapshot,b=d.length,k=e.records,h,c,j;for(;g<b;++g){h=d[g];c=k[g];if(c){j=f.indexOf(c);if(j>-1){f.removeAt(j);f.insert(j,h)}if(a){j=a.indexOf(c);if(j>-1){a.removeAt(j);a.insert(j,h)}}h.phantom=false;h.join(this)}}}},onUpdateRecords:function(d,c,h){if(h){var e=0,f=d.length,g=this.data,b=this.snapshot,a;for(;e<f;++e){a=d[e];g.replace(a);if(b){b.replace(a)}a.join(this)}}},onDestroyRecords:function(c,d,j){if(j){var h=this,f=0,b=c.length,e=h.data,a=h.snapshot,g;for(;f<b;++f){g=c[f];g.unjoin(h);e.remove(g);if(a){a.remove(g)}}h.removed=[]}},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,f){if(Ext.isString(e)){e={property:e,value:f}}var d=this,a=d.decodeFilters(e),b=0,g=d.sortOnFilter&&!d.remoteSort,c=a.length;for(;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){d.load()}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(g){d.sort()}if(!g||d.sorters.length<1){d.fireEvent("datachanged",d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){b.load()}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(f,a){var c=this.model,e=f.length,d,b;for(d=0;d<e;d++){b=f[d];if(!(b instanceof Ext.data.Model)){f[d]=Ext.ModelManager.create(b,c)}}this.loadRecords(f,{addRecords:a})},loadRecords:function(a,b){var e=this,c=0,d=a.length;b=b||{};if(!b.addRecords){delete e.snapshot;e.data.clear()}e.data.addAll(a);for(;c<d;c++){if(b.start!==undefined){a[c].index=b.start+c}a[c].join(e)}e.suspendEvents();if(e.filterOnLoad&&!e.remoteFilter){e.filter()}if(e.sortOnLoad&&!e.remoteSort){e.sort()}e.resumeEvents();e.fireEvent("datachanged",e,a)},loadPage:function(b){var a=this;a.currentPage=b;a.read({page:b,start:(b-1)*a.pageSize,limit:a.pageSize,addRecords:!a.clearOnPageLoad})},nextPage:function(){this.loadPage(this.currentPage+1)},previousPage:function(){this.loadPage(this.currentPage-1)},clearData:function(){this.data.each(function(a){a.unjoin()});this.data.clear()},prefetch:function(b){var c=this,a,d=c.getRequestId();b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.sorters.items,requestId:d});c.pendingRequests.push(d);a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeprefetch",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyPrefetch,c)}return c},prefetchPage:function(e,c){var d=this,b=d.pageSize,f=(e-1)*d.pageSize,a=f+b;if(Ext.Array.indexOf(d.pagesRequested,e)===-1&&!d.rangeSatisfied(f,a)){c=c||{};d.pagesRequested.push(e);Ext.applyIf(c,{page:e,start:f,limit:b,callback:d.onWaitForGuarantee,scope:d});d.prefetch(c)}},getRequestId:function(){this.requestSeed=this.requestSeed||1;return this.requestSeed++},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e){d.cacheRecords(a,b)}Ext.Array.remove(d.pendingRequests,b.requestId);if(b.page){Ext.Array.remove(d.pagesRequested,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,e,b);if(b.blocking){d.fireEvent("load",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},cacheRecords:function(b,a){var e=this,c=0,d=b.length,f=a?a.start:0;if(!Ext.isDefined(e.totalCount)){e.totalCount=b.length;e.fireEvent("totalcountchange",e.totalCount)}for(;c<d;c++){b[c].index=f+c}e.prefetchData.addAll(b);if(e.purgePageCount){e.purgeRecords()}},purgeRecords:function(){var c=this,b=c.prefetchData.getCount(),d=c.purgePageCount*c.pageSize,e=b-d-1,a=0;for(;a<=e;a++){c.prefetchData.removeAt(0)}},rangeSatisfied:function(e,a){var c=this,b=e,d=true;for(;b<a;b++){if(!c.prefetchData.getByKey(b)){d=false;break}}return d},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(){var f=this,c=f.getTotalCount(),g=f.requestStart,b=((c-1)<f.requestEnd)?c-1:f.requestEnd,d=[],a,e=g;if(g!==f.guaranteedStart&&b!==f.guaranteedEnd){f.guaranteedStart=g;f.guaranteedEnd=b;for(;e<=b;e++){a=f.prefetchData.getByKey(e);d.push(a)}f.fireEvent("guaranteedrange",d,g,b);if(f.cb){f.cb.call(f.scope||f,d)}}f.unmask()},mask:function(){this.masked=true;this.fireEvent("beforeload")},unmask:function(){if(this.masked){this.fireEvent("load")}},hasPendingRequests:function(){return this.pendingRequests.length},onWaitForGuarantee:function(){if(!this.hasPendingRequests()){this.onGuaranteedRange()}},guaranteeRange:function(a,c,b,m){c=(c>this.totalCount)?this.totalCount-1:c;var h=this,d=a,k=h.prefetchData,e=[],g=!!k.getByKey(a),j=!!k.getByKey(c),f=h.getPageFromRecordIndex(a),l=h.getPageFromRecordIndex(c);h.cb=b;h.scope=m;h.requestStart=a;h.requestEnd=c;if(!g||!j){if(f===l){h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h})}else{h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h});h.prefetchPage(l,{callback:h.onWaitForGuarantee,scope:h})}}else{h.onGuaranteedRange()}},sort:function(){var d=this,c=d.prefetchData,e,f,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();f=d.guaranteedStart;a=d.guaranteedEnd;b;if(e.length){c.sort(e);b=c.getRange();c.clear();d.cacheRecords(b);delete d.guaranteedStart;delete d.guaranteedEnd;d.guaranteeRange(f,a)}d.callParent(arguments)}}else{d.callParent(arguments)}},doSort:function(b){var e=this;if(e.remoteSort){e.load()}else{e.data.sortBy(b);if(!e.buffered){var a=e.getRange(),d=a.length,c=0;for(;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e)}},find:function(e,d,g,f,a,c){var b=this.createFilterFn(e,d,f,a,c);return b?this.data.findIndexBy(b,null,g):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(f){return c.test(f.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)===a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){return a.index||this.indexOf(a)},indexOfId:function(a){return this.data.indexOfKey(a)},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,f){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(f)}for(;d<a;++d){e=b[d].get(f);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,f){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(f)}for(;d<b;++d){e=c[d].get(f);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(g,j,e,f){f=f||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},h;for(;c<d;++c){h=a[c];b[h.name]=g.apply(j||this,[h.children].concat(f))}return b}else{return g.apply(j||this,[this.data.items].concat(f))}}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",uses:["Ext.data.reader.Array"],constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"memory",reader:"array"}});this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]){return Ext.create("Ext.draw.engine."+d[c],b)}}return false}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:Ext.emptyFn,addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){var a=this.gradients;if(a){Ext.each(a,this.addGradient,this)}},initItems:function(){var a=this.items;this.items=Ext.create("Ext.draw.CompositeSprite");this.groups=Ext.create("Ext.draw.CompositeSprite");if(a){this.add(a)}},initBackground:function(b){var e,f,d,c=this.width,a=this.height;if(b){if(b.gradient){f=b.gradient;e=f.id;this.addGradient(f);this.background=this.add({type:"rect",x:0,y:0,width:c,height:a,fill:"url(#"+e+")"})}else{if(b.fill){this.background=this.add({type:"rect",x:0,y:0,width:c,height:a,fill:b.fill})}else{if(b.image){this.background=this.add({type:"image",x:0,y:0,width:c,height:a,src:b.image})}}}}},setSize:function(a,b){if(this.background){this.background.setAttributes({width:a,height:b,hidden:false},true)}},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var f=Array.prototype.slice.call(arguments),h,d;var a=f.length>1;if(a||Ext.isArray(f[0])){var g=a?f:f[0],b=[],c,e,j;for(c=0,e=g.length;c<e;c++){j=g[c];j=this.add(j);b.push(j)}return b}h=this.prepareItems(f[0],true)[0];this.normalizeSpriteCollection(h);this.onAdd(h);return h},normalizeSpriteCollection:function(c){var b=this.items,d=c.attr.zIndex,a=b.indexOf(c);if(a<0||(a>0&&b.getAt(a-1).attr.zIndex>d)||(a<b.length-1&&b.getAt(a+1).attr.zIndex<d)){b.removeAt(a);a=b.findIndexBy(function(e){return e.attr.zIndex>d});if(a<0){a=b.length}b.insert(a,c)}return a},onAdd:function(d){var f=d.group,b=d.draggable,a,e,c;if(f){a=[].concat(f);e=a.length;for(c=0;c<e;c++){f=a[c];this.getGroup(f).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(a,b){if(a){this.items.remove(a);this.groups.each(function(c){c.remove(a)});a.onRemove();if(b===true){a.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyTransformations:function(b){b.bbox.transform=0;this.transform(b);var d=this,c=false,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){d.translate(b);c=true}if(a.scaling.x!=null||a.scaling.y!=null){d.scale(b);c=true}if(a.rotation.degrees!=null){d.rotate(b);c=true}if(c){b.bbox.transform=0;this.transform(b);b.transformations=[]}},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,f=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:f,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX,b.radiusY)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x,b.y,b.width,b.height,b.r)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=Ext.create("Ext.draw.CompositeSprite",{surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){if(typeof b=="string"){var a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){delete this.domRef;this.removeAll()}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click")},onRender:function(){var d=this,i=d.viewBox,b=d.autoSize,g,c,a,h,f,e;d.callParent(arguments);d.createSurface();c=d.surface.items;if(i||b){g=c.getBBox();a=g.width;h=g.height;f=g.x;e=g.y;if(d.viewBox){d.surface.setViewBox(f,e,a,h)}else{d.autoSizeSurface()}}},autoSizeSurface:function(){var d=this,b=d.surface.items,e=b.getBBox(),c=e.width,a=e.height;b.setAttributes({translate:{x:-e.x,y:-e.y+(+Ext.isOpera)}},true);if(d.rendered){d.setSize(c,a)}else{d.surface.setSize(c,a)}d.el.setSize(c,a)},createSurface:function(){var a=Ext.draw.Surface.create(Ext.apply({},{width:this.width,height:this.height,renderTo:this.el},this.initialConfig));this.surface=a;function b(c){return function(d){this.fireEvent(c,d)}}a.on({scope:this,mouseup:b("mouseup"),mousedown:b("mousedown"),mousemove:b("mousemove"),mouseenter:b("mouseenter"),mouseleave:b("mouseleave"),click:b("click")})},onDestroy:function(){var a=this.surface;if(a){a.destroy()}this.callParent(arguments)}});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.AbstractFit",alias:"layout.fit",alternateClassName:"Ext.layout.FitLayout",onLayout:function(){var a=this;a.callParent();if(a.owner.items.length){a.setItemBox(a.owner.items.get(0),a.getLayoutTargetSize())}},getTargetBox:function(){return this.getLayoutTargetSize()},setItemBox:function(c,b){var a=this;if(c&&b.height>0){if(a.isManaged("width")===true){b.width=undefined}if(a.isManaged("height")===true){b.height=undefined}a.setItemSize(c,b.width,b.height)}}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,afterRender:function(){var a=this;this.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true)},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var a=this;a.iconEl.addCls(a.disabledCls);a.checkChangeDisabled=true},enableCheckChange:function(){var a=this;a.iconEl.removeCls(a.disabledCls);a.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:false,hidden:true,ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix;b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);var a=[d+"menu"];if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");var c=b.bodyCls?[b.bodyCls]:[];c.unshift(d+"menu-body");b.bodyCls=c.join(" ");b.layout={type:"vbox",align:"stretchmax",autoSize:true,clearInnerCtOnLayout:true,overflowHandler:"Scroller"};if(b.floating===false&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var e=!!b.items.length;if(e&&b.rendered){b.el.setStyle("visibility",null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c=" ";b.callParent(arguments);if(b.showSeparator){b.iconSepEl=b.layout.getRenderTarget().insertFirst({cls:d+"menu-icon-separator",html:c})}b.focusEl=b.el.createChild({cls:d+"menu-focus",tabIndex:"-1",html:c});b.mon(b.el,{click:b.onClick,mouseover:b.onMouseOver,scope:b});b.mouseMonitor=b.el.monitorMouseLeave(100,b.onMouseLeave,b);if(b.showSeparator&&((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)){b.iconSepEl.setHeight(b.el.getHeight())}b.keyNav=Ext.create("Ext.menu.KeyNav",b)},afterLayout:function(){var j=this;j.callParent(arguments);if((!Ext.iStrict&&Ext.isIE)||Ext.isIE6){var a=j.layout.getRenderTarget(),c=0,b=j.dockedItems,d=b.length,f=0,g,h,e;c=a.getWidth();e=c+j.body.getBorderWidth("lr")+j.body.getPadding("lr");j.body.setWidth(e);for(;f<d,g=b.getAt(f);f++){if(g.dock=="left"||g.dock=="right"){e+=g.getWidth()}}j.el.setWidth(e)}},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(){var a=this;if(a.activeItem){a.activeItem.deactivate();if(!a.activeItem.activated){delete a.activeItem}}if(a.focusedItem){a.focusedItem.blur();if(!a.focusedItem.$focused){delete a.focusedItem}}},getFocusEl:function(){return this.focusEl},hide:function(){this.deactivateActiveItem();this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(Ext.isString(b)){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){var a=[d+"menu-item",d+"menu-item-cmp"],e=Ext.Function.createInterceptor;c.focus=e(c.focus,function(){this.$focused=true},c);c.blur=e(c.blur,function(){this.$focused=false},c);if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}c.isMenuItem=true}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?Ext.createWidget("menuseparator"):Ext.createWidget("menuitem",{canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}if((c.getTarget()==b.focusEl.dom)||c.within(b.layout.getRenderTarget())){a=b.getItemFromEvent(c)||b.activeItem;if(a){if(a.getXTypes().indexOf("menuitem")>=0){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}}b.fireEvent("click",b,a,c)}},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(d){var c=this,f=d.getRelatedTarget(),a=!c.el.contains(f),b=c.getItemFromEvent(d);if(a&&c.parentMenu){c.parentMenu.setActiveItem(c.parentItem);c.parentMenu.mouseMonitor.mouseenter()}if(c.disabled){return}if(b){c.setActiveItem(b);if(b.activated&&b.expandMenu){b.expandMenu()}}if(a){c.fireEvent("mouseenter",c,d)}c.fireEvent("mouseover",c,b,d)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem&&b!=a.focusedItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(c,f,e){var b=this;if(b.floating&&c){b.layout.autoSize=true;b.show();c=c.el||c;var d=b.el.getAlignToXY(c,f||b.defaultAlign,e);if(b.floatParent){var a=b.floatParent.getTargetEl().getViewRegion();d[0]-=a.x;d[1]-=a.y}b.showAt(d);b.doConstrain()}return b},doConstrain:function(){var e=this,f=this.el.getY(),g,d,h=f,i,c,a,b;delete e.height;e.setSize();d=e.getHeight();if(e.floating){c=Ext.fly(e.el.dom.parentNode);a=c.getScroll().top;b=c.getViewSize().height;i=f-a;g=e.maxHeight?e.maxHeight:b-i;if(d>b){g=b;h=f-i}else{if(g<d){h=f-(d-g);g=d}}}else{g=e.getHeight()}if(e.maxHeight){g=Math.min(e.maxHeight,g)}if(d>g&&g>0){e.layout.autoSize=false;e.setHeight(g);if(e.showSeparator){e.iconSepEl.setHeight(e.layout.getRenderTarget().dom.scrollHeight)}}e.el.setY(h)}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(g,h,f){if(f){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this.target;if(this.dynamic){return a}else{if(!this.proxy){this.proxy=a.isComponent?a.getProxy().addCls(Ext.baseCSSPrefix+"resizable-proxy"):a.createProxy({tag:"div",cls:Ext.baseCSSPrefix+"resizable-proxy",id:a.id+"-rzproxy"},Ext.getBody());this.proxy.removeCls(Ext.baseCSSPrefix+"proxy-el")}}this.proxy.show();return this.proxy},onStart:function(a){this.activeResizeHandle=Ext.getCmp(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(p,k){var q=this,c=q.activeResizeHandle.region,f=q.getOffset(q.constrainTo?"dragTarget":null),i=q.startBox,g,n=0,r=0,a=0,t=0,s,l=f[0]<0?"right":"left",o=f[1]<0?"down":"up",h,b;switch(c){case"south":r=f[1];b=2;break;case"north":r=-f[1];t=-r;b=2;break;case"east":n=f[0];b=1;break;case"west":n=-f[0];a=-n;b=1;break;case"northeast":r=-f[1];t=-r;n=f[0];h=[i.x,i.y+i.height];b=3;break;case"southeast":r=f[1];n=f[0];h=[i.x,i.y];b=3;break;case"southwest":n=-f[0];a=-n;r=f[1];h=[i.x+i.width,i.y];b=3;break;case"northwest":r=-f[1];t=-r;n=-f[0];a=-n;h=[i.x+i.width,i.y+i.height];b=3;break}var d={width:i.width+n,height:i.height+r,x:i.x+a,y:i.y+t};if(d.width<q.minWidth||d.width>q.maxWidth){d.width=Ext.Number.constrain(d.width,q.minWidth,q.maxWidth);d.x=q.lastX||d.x}else{q.lastX=d.x}if(d.height<q.minHeight||d.height>q.maxHeight){d.height=Ext.Number.constrain(d.height,q.minHeight,q.maxHeight);d.y=q.lastY||d.y}else{q.lastY=d.y}if(q.preserveRatio||p.shiftKey){var m,j;g=q.startBox.width/q.startBox.height;m=Math.min(Math.max(q.minHeight,d.width/g),q.maxHeight);j=Math.min(Math.max(q.minWidth,d.height*g),q.maxWidth);if(b==1){d.height=m}else{if(b==2){d.width=j}else{s=Math.abs(h[0]-this.lastXY[0])/Math.abs(h[1]-this.lastXY[1]);if(s>g){d.height=m}else{d.width=j}if(c=="northeast"){d.y=i.y-(d.height-i.height)}else{if(c=="northwest"){d.y=i.y-(d.height-i.height);d.x=i.x-(d.width-i.width)}else{if(c=="southwest"){d.x=i.x-(d.width-i.width)}}}}}}if(r===0){o="none"}if(n===0){l="none"}q.resize(d,{horizontal:l,vertical:o},k)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){if(c.floating){c.setPagePosition(b.x,b.y)}c.setSize(b.width,b.height)}else{c.setBox(b);if(this.originalTarget){this.originalTarget.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",buildExtractors:function(){this.callParent(arguments);var a=this.model.prototype.fields.items,c=a.length,d=[],b;for(b=0;b<c;b++){d.push(function(e){return function(f){return f[e]}}(a[b].mapping||b))}this.extractorFunctions=d}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.core.DomHelper"],markup:function(){if(Ext.supports.CSS3BoxShadow){return'<div class="'+Ext.baseCSSPrefix+'css-shadow" role="presentation"></div>'}else{if(Ext.isIE){return'<div class="'+Ext.baseCSSPrefix+'ie-shadow" role="presentation"></div>'}else{return'<div class="'+Ext.baseCSSPrefix+'frame-shadow" role="presentation"><div class="xst" role="presentation"><div class="xstl" role="presentation"></div><div class="xstc" role="presentation"></div><div class="xstr" role="presentation"></div></div><div class="xsc" role="presentation"><div class="xsml" role="presentation"></div><div class="xsmc" role="presentation"></div><div class="xsmr" role="presentation"></div></div><div class="xsb" role="presentation"><div class="xsbl" role="presentation"></div><div class="xsbc" role="presentation"></div><div class="xsbr" role="presentation"></div></div></div>'}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.core.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,g){c=Ext.draw.Draw.rad(c);var e=this,f=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(f,d,-d,f,b,g);e.add(1,0,0,1,-b,-g)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(){var a=this;return"progid:DXImageTransform.Microsoft.Matrix(M11="+a.get(0,0)+", M12="+a.get(0,1)+", M21="+a.get(1,0)+", M22="+a.get(1,1)+", Dx="+a.get(0,2)+", Dy="+a.get(1,2)+")"},offset:function(){var a=this.matrix;return[a[0][2].toFixed(4),a[1][2].toFixed(4)]},split:function(){function d(f){return f[0]*f[0]+f[1]*f[1]}function b(f){var g=Math.sqrt(d(f));f[0]/=g;f[1]/=g}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var i=this,f=i.el,k,d,c,n,m,q,a,j,g,p,o;o=i.sprite;p=o.getBBox();try{k=Ext.core.Element.getXY(f)}catch(h){}if(!k){return null}d=k[0];c=d+p.width;n=k[1];m=n+p.height;return Ext.create("Ext.util.Region",n,c,m,d)},startDrag:function(b,e){var d=this,a=d.sprite.attr,c=a.translation;if(d.sprite.vml){d.prevX=b+a.x;d.prevY=e+a.y}else{d.prevX=b-c.x;d.prevY=e-c.y}},onDrag:function(f){var d=f.getXY(),c=this,b=c.sprite,a=b.attr;c.translateX=d[0]-c.prevX;c.translateY=d[1]-c.prevY;b.setAttributes({translate:{x:c.translateX,y:c.translateY}},true);if(b.vml){c.prevX=d[0]+a.x||0;c.prevY=d[1]+a.y||0}}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){Ext.apply(this,b);if(typeof this.mode!="string"){this.mode=this.defaultMode}var d=this.offset,c={h:0},a=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){c.w=c.h=-d;c.l=c.t=d}else{c.w=0;c.l=c.t=d;c.t-=1;if(Ext.isIE){c.l-=d+a;c.t-=d+a;c.w-=a;c.h-=a;c.t+=1}}break;case"sides":if(Ext.supports.CSS3BoxShadow){c.h-=d;c.t=d;c.l=c.w=0}else{c.w=(d*2);c.l=-d;c.t=d-1;if(Ext.isIE){c.l-=(d-a);c.t-=d+a;c.l+=1;c.w-=(d-a)*2;c.w-=a+1;c.h-=1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){c.l=c.w=c.t=0}else{c.w=c.h=(d*2);c.l=c.t=-d;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(d-a);c.t-=(d-a);c.l+=1;c.w-=(d+a+1);c.h-=(d+a);c.h+=1}break}}this.adjusts=c},offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.ShadowPool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,o,k,g){if(!this.el){return}var a=this.adjusts,i=this.el.dom,j=i.style,c,f,m,e,h,n;j.left=(b+a.l)+"px";j.top=(o+a.t)+"px";c=Math.max(k+a.w,0);f=Math.max(g+a.h,0);h=c+"px";n=f+"px";if(j.width!=h||j.height!=n){j.width=h;j.height=n;if(Ext.supports.CSS3BoxShadow){j.boxShadow="0 0 "+this.offset+"px 0 #888"}else{if(!Ext.isIE){m=i.childNodes;e=Math.max(0,(c-12))+"px";m[0].childNodes[1].style.width=e;m[1].childNodes[1].style.width=e;m[2].childNodes[1].style.width=e;m[1].style.height=Math.max(0,(f-12))+"px"}}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.ShadowPool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},read:function(c,f,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(f,d||e,[c])},clear:Ext.emptyFn});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=a||{};b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSprite(a)}a.dd=Ext.create("Ext.draw.SpriteDD",a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(j,m){var r=this,h=r.fontProperties,p=h.length,f=r.pathProperties,e=f.length,q=!!r.surface,a=q&&r.surface.customAttributes||{},b=r.attr,k,n,g,c,o,l,s,d;for(k in a){if(j.hasOwnProperty(k)&&typeof a[k]=="function"){Ext.apply(j,a[k].apply(r,[].concat(j[k])))}}if(!!j.hidden!==!!b.hidden){r.dirtyHidden=true}for(n=0;n<e;n++){k=f[n];if(k in j&&j[k]!==b[k]){r.dirtyPath=true;break}}if("zIndex" in j){r.zIndexDirty=true}for(n=0;n<p;n++){k=h[n];if(k in j&&j[k]!==b[k]){r.dirtyFont=true;break}}g=j.translate;c=b.translation;if(g){if((g.x&&g.x!==c.x)||(g.y&&g.y!==c.y)){Ext.apply(c,g);r.dirtyTransform=true}delete j.translate}o=j.rotate;l=b.rotation;if(o){if((o.x&&o.x!==l.x)||(o.y&&o.y!==l.y)||(o.degrees&&o.degrees!==l.degrees)){Ext.apply(l,o);r.dirtyTransform=true}delete j.rotate}s=j.scale;d=b.scaling;if(s){if((s.x&&s.x!==d.x)||(s.y&&s.y!==d.y)||(s.cx&&s.cx!==d.cx)||(s.cy&&s.cy!==d.cy)){Ext.apply(d,s);r.dirtyTransform=true}delete j.scale}Ext.apply(b,j);r.dirty=true;if(m===true&&q){r.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.core.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=Ext.create("Ext.draw.Matrix");a.bbox={plain:0,transform:0};a.fireEvent("render",a);return b},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(h){var j={},f,k,a,c,g,b;if(h&&h.el){b=h.el.dom;try{j=b.getBBox();return j}catch(d){}j={x:j.x,y:Infinity,width:0,height:0};g=b.getNumberOfChars();for(c=0;c<g;c++){f=b.getExtentOfChar(c);j.y=Math.min(f.y,j.y);k=f.y+f.height-j.y;j.height=Math.max(j.height,k);a=f.x+f.width-j.x;j.width=Math.max(j.width,a)}return j}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(d){var g=this,a=Ext.create("Ext.draw.Matrix"),f=d.transformations,h=f.length,c=0,b,e;for(;c<h;c++){b=f[c];e=b.type;if(e=="translate"){a.translate(b.x,b.y)}else{if(e=="rotate"){a.rotate(b.degrees,b.x,b.y)}else{if(e=="scale"){a.scale(b.x,b.y,b.centerX,b.centerY)}}}}d.matrix=a;d.el.set({transform:a.toSvg()})},setSize:function(a,c){var d=this,b=d.el;a=+a||d.width;c=+c||d.height;d.width=a;d.height=c;b.setSize(a,c);b.set({width:a,height:c});d.callParent([a,c])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var f=this;if(!f.el){var e=f.width||10,b=f.height||10,d=f.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b}),a=f.getDefs(),g=f.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0}),h;if(Ext.isSafari3){h=f.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(h)}d.appendChild(g);c.appendChild(d);f.el=Ext.get(d);f.bgRect=Ext.get(g);if(Ext.isSafari3){f.webkitRect=Ext.get(h);f.webkitRect.hide()}f.el.on({scope:f,mouseup:f.onMouseUp,mousedown:f.onMouseDown,mouseover:f.onMouseOver,mouseout:f.onMouseOut,mousemove:f.onMouseMove,mouseenter:f.onMouseEnter,mouseleave:f.onMouseLeave,click:f.onClick})}f.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,f){var d=f.getTarget(),a=this.surface,c;this.fireEvent(b,f);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,f)}},tuneText:function(h,j){var a=h.el.dom,b=[],l,g,k,d,e,c,f;if(j.hasOwnProperty("text")){b=this.setText(h,j.text)}if(b.length){l=this.getBBoxText(h).height;for(d=0,e=b.length;d<e;d++){f=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("dy",d?l*1.2:l/f)}h.dirty=true}},setText:function(k,d){var g=this,a=k.el.dom,j=a.getAttribute("x"),b=[],m,h,l,e,f,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,f=c.length;e<f;e++){l=c[e];if(l){h=g.createSvgElement("tspan");h.appendChild(document.createTextNode(Ext.htmlDecode(l)));h.setAttribute("x",j);a.appendChild(h);b[e]=h}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);this.applyTransformations(a)}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(o){var j=this,c=o.el,n=o.group,g=o.attr,e,f,h,m,d,l,b,a,k;if(n){e=[].concat(n);h=e.length;for(f=0;f<h;f++){n=e[f];j.getGroup(n).add(o)}delete o.group}m=j.scrubAttrs(o)||{};o.bbox.plain=0;o.bbox.transform=0;if(o.type=="circle"||o.type=="ellipse"){m.cx=m.cx||m.x;m.cy=m.cy||m.y}else{if(o.type=="rect"){m.rx=m.ry=m.r}else{if(o.type=="path"&&m.d){m.d=Ext.draw.Draw.pathToAbsolute(m.d)}}}o.dirtyPath=false;if(m["clip-rect"]){j.setClip(o,m);delete m["clip-rect"]}if(o.type=="text"&&m.font&&o.dirtyFont){c.set({style:"font: "+m.font});o.dirtyFont=false}if(o.type=="image"){c.dom.setAttributeNS(j.xlink,"href",m.src)}Ext.applyIf(m,j.minDefaults[o.type]);if(o.dirtyHidden){(g.hidden)?j.hidePrim(o):j.showPrim(o);o.dirtyHidden=false}for(l in m){if(m.hasOwnProperty(l)&&m[l]!=null){c.dom.setAttribute(l,String(m[l]))}}if(o.type=="text"){j.tuneText(o,m)}b=g.style;if(b){c.setStyle(b)}o.dirty=false;if(Ext.isSafari3){j.webkitRect.show();setTimeout(function(){j.webkitRect.hide()})}},setClip:function(b,f){var e=this,d=f["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(c){var a=this.normalizeSpriteCollection(c),d=c.el,b;if(this.el.dom.childNodes[a+2]!==d.dom){if(a>0){do{b=this.items.getAt(--a).el}while(!b&&a>0)}d.insertAfter(b||this.bgRect)}c.zIndexDirty=false},createItem:function(a){var b=Ext.create("Ext.draw.Sprite",a);b.surface=this;return b},addGradient:function(g){g=Ext.draw.Draw.parseGradient(g);var e=g.stops.length,a=g.vector,b,d,f,c;if(g.type=="linear"){b=this.createSvgElement("linearGradient");b.setAttribute("x1",a[0]);b.setAttribute("y1",a[1]);b.setAttribute("x2",a[2]);b.setAttribute("y2",a[3])}else{b=this.createSvgElement("radialGradient");b.setAttribute("cx",g.centerX);b.setAttribute("cy",g.centerY);b.setAttribute("r",g.radius);if(Ext.isNumber(g.focalX)&&Ext.isNumber(g.focalY)){b.setAttribute("fx",g.focalX);b.setAttribute("fy",g.focalY)}}b.id=g.id;this.getDefs().appendChild(b);for(c=0;c<e;c++){d=g.stops[c];f=this.createSvgElement("stop");f.setAttribute("offset",d.offset+"%");f.setAttribute("stop-color",d.color);f.setAttribute("stop-opacity",d.opacity);b.appendChild(f)}},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,g){var f=e.el,d,a,c,b=[],h=f.getAttribute("class")||"";if(!Ext.isArray(g)){if(typeof g=="string"&&!this.hasCls(e,g)){f.set({"class":h+" "+g})}}else{for(d=0,a=g.length;d<a;d++){c=g[d];if(typeof c=="string"&&(" "+h+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){f.set({"class":" "+b.join(" ")})}}},removeCls:function(j,f){var g=this,b=j.el,d=b.getAttribute("class")||"",c,h,e,k,a;if(!Ext.isArray(f)){f=[f]}if(d){a=d.replace(g.trimRe," ").split(g.spacesRe);for(c=0,e=f.length;c<e;c++){k=f[c];if(typeof k=="string"){k=k.replace(g.trimRe,"");h=Ext.Array.indexOf(a,k);if(h!=-1){a.splice(h,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.core.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",path2vml:function(s){var m=this,t=m.NonVmlPathRe,b=m.map,e=m.valRe,q=m.zoom,d=m.bitesRe,f=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),l,n,c,a,h,o,g,k;if(String(s).match(t)){f=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(s).match(m.partialPathRe)){l=String(s).replace(d,function(r,v,j){var u=[],i=v.toLowerCase()=="m",p=b[v];j.replace(e,function(w){if(i&&u[length]==2){p+=u+b[v=="m"?"l":"L"];u=[]}u.push(Math.round(w*q))});return p+u});return l}}n=f(s);l=[];for(h=0,o=n.length;h<o;h++){c=n[h];a=n[h][0].toLowerCase();if(a=="z"){a="x"}for(g=1,k=c.length;g<k;g++){a+=Math.round(c[g]*m.zoom)+(g!=k-1?",":"")}l.push(a)}return l.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,f){var d=f.getTarget(),a=this.surface,c;this.fireEvent(b,f);c=this.items.get(d.id);if(c){c.fireEvent(b,c,f)}},createSpriteElement:function(g){var e=this,d=g.attr,f=g.type,i=e.zoom,b=g.vml||(g.vml={}),j=Math.round,c=(f==="image")?e.createNode("image"):e.createNode("shape"),k,h,a;c.coordsize=i+" "+i;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(f=="text"){b.path=k=e.createNode("path");k.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(k)}c.id=g.id;g.el=Ext.get(c);e.el.appendChild(c);if(f!=="image"){h=e.createNode("skew");h.on=true;c.appendChild(h);g.skew=h}g.matrix=Ext.create("Ext.draw.Matrix");g.bbox={plain:null,transform:null};g.fireEvent("render",g);return g.el},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(m){var s=this,d=m.vml,j=m.group,b=m.attr,c=m.el,o=c.dom,p,u,r,n,k,q,l,t,a;if(j){r=[].concat(j);k=r.length;for(n=0;n<k;n++){j=r[n];s.getGroup(j).add(m)}delete m.group}q=s.scrubAttrs(m)||{};if(m.zIndexDirty){s.setZIndex(m)}Ext.applyIf(q,s.minDefaults[m.type]);if(m.type=="image"){Ext.apply(m.attr,{x:q.x,y:q.y,width:q.width,height:q.height});a=m.getBBox();c.setStyle({width:a.width+"px",height:a.height+"px"});o.src=q.src}if(o.href){o.href=q.href}if(o.title){o.title=q.title}if(o.target){o.target=q.target}if(o.cursor){o.cursor=q.cursor}if(m.dirtyHidden){(q.hidden)?s.hidePrim(m):s.showPrim(m);m.dirtyHidden=false}if(m.dirtyPath){if(m.type=="circle"||m.type=="ellipse"){var f=q.x,e=q.y,h=q.rx||q.r||0,g=q.ry||q.r||0;o.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((f-h)*s.zoom),Math.round((e-g)*s.zoom),Math.round((f+h)*s.zoom),Math.round((e+g)*s.zoom),Math.round(f*s.zoom));m.dirtyPath=false}else{if(m.type!=="text"&&m.type!=="image"){m.attr.path=q.path=s.setPaths(m,q)||q.path;o.path=s.path2vml(q.path);m.dirtyPath=false}}}if("clip-rect" in q){s.setClip(m,q)}if(m.type=="text"){s.setTextAttributes(m,q)}if(q.opacity||q["stroke-opacity"]||q.fill){s.setFill(m,q)}if(q.stroke||q["stroke-opacity"]||q.fill){s.setStroke(m,q)}p=b.style;if(p){c.setStyle(p)}m.dirty=false},setZIndex:function(a){if(a.el){if(a.attr.zIndex!=undefined){a.el.setStyle("zIndex",a.attr.zIndex)}a.zIndexDirty=false}},setPaths:function(b,c){var a=b.attr;b.bbox.plain=null;b.bbox.transform=null;if(b.type=="circle"){a.rx=a.ry=c.r;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="ellipse"){a.rx=c.rx;a.ry=c.ry;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="rect"){a.rx=a.ry=c.r;return Ext.draw.Draw.rectPath(b)}else{if(b.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(j,e){var g=this,c=j.el.dom,i=c.fill,b=false,f,h,a,k,d;if(!i){i=c.fill=g.createNode("fill");b=true}if(Ext.isArray(e.fill)){e.fill=e.fill[0]}if(e.fill=="none"){i.on=false}else{if(typeof e.opacity=="number"){i.opacity=e.opacity}if(typeof e["fill-opacity"]=="number"){i.opacity=e["fill-opacity"]}i.on=true;if(typeof e.fill=="string"){a=e.fill.match(g.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){h=g.gradientsColl.getByKey(a.substring(1))}if(h){k=e.rotation;d=-(h.angle+270+(k?k.degrees:0))%360;if(d===0){d=180}i.angle=d;i.type="gradient";i.method="sigma";i.colors.value=h.colors}else{i.src=a;i.type="tile"}}else{i.color=Ext.draw.Color.toHex(e.fill);i.src="";i.type="solid"}}}if(b){c.appendChild(i)}},setStroke:function(b,g){var e=this,d=b.el.dom,h=b.strokeEl,f=false,c,a;if(!h){h=b.strokeEl=e.createNode("stroke");f=true}if(Ext.isArray(g.stroke)){g.stroke=g.stroke[0]}if(!g.stroke||g.stroke=="none"||g.stroke==0||g["stroke-width"]==0){h.on=false}else{h.on=true;if(g.stroke&&!g.stroke.match(e.fillUrlRe)){h.color=Ext.draw.Color.toHex(g.stroke)}h.joinstyle=g["stroke-linejoin"];h.endcap=g["stroke-linecap"]||"round";h.miterlimit=g["stroke-miterlimit"]||8;c=parseFloat(g["stroke-width"]||1)*0.75;a=g["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){h.weight=1;h.opacity=a*c}else{h.weight=c;h.opacity=a}}if(f){d.appendChild(h)}},setClip:function(b,f){var e=this,c=b.el,a=b.clipEl,d=String(f["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(h,c){var g=this,a=h.vml,e=a.textpath.style,f=g.span.style,i=g.zoom,j=Math.round,k={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(h.dirtyFont){if(c.font){e.font=f.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(g.fontFamilyRe,"")+'"';f.fontFamily=c["font-family"]}for(b in k){d=c[k[b]];if(d){e[b]=f[b]=d}}g.setText(h,c.text);if(a.textpath.string){g.span.innerHTML=String(a.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>")}a.W=g.span.offsetWidth;a.H=g.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*i),Math.round(a.Y*i),Math.round(a.X*i)+1);h.bbox.plain=null;h.bbox.transform=null;h.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(a,m){var h=this,q=h.viewBox,l,k,f,c,e;a=a||h.width;m=m||h.height;h.width=a;h.height=m;if(!h.el){return}if(a!=undefined){h.el.setWidth(a)}if(m!=undefined){h.el.setHeight(m)}if(q&&(a||m)){var j=q.x,g=q.y,o=q.width,b=q.height,n=m/b,d=a/o,p;if(o*n<a){j-=(a-o*n)/2/n}if(b*d<m){g-=(m-b*d)/2/d}p=1/Math.max(o/a,b/m);h.viewBoxShift={dx:-j,dy:-g,scale:p};f=h.items.items;for(c=0,e=f.length;c<e;c++){h.transform(f[c])}}this.callParent(arguments)},setViewBox:function(b,d,c,a){this.callParent(arguments);this.viewBox={x:b,y:d,width:c,height:a}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},render:function(a){var c=this,f=Ext.getDoc().dom;if(!c.createNode){try{if(!f.namespaces.rvml){f.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}c.createNode=function(e){return f.createElement("<rvml:"+e+' class="rvml">')}}catch(d){c.createNode=function(e){return f.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){var b=f.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=f.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=Ext.create("Ext.draw.Matrix");b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(s){var B=this,v=Ext.create("Ext.draw.Matrix"),l=s.transformations,q=l.length,w=0,j=0,c=1,b=1,h="",e=s.el,x=e.dom,t=x.style,a=B.zoom,f=s.skew,A,z,n,g,m,k,u,r,p,o,d;for(;w<q;w++){n=l[w];g=n.type;if(g=="translate"){v.translate(n.x,n.y)}else{if(g=="rotate"){v.rotate(n.degrees,n.x,n.y);j+=n.degrees}else{if(g=="scale"){v.scale(n.x,n.y,n.centerX,n.centerY);c*=n.x;b*=n.y}}}}if(B.viewBoxShift){v.scale(B.viewBoxShift.scale,B.viewBoxShift.scale,-1,-1);v.add(1,0,0,1,B.viewBoxShift.dx,B.viewBoxShift.dy)}s.matrix=v;if(s.type!="image"&&f){f.matrix=v.toString();f.offset=v.offset()}else{A=v.matrix[0][2];z=v.matrix[1][2];p=a/c;o=a/b;x.coordsize=Math.abs(p)+" "+Math.abs(o);r=j*(c*((b<0)?-1:1));if(r!=t.rotation&&!(r===0&&!t.rotation)){t.rotation=r}if(j){m=B.rotationCompensation(j,A,z);A=m.x;z=m.y}if(c<0){h+="x"}if(b<0){h+=" y";k=-1}if(h!=""&&!x.style.flip){t.flip=h}d=(A*-p)+" "+(z*-o);if(d!=x.coordorigin){x.coordorigin=(A*-p)+" "+(z*-o)}}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(d){var a=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),b=[],c=Ext.create("Ext.util.MixedCollection");c.addAll(d.stops);c.sortByKey("ASC",function(f,e){f=parseInt(f,10);e=parseInt(e,10);return f>e?1:(f<e?-1:0)});c.eachKey(function(f,e){b.push(f+"% "+e.color)});a.add(d.id,{colors:b.join(","),angle:d.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",initComponent:function(){var c=this,a=Ext.fly(document.body.parentNode),b;c.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){a.setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;Ext.EventManager.onWindowResize(c.fireResize,c);c.renderTo=c.el},fireResize:function(a,b){this.setSize(a,b)}});Ext.define("AM.model.User",{extend:"Ext.data.Model",fields:["id","name","email"]});Ext.define("AM.store.Users",{extend:"Ext.data.Store",model:"AM.model.User",autoLoad:true,proxy:{type:"ajax",api:{read:"data/users.json",update:"data/updateUsers.json"},reader:{type:"json",root:"users",successProperty:"success"}}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(f){var g=f.isFieldLabelable,h=f.isFormField;if(g||h){if(g){c["onLabelable"+(d?"Added":"Removed")](f)}if(h){c["onField"+(d?"Added":"Removed")](f)}}else{if(f.isContainer){Ext.Array.forEach(f.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange()},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange()},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.Scroller","Ext.grid.header.Container","Ext.grid.Lockable"],cls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scrollDelta:40,scroll:true,sortableColumns:true,verticalScrollDock:"right",verticalScrollerType:"gridscroller",horizontalScrollerPresentCls:Ext.baseCSSPrefix+"horizontal-scroller-present",verticalScrollerPresentCls:Ext.baseCSSPrefix+"vertical-scroller-present",scrollerOwner:true,invalidateScrollerOnRefresh:true,enableColumnMove:true,enableColumnResize:true,initComponent:function(){var g=this,a=g.scroll,d=false,c=false,h=g.columns||g.colModel,f=0,b,e=g.border;g.determineScrollbars=Ext.Function.createBuffered(g.determineScrollbars,30);g.injectView=Ext.Function.createBuffered(g.injectView,30);if(g.hideHeaders){e=false}if(h instanceof Ext.grid.header.Container){g.headerCt=h;g.headerCt.border=e;g.columns=g.headerCt.items.items}else{if(Ext.isArray(h)){h={items:h,border:e}}Ext.apply(h,{forceFit:g.forceFit,sortable:g.sortableColumns,enableColumnMove:g.enableColumnMove,enableColumnResize:g.enableColumnResize,border:e});g.columns=h.items;if(Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",g.columns).length){g.self.mixin("lockable",Ext.grid.Lockable);g.injectLockable()}}g.store=Ext.data.StoreManager.lookup(g.store);g.addEvents("scrollerhide","scrollershow");g.bodyCls=g.bodyCls||"";g.bodyCls+=(" "+g.extraBodyCls);delete g.autoScroll;if(!g.hasView){if(!g.headerCt){g.headerCt=Ext.create("Ext.grid.header.Container",h)}g.columns=g.headerCt.items.items;if(g.hideHeaders){g.headerCt.height=0;g.headerCt.border=false;g.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");g.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){g.headerCt.style={display:"none"}}}if(a===true||a==="both"){d=c=true}else{if(a==="horizontal"){c=true}else{if(a==="vertical"){d=true}else{g.headerCt.availableSpaceOffset=0}}}if(d){g.verticalScroller=g.verticalScroller||{};Ext.applyIf(g.verticalScroller,{dock:g.verticalScrollDock,xtype:g.verticalScrollerType,store:g.store});g.verticalScroller=Ext.ComponentManager.create(g.verticalScroller);g.mon(g.verticalScroller,{bodyscroll:g.onVerticalScroll,scope:g})}if(c){g.horizontalScroller=Ext.ComponentManager.create({xtype:"gridscroller",section:g,dock:"bottom",store:g.store});g.mon(g.horizontalScroller,{bodyscroll:g.onHorizontalScroll,scope:g})}g.headerCt.on("columnresize",g.onHeaderResize,g);g.relayEvents(g.headerCt,["columnresize","columnmove","columnhide","columnshow","sortchange"]);g.features=g.features||[];g.dockedItems=g.dockedItems||[];g.dockedItems.unshift(g.headerCt);g.viewConfig=g.viewConfig||{};g.viewConfig.invalidateScrollerOnRefresh=g.invalidateScrollerOnRefresh;b=g.getView();if(b){g.mon(b.store,{load:g.onStoreLoad,scope:g});g.mon(b,{refresh:{fn:this.onViewRefresh,scope:g,buffer:50},itemupdate:g.onViewItemUpdate,scope:g});this.relayEvents(b,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect"])}}g.callParent(arguments)},initStateEvents:function(){var a=this.stateEvents;Ext.each(["columnresize","columnmove","columnhide","columnshow","sortchange"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},getState:function(){var a={columns:[]},b=this.store.sorters.first();this.headerCt.items.each(function(c){a.columns.push({id:c.headerId,width:c.flex?undefined:c.width,hidden:c.hidden,sortable:c.sortable})});if(b){a.sort={property:b.property,direction:b.direction}}return a},applyState:function(a){var c=a.columns,b=c?c.length:0,d=this.headerCt,h=d.items,l=a.sort,j=this.store,e=0,g,k,f;for(;e<b;++e){k=c[e];f=d.down("gridcolumn[headerId="+k.id+"]");g=h.indexOf(f);if(e!==g){d.moveHeader(g,e)}f.sortable=k.sortable;if(Ext.isDefined(k.width)){delete f.flex;if(f.rendered){f.setWidth(k.width)}else{f.minWidth=f.width=k.width}}f.hidden=k.hidden}if(l){if(j.remoteSort){j.sorters.add(Ext.create("Ext.util.Sorter",{property:l.property,direction:l.direction}))}else{j.sort(l.property,l.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=a.createComponent(Ext.apply({},a.viewConfig,{xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,elScroll:function(d,e,b){var c=this,a;if(d==="up"||d==="left"){e=-e}if(d==="down"||d==="up"){a=c.getVerticalScroller();a.scrollByDeltaY(e)}else{a=c.getHorizontalScroller();a.scrollByDeltaX(e)}},afterLayout:function(){this.callParent(arguments);this.injectView()},injectView:function(){if(!this.hasView&&!this.collapsed){var b=this,a=b.getView();b.hasView=true;b.add(a);a.el.scroll=Ext.Function.bind(b.elScroll,b);b.mon(a.el,{mousewheel:b.onMouseWheel,scope:b})}},afterExpand:function(){this.callParent(arguments);if(!this.hasView){this.injectView()}},processEvent:function(f,b,a,c,d,h){var g=this,i;if(d!==-1){i=g.headerCt.getGridColumns()[d];return i.processEvent.apply(i,arguments)}},determineScrollbars:function(){var e=this,b,a,f,d,c;if(!e.collapsed&&e.view&&e.view.el){b=e.view.el.dom;a=e.headerCt.getFullWidth();f=b.offsetWidth;if(e.verticalScroller&&e.verticalScroller.el){d=e.verticalScroller.getSizeCalculation().height}else{d=b.scrollHeight}c=b.clientHeight;if(!e.collapsed&&d>c){e.showVerticalScroller()}else{e.hideVerticalScroller()}if(!e.collapsed&&a>(f+Ext.getScrollBarWidth()-2)){e.showHorizontalScroller()}else{e.hideHorizontalScroller()}}},onHeaderResize:function(){if(this.view&&this.view.rendered){this.determineScrollbars();this.invalidateScroller()}},hideHorizontalScroller:function(){var a=this;if(a.horizontalScroller&&a.horizontalScroller.ownerCt===a){a.verticalScroller.offsets.bottom=0;a.removeDocked(a.horizontalScroller,false);a.removeCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollerhide",a.horizontalScroller,"horizontal")}},showHorizontalScroller:function(){var a=this;if(a.verticalScroller){a.verticalScroller.offsets.bottom=Ext.getScrollBarWidth()-2}if(a.horizontalScroller&&a.horizontalScroller.ownerCt!==a){a.addDocked(a.horizontalScroller);a.addCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollershow",a.horizontalScroller,"horizontal")}},hideVerticalScroller:function(){var a=this,b=a.headerCt;if(b&&b.layout.reserveOffset){b.layout.reserveOffset=false;b.doLayout()}if(a.verticalScroller&&a.verticalScroller.ownerCt===a){a.removeDocked(a.verticalScroller,false);a.removeCls(a.verticalScrollerPresentCls);a.fireEvent("scrollerhide",a.verticalScroller,"vertical")}},showVerticalScroller:function(){var a=this,b=a.headerCt;if(b&&!b.layout.reserveOffset){b.layout.reserveOffset=true;b.doLayout()}if(a.verticalScroller&&a.verticalScroller.ownerCt!==a){a.addDocked(a.verticalScroller);a.addCls(a.verticalScrollerPresentCls);a.fireEvent("scrollershow",a.verticalScroller,"vertical")}},invalidateScroller:function(){var b=this,a=b.verticalScroller,c=b.horizontalScroller;if(a){a.invalidate()}if(c){c.invalidate()}},onHeaderMove:function(c,d,a,b){this.view.refresh()},onHeaderHide:function(a,b){this.invalidateScroller()},onHeaderShow:function(a,b){this.invalidateScroller()},getVerticalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock="+this.verticalScrollDock+"]")},getHorizontalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock=bottom]")},onMouseWheel:function(j){var k=this,n=j.browserEvent,g=k.getVerticalScroller(),l=k.getHorizontalScroller(),c=k.scrollDelta,d,f,i,m,h,b,o,a;if(l){m=l.el;if(m){h=m.dom.scrollLeft}}if(g){i=g.el;if(i){b=i.dom.scrollTop}}if(n.wheelDeltaX||n.wheelDeltaY){f=-n.wheelDeltaX/120*c/3;d=-n.wheelDeltaY/120*c/3;if(l){o=l.scrollByDeltaX(f)}if(g){a=g.scrollByDeltaY(d)}}else{if(n.axis&&n.axis===1){if(l){f=-(c*j.getWheelDelta())/3;o=l.scrollByDeltaX(f)}}else{if(g){d=-(c*j.getWheelDelta()/3);a=g.scrollByDeltaY(d)}}}if((f!==0&&o!==h)||(d!==0&&a!==b)){j.stopEvent()}},onViewRefresh:function(){if(Ext.isIE){this.syncCellHeight()}this.determineScrollbars();if(this.invalidateScrollerOnRefresh){this.invalidateScroller()}},onViewItemUpdate:function(a,b,c){if(Ext.isIE){this.syncCellHeight([c])}},syncCellHeight:function(g){var m=this,f=0,e,d,h,l,c,n,k=[],a,b=("."+Ext.baseCSSPrefix+"grid-cell");g=g||m.view.getNodes();n=g.length;for(;f<n;f++){l=g[f];e=Ext.fly(l).query(b);h=e.length;a=[];for(d=0;d<h;d++){c=e[d];a.push(c.clientHeight)}k.push(Ext.Array.max(a))}for(f=0;f<n;f++){l=g[f];h=l.childNodes.length;for(d=0;d<h;d++){c=Ext.fly(l.childNodes[d]);if(k[f]){if(c.is(b)){c.setHeight(k[f])}else{c.down(b).setHeight(k[f])}}}}},setScrollTop:function(d){var c=this,b=c.getScrollerOwner(),a=c.getVerticalScroller();b.virtualScrollTop=d;if(a){a.setScrollTop(d)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},scrollByDeltaY:function(a){var c=this.getScrollerOwner(),b;b=c.down("gridscroller[dock="+this.verticalScrollDock+"]");if(b){b.scrollByDeltaY(a)}},scrollByDeltaX:function(a){this.horizontalScroller.scrollByDeltaX(a)},getLhsMarker:function(){var a=this;if(!a.lhsMarker){a.lhsMarker=Ext.core.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.lhsMarker},getRhsMarker:function(){var a=this;if(!a.rhsMarker){a.rhsMarker=Ext.core.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.rhsMarker},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onVerticalScroll:function(e,f){var b=this.getScrollerOwner(),c=b.query("tableview"),d=0,a=c.length;for(;d<a;d++){c[d].el.dom.scrollTop=f.scrollTop}},onHorizontalScroll:function(b,j){var d=this.getScrollerOwner(),k=d.query("tableview"),f=0,h=k.length,a,e,g,l,c;a=k[1]||k[0];e=a.el.dom;g=e.scrollWidth;l=e.offsetWidth;c=this.horizontalScroller.getWidth();e.scrollLeft=j.scrollLeft;this.headerCt.el.dom.scrollLeft=j.scrollLeft},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},reconfigure:function(a,b){var c=this;if(c.lockable){c.reconfigureLockable(a,b);return}if(b){c.headerCt.removeAll();c.headerCt.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}},afterComponentLayout:function(){this.callParent(arguments);this.determineScrollbars();this.invalidateScroller()}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,onLayout:function(){this.callParent(arguments);var u=this,o=u.getLayoutTargetSize(),a=u.owner,w=u.getTarget(),v=o.width,m=o.height,p=w.getStyle("overflow"),n=u.getVisibleItems(a),s=n.length,g=[],k,q,b,t,l,j,d,f,e,h,r,c;if(v<20&&m<20){return}if(!u.clearEl){u.clearEl=w.createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}if(a.anchorSize){if(typeof a.anchorSize=="number"){b=a.anchorSize}else{b=a.anchorSize.width;t=a.anchorSize.height}}else{b=a.initialConfig.width;t=a.initialConfig.height}if(!Ext.supports.RightMargin){w.addCls(Ext.baseCSSPrefix+"inline-children")}for(r=0;r<s;r++){l=n[r];c=l.el;h=l.anchor;if(!l.anchor&&l.items&&!Ext.isNumber(l.width)&&!(Ext.isIE6&&Ext.isStrict)){l.anchor=h=u.defaultAnchor}if(h){j=l.anchorSpec;if(!j){e=h.split(" ");l.anchorSpec=j={right:u.parseAnchor(e[0],l.initialConfig.width,b),bottom:u.parseAnchor(e[1],l.initialConfig.height,t)}}d=j.right?u.adjustWidthAnchor(j.right(v)-c.getMargin("lr"),l):undefined;f=j.bottom?u.adjustHeightAnchor(j.bottom(m)-c.getMargin("tb"),l):undefined;g.push({component:l,anchor:true,width:d||undefined,height:f||undefined})}else{g.push({component:l,anchor:false})}}if(!Ext.supports.RightMargin){w.removeCls(Ext.baseCSSPrefix+"inline-children")}for(r=0;r<s;r++){k=g[r];u.setItemSize(k.component,k.width,k.height)}if(p&&p!="hidden"&&!u.adjustmentPass){q=u.getLayoutTargetSize();if(q.width!=o.width||q.height!=o.height){u.adjustmentPass=true;u.onLayout()}}delete u.adjustmentPass},parseAnchor:function(c,f,b){if(c&&c!="none"){var d;if(this.parseAnchorRE.test(c)){var e=b-f;return function(a){return a-e}}else{if(c.indexOf("%")!=-1){d=parseFloat(c.replace("%",""))*0.01;return function(a){return Math.floor(a*d)}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){return a+c}}}}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b}});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}})());Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Component",type:"progressbar",onLayout:function(d,b){var e=this,a=e.owner,c=a.textEl;e.setElementSize(a.el,d,b);c.setWidth(a.el.getWidth(true));e.callParent([d,b]);a.updateProgress(a.value)}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],labelableRenderTpl:['<tpl if="!hideLabel && !(!fieldLabel && hideEmptyLabel)">','<label<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"<tpl if="labelStyle"> style="{labelStyle}"</tpl>>','<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"</label>","</tpl>",'<div class="{baseBodyCls} {fieldBodyCls}"<tpl if="inputId"> id="{baseBodyCls}-{inputId}"</tpl> role="presentation">{subTplMarkup}</div>','<div class="{errorMsgCls}" style="display:none"></div>','<div class="{clearCls}" role="presentation"><!-- --></div>',{compiled:true,disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",initLabelable:function(){this.addCls(this.formItemCls);this.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},getLabelableRenderData:function(){var d=this,b=d.labelAlign,c=d.labelPad,a;if(b==="top"){a="margin-bottom:"+c+"px;"}else{a="margin-right:"+c+"px;";if(Ext.isBorderBox){a+="width:"+d.labelWidth+"px;"}}return Ext.copyTo({inputId:d.getInputId(),fieldLabel:d.getFieldLabel(),labelStyle:a+(d.labelStyle||""),subTplMarkup:d.getSubTplMarkup()},d,"hideLabel,hideEmptyLabel,labelCls,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator",true)},getLabelableSelectors:function(){return{labelEl:"label."+this.labelCls,bodyEl:"."+this.baseBodyCls,errorEl:"."+this.errorMsgCls}},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.activeError=a;this.activeErrors=[a];this.renderActiveError()},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);c.errorEl.dom.innerHTML=b}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})},getBodyNaturalWidth:function(){return this.bodyEl.getWidth()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){this.suspendCheckChange++;a();this.suspendCheckChange--;this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.Field",{alias:["layout.field"],extend:"Ext.layout.component.Component",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics"],type:"field",beforeLayout:function(b,a){var c=this;return c.callParent(arguments)||(!c.owner.preventMark&&c.activeError!==c.owner.getActiveError())},onLayout:function(a,l){var f=this,b=f.owner,e=f.getLabelStrategy(),k=f.getErrorStrategy(),i=Ext.isDefined,m=Ext.isNumber,h,g,j,c,d;h=f.lastComponentSize||{};if(!i(a)){a=h.width;if(a<0){a=d}}if(!i(l)){l=h.height;if(l<0){l=d}}g=!m(a);j=!m(l);c={autoWidth:g,autoHeight:j,width:g?b.getBodyNaturalWidth():a,height:l,insets:{top:0,right:0,bottom:0,left:0}};e.prepare(b,c);k.prepare(b,c);e.adjustHorizInsets(b,c);k.adjustHorizInsets(b,c);e.layoutHoriz(b,c);k.layoutHoriz(b,c);e.adjustVertInsets(b,c);k.adjustVertInsets(b,c);e.layoutVert(b,c);k.layoutVert(b,c);if(g&&j){f.setElementSize(b.el,c.width,c.height)}else{f.setTargetSize(c.width,c.height)}f.sizeBody(c);f.activeError=b.getActiveError()},sizeBody:function(h){var g=this,c=g.owner,d=h.insets,b=h.width,e=h.height,f=Ext.isNumber(b)?b-d.left-d.right:b,a=Ext.isNumber(e)?e-d.top-d.bottom:e;g.setElementSize(c.bodyEl,f,a);g.sizeBodyContents(f,a)},sizeBodyContents:Ext.emptyFn,getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var b=Ext.applyIf,a=Ext.emptyFn,c={prepare:function(e,h){var f=e.labelCls+"-"+e.labelAlign,g=e.labelEl;if(g&&!g.hasCls(f)){g.addCls(f)}},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a},d=b({prepare:function(e,f){c.prepare(e,f);if(f.autoWidth){f.width+=(!e.labelEl?0:e.labelWidth+e.labelPad)}},adjustHorizInsets:function(e,f){if(e.labelEl){f.insets.left+=e.labelWidth+e.labelPad}},layoutHoriz:function(e,g){var f=e.labelEl;if(f&&!e.isLabelSized&&!Ext.isBorderBox){f.setWidth(e.labelWidth);e.isLabelSized=true}}},c);return{base:c,top:b({adjustVertInsets:function(e,g){var f=e.labelEl;if(f){g.insets.top+=Ext.util.TextMetrics.measure(f,e.fieldLabel,g.width).height+f.getFrameWidth("tb")+e.labelPad}}},c),left:d,right:d}})(),errorStrategies:(function(){function c(g,f){var h=g.getStyle("display")!=="none";if(f!==h){g.setDisplayed(f)}}function e(g,f,h){if(g.getStyle(f)!==h){g.setStyle(f,h)}}var b=Ext.applyIf,a=Ext.emptyFn,d={prepare:function(f){c(f.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a};return{none:d,side:b({prepare:function(f){var g=f.errorEl;g.addCls(Ext.baseCSSPrefix+"form-invalid-icon");Ext.layout.component.field.Field.initTip();g.dom.setAttribute("data-errorqtip",f.getActiveError()||"");c(g,f.hasActiveError())},adjustHorizInsets:function(f,g){if(f.autoFitErrors&&f.hasActiveError()){g.insets.right+=f.errorEl.getWidth()}},layoutHoriz:function(f,g){if(f.hasActiveError()){e(f.errorEl,"left",g.width-g.insets.right+"px")}},layoutVert:function(f,g){if(f.hasActiveError()){e(f.errorEl,"top",g.insets.top+"px")}}},d),under:b({prepare:function(f){var h=f.errorEl,g=Ext.baseCSSPrefix+"form-invalid-under";if(!h.hasCls(g)){h.addCls(g)}c(h,f.hasActiveError())},adjustVertInsets:function(f,g){if(f.autoFitErrors){g.insets.bottom+=f.errorEl.getHeight()}},layoutHoriz:function(f,h){var i=f.errorEl,g=h.insets;e(i,"width",h.width-g.right-g.left+"px");e(i,"marginLeft",g.left+"px")}},d),qtip:b({prepare:function(f){c(f.errorEl,false);Ext.layout.component.field.Field.initTip();f.getActionEl().dom.setAttribute("data-errorqtip",f.getActiveError()||"")}},d),title:b({prepare:function(f){c(f.errorEl,false);f.el.dom.title=f.getActiveError()||""}},d),elementId:b({prepare:function(f){c(f.errorEl,false);var g=Ext.fly(f.msgTarget);if(g){g.dom.innerHTML=f.getActiveError()||"";g.setDisplayed(f.hasActiveError())}}},d)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip",renderTo:Ext.getBody()});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractStoreSelectionModel",requires:["Ext.data.StoreManager"],allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=Ext.create("Ext.util.MixedCollection");b.callParent(arguments)},bind:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroy()}else{c.store.un("add",c.onStoreAdd,c);c.store.un("clear",c.onStoreClear,c);c.store.un("remove",c.onStoreRemove,c);c.store.un("update",c.onStoreUpdate,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({add:c.onStoreAdd,clear:c.onStoreClear,remove:c.onStoreRemove,update:c.onStoreUpdate,scope:c})}c.store=a;if(a&&!b){c.refresh()}},selectAll:function(b){var d=this.store.getRange(),c=0,a=d.length;for(;c<a;c++){this.doSelect(d[c],true,b)}},deselectAll:function(){var c=this.getSelection(),b=0,a=c.length;for(;b<a;b++){this.doDeselect(c[b])}},selectWithEvent:function(a,c){var b=this;switch(b.selectionMode){case"MULTI":if(c.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(c.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,c.ctrlKey)}else{if(c.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!c.shiftKey&&!c.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,false,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(k,e,l,c){var h=this,j=h.store,d=0,g,f,a,b=[];if(h.isLocked()){return}if(!l){h.clearSelections()}if(!Ext.isNumber(k)){k=j.indexOf(k)}if(!Ext.isNumber(e)){e=j.indexOf(e)}if(k>e){f=e;e=k;k=f}for(g=k;g<=e;g++){if(h.isSelected(j.getAt(g))){d++}}if(!c){a=-1}else{a=(c=="up")?k:e}for(g=k;g<=e;g++){if(d==(e-k+1)){if(g!=a){h.doDeselect(g,true)}}else{b.push(j.getAt(g))}}h.doMultiSelect(b,true)},select:function(b,c,a){this.doSelect(b,c,a)},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,j,h){var f=this,b=f.selected,g=false,c=0,e,d;if(f.locked){return}a=!Ext.isArray(a)?[a]:a;e=a.length;if(!j&&b.getCount()>0){g=true;f.doDeselect(f.getSelection(),true)}for(;c<e;c++){d=a[c];if(j&&f.isSelected(d)){continue}g=true;f.lastSelected=d;b.add(d);f.onSelectChange(d,true,h)}f.setLastFocused(d,h);f.maybeFireSelectionChange(g&&!h)},doDeselect:function(d,c){var g=this,f=g.selected,h=false,e=0,a,b;if(g.locked){return}if(typeof d==="number"){d=[g.store.getAt(d)]}d=!Ext.isArray(d)?[d]:d;a=d.length;for(;e<a;e++){b=d[e];if(f.remove(b)){if(g.lastSelected==b){g.lastSelected=f.last()}g.onSelectChange(b,false,c);h=true}}g.maybeFireSelectionChange(h&&!c)},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.doDeselect(d.lastSelected,b)}c.add(a);d.lastSelected=a;d.onSelectChange(a,true,b);if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;d.onLastFocusChanged(a,c,b)},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){if(a){var b=this;b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var g=this,b=[],f=g.getSelection(),a=f.length,e,h,d=0,c=this.getLastFocused();for(;d<a;d++){e=f[d];if(!this.pruneRemoved||g.store.indexOf(e)!==-1){b.push(e)}}if(g.selected.getCount()!=b.length){h=true}g.clearSelections();if(g.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){g.doSelect(b,false,true)}g.maybeFireSelectionChange(h)},clearSelections:function(){var a=this;a.selected.clear();a.lastSelected=null;a.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){var b=this,a=this.selected;if(a.getCount>0){a.clear();b.lastSelected=null;b.setLastFocused(null);b.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("AM.view.Viewport",{extend:"Ext.container.Viewport"});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var c=[],d,e,b=this.form,g=this.getParams(),a=[];b.getFields().each(function(h){if(h.isFileUpload()){a.push(h)}});function f(h,i){c.push({tag:"input",type:"hidden",name:h,value:i})}Ext.iterate(g,function(h,i){if(Ext.isArray(i)){Ext.each(i,function(j){f(h,j)})}else{f(h,i)}});d={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:c};if(a.length){d.encoding=d.enctype="multipart/form-data"}e=Ext.core.DomHelper.append(Ext.getBody(),d);Ext.Array.each(a,function(h){if(h.rendered){e.appendChild(h.extractFileInput())}});return e},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var g=this.form,e=g.errorReader,c,h,f,a,b;if(e){c=e.read(d);b=c.records;h=[];if(b){for(f=0,a=b.length;f<a;f++){h[f]=b[f].data}}if(h.length<1){h=null}return{success:c.success,errors:h}}return Ext.decode(d.responseText)}});Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",config:{animate:false,text:""},waitTimer:null,renderTpl:['<div class="{baseCls}-text {baseCls}-text-back">',"<div> </div>","</div>",'<div class="{baseCls}-bar">','<div class="{baseCls}-text">',"<div> </div>","</div>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.renderSelectors=Ext.apply(this.renderSelectors||{},{textTopEl:"."+this.baseCls+"-text",textBackEl:"."+this.baseCls+"-text-back",bar:"."+this.baseCls+"-bar"});this.addEvents("update")},afterRender:function(){var a=this;a.textEl=a.textEl?Ext.get(a.textEl):a.el.select("."+a.baseCls+"-text");this.callParent(arguments);if(a.value){a.updateProgress(a.value,a.text)}else{a.updateText(a.text)}},updateProgress:function(c,d,a){var b;this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){b=Math.floor(this.value*this.el.getWidth(true));if(Ext.isForcedBorderBox){b+=this.bar.getBorderWidth("lr")}if(a===true||(a!==false&&this.animate)){this.bar.stopAnimation();this.bar.animate(Ext.apply({to:{width:b+"px"}},this.animate))}else{this.bar.setWidth(b)}}this.fireEvent("update",this,this.value,d);return this},updateText:function(a){this.text=a;if(this.rendered){this.textEl.update(this.text)}return this},applyText:function(a){this.updateText(a)},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskManager.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},reset:function(a){this.updateProgress(0);this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskManager.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}this.callParent()}});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />',{compiled:true,disableFormats:true}],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:Ext.baseCSSPrefix+"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("focus","blur","specialkey");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=Ext.id())},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId();return Ext.applyIf(c.subTplData,{id:a,name:c.name||a,type:b,size:c.size||20,cls:c.cls,fieldCls:c.fieldCls,tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)})},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},onRender:function(){var c=this,b=c.fieldStyle,a=c.renderSelectors;Ext.applyIf(a,c.getLabelableSelectors());Ext.applyIf(a,{inputEl:"."+c.fieldCls});c.callParent(arguments);c.setRawValue(c.rawValue);if(c.readOnly){c.setReadOnly(true)}if(c.disabled){c.disable()}if(b){c.setFieldStyle(b)}c.renderActiveError()},initAria:function(){var a=this;a.callParent();a.getActionEl().dom.setAttribute("aria-describedby",Ext.id(a.errorEl))},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.readOnly=c;b.dom.setAttribute("aria-readonly",c)}a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,Ext.create("Ext.EventObjectImpl",a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);b.mon(c,"focus",b.onFocus,b);b.mon(c,"blur",b.onBlur,b,b.inEditor?{buffer:10}:null);a=Ext.create("Ext.util.DelayedTask",b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e==="propertychange"){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},preFocus:Ext.emptyFn,onFocus:function(){var b=this,a=b.focusCls,c=b.inputEl;b.preFocus();if(a&&c){c.addCls(a)}if(!b.hasFocus){b.hasFocus=true;b.fireEvent("focus",b)}},beforeBlur:Ext.emptyFn,onBlur:function(){var b=this,a=b.focusCls,c=b.inputEl;b.beforeBlur();if(a&&c){c.removeCls(a)}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b);b.postBlur()},postBlur:Ext.emptyFn,onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var a=this;return a.disabled||a.validateValue(a.processRawValue(a.getRawValue()))},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.doComponentLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.doComponentLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",beforeLayout:function(d,b){var e=this,a=e.owner,c=this.lastValue,f=a.getRawValue();this.lastValue=f;return e.callParent(arguments)||(a.grow&&f!==c)},sizeBodyContents:function(c,a){var b=this.adjustForGrow(c,a);this.setElementSize(this.owner.inputEl,b[0],b[1])},adjustForGrow:function(e,c){var f=this,b=f.owner,h,g,d,a=[e,c];if(b.grow){h=b.inputEl;g=(h.dom.value||(b.hasFocus?"":b.emptyText)||"")+b.growAppend;d=h.getTextWidth(g)+h.getBorderWidth("lr")+h.getPadding("lr");a[0]=Ext.Number.constrain(d,b.growMin,Math.max(b.growMin,Math.min(b.growMax,Ext.isNumber(e)?e:Infinity)))}return a}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",ariaRole:"textbox",componentLayout:"textfield",initComponent:function(){this.callParent();this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},onChange:function(){this.callParent();this.autoSize()},afterRender:function(){var a=this;if(a.enforceMaxLength){a.inputEl.dom.maxLength=a.maxLength}a.applyEmptyText();a.autoSize();a.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(k){var f=this,j=f.callParent(arguments),a=f.validator,d=f.emptyText,c=f.allowBlank,e=f.vtype,g=Ext.form.field.VTypes,h=f.regex,i=Ext.String.format,b;k=k||f.processRawValue(f.getRawValue());if(Ext.isFunction(a)){b=a.call(f,k);if(b!==true){j.push(b)}}if(k.length<1||k===d){if(!c){j.push(f.blankText)}return j}if(k.length<f.minLength){j.push(i(f.minLengthText,f.minLength))}if(k.length>f.maxLength){j.push(i(f.maxLengthText,f.maxLength))}if(e){if(!g[e](k,f)){j.push(f.vtypeText||g[e+"Text"])}}if(h&&!h.test(k)){j.push(f.regexText||f.invalidText)}return j},selectText:function(h,a){var g=this,c=g.getRawValue(),d=true,f=g.inputEl.dom,e,b;if(c.length>0){h=h===e?0:h;a=a===e?c.length:a;if(f.setSelectionRange){f.setSelectionRange(h,a)}else{if(f.createTextRange){b=f.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){g.focus()}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",a);b.lastInputWidth=a}}},initAria:function(){this.callParent();this.getActionEl().dom.setAttribute("aria-required",this.allowBlank===false)},getBodyNaturalWidth:function(){return Math.round(this.size*6.5)+20}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",adjustForGrow:function(a,j){var e=this,b=e.owner,h,g,f,d,c,i,k=[a,j];if(b.grow){h=b.inputEl;d=h.getWidth(true);c=h.getHeight();g=h.dom.value||" ";g+=b.growAppend;g=g.replace(/\n/g,"<br>");i=Ext.util.TextMetrics.measure(h,g,d).height+h.getBorderWidth("tb")+h.getPadding("tb");f=b.growMax;if(Ext.isNumber(j)){f=Math.min(f,j)}k[1]=Ext.Number.constrain(i,b.growMin,f)}return k}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea"],fieldSubTpl:['<textarea id="{id}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="rows">rows="{rows}" </tpl>','<tpl if="cols">cols="{cols}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" ','autocomplete="off">',"</textarea>",{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",onRender:function(b,a){var c=this;Ext.applyIf(c.subTplData,{cols:c.cols,rows:c.rows});c.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.grow){if(a.preventScrollbars){a.inputEl.setStyle("overflow","hidden")}a.inputEl.setHeight(a.growMin)}},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!==a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},getBodyNaturalWidth:function(){return Math.round(this.cols*6.5)+20}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alternateClassName:"Ext.MessageBox",alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:" ",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"anchor"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return Ext.create("Ext.button.Button",{handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent()},initComponent:function(){var c=this,b,a;c.title=" ";c.topContainer=Ext.create("Ext.container.Container",{anchor:"100%",style:{padding:"10px",overflow:"hidden"},items:[c.iconComponent=Ext.create("Ext.Component",{cls:"ext-mb-icon",width:50,height:c.iconHeight,style:{"float":"left"}}),c.promptContainer=Ext.create("Ext.container.Container",{layout:{type:"anchor"},items:[c.msg=Ext.create("Ext.Component",{autoEl:{tag:"span"},cls:"ext-mb-text"}),c.textField=Ext.create("Ext.form.field.Text",{anchor:"100%",enableKeyEvents:true,listeners:{keydown:c.onPromptKey,scope:c}}),c.textArea=Ext.create("Ext.form.field.TextArea",{anchor:"100%",height:75})]})]});c.progressBar=Ext.create("Ext.ProgressBar",{anchor:"-10",style:"margin-left:10px"});c.items=[c.topContainer,c.progressBar];c.msgButtons=[];for(b=0;b<4;b++){a=c.makeButton(b);c.msgButtons[a.itemId]=a;c.msgButtons.push(a)}c.bottomTb=Ext.create("Ext.toolbar.Toolbar",{ui:"footer",dock:"bottom",layout:{pack:"center"},items:[c.msgButtons[0],c.msgButtons[1],c.msgButtons[2],c.msgButtons[3]]});c.dockedItems=[c.bottomTb];c.callParent()},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=a.buttons||0,f=true,e=d.maxWidth,b;a=a||{};d.cfg=a;if(a.width){e=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||" ")}if(!d.rendered){d.width=e;d.render(Ext.getBody())}else{d.setSize(e,d.maxHeight)}d.setPosition(-10000,-10000);d.closable=a.closable&&!a.wait;if(a.closable===false){d.tools.close.hide()}else{d.tools.close.show()}if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();f=false}else{d.msgButtons[b].hide()}}if(f){d.bottomTb.hide()}else{d.bottomTb.show()}d.hidden=true},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);if(a.animateTarget){b.doAutoSize(false);b.callParent()}else{b.callParent();b.doAutoSize(true)}return b},afterShow:function(){if(this.animateTarget){this.center()}this.callParent(arguments)},doAutoSize:function(b){var e=this,d=e.iconComponent,f=e.iconHeight;if(!Ext.isDefined(e.frameWidth)){e.frameWidth=e.el.getWidth()-e.body.getWidth()}d.setHeight(f);e.minWidth=e.cfg.minWidth||Ext.getClass(this).prototype.minWidth;e.topContainer.doLayout();if(Ext.isIE6||Ext.isIEQuirks){e.textField.setCalculatedSize(9);e.textArea.setCalculatedSize(9)}var c=e.cfg.width||e.msg.getWidth()+d.getWidth()+25,a=(e.header.rendered?e.header.getHeight():0)+Math.max(e.promptContainer.getHeight(),d.getHeight())+e.progressBar.getHeight()+(e.bottomTb.rendered?e.bottomTb.getHeight():0)+20;d.setHeight(Math.max(f,e.msg.getHeight()));e.setSize(c+e.frameWidth,a+e.frameWidth);if(b){e.center()}return e},updateText:function(a){this.msg.update(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.iconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.iconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:"ext-mb-question",msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,f,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:f,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors"],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners()},onItemAddOrRemove:function(c,f){var d=this,e=!!f.ownerCt,b=f.isContainer;function a(g){d[e?"mon":"mun"](g,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(f.isFormField){a(f)}else{if(b){Ext.Array.forEach(f.query("[isFormField]"),a)}}delete this._boundItems;if(d.initialized){d.onValidityChange(!d.hasInvalidField())}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a){a=this._boundItems=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;a.batchLayouts(function(){b=a.getFields().filterBy(function(c){return !c.validate()})});return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+"mask-loading",d;this.getFields().each(function(e){if(e.isFormField&&e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,f){var e=a.findField(d);if(e){e.markInvalid(f)}}if(Ext.isArray(c)){Ext.each(c,function(d){b(d.id,d.msg)})}else{if(c instanceof Ext.data.Errors){c.each(function(d){b(d.field,d.message)})}else{Ext.iterate(c,b)}}return this},setValues:function(a){var b=this;function c(d,f){var e=b.findField(d);if(e){e.setValue(f);if(b.trackResetOnLoad){e.resetOriginalValue()}}}if(Ext.isArray(a)){Ext.each(a,function(d){c(d.id,d.value)})}else{Ext.iterate(a,c)}return this},getValues:function(e,b,d,a){var c={};this.getFields().each(function(g){if(!b||g.isDirty()){var f=g[a?"getModelData":"getSubmitData"](d);if(Ext.isObject(f)){Ext.iterate(f,function(i,j){if(d&&j===""){j=g.emptyText||""}if(i in c){var k=c[i],h=Ext.isArray;if(!h(k)){k=c[i]=[k]}if(h(j)){c[i]=k.concat(j)}else{k.push(j)}}else{c[i]=j}})}}});if(e){c=Ext.Object.toQueryString(c)}return c},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.clearInvalid()})});return a},reset:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.reset()})});return a},applyToFields:function(a){this.getFields().each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.getFields().each(function(b){Ext.applyIf(b,a)});return this},batchLayouts:function(b){var c=this,a=new Ext.util.HashMap();c.getFields().each(function(e){var d=e.ownerCt;if(!a.contains(d)){a.add(d);d.oldSuspendLayout=d.suspendLayout;d.suspendLayout=true}});b();a.each(function(e,d){d.suspendLayout=d.oldSuspendLayout;delete d.oldSuspendLayout});c.owner.doComponentLayout()}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent();a.form.initialize()},createForm:function(){return Ext.create("Ext.form.Basic",this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(){return this.getForm().getValues()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},disable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.disable()})},enable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.enable()})},startPolling:function(b){this.stopPolling();var a=Ext.create("Ext.util.TaskRunner",b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){this.form.getFields().each(function(a){a.checkChange()})}});Ext.define("AM.view.user.Edit",{extend:"Ext.window.Window",alias:"widget.useredit",requires:["Ext.form.Panel"],title:"Edit User",layout:"fit",autoShow:true,height:120,width:280,initComponent:function(){this.items=[{xtype:"form",padding:"5 5 0 5",border:false,style:"background-color: #fff;",items:[{xtype:"textfield",name:"name",fieldLabel:"Name"},{xtype:"textfield",name:"email",fieldLabel:"Email"}]}];this.buttons=[{text:"Save",action:"save"},{text:"Cancel",scope:this,handler:this.close}];this.callParent(arguments)}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bind(a.getStore());a.on(a.triggerEvent,b.onItemClick,b);a.on(a.triggerCtEvent,b.onContainerClick,b);a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,f){this.selectWithEvent(a,f)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create("Ext.util.KeyNav",a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(f){f=f||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+f}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,c){var f=this,a=f.view,d=true;if(e){if(!c){d=f.fireEvent("beforeselect",f,b)!==false}if(d){a.onItemSelect(b);if(!c){f.fireEvent("select",f,b)}}}else{a.onItemDeselect(b);if(!c){f.fireEvent("deselect",f,b)}}}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",alternateClassName:"Ext.view.AbstractView",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=Ext.create("Ext.XTemplate",d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=Ext.create("Ext.XTemplate",c.tpl)}c.addEvents("beforerefresh","refresh","itemupdate","itemadd","itemremove");c.addCmpEvents();if(c.store){c.store=Ext.data.StoreManager.lookup(c.store)}c.all=new Ext.CompositeElementLite();c.getSelectionModel().bindComponent(c)},onRender:function(){var d=this,a=d.loadingText,c=d.loadingHeight,b;d.callParent(arguments);if(a){d.loadMask=Ext.create("Ext.LoadMask",d.floating?d:d.ownerCt||d,{msg:a,msgCls:d.loadingCls,useMsg:d.loadingUseMsg,listeners:{beforeshow:function(){d.getTargetEl().update("");d.getSelectionModel().deselectAll();d.all.clear();if(c){d.setCalculatedSize(b,c)}},hide:function(){if(c){d.setHeight(d.height)}}}})}},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=Ext.create("Ext.selection.DataViewModel",a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","select","deselect"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,b,a;if(!c.rendered){return}c.fireEvent("beforerefresh",c);b=c.getTargetEl();a=c.store.getRange();b.update("");if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){b.update(c.emptyText)}c.all.clear()}else{c.tpl.overwrite(b,c.collectData(a,0));c.all.fill(Ext.query(c.getItemSelector(),b.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;c.fireEvent("refresh",c)},prepareData:function(c,b,a){if(a){Ext.apply(c,a.getAssociatedData())}return c},collectData:function(b,e){var d=[],c=0,a=b.length;for(;c<a;c++){d[d.length]=this.prepareData(b[c].data,e+c,b[c])}return d},bufferRender:function(a,b){var c=document.createElement("div");this.tpl.overwrite(c,this.collectData(a,b));return Ext.query(this.getItemSelector(),c)},onUpdate:function(f,a){var e=this,b=e.store.indexOf(a),c,d;if(b>-1){c=e.all.elements[b];d=e.bufferRender([a],b)[0];e.all.replaceElement(b,d,true);e.updateIndexes(b,b);e.selModel.refresh();e.fireEvent("itemupdate",a,b,d)}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent("itemadd",b,c,a)},doAdd:function(d,c,e){var f,b=this.all.elements;if(e<this.all.getCount()){f=this.all.item(e).insertSibling(d,"before",true);b.splice.apply(b,[e,0].concat(d))}else{f=this.all.last().insertSibling(d,"after",true);b.push.apply(b,d)}},onRemove:function(d,a,b){var c=this;c.doRemove(a,b);c.updateIndexes(b);if(c.store.getCount()===0){c.refresh()}c.fireEvent("itemremove",a,b)},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange();e=e||0;d=d||((d===0)?0:(c.length-1));for(var b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroy()}else{c.mun(c.store,{scope:c,datachanged:c.onDataChanged,add:c.onAdd,remove:c.onRemove,update:c.onUpdate,clear:c.refresh})}if(!a){if(c.loadMask){c.loadMask.bindStore(null)}c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,datachanged:c.onDataChanged,add:c.onAdd,remove:c.onRemove,update:c.onUpdate,clear:c.refresh});if(c.loadMask){c.loadMask.bindStore(a)}}c.store=a;c.getSelectionModel().bind(a);if(a){c.refresh(true)}},onDataChanged:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if(Ext.isString(a)){return document.getElementById(a)}else{if(Ext.isNumber(a)){return this.all.elements[a]}else{if(a instanceof Ext.data.Model){return this.getNodeByRecord(a)}}}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);Ext.fly(b).addCls(this.selectedItemCls)},onItemDeselect:function(a){var b=this.getNode(a);Ext.fly(b).removeCls(this.selectedItemCls)},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel");return this.selModel.getSelection().length},getSelectedRecords:function(){console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel");return this.selModel.getSelection()},select:function(a,b,d){console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()");var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()");var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.view.View",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect")},afterRender:function(){var b=this,a;b.callParent();a={scope:b,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,processUIEvent:function(h,c){c=c||h.type;var f=this,d=h.getTarget(f.getItemSelector(),f.getTargetEl()),g=this.statics().EventMap,b,a;if(!d){if(c=="mouseover"&&f.mouseOverItem&&typeof f.mouseOverItem.offsetParent==="object"&&Ext.fly(f.mouseOverItem).getRegion().contains(h.getPoint())){d=f.mouseOverItem}if(c=="keydown"){a=f.getSelectionModel().getLastSelected();if(a){d=f.getNode(a)}}}if(d){b=f.indexOf(d);if(!a){a=f.getRecord(d)}if(f.processItemEvent(c,a,d,b,h)===false){return false}c=f.isNewItemEvent(c,d,h);if(c===false){return false}if((f["onBeforeItem"+g[c]](a,d,b,h)===false)||(f.fireEvent("beforeitem"+c,f,a,d,b,h)===false)||(f["onItem"+g[c]](a,d,b,h)===false)){return false}f.fireEvent("item"+c,f,a,d,b,h)}else{if((f.processContainerEvent(c,h)===false)||(f["onBeforeContainer"+g[c]](h)===false)||(f.fireEvent("beforecontainer"+c,f,h)===false)||(f["onContainer"+g[c]](h)===false)){return false}f.fireEvent("container"+c,f,h)}return true},isNewItemEvent:function(c,f,h){var d=this,a=d.mouseOverItem,b,g;switch(c){case"mouseover":if(f===a){return false}d.mouseOverItem=f;return"mouseenter";break;case"mouseout":if(a&&typeof a.offsetParent==="object"){b=Ext.fly(d.mouseOverItem).getRegion().contains(h.getPoint());g=Ext.fly(h.getTarget()).hasCls(d.itemSelector);if(b&&g){return false}}d.mouseOverItem=null;return"mouseleave";break}return c},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);delete b.highlightedItem}},refresh:function(){this.clearHighlight();this.callParent(arguments)}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],cls:Ext.baseCSSPrefix+"grid-view",itemSelector:"."+Ext.baseCSSPrefix+"grid-row",cellSelector:"."+Ext.baseCSSPrefix+"grid-cell",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp("x-grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,initComponent:function(){this.scrollState={};this.selModel.view=this;this.headerCt.view=this;this.initFeatures();this.setNewTemplate();this.callParent();this.mon(this.store,{load:this.onStoreLoad,scope:this})},onStoreLoad:function(){if(this.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=Ext.create("Ext.util.DelayedTask",this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}}},scrollToTop:Ext.emptyFn,getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){this.features=this.features||[];var b=this.features,c=b.length,a=0;this.featuresMC=Ext.create("Ext.util.MixedCollection");for(;a<c;a++){if(!b[a].isFeature){b[a]=Ext.create("feature."+b[a].ftype,b[a])}b[a].view=this;this.featuresMC.add(b[a])}},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){this.callParent();this.mon(this.el,{scroll:this.fireBodyScroll,scope:this});this.attachEventsForFeatures()},fireBodyScroll:function(b,a){this.fireEvent("bodyscroll",b,a)},prepareData:function(c,h,e){var g=this.headerCt.prepareData(c,h,e,this),a=this.features,f=a.length,d=0,b,j;for(;d<f;d++){j=a[d];if(j.isFeature){Ext.apply(g,j.getAdditionalData(c,h,e,g,this))}}return g},collectData:function(d,m){var n=this.callParent(arguments),c=this.headerCt,l=c.getFullWidth(),b=this.features,h=b.length,a={rows:n,fullWidth:l},f=0,p,e=0,k,g;k=n.length;if(this.getRowClass){for(;e<k;e++){g={};n[e]["rowCls"]=this.getRowClass(d[e],e,g,this.store)}}for(;f<h;f++){p=b[f];if(p.isFeature&&p.collectData&&!p.disabled){a=p.collectData(d,n,m,l,a);break}}return a},onHeaderResize:function(d,a,c){var b=this.el;if(b){this.saveScrollState();b.select("."+Ext.baseCSSPrefix+"grid-col-resizer-"+d.id).setWidth(a);b.select("."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(this.headerCt.getFullWidth());this.restoreScrollState();this.setNewTemplate();if(!c){this.el.focus()}}},onHeaderShow:function(b,c,a){if(c.oldWidth){this.onHeaderResize(c,c.oldWidth,a);delete c.oldWidth}else{if(c.width&&!c.flex){this.onHeaderResize(c,c.width,a)}}this.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},setNewTemplate:function(){var a=this.headerCt.getColumnsForTpl(true);this.tpl=this.getTableChunker().getTableTpl({columns:a,features:this.features})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(a){this.removeRowCls(a,this.selectedItemCls);this.removeRowCls(a,this.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(b){var g=b.row,e=b.column,d=this.store,f=this.getNode(g),h=this.headerCt.getHeaderAtIndex(e),c,a=false;if(h){c=h.getCellSelector();a=Ext.fly(f).down(c)}return a},onRowFocus:function(c,b,a){var d=this.getNode(c);if(b){this.addRowCls(c,this.focusedItemCls);if(!a){this.focusRow(c)}}else{this.removeRowCls(c,this.focusedItemCls)}},focusRow:function(f){var h=this.getNode(f),e=this.el,d=0,b=this.ownerCt,c,g,a;if(h&&this.el){g=e.getRegion();c=Ext.fly(h).getRegion();if(c.top<g.top){d=c.top-g.top}else{if(c.bottom>g.bottom){d=c.bottom-g.bottom}}a=this.getRecord(h);f=this.store.indexOf(a);if(d){b.scrollByDeltaY(d)}this.fireEvent("rowfocus",a,h,f)}},focusCell:function(g){var i=this.getCellByPosition(g),b=this.el,d=0,e=0,c=b.getRegion(),a=this.ownerCt,h,f;if(i){h=i.getRegion();if(h.top<c.top){d=h.top-c.top}else{if(h.bottom>c.bottom){d=h.bottom-c.bottom}}if(h.left<c.left){e=h.left-c.left}else{if(h.right>c.right){e=h.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();this.fireEvent("cellfocus",f,i,g)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(b,a){this.callParent(arguments)},saveScrollState:function(){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop},restoreScrollState:function(){var b=this.el.dom,a=this.scrollState,c=this.headerCt.el.dom;c.scrollLeft=b.scrollLeft=a.left;b.scrollTop=a.top},refresh:function(c){var b=this,a;b.setNewTemplate();if(b.rendered){a=b.el.child("table");if(a){a.removeAllListeners()}}b.callParent(arguments);if(b.rendered){a=b.el.child("table");if(a){a.unselectable()}if(!c){b.el.focus()}}},processItemEvent:function(g,b,l,i,d){var f=this,j=d.getTarget(f.cellSelector,l),h=j?j.cellIndex:-1,a=f.statics().EventMap,c=f.getSelectionModel(),k;if(g=="keydown"&&!j&&c.getCurrentPosition){j=f.getCellByPosition(c.getCurrentPosition());if(j){j=j.dom;h=j.cellIndex}}k=f.fireEvent("uievent",g,f,j,i,h,d);if(k===false||f.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}return !((f["onBeforeCell"+a[g]](j,h,b,l,i,d)===false)||(f.fireEvent("beforecell"+g,f,j,h,b,l,i,d)===false)||(f["onCell"+a[g]](j,h,b,l,i,d)===false)||(f.fireEvent("cell"+g,f,j,h,b,l,i,d)===false))},processSpecialEvent:function(j){var m=this,b=this.statics().EventMap,d=this.features,l=d.length,n=j.type,f,o,g,h,c,k,a=m.ownerCt;this.callParent(arguments);if(n=="mouseover"||n=="mouseout"){return}for(f=0;f<l;f++){o=d[f];if(o.hasFeatureEvent){h=j.getTarget(o.eventSelector,m.getTargetEl());if(h){g=o.eventPrefix;c=o.getFireEventArgs("before"+g+n,m,h);k=o.getFireEventArgs(g+n,m,h);if((m.fireEvent.apply(m,c)===false)||(a.fireEvent.apply(a,c)===false)||(m.fireEvent.apply(m,k)===false)||(a.fireEvent.apply(a,k)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)},getMaxContentWidth:function(g){var a=g.getCellInnerSelector(),c=this.el.query(a),d=0,f=c.length,e=g.el.dom.scrollWidth,b;for(;d<f;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(d){var b=d.getTarget(this.cellSelector),c=d.getTarget(this.itemSelector),a=this.getRecord(c),f=this.getHeaderByCell(b);return this.getPosition(a,f)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(j,k,g,l,a,m){var n=j.row,d=j.column,i=this.store.getCount(),f=this.getFirstVisibleColumnIndex(),b=this.getLastVisibleColumnIndex(),h={row:n,column:d},c=this.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}g=g||{};k=k.toLowerCase();switch(k){case"right":if(d===b){if(l||n===i-1){return false}if(!g.ctrlKey){h.row=n+1;h.column=f}}else{if(!g.ctrlKey){h.column=d+this.getRightGap(c)}else{h.column=b}}break;case"left":if(d===f){if(l||n===0){return false}if(!g.ctrlKey){h.row=n-1;h.column=b}}else{if(!g.ctrlKey){h.column=d+this.getLeftGap(c)}else{h.column=f}}break;case"up":if(n===0){return false}else{if(!g.ctrlKey){h.row=n-1}else{h.row=0}}break;case"down":if(n===i-1){return false}else{if(!g.ctrlKey){h.row=n+1}else{h.row=i-1}}break}if(a&&a.call(m||window,h)!==true){return false}else{return h}},getFirstVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[0];return c.getHeaderIndex(b)},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[d.length-1];return c.getHeaderIndex(b)},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var f=this.getHeaderCt(),e=f.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){table=this.el.child("table");if(table){table.removeAllListeners()}}this.callParent(arguments)},getLeftGap:function(a){var f=this.getHeaderCt(),e=f.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,invalidateScrollerOnRefresh:true,scrollToTop:function(){if(this.rendered){var b=this.ownerCt,a=b.verticalScroller;if(a){a.scrollToTop()}}},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},doStripeRows:function(a){if(this.stripeRows){var c=this.getNodes(a),e=c.length,b=0,d;for(;b<e;b++){d=c[b];d.className=d.className.replace(this.rowClsRe," ");if(b%2===1){d.className+=(" "+this.altRowCls)}}}},refresh:function(b){this.callParent(arguments);this.doStripeRows(0);var a=this.up("gridpanel");if(a&&this.invalidateScrollerOnRefresh){a.invalidateScroller()}}});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,normalCfgCopy:["invalidateScrollerOnRefresh","verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:["invalidateScrollerOnRefresh"],initComponent:function(){var a=this;if(a.columnLines){a.setColumnLines(a.columnLines)}a.callParent()},setColumnLines:function(a){var b=this,c=(a)?"addClsWithUI":"removeClsWithUI";b[c]("with-col-lines")}});Ext.define("AM.view.user.List",{extend:"Ext.grid.Panel",alias:"widget.userlist",title:"All Users",store:"Users",columns:[{header:"Name",dataIndex:"name",flex:1},{header:"Email",dataIndex:"email",flex:1}]});Ext.define("AM.controller.Users",{extend:"Ext.app.Controller",stores:["Users"],models:["User"],views:["user.Edit","user.List"],refs:[{ref:"usersPanel",selector:"panel"}],init:function(){this.control({"viewport > userlist dataview":{itemdblclick:this.editUser},"useredit button[action=save]":{click:this.updateUser}})},editUser:function(b,a){var c=Ext.create("AM.view.user.Edit").show();c.down("form").loadRecord(a)},updateUser:function(c){var e=c.up("window"),d=e.down("form"),a=d.getRecord(),b=d.getValues();a.set(b);e.close();this.getUsersStore().sync()}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(d,a){var c=this,b=c.store.getAt(c.store.getCount()-1);if(b){if(d.shiftKey){c.selectRange(b,c.lastFocused||0);c.setLastFocused(b)}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyHome:function(c,a){var b=this,d=b.store.getAt(0);if(d){if(c.shiftKey){b.selectRange(d,b.lastFocused||0);b.setLastFocused(d)}else{if(c.ctrlKey){b.setLastFocused(d)}else{b.doSelect(d,false)}}}},onKeyPageUp:function(h,d){var g=this,i=g.getRowsVisible(),b,c,a,f;if(i){b=g.lastFocused?g.store.indexOf(g.lastFocused):0;c=b-i;if(c<0){c=0}a=g.store.getAt(c);if(h.shiftKey){f=g.store.getAt(b);g.selectRange(a,f,h.ctrlKey,"up");g.setLastFocused(a)}else{if(h.ctrlKey){h.preventDefault();g.setLastFocused(a)}else{g.doSelect(a)}}}},onKeyPageDown:function(h,b){var f=this,i=f.getRowsVisible(),a,g,d,c;if(i){a=f.lastFocused?f.store.indexOf(f.lastFocused):0;g=a+i;if(g>=f.store.getCount()){g=f.store.getCount()-1}d=f.store.getAt(g);if(h.shiftKey){c=f.store.getAt(a);f.selectRange(d,c,h.ctrlKey,"down");f.setLastFocused(d)}else{if(h.ctrlKey){h.preventDefault();f.setLastFocused(d)}else{f.doSelect(d)}}}},onKeyPress:function(d,b){if(d.getKey()===d.SPACE){d.stopEvent();var c=this,a=c.lastFocused;if(a){if(c.isSelected(a)){c.doDeselect(a,false)}else{c.doSelect(a,true)}}}},onKeyUp:function(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a>0){b=f.store.getAt(a-1);if(g.shiftKey&&f.lastFocused){if(f.isSelected(f.lastFocused)&&f.isSelected(b)){f.doDeselect(f.lastFocused,true);f.setLastFocused(b)}else{if(!f.isSelected(f.lastFocused)){f.doSelect(f.lastFocused,true);f.doSelect(b,true)}else{f.doSelect(b,true)}}}else{if(g.ctrlKey){f.setLastFocused(b)}else{f.doSelect(b)}}}},onKeyDown:function(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a+1<f.store.getCount()){b=f.store.getAt(a+1);if(f.selected.getCount()===0){f.doSelect(b)}else{if(g.shiftKey&&f.lastFocused){if(f.isSelected(f.lastFocused)&&f.isSelected(b)){f.doDeselect(f.lastFocused,true);f.setLastFocused(b)}else{if(!f.isSelected(f.lastFocused)){f.doSelect(f.lastFocused,true);f.doSelect(b,true)}else{f.doSelect(b,true)}}}else{if(g.ctrlKey){f.setLastFocused(b)}else{f.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(b,a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b,a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,f){b.el.focus();this.selectWithEvent(a,f)},onSelectChange:function(e,b,h){var f=this,j=f.views,c=j.length,g=f.store,a=g.indexOf(e),d=0;for(;d<c;d++){if(b){j[d].onRowSelect(a,h);if(!h){f.fireEvent("select",f,e,a)}}else{j[d].onRowDeselect(a,h);if(!h){f.fireEvent("deselect",f,e,a)}}}},onLastFocusChanged:function(h,d,b){var a=this.views,g=a.length,c=this.store,f,e=0;if(h){f=c.indexOf(h);if(f!=-1){for(;e<g;e++){a[e].onRowFocus(f,false)}}}if(d){f=c.indexOf(d);if(f!=-1){for(e=0;e<g;e++){a[e].onRowFocus(f,true,b)}}}},onEditorTab:function(h,f){var g=this,i=g.views[0],c=h.getActiveRecord(),b=h.getActiveColumn(),d=i.getPosition(c,b),j=f.shiftKey?"left":"right",a=i.walkCells(d,j,f,this.preventWrap);if(a){h.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)}});Ext.define("Ext.grid.Scroller",{extend:"Ext.Component",alias:"widget.gridscroller",weight:110,cls:Ext.baseCSSPrefix+"scroller",focusable:false,renderTpl:['<div class="'+Ext.baseCSSPrefix+'stretcher"></div>'],initComponent:function(){var d=this,c=d.dock,a=Ext.baseCSSPrefix+"scroller-vertical",e="width",b=Ext.getScrollBarWidth()+(Ext.isIE?1:-1);d.offsets={bottom:0};if(c==="top"||c==="bottom"){a=Ext.baseCSSPrefix+"scroller-horizontal";e="height"}d[e]=b;d.cls+=(" "+a);Ext.applyIf(d.renderSelectors,{stretchEl:"."+Ext.baseCSSPrefix+"stretcher"});d.callParent()},afterRender:function(){var a=this;a.callParent();a.ownerCt.on("afterlayout",a.onOwnerAfterLayout,a);a.mon(a.el,"scroll",a.onElScroll,a);Ext.cache[a.el.id].skipGarbageCollection=true},getSizeCalculation:function(){var c=this.getPanel(),i=this.dock,e=this.el.dom,b=1,h=1,g,d;if(i==="top"||i==="bottom"){var f=c.query("tableview"),a=f[1]||f[0];if(!a){return false}b=a.headerCt.getFullWidth();if(Ext.isIEQuirks){b--}b--}else{g=c.down("tableview:not([lockableInjected])");if(!g){return false}d=g.el;if(!d){return false}h=d.dom.scrollHeight}if(isNaN(b)){b=1}if(isNaN(h)){h=1}return{width:b,height:h}},invalidate:function(c){if(!this.stretchEl||!this.ownerCt){return}var b=this.getSizeCalculation(),a=this.el.dom;if(b){this.stretchEl.setSize(b);a.scrollTop=a.scrollTop}},onOwnerAfterLayout:function(a,b){this.invalidate()},setScrollTop:function(b){if(this.el){var a=this.el.dom;return a.scrollTop=Ext.Number.constrain(b,0,a.scrollHeight-a.clientHeight)}},setScrollLeft:function(b){if(this.el){var a=this.el.dom;return a.scrollLeft=Ext.Number.constrain(b,0,a.scrollWidth-a.clientWidth)}},scrollByDeltaY:function(b){if(this.el){var a=this.el.dom;return this.setScrollTop(a.scrollTop+b)}},scrollByDeltaX:function(b){if(this.el){var a=this.el.dom;return this.setScrollLeft(a.scrollLeft+b)}},scrollToTop:function(){this.setScrollTop(0)},onElScroll:function(a,b){this.fireEvent("bodyscroll",a,b)},getPanel:function(){var a=this;if(!a.panel){a.panel=this.up("[scrollerOwner]")}return a.panel}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",uses:["Ext.grid.ColumnLayout","Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=Ext.create("Ext.grid.plugin.HeaderResizer");a.reorderer=Ext.create("Ext.grid.plugin.HeaderReorderer");if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&&!a.items){a.layout="auto"}else{a.layout={type:"gridcolumn",availableSpaceOffset:a.availableSpaceOffset,align:"stretchmax",resetStretch:true}}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{width:a.defaultWidth,triStateSort:a.triStateSort,sortable:a.sortable});a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){Ext.destroy(this.resizer,this.reorderer);this.callParent()},onAdd:function(b){var a=this;if(!b.headerId){b.headerId="h"+(++a.headerCounter)}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},afterRender:function(){this.callParent();var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},afterLayout:function(){if(!this.isHeader){var c=this,b=c.query(">gridcolumn:not([hidden])"),a;c.callParent(arguments);if(b.length){b[0].el.radioCls(c.firstHeaderCls);b[b.length-1].el.radioCls(c.lastHeaderCls)}}},onHeaderShow:function(f){var j=this,k=j.ownerCt,c=j.getMenu(),d,b,g,a,h,e;if(c){g=c.down("menucheckitem[headerId="+f.id+"]");if(g){g.setChecked(true,true)}d=c.query("#columnItem>menucheckitem[checked]");b=d.length;if((j.getVisibleGridColumns().length>1)&&j.disabledMenuItems&&j.disabledMenuItems.length){if(b==1){Ext.Array.remove(j.disabledMenuItems,d[0])}for(e=0,h=j.disabledMenuItems.length;e<h;e++){a=j.disabledMenuItems[e];if(!a.isDestroyed){a[a.menu?"enableCheckChange":"enable"]()}}if(b==1){j.disabledMenuItems=d}else{j.disabledMenuItems=[]}}}if(!f.isGroupHeader){if(j.view){j.view.onHeaderShow(j,f,true)}if(k){k.onHeaderShow(j,f)}}j.fireEvent("columnshow",j,f);j.doLayout()},onHeaderHide:function(f,c){var b=this,a=b.ownerCt,e=b.getMenu(),d;if(e){d=e.down("menucheckitem[headerId="+f.id+"]");if(d){d.setChecked(false,true)}b.setDisabledItems()}if(!f.isGroupHeader){if(b.view){b.view.onHeaderHide(b,f,true)}if(a){a.onHeaderHide(b,f)}if(!c){b.doLayout()}}b.fireEvent("columnhide",b,f)},setDisabledItems:function(){var d=this,f=d.getMenu(),b=0,a,e,c;e=f.query("#columnItem>menucheckitem[checked]");if((e.length===1)){if(!d.disabledMenuItems){d.disabledMenuItems=[]}if((d.getVisibleGridColumns().length===1)&&e[0].menu){e=e.concat(e[0].menu.query("menucheckitem[checked]"))}a=e.length;for(b=0;b<a;b++){c=e[b];if(!Ext.Array.contains(d.disabledMenuItems,c)){c[c.menu?"disableCheckChange":"disable"]();d.disabledMenuItems.push(c)}}}},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(c,a,b){this.tempLock();if(this.view&&this.view.rendered){this.view.onHeaderResize(c,a,b)}this.fireEvent("columnresize",this,c,a)},onHeaderClick:function(c,b,a){this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(c,b,a){if(this.fireEvent("headertriggerclick",this,c,b,a)!==false){this.showMenuBy(a,c)}},showMenuBy:function(b,f){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=f;d.setFloatParent(f);f.titleContainer.addCls(this.headerOpenCls);a=f.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleContainer.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;if(a.menu){a.menu.destroy();delete a.menu}},onHeaderMoved:function(e,b,d){var c=this,a=c.ownerCt;if(a){a.onHeaderMove(c,e,b,d)}c.fireEvent("columnmove",c,e,b,d)},getMenu:function(){var a=this;if(!a.menu){a.menu=Ext.create("Ext.menu.Menu",{items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.setDisabledItems();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var b=this,a=[{itemId:"columnItem",text:b.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:b.getColumnMenu(b)}];if(b.sortable){a.unshift({itemId:"ascItem",text:b.sortAscText,cls:"xg-hmenu-sort-asc",handler:b.onSortAscClick,scope:b},{itemId:"descItem",text:b.sortDescText,cls:"xg-hmenu-sort-desc",handler:b.onSortDescClick,scope:b},"-")}return a},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(f){var c=[],b=0,e,a=f.query(">gridcolumn[hideable]"),g=a.length,d;for(;b<g;b++){e=a[b];d=Ext.create("Ext.menu.CheckItem",{text:e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});if(g===1){d.disabled=true}c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(d){var b=[],c=this.getGridColumns(d),f=c.length,a=0,e;for(;a<f;a++){e=c[a];b.push({dataIndex:e.dataIndex,align:e.align,width:e.hidden?0:e.getDesiredWidth(),id:e.id,cls:e.tdCls,columnId:e.getItemId()})}return b},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),e=b.length,a=0;for(;a<e;a++){if(!isNaN(b[a].width)){if(b[a].getDesiredWidth){c+=b[a].getDesiredWidth()}else{c+=b[a].getWidth()}}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),e=c.length,b=0,d;for(;b<e;b++){if(c[b]!==a){d=c[b].sortState;c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHeaderIndex:function(b){var a=this.getGridColumns();return Ext.Array.indexOf(a,b)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b[a]},prepareData:function(h,b,j,l){var f={},c=this.getGridColumns(),d=c.length,e=0,i,n,a,k=this.up("tablepanel"),m=k.store;for(;e<d;e++){a={tdCls:"",style:""};i=c[e];n=h[i.dataIndex];if(Ext.isString(i.renderer)){i.renderer=Ext.util.Format[i.renderer]}if(Ext.isFunction(i.renderer)){n=i.renderer.call(i.scope||this.ownerCt,n,a,j,b,e,m,l)}f[i.id+"-modified"]=j.isModified(i.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":Ext.baseCSSPrefix+"grid-clean-cell";f[i.id+"-tdCls"]=a.tdCls;f[i.id+"-tdAttr"]=a.tdAttr;f[i.id+"-style"]=a.style;if(n===undefined||n===null||n===""){n=" "}f[i.id]=n}return f},expandToFit:function(a){if(this.view){this.view.expandToFit(a)}}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{[this.openTableWrap()]}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth()]}>',"<tbody>","<tr>",'<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{[this.closeTableWrap()]}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(){return'style="width: {fullWidth}px;"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div unselectable="on" class="'+Ext.baseCSSPrefix+"grid-cell-inner "+Ext.baseCSSPrefix+'unselectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',"</tpl>","</tr>"],firstOrLastCls:function(b,c){var a="";if(b===1){a=Ext.baseCSSPrefix+"grid-cell-first"}else{if(b===c){a=Ext.baseCSSPrefix+"grid-cell-last"}}return a},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:function(){return""},closeTableWrap:function(){return""},getTableTpl:function(j,b){var h,g={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},f={},c=j.features||[],l=c.length,e=0,k={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<l;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(k,c[e].getMetaRowTplFragments());Ext.apply(f,c[e].getFragmentTpl());Ext.apply(g,c[e].getTableFragments())}}d=Ext.create("Ext.XTemplate",d.join(""),k);j.row=d.applyTemplate(j);a=Ext.create("Ext.XTemplate",this.metaTableTpl.join(""),g);h=a.applyTemplate(j);if(!b){h=Ext.create("Ext.XTemplate",h,f)}return h}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var f=this,h=[],a=f.eventRelayRe,b=c.locked.getView(),g=c.normal.getView(),d,e;Ext.apply(f,{lockedView:b,normalView:g,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});f.mixins.observable.constructor.call(f,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){h.push(e)}}f.relayEvents(b,h);f.relayEvents(g,h);g.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.onItemMouseEnter});b.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},onItemMouseEnter:function(c,b){var f=this,d=f.lockedView,a=f.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.lockedView,d;if(a.getHeaderAtIndex(c)===-1){a=this.normalView}d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView"],syncRowHeight:true,spacerHidden:true,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,f;if(c.subGridXType){f=c.subGridXType}else{var d=this.getXTypes().split("/"),b=d.length,e=d[b-1],a=d[b-2];if(a!=="tablepanel"){f=a}else{f=e}}return f},injectLockable:function(){this.lockable=true;this.hasView=true;var j=this,a=j.determineXTypeToCreate(),g=j.getSelectionModel(),b={xtype:a,enableAnimations:false,scroll:false,scrollerOwner:false,selModel:g,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked"},h={xtype:a,enableAnimations:false,scrollerOwner:false,selModel:g,border:false},e=0,d,c,f;j.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(h,j,j.normalCfgCopy);Ext.copyTo(b,j,j.lockedCfgCopy);for(;e<j.normalCfgCopy.length;e++){delete j[j.normalCfgCopy[e]]}for(e=0;e<j.lockedCfgCopy.length;e++){delete j[j.lockedCfgCopy[e]]}j.lockedHeights=[];j.normalHeights=[];d=j.processColumns(j.columns);b.width=d.lockedWidth;b.columns=d.locked;h.columns=d.normal;j.store=Ext.StoreManager.lookup(j.store);b.store=j.store;h.store=j.store;h.flex=1;b.viewConfig=j.lockedViewConfig||{};b.viewConfig.loadingUseMsg=false;h.viewConfig=j.normalViewConfig||{};Ext.applyIf(b.viewConfig,j.viewConfig);Ext.applyIf(h.viewConfig,j.viewConfig);j.normalGrid=Ext.ComponentManager.create(h);j.lockedGrid=Ext.ComponentManager.create(b);j.view=Ext.create("Ext.grid.LockingView",{locked:j.lockedGrid,normal:j.normalGrid,panel:j});if(j.syncRowHeight){j.lockedGrid.getView().on({refresh:j.onLockedGridAfterRefresh,itemupdate:j.onLockedGridAfterUpdate,scope:j});j.normalGrid.getView().on({refresh:j.onNormalGridAfterRefresh,itemupdate:j.onNormalGridAfterUpdate,scope:j})}c=j.lockedGrid.headerCt;f=j.normalGrid.headerCt;c.lockedCt=true;c.lockableInjected=true;f.lockableInjected=true;c.on({columnshow:j.onLockedHeaderShow,columnhide:j.onLockedHeaderHide,columnmove:j.onLockedHeaderMove,sortchange:j.onLockedHeaderSortChange,columnresize:j.onLockedHeaderResize,scope:j});f.on({columnmove:j.onNormalHeaderMove,sortchange:j.onNormalHeaderSortChange,scope:j});j.normalGrid.on({scrollershow:j.onScrollerShow,scrollerhide:j.onScrollerHide,scope:j});j.lockedGrid.on("afterlayout",j.onLockedGridAfterLayout,j,{single:true});j.modifyHeaderCt();j.items=[j.lockedGrid,j.normalGrid];j.layout={type:"hbox",align:"stretch"}},processColumns:function(f){var e=0,a=f.length,b=0,d=[],c=[],g;for(;e<a;++e){g=f[e];g.processed=true;if(g.locked){b+=g.width;d.push(g)}else{c.push(g)}}return{lockedWidth:b,locked:d,normal:c}},onLockedGridAfterLayout:function(){var b=this,a=b.lockedGrid.getView();a.on({refresh:b.createSpacer,beforerefresh:b.destroySpacer,scope:b})},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalGridAfterRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedGridAfterRefresh()}},createSpacer:function(){var d=this,b=Ext.getScrollBarWidth()+(Ext.isIE?2:0),a=d.lockedGrid.getView(),c=a.el;d.spacerEl=Ext.core.DomHelper.append(c,{cls:d.spacerHidden?(Ext.baseCSSPrefix+"hidden"):"",style:"height: "+b+"px;"},true)},destroySpacer:function(){var a=this;if(a.spacerEl){a.spacerEl.destroy();delete a.spacerEl}},onLockedGridAfterRefresh:function(){var e=this,a=e.lockedGrid.getView(),c=a.el,f=c.query(a.getItemSelector()),d=f.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=f[b].clientHeight}e.syncRowHeights()},onNormalGridAfterRefresh:function(){var e=this,a=e.normalGrid.getView(),c=a.el,f=c.query(a.getItemSelector()),d=f.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=f[b].clientHeight}e.syncRowHeights()},onLockedGridAfterUpdate:function(a,b,c){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()},onNormalGridAfterUpdate:function(a,b,c){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()},syncRowHeights:function(){var k=this,b=k.lockedHeights,l=k.normalHeights,a=[],j=b.length,g=0,m,d,e,h,f=k.getVerticalScroller(),c;if(b.length&&l.length){m=k.lockedGrid.getView();d=k.normalGrid.getView();e=m.el.query(m.getItemSelector());h=d.el.query(d.getItemSelector());for(;g<j;g++){if(!isNaN(b[g])&&!isNaN(l[g])){if(b[g]>l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g]<l[g]){Ext.fly(e[g]).setHeight(l[g])}}}}k.normalGrid.invalidateScroller();if(f&&f.setViewScrollTop){f.setViewScrollTop(k.virtualScrollTop)}else{c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;m.el.dom.scrollTop=c}k.lockedHeights=[];k.normalHeights=[]}},onScrollerShow:function(a,b){if(b==="horizontal"){this.spacerHidden=false;this.spacerEl.removeCls(Ext.baseCSSPrefix+"hidden")}},onScrollerHide:function(a,b){if(b==="horizontal"){this.spacerHidden=true;this.spacerEl.addCls(Ext.baseCSSPrefix+"hidden")}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var f=this,g=f.unlockText,h=f.lockText,c="xg-hmenu-unlock",e="xg-hmenu-lock",a=Ext.Function.bind(f.onUnlockMenuClick,f),d=Ext.Function.bind(f.onLockMenuClick,f);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push("-",{cls:c,text:g,handler:a,disabled:!b});i.push({cls:e,text:h,handler:d,disabled:b});return i}},lock:function(a,d){var c=this,e=c.normalGrid,g=c.lockedGrid,f=e.headerCt,b=g.headerCt;a=a||f.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}f.remove(a,false);b.suspendLayout=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}b.suspendLayout=false;c.syncLockedSection()},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var b=this,a=b.lockedGrid.headerCt.getFullWidth(true);b.lockedGrid.setWidth(a)},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,d){var c=this,e=c.normalGrid,g=c.lockedGrid,f=e.headerCt,b=g.headerCt;if(!Ext.isDefined(d)){d=0}a=a||b.getMenu().activeHeader;b.remove(a,false);c.syncLockedWidth();c.lockedGrid.getView().refresh();f.insert(d,a);c.normalGrid.getView().refresh()},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked);d.headerCt.add(b.normal)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"column",clearInnerCtOnLayout:false,constructor:function(){var a=this;a.callParent(arguments);if(!Ext.isDefined(a.availableSpaceOffset)){a.availableSpaceOffset=(Ext.getScrollBarWidth()-2)}},beforeLayout:function(){var f=this,c=0,b=f.getLayoutItems(),a=b.length,e,d;d=f.callParent(arguments);f.innerCt.setHeight(23);if(f.align=="stretchmax"){for(;c<a;c++){e=b[c];e.el.setStyle({height:"auto"});e.titleContainer.setStyle({height:"auto",paddingTop:"0"});if(e.componentLayout&&e.componentLayout.lastComponentSize){e.componentLayout.lastComponentSize.height=e.el.dom.offsetHeight}}}return d},calculateChildBoxes:function(k,c){var h=this,b=h.callParent(arguments),f=b.boxes,a=b.meta,g=f.length,d=0,e,j;if(c.width&&!h.isColumn){if(h.owner.forceFit){for(;d<g;d++){e=f[d];j=e.component;j.minWidth=Ext.grid.plugin.HeaderResizer.prototype.minColWidth;j.flex=e.width}b=h.callParent(arguments)}else{if(a.tooNarrow){c.width=a.desiredSize}}}return b},afterLayout:function(){var d=this,c=0,b=d.getLayoutItems(),a=b.length;d.callParent(arguments);if(d.align=="stretchmax"){for(;c<a;c++){b[c].setPadding()}}},updateInnerCtSize:function(b,d){var c=this,a=0;if(!c.isColumn&&d.meta.tooNarrow){if(Ext.isWebKit||Ext.isGecko||(Ext.isIEQuirks&&(Ext.isIE6||Ext.isIE7||Ext.isIE8))){a=1}else{if(Ext.isIE6||Ext.isIE7||Ext.isIE8){a=2}}a++;b.width=d.meta.desiredSize+(c.reserveOffset?c.availableSpaceOffset:0)+a}return c.callParent(arguments)},doOwnerCtLayouts:function(){var a=this.owner.ownerCt;if(!a.componentLayout.layoutBusy){a.doComponentLayout()}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],renderTpl:'<div class="'+Ext.baseCSSPrefix+'column-header-inner"><span class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!values.menuDisabled"><div class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>',dataIndex:null,text:" ",sortable:true,hideable:true,menuDisabled:false,renderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,initComponent:function(){var c=this,b,a;if(Ext.isDefined(c.header)){c.text=c.header;delete c.header}if(c.flex){c.minWidth=c.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{c.minWidth=c.width}if(!c.triStateSort){c.possibleSortStates.length=2}if(Ext.isDefined(c.columns)){c.isGroupHeader=true;c.items=c.columns;delete c.columns;delete c.flex;c.width=0;for(b=0,a=c.items.length;b<a;b++){c.width+=c.items[b].width||Ext.grid.header.Container.prototype.defaultWidth}c.minWidth=c.width;c.cls=(c.cls||"")+" "+Ext.baseCSSPrefix+"group-header";c.sortable=false;c.fixed=true;c.align="center"}Ext.applyIf(c.renderSelectors,{titleContainer:"."+Ext.baseCSSPrefix+"column-header-inner",triggerEl:"."+Ext.baseCSSPrefix+"column-header-trigger",textEl:"."+Ext.baseCSSPrefix+"column-header-text"});c.callParent(arguments)},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header")},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header")},initRenderData:function(){var a=this;Ext.applyIf(a.renderData,{text:a.text,menuDisabled:a.menuDisabled});return a.callParent(arguments)},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"column-header-align-"+b.align).addClsOnOver(b.overCls);b.mon(a,{click:b.onElClick,dblclick:b.onElDblClick,scope:b});if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.mon(b.titleContainer,{mouseenter:b.onTitleMouseOver,mouseleave:b.onTitleMouseOut,scope:b});b.keyNav=Ext.create("Ext.util.KeyNav",a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},setSize:function(a,k){var h=this,b=h.ownerCt,f=h.getOwnerHeaderCt(),j,g,e,c=h.getWidth(),d=0;if(a!==c){if(b.isGroupHeader){j=b.items.items;g=j.length;if(j[g-1].rendered){for(e=0;e<g;e++){d+=(j[e]===h)?a:j[e].getWidth()}b.minWidth=d;b.setWidth(d)}}h.callParent(arguments)}},afterComponentLayout:function(c,a){var d=this,b=this.getOwnerHeaderCt();d.callParent(arguments);if(c&&!d.isGroupHeader&&b){b.onHeaderResize(d,c,true)}},setPadding:function(){var c=this,a,b=parseInt(c.textEl.getStyle("line-height"),10);if(!c.isGroupHeader){a=c.el.getViewSize().height;if(c.titleContainer.getHeight()<a){c.titleContainer.dom.style.height=a+"px"}}a=c.titleContainer.getViewSize().height;if(b){c.titleContainer.setStyle({paddingTop:Math.max(((a-b)/2),0)+"px"})}if(Ext.isIE&&c.triggerEl){c.triggerEl.setHeight(a)}},onDestroy:function(){var a=this;Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleContainer.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleContainer.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(f,b,a,c,d,g){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,j,f){var g=this,h=Ext.baseCSSPrefix+"column-header-sort-",i=h+"ASC",c=h+"DESC",b=h+"null",e=g.getOwnerHeaderCt(),d=g.sortState;if(d!==a&&g.getSortParam()){g.addCls(h+a);if(a&&!f){g.doSort(a)}switch(a){case"DESC":g.removeCls([i,b]);break;case"ASC":g.removeCls([c,b]);break;case null:g.removeCls([i,c]);break}if(e&&!g.triStateSort&&!j){e.clearOtherSortStates(g)}g.sortState=a;e.fireEvent("sortchange",e,g,a)}},hide:function(){var f=this,c,a,d,g,e=0,b=f.getOwnerHeaderCt();f.oldWidth=f.getWidth();if(f.isGroupHeader){c=f.items.items;f.callParent(arguments);b.onHeaderHide(f);for(d=0,a=c.length;d<a;d++){c[d].hidden=true;b.onHeaderHide(c[d],true)}return}g=f.ownerCt.componentLayout.layoutBusy;f.ownerCt.componentLayout.layoutBusy=true;f.callParent(arguments);f.ownerCt.componentLayout.layoutBusy=g;b.onHeaderHide(f);if(f.ownerCt.isGroupHeader){c=f.ownerCt.query(">:not([hidden])");if(!c.length){f.ownerCt.hide()}else{for(d=0,a=c.length;d<a;d++){e+=c[d].getWidth()}f.ownerCt.minWidth=e;f.ownerCt.setWidth(e)}}},show:function(){var f=this,d=f.getOwnerHeaderCt(),g,b,a,c,e=0;g=f.ownerCt.componentLayout.layoutBusy;f.ownerCt.componentLayout.layoutBusy=true;f.callParent(arguments);f.ownerCt.componentLayout.layoutBusy=g;if(f.isSubHeader){if(!f.ownerCt.isVisible()){f.ownerCt.show()}}if(f.isGroupHeader&&!f.query(":not([hidden])").length){b=f.query(">*");for(c=0,a=b.length;c<a;c++){b[c].show()}}if(f.ownerCt.isGroupHeader){b=f.ownerCt.query(">:not([hidden])");for(c=0,a=b.length;c<a;c++){e+=b[c].getWidth()}f.ownerCt.minWidth=e;f.ownerCt.setWidth(e)}if(d){d.onHeaderShow(f)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,configs:{dynamic:true},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=Ext.create("Ext.dd.DragTracker",{disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(c,a){if(this.headerCt.dragging){if(this.activeHd){this.activeHd.el.dom.style.cursor="";delete this.activeHd}}else{var f=c.getTarget("."+this.colHeaderCls,3,true),b,d;if(f){b=Ext.getCmp(f.id);if(b.isOnLeftEdge(c)){d=b.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])")}else{if(b.isOnRightEdge(c)){d=b}else{d=null}}if(d){if(d.isGroupHeader){d=d.getVisibleGridColumns();d=d[d.length-1]}if(d&&!d.fixed){this.activeHd=d;b.el.dom.style.cursor=this.eResizeCursor}}else{b.el.dom.style.cursor="";delete this.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls("x-column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var a=this.dragHd.el,b=Ext.util.Region.getRegion(a);return b.adjust(0,this.maxColWidth-a.getWidth(),0,this.minColWidth)},onStart:function(s){var u=this,g=u.dragHd,b=g.el,n=b.getWidth(),i=u.headerCt,k=s.getTarget();if(u.dragHd&&!Ext.fly(k).hasCls("x-column-header-trigger")){i.dragging=true}u.origWidth=n;if(!u.dynamic){var d=b.getXY(),q=i.up("[scrollerOwner]"),f=u.dragHd.up(":not([isGroupHeader])"),j=f.up(),c=q.getLhsMarker(),m=q.getRhsMarker(),a=m.parent(),h=a.getLeft(true),r=a.getTop(true),p=a.translatePoints(d),o=j.body.getHeight()+i.getHeight(),l=p.top-r;c.setTop(l);m.setTop(l);c.setHeight(o);m.setHeight(o);c.setLeft(p.left-h);m.setLeft(p.left+n-h)}},onDrag:function(g){if(!this.dynamic){var f=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),h=a.getRhsMarker(),c=h.parent(),b=c.translatePoints(f),d=c.getLeft(true);h.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(g){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var f=this.dragHd,c=this.headerCt.up("[scrollerOwner]"),d=c.getLhsMarker(),i=c.getRhsMarker(),a=f.getWidth(),h=this.tracker.getOffset("point"),b=-9999;d.setLeft(b);i.setLeft(b)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){this.headerCt.componentLayout.layoutBusy=true}}b.minWidth=this.origWidth+c[0];b.setWidth(b.minWidth);if(a){delete a.flex;a.setWidth(a.getWidth()-c[0]);this.headerCt.componentLayout.layoutBusy=false;this.headerCt.doComponentLayout()}}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.core.Element.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var f=this.getId(d,false);var e=this.elements[f];if(e){delete this.elements[f];if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(g,j){if(j||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var k=g.getXY(),l=g.getPoint(),h=this.proc,f=this.els;for(var b in f){var d=f[b],a=d._region;var i=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(l)&&d.isScrollable()){if(a.bottom-l.y<=i.vthresh){if(h.el!=d){this.startProc(d,"down")}return}else{if(a.right-l.x<=i.hthresh){if(h.el!=d){this.startProc(d,"left")}return}else{if(l.y-a.top<=i.vthresh){if(h.el!=d){this.startProc(d,"up")}return}else{if(l.x-a.left<=i.hthresh){if(h.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){var c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.core.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:" "},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.core.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:" "},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),g,f;if((c.right-a)<=(c.right-c.left)/2){g="after"}else{g="before"}return{pos:g,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(w,o,u){var a=this.getLocation(u,o),q=a.header,g=a.pos,f=w.nextSibling("gridcolumn:not([hidden])"),t=w.previousSibling("gridcolumn:not([hidden])"),d,l,r,s,b,c,k,m,x,v;if(!q.draggable&&q.getIndex()==0){return false}this.lastLocation=a;if((w!==q)&&((g==="before"&&f!==q)||(g==="after"&&t!==q))&&!q.isDescendantOf(w)){var n=Ext.dd.DragDropManager.getRelated(this),j=n.length,p=0,h;for(;p<j;p++){h=n[p];if(h!==this&&h.invalidateDrop){h.invalidateDrop()}}this.valid=true;l=this.getTopIndicator();r=this.getBottomIndicator();if(g==="before"){s="tl";b="bl"}else{s="tr";b="br"}c=q.el.getAnchorXY(s);k=q.el.getAnchorXY(b);m=this.headerCt.el;x=m.getLeft();v=m.getRight();c[0]=Ext.Number.constrain(c[0],x,v);k[0]=Ext.Number.constrain(k[0],x,v);c[0]-=4;c[1]-=9;k[0]-=4;l.setXY(c);r.setXY(k);l.show();r.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,a,d,c){if(c.header.el.dom!==b){this.positionIndicator(c.header,b,d)}return this.valid?this.dropAllowed:this.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(d,k,j,f){if(this.valid){this.invalidateDrop();var h=f.header,g=this.lastLocation,m=h.ownerCt,a=m.items.indexOf(h),i=g.header.ownerCt,n=i.items.indexOf(g.header),c=this.headerCt,l,b;if(g.pos==="after"){n++}if(m!==i&&m.lockableInjected&&i.lockableInjected&&i.lockedCt){b=m.up("[scrollerOwner]");b.lock(h,n)}else{if(m!==i&&m.lockableInjected&&i.lockableInjected&&m.lockedCt){b=m.up("[scrollerOwner]");b.unlock(h,n)}else{if((m===i)&&(n>m.items.indexOf(h))){n--}if(m!==i){m.suspendLayout=true;m.remove(h,false);m.suspendLayout=false}if(m.isGroupHeader){if(!m.items.getCount()){l=m.ownerCt;l.suspendLayout=true;l.remove(m,false);m.el.dom.parentNode.removeChild(m.el.dom);l.suspendLayout=false}else{m.minWidth=m.getWidth()-h.getWidth();m.setWidth(m.minWidth)}}i.suspendLayout=true;if(m===i){i.move(a,n)}else{i.insert(n,h)}i.suspendLayout=false;if(i.isGroupHeader){h.savedFlex=h.flex;delete h.flex;h.width=h.getWidth();i.minWidth=i.getWidth()+h.getWidth()-(h.savedFlex?1:0);i.setWidth(i.minWidth)}else{if(h.savedFlex){h.flex=h.savedFlex;delete h.width}}c.purgeCache();c.doLayout();c.onHeaderMoved(h,a,n);if(!m.items.getCount()){m.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on("render",this.onHeaderCtRender,this)},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){this.dragZone=Ext.create("Ext.grid.header.DragZone",this.headerCt);this.dropZone=Ext.create("Ext.grid.header.DropZone",this.headerCt);if(this.disabled){this.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});