e?1:(fc){e.showVerticalScroller()}else{e.hideVerticalScroller()}if(!e.collapsed&&a>(f+Ext.getScrollBarWidth()-2)){e.showHorizontalScroller()}else{e.hideHorizontalScroller()}e.suspendLayout=false;if(e.scrollbarChanged){e.doComponentLayout()}}},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.scrollbarChanged=true;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.scrollbarChanged=true;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.scrollbarChanged=true;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.scrollbarChanged=true;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(l){var m=this,p=l.browserEvent,i=m.getVerticalScroller(),n=m.getHorizontalScroller(),b=m.scrollDelta,f,g,k,o,a,q,c,h,j,d;if(n){o=n.el;if(o){q=o.dom;h=q.scrollLeft!==q.scrollWidth-q.clientWidth;c=q.scrollLeft!==0}}if(i){k=i.el;if(k){a=k.dom;j=a.scrollTop!==a.scrollHeight-a.clientHeight;d=a.scrollTop!==0}}if(p.wheelDeltaX||p.wheelDeltaY){g=-p.wheelDeltaX/120*b/3;f=-p.wheelDeltaY/120*b/3}else{if(p.axis&&p.axis===1){g=-(b*l.getWheelDelta())/3}else{f=-(b*l.getWheelDelta()/3)}}if(n){if((g<0&&c)||(g>0&&h)){l.stopEvent();n.scrollByDeltaX(g)}}if(i){if((f<0&&d)||(f>0&&j)){l.stopEvent();i.scrollByDeltaY(f)}}},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 ','","",' id="{baseBodyCls}-{inputId}" role="presentation">{subTplMarkup}','','',{compiled:true,disableFormats:true}],activeErrorsTpl:['',' ',""],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,setOuterWidth:false,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.setOuterWidth?c.width:d),c.height)}else{f.setTargetSize((!g||c.setOuterWidth?c.width:d),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)}f.setOuterWidth=true},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 e=this,d=e.store.getRange(),c=0,a=d.length,f=e.getSelection().length;e.bulkChange=true;for(;c1){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(),h)}for(;c
>{.} - class="last"
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){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var g=this,b=[],f=g.getSelection(),a=f.length,e,h,d=0,c=this.getLastFocused();for(;d0){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("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:Ext.String.htmlEncode(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'," ","",' "],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:['name="{name}" ','size="{size}" ','tabIndex="{tabIdx}" ','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.lengthf.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,"
");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:['",{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.hidden=false;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","Ext.util.DelayedTask"],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.checkValidityTask=Ext.create("Ext.util.DelayedTask",c.checkValidity,c);c.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,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.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a){a=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('',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-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 {1}=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(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.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,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(g){var h=this,j=g.getTarget(h.getItemSelector(),h.getTargetEl()),a=this.statics().EventMap,f,c,i=g.type,d=h.mouseOverItem,b;if(!j){if(i=="mouseover"&&h.stillOverItem(g,d)){j=d}if(i=="keydown"){c=h.getSelectionModel().getLastSelected();if(c){j=h.getNode(c)}}}if(j){f=h.indexOf(j);if(!c){c=h.getRecord(j)}if(h.processItemEvent(c,j,f,g)===false){return false}b=h.isNewItemEvent(j,g);if(b===false){return false}if((h["onBeforeItem"+a[b]](c,j,f,g)===false)||(h.fireEvent("beforeitem"+b,h,c,j,f,g)===false)||(h["onItem"+a[b]](c,j,f,g)===false)){return false}h.fireEvent("item"+b,h,c,j,f,g)}else{if((h.processContainerEvent(g)===false)||(h["onBeforeContainer"+a[i]](g)===false)||(h.fireEvent("beforecontainer"+i,h,g)===false)||(h["onContainer"+a[i]](g)===false)){return false}h.fireEvent("container"+i,h,g)}return true},isNewItemEvent:function(d,f){var c=this,a=c.mouseOverItem,b=f.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(f,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,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(){var a=this;a.scrollState={};a.selModel.view=a;a.headerCt.view=a;a.initFeatures();a.tpl="";a.callParent();a.mon(a.store,{load:a.onStoreLoad,scope:a})},onStoreLoad:function(){var a=this;if(a.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!a.scrollToTopTask){a.scrollToTopTask=Ext.create("Ext.util.DelayedTask",a.scrollToTop,a)}a.scrollToTopTask.delay(1)}else{a.scrollToTop()}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=Ext.create("Ext.util.MixedCollection");for(;bd.bottom){g=h.bottom-d.bottom}}e=f.getRecord(i);b=f.store.indexOf(e);if(g){a.scrollByDeltaY(g)}f.fireEvent("rowfocus",e,i,b)}},focusCell:function(g){var i=this,j=i.getCellByPosition(g),b=i.el,d=0,e=0,c=b.getRegion(),a=i.ownerCt,h,f;if(j){h=j.getRegion();if(h.top c.bottom){d=h.bottom-c.bottom}}if(h.left c.right){e=h.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();i.fireEvent("cellfocus",f,j,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();b.callParent(arguments);if(b.rendered&&!c){}},processItemEvent:function(b,l,i,d){var g=this,j=d.getTarget(g.cellSelector,l),h=j?j.cellIndex:-1,a=g.statics().EventMap,c=g.getSelectionModel(),f=d.type,k;if(f=="keydown"&&!j&&c.getCurrentPosition){j=g.getCellByPosition(c.getCurrentPosition());if(j){j=j.dom;h=j.cellIndex}}k=g.fireEvent("uievent",f,g,j,i,h,d);if(k===false||g.callParent(arguments)===false){return false}if(f=="mouseover"||f=="mouseout"){return true}return !((g["onBeforeCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("beforecell"+f,g,j,h,b,l,i,d)===false)||(g["onCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("cell"+f,g,j,h,b,l,i,d)===false))},processSpecialEvent:function(j){var m=this,b=m.statics().EventMap,d=m.features,l=d.length,n=j.type,f,o,g,h,c,k,a=m.ownerCt;m.callParent(arguments);if(n=="mouseover"||n=="mouseout"){return}for(f=0;f e){e=b}}return e},getPositionByEvent:function(f){var d=this,b=f.getTarget(d.cellSelector),c=f.getTarget(d.itemSelector),a=d.getRecord(c),g=d.getHeaderByCell(b);return d.getPosition(a,g)},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(k,l,g,m,a,n){var i=this,o=k.row,d=k.column,j=i.store.getCount(),f=i.getFirstVisibleColumnIndex(),b=i.getLastVisibleColumnIndex(),h={row:o,column:d},c=i.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}g=g||{};l=l.toLowerCase();switch(l){case"right":if(d===b){if(m||o===j-1){return false}if(!g.ctrlKey){h.row=o+1;h.column=f}}else{if(!g.ctrlKey){h.column=d+i.getRightGap(c)}else{h.column=b}}break;case"left":if(d===f){if(m||o===0){return false}if(!g.ctrlKey){h.row=o-1;h.column=b}}else{if(!g.ctrlKey){h.column=d+i.getLeftGap(c)}else{h.column=f}}break;case"up":if(o===0){return false}else{if(!g.ctrlKey){h.row=o-1}else{h.row=0}}break;case"down":if(o===j-1){return false}else{if(!g.ctrlKey){h.row=o+1}else{h.row=j-1}}break}if(a&&a.call(n||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){this.el.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)},onUpdate:function(d,a,b){var c=d.indexOf(a);this.callParent(arguments);this.doStripeRows(c,c)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),f=d.length,c=0,e;for(;c 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 '],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 e=this,d=e.query(">gridcolumn:not([hidden])"),c,b,a;e.callParent(arguments);if(d.length){b=d[0].el;if(b!==e.pastFirstHeaderEl){if(e.pastFirstHeaderEl){e.pastFirstHeaderEl.removeCls(e.firstHeaderCls)}b.addCls(e.firstHeaderCls);e.pastFirstHeaderEl=b}a=d[d.length-1].el;if(a!==e.pastLastHeaderEl){if(e.pastLastHeaderEl){e.pastLastHeaderEl.removeCls(e.lastHeaderCls)}a.addCls(e.lastHeaderCls);e.pastLastHeaderEl=a}}}},onHeaderShow:function(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 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;bgridcolumn[hideable]"),g=a.length,d;for(;b ',""," ",' ","{[this.openRows()]}","{row}",'',' ","'," ',"{[this.embedFeature(values, parent, xindex, xcount)]}"," ","{[this.closeRows()]}","","","{[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''},closeRows:function(){return" "},metaRowTpl:['',' "],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',' ","'," {{id}}l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g] {text} ',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:not([hidden])");if(!c.length){f.ownerCt.hide()}else{for(d=0,a=c.length;d*");for(c=0,a=b.length;c:not([hidden])");for(c=0,a=b.length;cm.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()}}}); +Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.listeners){b.on(b.listeners);delete b.listeners}b.events=b.events||{};if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(h,d,f,e,c){var g=this,a=g.managedListeners=g.managedListeners||[],b;if(typeof d!=="string"){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(h,c,f,j){var e=this,k,b,g,a,d;if(typeof c!=="string"){k=c;for(c in k){if(k.hasOwnProperty(c)){b=k[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(h,c,b.fn||b,b.scope||k.scope)}}}}g=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=g.length;d0},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue;a.eventsSuspended=false;delete a.eventQueue;if(b){Ext.each(b,function(c){a.continueFireEvent.apply(a,c)})}},relayEvents:function(c,e,h){h=h||"";var g=this,a=e.length,d=0,f,b;for(;da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){return b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.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,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.addEvents("beforerequest","requestcomplete","requestexception");this.requests={};this.mixins.observable.constructor.call(this)},request:function(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()}if((j.cors===true||f.cors===true)&&Ext.isIe&&Ext.ieVersion>=8){h=new XDomainRequest()}else{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)}if(j.withCredentials===true||f.withCredentials===true){h.withCredentials=true}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;f.latestId=d.id;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[h.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.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=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){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,f=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}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 u){return u}while(vq){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.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.DomHelper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;c ',cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:document.body});this.el=this.proxy.el;this.el.show();this.el.setVisibilityMode(Ext.Element.VISIBILITY);this.el.hide();this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className=Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.proxy.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.proxy.show();this.proxy.toFront()},sync:function(){this.proxy.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.animate({duration:this.repairDuration||500,easing:"ease-out",to:{x:b[0],y:b[1]},stopAnimation:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.proxy,this.el)}});Ext.define("Ext.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=0;--c){b=this.zIndexStack[c];if(!b.hidden){if(!d){this._setActiveChild(b);d=true}if(b.modal){this._showModalMask(b);return}}}this._hideModalMask();if(!d){this._setActiveChild(null)}},_showModalMask:function(a){var d=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():Ext.get(a.getEl().dom.parentNode),c;if(!b){return}c=b.getBox();if(!this.mask){this.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});this.mask.setVisibilityMode(Ext.Element.DISPLAY);this.mask.on("click",this._onMaskClick,this)}if(b.dom===document.body){c.height=Ext.Element.getViewHeight()}b.addCls(Ext.baseCSSPrefix+"body-masked");this.mask.setBox(c);this.mask.setStyle("zIndex",d);this.mask.show()},_hideModalMask:function(){if(this.mask&&this.mask.dom.parentNode){Ext.get(this.mask.dom.parentNode).removeCls(Ext.baseCSSPrefix+"body-masked");this.mask.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){if(this.mask&&this.mask.isVisible()){this.mask.setSize(Ext.get(this.mask.dom.parentNode).getViewSize(true))}},register:function(a){if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=this;this.list[a.id]=a;this.zIndexStack.push(a);a.on("hide",this._activateLast,this)},unregister:function(a){delete a.zIndexManager;if(this.list&&this.list[a.id]){delete this.list[a.id];a.un("hide",this._activateLast);Ext.Array.remove(this.zIndexStack,a);this._activateLast(a)}},get:function(a){return typeof a=="object"?a:this.list[a]},bringToFront:function(a){a=this.get(a);if(a!==this.front){Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.push(a);this.assignZIndices();return true}if(a.modal){this._showModalMask(a)}return false},sendToBack:function(a){a=this.get(a);Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.unshift(a);this.assignZIndices();return a},hideAll:function(){for(var a in this.list){if(this.list[a].isComponent&&this.list[a].isVisible()){this.list[a].hide()}}},hide:function(){var b=0,c=this.zIndexStack.length,a;this.tempHidden=[];for(;b 0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){this.each(function(a){a.destroy()});delete this.zIndexStack;delete this.list;delete this.container;delete this.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.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?|\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(;r1){for(q=0,r=s.length;q1){r=q.length;for(p=0;p =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(!b||typeof b==="string"){a=b||c;b={}}else{a=b.type||c}return Ext.createByAlias("layout."+a,b||{})}}},constructor:function(a){this.id=Ext.id(null,this.type+"-");Ext.apply(this,a)},layout:function(){var a=this;a.layoutBusy=true;a.initLayout();if(a.beforeLayout.apply(a,arguments)!==false){a.layoutCancelled=false;a.onLayout.apply(a,arguments);a.childrenChanged=false;a.owner.needsLayout=false;a.layoutBusy=false;a.afterLayout.apply(a,arguments)}else{a.layoutCancelled=true}a.layoutBusy=false;a.doOwnerCtLayouts()},beforeLayout:function(){this.renderChildren();return true},renderChildren:function(){this.renderItems(this.getLayoutItems(),this.getRenderTarget())},renderItems:function(a,f){var e=this,d=a.length,b=0,c;for(;b 1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,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 =0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(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--){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 ",""],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},blur:function(){this.$focused=false;this.callParent(arguments)},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){clearTimeout(b.hideMenuTimer);if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},focus:function(){this.$focused=true;this.callParent(arguments)},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"];b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){b.menu=Ext.menu.Manager.get(b.menu)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);clearTimeout(a.hideMenuTimer);clearTimeout(a.deferHideParentMenusTimer);if(a.menu){delete a.menu.parentItem;delete a.menu.parentMenu;delete a.menu.ownerCt;if(a.destroyMenu!==false){a.menu.destroy()}}a.callParent(arguments)},onRender:function(a,d){var b=this,c=Ext.BLANK_IMAGE_URL;Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||c,iconCls:b.iconCls+(b.checkChangeDisabled?" "+b.disabledCls:""),menu:Ext.isDefined(b.menu),plain:b.plain,text:b.text,blank:c});b.addChildEls("itemEl","iconEl","textEl","arrowEl");b.callParent(arguments)},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIconCls:function(a){var b=this;if(b.iconEl){if(b.iconCls){b.iconEl.removeCls(b.iconCls)}if(a){b.iconEl.addCls(a)}}b.iconCls=a},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.redoComponentLayout()}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(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;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 c=this,b;c.addEvents("add","remove","update","datachanged","beforeload","load","write","beforesync","clear");Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=Ext.create("Ext.util.MixedCollection");c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=Ext.create("Ext.data.Operation",c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},onProxyRead:Ext.emptyFn,update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var f=this,b=c.operations,e=b.length,d;f.suspendEvents();for(d=0;de?1:(f =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(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(g,a,c,b,f,h){var e=this,d,i;if(g===true){d=e.getReader();i=d.read(e.extractResponseData(b));if(i.success!==false){Ext.apply(a,{response:b,resultSet:i});a.commitRecords(i.records);a.setCompleted();a.setSuccessful()}else{a.setException(i.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof f=="function"){f.call(h||e,a)}e.afterRequest(c,g)},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 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.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.data.proxy.Ajax","Ext.util.MixedCollection"],onClassExtended:function(a,b){var c=b.onBeforeClassCreated;b.onBeforeClassCreated=function(d,x){var w=this,y=Ext.getClassName(d),l=d.prototype,q=d.prototype.superclass,e=x.validations||[],n=x.fields||[],s=x.associations||[],r=x.belongsTo,m=x.hasMany,o=x.idgen,u=new Ext.util.MixedCollection(false,function(i){return i.name}),t=new Ext.util.MixedCollection(false,function(i){return i.name}),k=q.validations,v=q.fields,g=q.associations,f,p,h,j=[];d.modelName=y;l.modelName=y;if(k){e=k.concat(e)}x.validations=e;if(v){n=v.items.concat(n)}for(p=0,h=n.length;p 0){h=g.data.items;s=h.length;for(l=0;l ]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,nameRe:/^]*?for="(.*?)"/,ifRe:/^ ]*?if="(.*?)"/,execRe:/^ ',']*?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=[" ",'",h," "].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=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 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.Element.DISPLAY);c.focusFrameWidth=2;c.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(d){var b=this,a=b.focusedCmp,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()}else{a.focus()}return true},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).setLeftTop(c,q);d.setWidth(m).setLeftTop(c,q+g-f);o.setHeight(g-f-f).setLeftTop(c,q+f);j.setHeight(g-f-f).setLeftTop(c+m-f,q+f);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"),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 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 2){c.push([e].concat(Ext.Array.splice(h,0,2)));g="l";e=(e=="m")?"l":"L"}while(h.length>=d[g]){c.push([e].concat(Ext.Array.splice(h,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 7){g[b].shift();e=g[b];while(e.length){Ext.Array.splice(g,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(g,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){Ext.Array.splice(p,r++,0,["C"].concat(Ext.Array.splice(s,0,6)))}Ext.Array.erase(p,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"){Ext.Array.splice(t,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 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 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 (a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(m,l,f,d){var c=[],b=f[0]-d[0],a=f[1]-d[1],j=m[0]-l[0],h=m[1]-l[1],k=f[0]*d[1]-f[1]*d[0],i=m[0]*l[1]-m[1]*l[0],g=1/(b*h-a*j);c[0]=(k*j-i*b)*g;c[1]=(k*h-i*a)*g;return c},intersect:function(n,c){var m=this,h=0,l=c.length,g=c[l-1],p=n,f,q,k,o,a,b,d;for(;h 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(e,d,j,i,u,t,p){p=p||4;var h=Math,o=h.PI,q=o/2,l=h.abs,a=h.sin,b=h.cos,f=h.atan,s,r,g,k,n,m,w,v,c;s=(j-e)/p;r=(u-j)/p;if((i>=d&&i>=t)||(i<=d&&i<=t)){g=k=q}else{g=f((j-e)/l(i-d));if(dq){c-=o}g+=c;k+=c;n=j-s*a(g);m=i+s*b(g);w=j+r*a(k);v=i+r*b(k);if((i>d&&m d)){n+=l(d-m)*(n-j)/(m-i);m=d}if((i>t&&v t)){w-=l(t-v)*(w-j)/(v-i);v=t}return{x1:n,y1:m,x2:w,y2:v}},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 =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:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(i,c,a,f,h){a=(typeof a=="number")?a:1;var g=this.unitRE,d=g.exec(i),b,e;if(d){i=d[1];e=d[2];if(!this.scrollRE.test(h)&&!e&&this.pixelDefaultsRE.test(h)){e="px"}}i=+i||0;d=g.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(f!=null)?f:i;return{from:i,delta:(c-b)*a,units:e}},get:function(n,b,a,m,h){var l=n.length,d=[],e,g,k,c,f;for(e=0;e =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(bh){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.right)},isOutOfBoundY:function(a){return(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;cthis.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 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){if(a){b.doComponentLayout(a.width,a.height)}else{b.doComponentLayout()}},getLayoutTargetSize:function(){var b=this.getTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},beforeLayout:function(){if(this.owner.beforeLayout(arguments)!==false){return this.callParent(arguments)}else{return false}},getRenderedItems:function(){var e=this,g=e.getTarget(),a=e.getLayoutItems(),d=a.length,f=[],b,c;for(b=0;b =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 a,fullyVisible:b>h&&g=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=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.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.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=Ext.Element.getViewHeight();var b=Ext.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 0&&j-o b&&f 0&&k-d this.maxX){a=this.maxX}}if(this.constrainY){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.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=Ext.create("Ext.state.Provider")},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=[c]}var d=this,b=0,a=c.length;for(;b0){if(!b.stateTask){b.stateTask=Ext.create("Ext.util.DelayedTask",b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent("beforestatesave",a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent("statesave",a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent("beforestaterestore",a,b)!==false){a.applyState(b);a.fireEvent("staterestore",a,b)}}}}},savePropToState:function(f,e,d){var b=this,c=b[f],a=b.initialConfig;if(b.hasOwnProperty(f)){if(!a||a[f]!==c){if(e){e[d||f]=c}return true}}return false},savePropsToState:function(c,b){var a=this;Ext.each(c,function(d){a.savePropToState(d,b)});return b},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.ComponentManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},renderTpl:null,tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,needsLayout:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,weight:0,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,maskOnDisable:true,constructor:function(b){var d=this,c,a;b=b||{};d.initialConfig=b;Ext.apply(d,b);d.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","resize","move");d.getId();d.mons=[];d.additionalCls=[];d.renderData=d.renderData||{};d.renderSelectors=d.renderSelectors||{};if(d.plugins){d.plugins=[].concat(d.plugins);d.constructPlugins()}d.initComponent();Ext.ComponentManager.register(d);d.mixins.observable.constructor.call(d);d.mixins.state.constructor.call(d,b);this.addStateEvents("resize");if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;cd){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},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c',' '," {parent.baseCls}-{parent.ui}-{.}-tl " style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation">','',' {parent.baseCls}-{parent.ui}-{.}-tr " style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation">','','{parent.baseCls}-{parent.ui}-{.}-tc " style="background-position: {tc}; height: {frameWidth}px" role="presentation">',' {parent.baseCls}-{parent.ui}-{.}-ml " style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation">','',' {parent.baseCls}-{parent.ui}-{.}-mr " style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation">','','{parent.baseCls}-{parent.ui}-{.}-mc " role="presentation">',' "],frameTableTpl:["'," {parent.baseCls}-{parent.ui}-{.}-bl " style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation">','',' {parent.baseCls}-{parent.ui}-{.}-br " style="background-position: {br}; padding-right: {frameWidth}px" role="presentation">','','{parent.baseCls}-{parent.ui}-{.}-bc " style="background-position: {bc}; height: {frameWidth}px" role="presentation">",'
"],initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,d=e.getFrameInfo(),b=d.width,a=e.getFrameTpl(d.table),c;if(e.frame){e.frameGenId=c=(e.frameGenId||0)+1;c=e.id+"-frame"+c;a.insertFirst(e.el,Ext.apply({},{fgid:c,ui:e.ui,uiCls:e.uiCls,frameCls:e.frameCls,baseCls:e.baseCls,frameWidth:b,top:!!d.top,left:!!d.left,right:!!d.right,bottom:!!d.bottom},e.getFramePositions(d)));e.frameBody=e.el.down("."+e.frameCls+"-mc");e.removeChildEls(function(f){return f.id&&e.frameIdRegex.test(f.id)});Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(f){e.childEls.push({name:"frame"+f,id:c+f})})}},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(f){var e=this,b=Ext.Array.clone(e.uiCls),g=[],d=[],a,c;for(c=0;c'," ","",' ","',' {parent.baseCls}-{parent.ui}-{.}-tl " style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation">',' {parent.baseCls}-{parent.ui}-{.}-tc " style="background-position: {tc}; height: {frameWidth}px" role="presentation">'," {parent.baseCls}-{parent.ui}-{.}-tr " style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation">",' ",'',' {parent.baseCls}-{parent.ui}-{.}-ml " style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation">',' {parent.baseCls}-{parent.ui}-{.}-mc " style="background-position: 0 0;" role="presentation">'," {parent.baseCls}-{parent.ui}-{.}-mr " style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation">'," ","",' ","',' {parent.baseCls}-{parent.ui}-{.}-bl " style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation">',' {parent.baseCls}-{parent.ui}-{.}-bc " style="background-position: {bc}; height: {frameWidth}px" role="presentation">'," {parent.baseCls}-{parent.ui}-{.}-br " style="background-position: {br}; padding-left: {frameWidth}px" role="presentation">=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;e1;if(a||Ext.isArray(f[0])){g=a?f:f[0];h.suspendLayout=true;for(c=0,e=g.length;c "+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 {bodyCls} ',' "','{parent.baseCls}-body-{parent.ui}-{.} ','style="{bodyStyle}" >'],initComponent:function(){var c=this,f,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);c.addChildEls("body");if(!Ext.isEmpty(c.iconCls)){c.initIconCmp();c.items.push(c.iconCmp)}if(c.orientation=="vertical"){if(Ext.isIE6||Ext.isIE7){c.width=this.width||24}else{if(Ext.isIEQuirks){c.width=this.width||25}}c.layout={type:"vbox",align:"center",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.textConfig={cls:c.baseCls+"-text",type:"text",text:c.title,rotate:{degrees:90}};d=c.ui;if(Ext.isArray(d)){d=d[0]}f="."+c.baseCls+"-text-"+d;if(Ext.scopeResetCSS){f="."+Ext.baseCSSPrefix+"reset "+f}e=Ext.util.CSS.getRule(f);if(e){b=e.style}if(b){Ext.apply(c.textConfig,{"font-family":b.fontFamily,"font-weight":b.fontWeight,"font-size":b.fontSize,fill:b.color})}c.titleCmp=Ext.create("Ext.draw.Component",{ariaRole:"heading",focusable:false,viewBox:false,flex:1,autoSize:true,margins:"5 0 0 0",items:[c.textConfig],renderSelectors:{textEl:"."+c.baseCls+"-text"}})}else{c.layout={type:"hbox",align:"middle",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.titleCmp=Ext.create("Ext.Component",{xtype:"component",ariaRole:"heading",focusable:false,flex:1,cls:c.baseCls+"-text-container",renderTpl:['{title}'],renderData:{title:c.title,cls:c.baseCls,ui:c.ui},childEls:["textEl"]})}c.items.push(c.titleCmp);c.items=c.items.concat(c.tools);this.callParent()},initIconCmp:function(){this.iconCmp=Ext.create("Ext.Component",{focusable:false,renderTpl:[''],renderData:{blank:Ext.BLANK_IMAGE_URL,cls:this.baseCls,iconCls:this.iconCls,orientation:this.orientation},childEls:["iconEl"],iconCls:this.iconCls})},afterRender:function(){var a=this;a.el.unselectable();if(a.indicateDrag){a.el.addCls(a.indicateDragCls)}a.mon(a.el,{click:a.onClick,scope:a});a.callParent()},afterLayout:function(){var a=this;a.callParent(arguments);if(Ext.isIE7){a.el.repaint()}},addUIClsToElement:function(b,f){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(!f&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;c0){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(f){var b=this,d=b.active,a=b.lastShow,c=f.target;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!f.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll();if(Ext.isIE&&Ext.fly(c).focusable()){c.focus()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return Ext.create("Ext.menu.Menu",{items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,f){var a=this.groups,c=d.group,b=0,h,e,g;if(c&&f){h=a[c];e=h.length;for(;b /,beforeLayout:function(){return this.callParent(arguments)||this.lastText!==this.owner.text},onLayout:function(c,n){var k=this,g=Ext.isNumber,d=k.owner,m=d.el,h=d.btnEl,e=d.btnInnerEl,f=d.btnIconEl,i=(d.icon||d.iconCls)&&(d.iconAlign=="top"||d.iconAlign=="bottom"),b=d.minWidth,l=d.maxWidth,a,o,j;k.getTargetInfo();k.callParent(arguments);e.unclip();k.setTargetSize(c,n);if(!g(c)){if(d.text&&(Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&h&&h.getWidth()>20){o=k.btnFrameWidth;j=Ext.util.TextMetrics.measure(e,d.text);m.setWidth(j.width+o+k.adjWidth);h.setWidth(j.width+o);e.setWidth(j.width+o);if(i){f.setWidth(j.width+o)}}else{m.setWidth(null);h.setWidth(null);e.setWidth(null);f.setWidth(null)}if(b||l){a=m.getWidth();if(b&&(al)){e.clip();k.setTargetSize(l,n)}}}}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(f>=0){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?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",ariaRole:"button",renderTpl:' tabIndex="{tabIndex}" role="link">{text}role="button" autocomplete="off">{text} ',scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerCt=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},initAria:function(){this.callParent();var a=this.getActionEl();if(this.menu){a.dom.setAttribute("aria-haspopup",true)}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.btnEl},setButtonCls:function(){var d=this,b=[],a=d.btnIconEl,c="x-hide-display";if(d.useSetClass){if(!Ext.isEmpty(d.oldCls)){d.removeClsWithUI(d.oldCls);d.removeClsWithUI(d.pressedCls)}if(d.iconCls||d.icon){if(d.text){b.push("icon-text-"+d.iconAlign)}else{b.push("icon")}if(a){a.removeCls(c)}}else{if(d.text){b.push("noicon")}if(a){a.addCls(c)}}d.oldCls=b;d.addClsWithUI(b);d.addClsWithUI(d.pressed?d.pressedCls:null)}},onRender:function(d,a){var e=this,c,b;Ext.applyIf(e.renderData,e.getTemplateArgs());e.addChildEls("btnEl","btnWrap","btnInnerEl","btnIconEl");if(e.scale){e.ui=e.ui+"-"+e.scale}e.callParent(arguments);if(e.split&&e.arrowTooltip){e.arrowEl.dom.setAttribute(e.getTipAttr(),e.arrowTooltip)}e.mon(e.btnEl,{scope:e,focus:e.onFocus,blur:e.onBlur});b=e.el;if(e.icon){e.setIcon(e.icon)}if(e.iconCls){e.setIconCls(e.iconCls)}if(e.tooltip){e.setTooltip(e.tooltip,true)}if(e.textAlign){e.setTextAlign(e.textAlign)}if(e.handleMouseEvents){e.mon(b,{scope:e,mouseover:e.onMouseOver,mouseout:e.onMouseOut,mousedown:e.onMouseDown});if(e.split){e.mon(b,{mousemove:e.onMouseMove,scope:e})}}if(e.menu){e.mon(e.menu,{scope:e,show:e.onMenuShow,hide:e.onMenuHide});e.keyMap=Ext.create("Ext.util.KeyMap",e.el,{key:Ext.EventObject.DOWN,handler:e.onDownKey,scope:e})}if(e.repeat){c=Ext.create("Ext.util.ClickRepeater",b,Ext.isObject(e.repeat)?e.repeat:{});e.mon(c,"click",e.onRepeatClick,e)}else{e.mon(b,e.clickEvent,e.onClick,e)}Ext.ButtonToggleManager.register(e)},getTemplateArgs:function(){var c=this,b=c.getPersistentBtnPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),target:c.target||"_blank",type:c.type,splitCls:c.getSplitCls(),cls:c.cls,iconCls:c.iconCls||"",text:c.text||" ",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},afterRender:function(){var a=this;a.useSetClass=true;a.setButtonCls();a.doc=Ext.getDoc();this.callParent(arguments)},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setButtonCls()}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.el){a.btnInnerEl.update(b||" ");a.setButtonCls()}a.doComponentLayout();return a},setIcon:function(b){var c=this,a=c.btnIconEl;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setButtonCls()}return c},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.btnEl.dom.setAttribute("aria-pressed",c);b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;b.fireEvent("click",b,c);if(a){a.call(b.scope||b,b,c)}b.onBlur()},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(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");b.removeClsWithUI(b.overCls);return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onFocus:function(b){var a=this;if(!a.disabled){a.addClsWithUI(a.focusCls)}},onBlur:function(b){var a=this;a.removeClsWithUI(a.focusCls)},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentBtnPadding:function(){var a=Ext.button.Button,e=a.persistentPadding,c,b,d,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={};function b(e,h){var f,d,c;if(h){f=a[e.toggleGroup];for(d=0,c=f.length;d (None)',constructor:function(b){var a=this;a.callParent(arguments);b.beforeLayout=Ext.Function.createInterceptor(b.beforeLayout,this.clearOverflow,this);a.afterCtCls=a.afterCtCls||Ext.baseCSSPrefix+"box-menu-"+b.parallelAfter;a.menuItems=[]},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},handleOverflow:function(a,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 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,availableSpaceOffset:0,reserveOffset:true,shrinkToFit: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(b){b=b.el||this.owner.getComponent(b).el;var a=b.getBox(false,true);return{left:a.left,top:a.top,width:a.width,height:a.height}},calculateChildBox:function(e){var d=this,b=d.calculateChildBoxes(d.getVisibleItems(),d.getLayoutTargetSize()).boxes,c=b.length,a=0;e=d.owner.getComponent(e);for(;a c}e=l(0,c-d-u-(x.reserveOffset?x.availableSpaceOffset:0));if(m){for(af=0;af 0){for(af=0;af 0)}else{a=e;q=ai;T=[];for(af=0;af 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:al,minimumSize:w,shortfall:X,tooNarrow:m}}},onRemove:function(a){this.callParent(arguments);if(this.overflowHandler){this.overflowHandler.onRemove(a)}},initOverflowHandler:function(){var c=this.overflowHandler;if(typeof c=="string"){c={type:c}}var b="None";if(c&&c.type!==undefined){b=c.type}var a=Ext.layout.container.boxOverflow[b];if(a[this.type]){a=a[this.type]}this.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,this,c)},onLayout:function(){this.callParent();if(this.clearInnerCtOnLayout===true&&this.adjustmentPass!==true){this.innerCt.setSize(null,null)}var 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();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)},animCallback:Ext.emptyFn,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 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");e.height=e.top+e.bottom;e.width=e.left+e.right;b.marginTop=b.marginRight=b.marginBottom=b.marginLeft="0";d.margins=e},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",alignCenteringString:"middle",type:"hbox",direction:"horizontal",parallelSizeIndex:0,perpendicularSizeIndex:1,parallelPrefix:"width",parallelPrefixCap:"Width",parallelLT:"l",parallelRB:"r",parallelBefore:"left",parallelBeforeCap:"Left",parallelAfter:"right",parallelPosition:"x",perpendicularPrefix:"height",perpendicularPrefixCap:"Height",perpendicularLT:"t",perpendicularRB:"b",perpendicularLeftTop:"top",perpendicularRightBottom:"bottom",perpendicularPosition:"y",configureItem:function(a){if(a.flex){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",alignCenteringString:"center",type:"vbox",direction:"vertical",parallelSizeIndex:1,perpendicularSizeIndex:0,parallelPrefix:"height",parallelPrefixCap:"Height",parallelLT:"t",parallelRB:"b",parallelBefore:"top",parallelBeforeCap:"Top",parallelAfter:"bottom",parallelPosition:"y",perpendicularPrefix:"width",perpendicularPrefixCap:"Width",perpendicularLT:"l",perpendicularRB:"r",perpendicularLeftTop:"left",perpendicularRightBottom:"right",perpendicularPosition:"x",configureItem:function(a){if(a.flex){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}this.callParent(arguments)}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox","Ext.FocusManager"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle",clearInnerCtOnLayout:true});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange");a=b.vertical?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a})},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(b){if(Ext.isString(b)){var a=Ext.toolbar.Toolbar.shortcuts[b];if(a){b={xtype:a}}else{b={xtype:"tbtext",text:b}}this.applyDefaults(b)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:this.createComponent(a,a.split?"splitbutton":this.defaultType)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a);if(this.disabled){a.disable()}},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}},function(){this.shortcuts={"-":"tbseparator"," ":"tbspacer","->":"tbfill"}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",defaultDockWeights:{top:1,left:3,right:5,bottom:7},renderTpl:[' {bodyCls}',' {baseCls}-body-{ui}"],border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");a.addChildEls("body");if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},initItems:function(){var b=this,a=b.dockedItems;b.callParent();b.dockedItems=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){b.addDocked(a)}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},initBodyStyles:function(){var d=this,a=d.bodyStyle,c=[],b=Ext.Element,e;if(Ext.isFunction(a)){a=a()}if(Ext.isString(a)){c=a.split(";")}else{for(e in a){if(a.hasOwnProperty(e)){c.push(e+":"+a[e])}}}if(d.bodyPadding!==undefined){c.push("padding: "+b.unitizeBox((d.bodyPadding===true)?5:d.bodyPadding))}if(d.frame&&d.bodyBorder){if(!Ext.isNumber(d.bodyBorder)){d.bodyBorder=1}c.push("border-width: "+b.unitizeBox(d.bodyBorder))}delete d.bodyStyle;return c.length?c.join(";"):undefined},initBodyCls:function(){var b=this,a="",c=b.bodyCls;if(c){Ext.each(c,function(d){a+=" "+d});delete b.bodyCls}return a.length>0?a:undefined},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyStyle:this.initBodyStyles(),bodyCls:this.initBodyCls()})},addDocked:function(a,f){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b',' "{parent.baseCls}-body-{parent.ui}-{.} ','style="{bodyStyle}" >',"a){if(i.anchorToTarget){i.defaultAlign="r-l";if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor="right";return i.getTargetXY()}if(b[1] 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) 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.Element",constructor:function(b,a){b=b||{};var c=this,d=Ext.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.Element[g.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}c.position("absolute");if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=Ext.create("Ext.Shadow",{offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var i=this,m=i.shadow,g,e,a;if(!i.updating&&i.isVisible()&&(m||i.useShim)){var d=i.getShim(),c=i.getLeft(true),n=i.getTop(true),k=i.dom.offsetWidth,f=i.dom.offsetHeight,j;if(m&&!i.shadowDisabled){if(b&&!m.isVisible()){m.show(i)}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();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;g[0]-=2;g[1]-=4}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 i},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.Element.getViewWidth(),b=Ext.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 ',modal:true,floating:{shadow:"frame"},focusOnToFront:false,constructor:function(b,a){var c=this;if(b.isComponent){c.ownerCt=b;c.bindComponent(b)}else{c.ownerCt=new Ext.Component({el:Ext.get(b),rendered:true,componentLayoutCounter:1});c.container=b}c.callParent([a]);if(c.store){c.bindStore(c.store,true)}c.renderData={msgCls:c.msgCls};c.renderSelectors={msgEl:"div"}},bindComponent:function(a){this.mon(a,{resize:this.onComponentResize,scope:this})},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onComponentResize:function(){var a=this;if(a.rendered&&a.isVisible()){a.toFront();a.center()}},bindStore:function(a,b){var c=this;if(!b&&c.store){c.mun(c.store,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad});if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad})}c.store=a;if(a&&a.isLoading()){c.onBeforeLoad()}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},onBeforeLoad:function(){var c=this,a=c.ownerCt||c.floatParent,b;if(!this.disabled){if(a.componentLayoutCounter){Ext.Component.prototype.show.call(c)}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);if(c.loading){Ext.Component.prototype.show.call(c)}}}}},onHide:function(){var a=this;a.callParent(arguments);a.showOnParentShow=true},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},afterShow:function(){this.callParent(arguments);this.center()},onLoad:function(){this.loading=false;Ext.Component.prototype.hide.call(this)}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(a){var 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,heightIncrement:g.heightIncrement,widthIncrement:g.widthIncrement,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 '],tooltipType:"qtip",stopEvent:true,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.addChildEls("toolEl");a.tooltip=a.tooltip||a.qtip;a.callParent()},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}b.mon(b.toolEl,{click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.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 this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,f){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return f}e.translateBy(f[0]-b[0],f[1]-b[1]);if(e.right>a.right){f[0]+=d=(a.right-e.right);e.left+=d}if(e.left a.bottom){f[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top ',"{text}","",' ','target="{hrefTarget}" hidefocus="true" unselectable="on">','',' ','',''," ","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});return 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 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.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.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(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(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:"el",scope:c}})}},afterRender:function(){var a=this,b=a.hidden,c;a.hidden=false;a.callParent();a.hidden=b;a.proxy=a.getProxy();a.mon(a.el,"mousedown",a.onMouseDown,a);a.el.set({tabIndex:-1});if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){c=a.getKeyMap();c.on(27,a.onEsc,a);c.disable()}if(!b){a.syncMonitorWindowResize();a.doConstrain()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=Ext.create("Ext.util.ComponentDragger",this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){var d=this,g=d.focusEl,e=d.defaultButton||d.defaultFocus,b=typeof db,c,a;if(Ext.isDefined(e)){if(Ext.isNumber(e)){g=d.query("button")[e]}else{if(Ext.isString(e)){g=d.down("#"+e)}else{g=e}}}return g||d.focusEl},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a=c||b.animateTarget;b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.ModelManager","Ext.data.Model","Ext.util.Grouper"],uses:["Ext.data.proxy.Memory"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",pageSize:25,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,isStore:true,onClassExtended:function(a,c){var b=c.model;if(typeof b=="string"){var d=c.onBeforeClassCreated;c.onBeforeClassCreated=function(e,g){var f=this;Ext.require(b,function(){d.call(f,e,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,f=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;if(b.buffered||d.buffered){d.prefetchData=Ext.create("Ext.util.MixedCollection",false,function(g){return g.index});d.pendingRequests=[];d.pagesRequested=[];d.sortOnLoad=false;d.filterOnLoad=false}d.addEvents("beforeprefetch","groupchange","prefetch");e=b.data||d.data;d.data=Ext.create("Ext.util.MixedCollection",false,function(g){return g.internalId});if(e){d.inlineData=e;delete b.data}if(!f&&a){f=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=Ext.create("Ext.util.MixedCollection");d.groupers.addAll(d.decodeGroupers(f));this.callParent([b]);if(d.groupers.items.length){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,e)}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(d){if(!Ext.isArray(d)){if(d===undefined){d=[]}else{d=[d]}}var c=d.length,e=Ext.util.Grouper,a,b;for(b=0;b 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-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-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 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;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 0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){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(;c1;if(a||Ext.isArray(f[0])){var g=a?f:f[0],b=[],c,e,j;for(c=0,e=g.length;c g){b=h-1}else{if(a -1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&&(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h0){if(!a.owner.isFixedWidth()){b.width=undefined}if(!a.owner.isFixedHeight()){b.height=undefined}a.setItemSize(c,b.width,b.height)}},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}},function(){this.prototype.renderItem=Ext.layout.container.Box.prototype.renderItem});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,afterRender:function(){var a=this;this.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true)},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var a=this;if(a.iconEl){a.iconEl.addCls(a.disabledCls)}a.checkChangeDisabled=true},enableCheckChange:function(){var a=this;a.iconEl.removeCls(a.disabledCls);a.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[];b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");b.layout={type:"vbox",align:"stretchmax",autoSize:true,clearInnerCtOnLayout:true,overflowHandler:"Scroller"};if(b.floating===false&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var e=!!b.items.length;if(e&&b.rendered){b.el.setStyle("visibility",null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c=" ";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.isStrict&&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 =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(b,f,e){var a=this,d,c;if(a.floating&&b){a.layout.autoSize=true;a.doAutoRender();delete a.needsLayout;b=b.el||b;d=a.el.getAlignToXY(b,f||a.defaultAlign,e);if(a.floatParent){c=a.floatParent.getTargetEl().getViewRegion();d[0]-=c.x;d[1]-=c.y}a.showAt(d)}return a},doConstrain:function(){var f=this,g=f.el.getY(),h,e,b,i=g,j,d,a,c;delete f.height;f.setSize();e=f.getHeight();if(f.floating){d=Ext.fly(f.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;j=g-a;h=f.maxHeight?f.maxHeight:c-j;if(e>c){h=c;i=g-j}else{if(h h&&h>0){f.layout.autoSize=false;f.setHeight(h);if(f.showSeparator){f.iconSepEl.setHeight(f.layout.getRenderTarget().dom.scrollHeight)}}b=f.getConstrainVector(f.el.getScopeParent());if(b){f.setPosition(f.getPosition()[0]+b[0])}f.el.setY(i)}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(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,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.getCmp(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(r,l){var s=this,c=s.activeResizeHandle.region,f=s.getOffset(s.constrainTo?"dragTarget":null),j=s.startBox,g,o=0,t=0,i,p,a=0,v=0,u,m=f[0]<0?"right":"left",q=f[1]<0?"down":"up",h,b;switch(c){case"south":t=f[1];b=2;break;case"north":t=-f[1];v=-t;b=2;break;case"east":o=f[0];b=1;break;case"west":o=-f[0];a=-o;b=1;break;case"northeast":t=-f[1];v=-t;o=f[0];h=[j.x,j.y+j.height];b=3;break;case"southeast":t=f[1];o=f[0];h=[j.x,j.y];b=3;break;case"southwest":o=-f[0];a=-o;t=f[1];h=[j.x+j.width,j.y];b=3;break;case"northwest":t=-f[1];v=-t;o=-f[0];a=-o;h=[j.x+j.width,j.y+j.height];b=3;break}var d={width:j.width+o,height:j.height+t,x:j.x+a,y:j.y+v};i=Ext.Number.snap(d.width,s.widthIncrement);p=Ext.Number.snap(d.height,s.heightIncrement);if(i!=d.width||p!=d.height){switch(c){case"northeast":d.y-=p-d.height;break;case"north":d.y-=p-d.height;break;case"southwest":d.x-=i-d.width;break;case"west":d.x-=i-d.width;break;case"northwest":d.x-=i-d.width;d.y-=p-d.height}d.width=i;d.height=p}if(d.width s.maxWidth){d.width=Ext.Number.constrain(d.width,s.minWidth,s.maxWidth);if(a){d.x=j.x+(j.width-d.width)}}else{s.lastX=d.x}if(d.height s.maxHeight){d.height=Ext.Number.constrain(d.height,s.minHeight,s.maxHeight);if(v){d.y=j.y+(j.height-d.height)}}else{s.lastY=d.y}if(s.preserveRatio||r.shiftKey){var n,k;g=s.startBox.width/s.startBox.height;n=Math.min(Math.max(s.minHeight,d.width/g),s.maxHeight);k=Math.min(Math.max(s.minWidth,d.height*g),s.maxWidth);if(b==1){d.height=n}else{if(b==2){d.width=k}else{u=Math.abs(h[0]-this.lastXY[0])/Math.abs(h[1]-this.lastXY[1]);if(u>g){d.height=n}else{d.width=k}if(c=="northeast"){d.y=j.y-(d.height-j.height)}else{if(c=="northwest"){d.y=j.y-(d.height-j.height);d.x=j.x-(d.width-j.width)}else{if(c=="southwest"){d.x=j.x-(d.width-j.width)}}}}}}if(t===0){q="none"}if(o===0){m="none"}s.resize(d,{horizontal:m,vertical:q},l)},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,b=0,c=a.length,e=[],d;for(;b '}else{if(Ext.isIE){return''}else{return' '}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define("Ext.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(sizingMethod='auto expand',FilterType=bilinear,M11="+a.get(0,0)+", M12="+a.get(0,1)+", M21="+a.get(1,0)+", M22="+a.get(1,1)+", Dx="+a.get(0,2)+", Dy="+a.get(1,2)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(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][0],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var 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.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,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(h){var g=h.getXY(),f=this,d=f.sprite,a=d.attr,c,b;g=f.sprite.surface.transformToViewBox(g[0],g[1]);c=g[0]-f.prev[0];b=g[1]-f.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);f.prev=g},setDragElPos:function(){return false}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d={h:0},e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d.w=d.h=-e;d.l=d.t=e}else{d.w=0;d.l=d.t=e;d.t-=1;if(Ext.isIE){d.l-=e+a;d.t-=e+a;d.w-=a;d.h-=a;d.t+=1}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d.h-=e;d.t=e;d.l=d.w=0}else{d.w=(e*2);d.l=-e;d.t=e-1;if(Ext.isIE){d.l-=(e-a);d.t-=e+a;d.l+=1;d.w-=(e-a)*2;d.w-=a+1;d.h-=1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d.l=d.w=d.t=0}else{d.w=d.h=(e*2);d.l=d.t=-e;d.t+=1;d.h-=2;if(Ext.isIE){d.l-=(e-a);d.t-=(e-a);d.l+=1;d.w-=(e+a+1);d.h-=(e+a);d.h+=1}break}}c.adjusts=d},offset:4,defaultMode:"drop",show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,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(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.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.createSpriteElement(a)}a.dd=Ext.create("Ext.draw.SpriteDD",a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(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;j=Ext.apply({},j);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-1)&&(o[n] in f)){o[n]=f[o[n]]}if(n in r){c.dom.setAttribute(n,r[n](o[n],q,l))}else{c.dom.setAttribute(n,o[n])}}}if(q.type=="text"){l.tuneText(q,o)}b=h.style;if(b){c.setStyle(b)}q.dirty=false;if(Ext.isSafari3){l.webkitRect.show();setTimeout(function(){l.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(d){var f=this,b=f.items,a=b.indexOf(d),e=d.el,c;if(f.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||f.bgRect)}d.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=this,d=g.stops.length,a=g.vector,k=Ext.isSafari&&!Ext.isStrict,h,f,j,c,b;b=e.gradientsMap||{};if(!k){if(g.type=="linear"){h=e.createSvgElement("linearGradient");h.setAttribute("x1",a[0]);h.setAttribute("y1",a[1]);h.setAttribute("x2",a[2]);h.setAttribute("y2",a[3])}else{h=e.createSvgElement("radialGradient");h.setAttribute("cx",g.centerX);h.setAttribute("cy",g.centerY);h.setAttribute("r",g.radius);if(Ext.isNumber(g.focalX)&&Ext.isNumber(g.focalY)){h.setAttribute("fx",g.focalX);h.setAttribute("fy",g.focalY)}}h.id=g.id;e.getDefs().appendChild(h);for(c=0;c ")}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(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}c.applyViewBox();c.callParent(arguments)}},setViewBox:function(b,d,c,a){this.callParent(arguments);this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()},applyViewBox:function(){var d=this,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&&(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h')}}catch(a){return function(c){return b.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}})(),render:function(a){var c=this,d=Ext.getDoc().dom;if(!c.el){var b=d.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=d.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=Ext.create("Ext.draw.Matrix");b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},extractTransform:function(j){var g=this,h=Ext.create("Ext.draw.Matrix"),e,c,a,d,f=0,b=g.viewBoxShift;for(c=j.transformations,a=c.length;f32767){d[0]=32767}else{if(d[0]<-32768){d[0]=-32768}}if(d[1]>32767){d[1]=32767}else{if(d[1]<-32768){d[1]=-32768}}p.offset=d}else{if(p){p.matrix="1 0 0 1";p.offset="0 0"}j=k.split();if(j.isSimple){f.filter="";i.setSimpleCoords(l,j.scaleX,j.scaleY,j.translateX,j.translateY,j.rotate/Math.PI*180)}else{f.filter=k.toFilter();var g=i.getBBox(l),q=g.x-l.x,m=g.y-l.y;e.coordorigin=(q*-o)+" "+(m*-o);if(n){e.removeChild(n);n.position=q+" "+m;n.size=l.width*l.scale.x+" "+l.height*1.1;e.appendChild(n)}}}},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 f){b=1;if(c&&((j-e) j){b=2;if(g&&((f-l) 0&&i)){m.stopEvent();o.scrollByDeltaX(h)}}if(j){if((g<0&&f)||(g>0&&k)){m.stopEvent();j.scrollByDeltaY(g)}}},onViewReady:function(){var a=this;a.fireEvent("viewready",a);if(a.deferRowRender){a.determineScrollbars();a.invalidateScroller()}},onViewRefresh:function(){var a=this;if(!a.rendering){this.determineScrollbars();if(this.invalidateScrollerOnRefresh){this.invalidateScroller()}}},setScrollTop:function(d){var c=this,b=c.getScrollerOwner(),a=c.getVerticalScroller();b.virtualScrollTop=d;if(a){a.setScrollTop(d)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},scrollByDeltaY:function(a){var b=this.getVerticalScroller();if(b){b.scrollByDeltaY(a)}},scrollByDeltaX:function(a){var b=this.getHorizontalScroller();if(b){b.scrollByDeltaX(a)}},getLhsMarker:function(){var a=this;if(!a.lhsMarker){a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.lhsMarker},getRhsMarker:function(){var a=this;if(!a.rhsMarker){a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.rhsMarker},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onVerticalScroll:function(e,f){var b=this.getScrollerOwner(),c=b.query("tableview"),d=0,a=c.length;for(;d','","",' {subTplMarkup}','','',{compiled:true,disableFormats:true}],activeErrorsTpl:['',' ',""],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",initLabelable:function(){this.addCls(this.formItemCls);this.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},getLabelableRenderData:function(){var e=this,b=e.labelAlign,f=e.labelCls,d=e.labelClsExtra,c=e.labelPad,a;if(b==="top"){a="margin-bottom:"+c+"px;"}else{a="margin-right:"+c+"px;";if(Ext.isBorderBox){a+="width:"+e.labelWidth+"px;"}}return Ext.copyTo({inputId:e.getInputId(),fieldLabel:e.getFieldLabel(),labelCls:d?f+" "+d:f,labelStyle:a+(e.labelStyle||""),subTplMarkup:e.getSubTplMarkup()},e,"hideLabel,hideEmptyLabel,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator",true)},onLabelableRender:function(){this.addChildEls("labelEl","bodyEl","errorEl")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.activeError=a;this.activeErrors=[a];this.renderActiveError()},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);c.errorEl.dom.innerHTML=b}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})},getBodyNaturalWidth:function(){return this.bodyEl.getWidth()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.Field",{alias:["layout.field"],extend:"Ext.layout.component.Component",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics"],type:"field",beforeLayout:function(b,a){var c=this;return c.callParent(arguments)||(!c.owner.preventMark&&c.activeError!==c.owner.getActiveError())},onLayout:function(a,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,setOuterWidth:false,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.setOuterWidth?c.width:d),c.height)}else{f.setTargetSize((!g||c.setOuterWidth?c.width:d),c.height)}f.sizeBody(c);f.activeError=b.getActiveError()},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},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)}f.setOuterWidth=true},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 d(h,g){var i=h.getStyle("display")!=="none";if(g!==i){h.setDisplayed(g)}}function f(h,g,i){if(h.getStyle(g)!==i){h.setStyle(g,i)}}function c(g){var h=Ext.layout.component.field.Field.tip,i;if(h&&h.isVisible()){i=h.activeTarget;if(i&&i.el===g.getActionEl().dom){h.toFront(true)}}}var b=Ext.applyIf,a=Ext.emptyFn,e={prepare:function(g){d(g.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a,onFocus:a};return{none:e,side:b({prepare:function(g){var h=g.errorEl;h.addCls(Ext.baseCSSPrefix+"form-invalid-icon");Ext.layout.component.field.Field.initTip();h.dom.setAttribute("data-errorqtip",g.getActiveError()||"");d(h,g.hasActiveError())},adjustHorizInsets:function(g,h){if(g.autoFitErrors&&g.hasActiveError()){h.insets.right+=g.errorEl.getWidth()}},layoutHoriz:function(g,h){if(g.hasActiveError()){f(g.errorEl,"left",h.width-h.insets.right+"px")}},layoutVert:function(g,h){if(g.hasActiveError()){f(g.errorEl,"top",h.insets.top+"px")}},onFocus:c},e),under:b({prepare:function(g){var i=g.errorEl,h=Ext.baseCSSPrefix+"form-invalid-under";if(!i.hasCls(h)){i.addCls(h)}d(i,g.hasActiveError())},adjustVertInsets:function(g,h){if(g.autoFitErrors){h.insets.bottom+=g.errorEl.getHeight()}},layoutHoriz:function(g,i){var j=g.errorEl,h=i.insets;f(j,"width",i.width-h.right-h.left+"px");f(j,"marginLeft",h.left+"px")}},e),qtip:b({prepare:function(g){d(g.errorEl,false);Ext.layout.component.field.Field.initTip();g.getActionEl().dom.setAttribute("data-errorqtip",g.getActiveError()||"")},onFocus:c},e),title:b({prepare:function(g){d(g.errorEl,false);g.el.dom.title=g.getActiveError()||""}},e),elementId:b({prepare:function(g){d(g.errorEl,false);var h=Ext.fly(g.msgTarget);if(h){h.dom.innerHTML=g.getActiveError()||"";h.setDisplayed(g.hasActiveError())}}},e)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip",renderTo:Ext.getBody()});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=Ext.create("Ext.util.MixedCollection");b.callParent(arguments)},bind:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("add",c.onStoreAdd,c);c.store.un("clear",c.onStoreClear,c);c.store.un("remove",c.onStoreRemove,c);c.store.un("update",c.onStoreUpdate,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({add:c.onStoreAdd,clear:c.onStoreClear,remove:c.onStoreRemove,update:c.onStoreUpdate,scope:c})}c.store=a;if(a&&!b){c.refresh()}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,f=e.getSelection().length;e.bulkChange=true;for(;c1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(k,e,l,c){var h=this,j=h.store,d=0,g,f,a,b=[];if(h.isLocked()){return}if(!l){h.deselectAll(true)}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){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,k,j){var g=this,b=g.selected,h=false,d=0,f,e;if(g.locked){return}a=!Ext.isArray(a)?[a]:a;f=a.length;if(!k&&b.getCount()>0){if(g.doDeselect(g.getSelection(),j)===false){return}}function c(){b.add(e);h=true}for(;d
>{.} - class="last"
0&&!j);return f===k},doSingleSelect:function(a,b){var d=this,f=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;f=true}d.onSelectChange(a,true,b,e);if(f){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;d.onLastFocusChanged(a,c,b)},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var g=this,b=[],f=g.getSelection(),a=f.length,e,h,d=0,c=this.getLastFocused();for(;d0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("Ext.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:Ext.String.htmlEncode(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.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'," ","",' "],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addChildEls("bar");this.addEvents("update")},afterRender:function(){var a=this;a.textEl=a.textEl?Ext.get(a.textEl):a.el.select("."+a.baseCls+"-text");a.callParent(arguments);if(a.value){a.updateProgress(a.value,a.text)}else{a.updateText(a.text)}},updateProgress:function(d,e,a){var c=this,b;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(c.isVisible(true)){b=Math.floor(c.value*c.el.getWidth(true));if(Ext.isForcedBorderBox){b+=c.bar.getBorderWidth("lr")}if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({to:{width:b+"px"}},c.animate))}else{c.bar.setWidth(b)}}else{c.doComponentLayout()}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},wait:function(b){var a=this;if(!a.waitTimer){scope=a;b=b||{};a.updateText(b.text);a.waitTimer=Ext.TaskManager.start({run:function(c){var d=b.increment||10;c-=1;a.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||a)}a.reset()},scope:scope})}return a},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.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:['name="{name}" ','size="{size}" ','tabIndex="{tabIdx}" ','class="{fieldCls} {typeCls}" autocomplete="off" />',{compiled:true,disableFormats:true}],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:Ext.baseCSSPrefix+"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("focus","blur","specialkey");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=Ext.id())},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId();return Ext.applyIf(c.subTplData,{id:a,cmpId:c.id,name:c.name||a,type:b,size:c.size||20,cls:c.cls,fieldCls:c.fieldCls,tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)})},afterRender:function(){this.callParent();if(this.inputEl){this.inputEl.selectable()}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},onRender:function(){var b=this,a=b.fieldStyle;b.onLabelableRender();b.addChildEls({name:"inputEl",id:b.getInputId()});b.callParent(arguments);b.setRawValue(b.rawValue);if(b.readOnly){b.setReadOnly(true)}if(b.disabled){b.disable()}if(a){b.setFieldStyle(a)}b.renderActiveError()},initAria:function(){var a=this;a.callParent();a.getActionEl().dom.setAttribute("aria-describedby",Ext.id(a.errorEl))},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.readOnly=c;b.dom.setAttribute("aria-readonly",c)}a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,Ext.create("Ext.EventObjectImpl",a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);b.mon(c,"focus",b.onFocus,b);b.mon(c,"blur",b.onBlur,b,b.inEditor?{buffer:10}:null);a=Ext.create("Ext.util.DelayedTask",b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e==="propertychange"){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},preFocus:Ext.emptyFn,onFocus:function(){var b=this,a=b.focusCls,c=b.inputEl;b.preFocus();if(a&&c){c.addCls(a)}if(!b.hasFocus){b.hasFocus=true;b.componentLayout.onFocus();b.fireEvent("focus",b)}},beforeBlur:Ext.emptyFn,onBlur:function(){var b=this,a=b.focusCls,c=b.inputEl;if(b.destroying){return}b.beforeBlur();if(a&&c){c.removeCls(a)}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b);b.postBlur()},postBlur:Ext.emptyFn,onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var a=this;return a.disabled||a.validateValue(a.processRawValue(a.getRawValue()))},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.doComponentLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.doComponentLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.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 this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},afterRender:function(){var a=this;if(a.enforceMaxLength){a.inputEl.dom.maxLength=a.maxLength}a.applyEmptyText();a.autoSize();a.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(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.lengthf.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,"
");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:['",{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",onRender:function(b,a){var c=this;Ext.applyIf(c.subTplData,{cols:c.cols,rows:c.rows});c.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.grow){if(a.preventScrollbars){a.inputEl.setStyle("overflow","hidden")}a.inputEl.setHeight(a.growMin)}},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!==a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},getBodyNaturalWidth:function(){return Math.round(this.cols*6.5)+20}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:" ",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;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();f=false}else{d.msgButtons[b].hide()}}if(f){d.bottomTb.hide()}else{d.bottomTb.show()}},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);if(a.animateTarget){b.doAutoSize(true);b.callParent()}else{b.callParent();b.doAutoSize(true)}return b},afterShow:function(){if(this.animateTarget){this.center()}this.callParent(arguments)},doAutoSize:function(b){var e=this,d=e.iconComponent,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,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.checkValidityTask=Ext.create("Ext.util.DelayedTask",c.checkValidity,c);c.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,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){if(f.isDestroyed){delete d._fields}else{Ext.Array.forEach(f.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;a.batchLayouts(function(){b=a.getFields().filterBy(function(c){return !c.validate()})});return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+"mask-loading",d;this.getFields().each(function(e){if(e.isFormField&&e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,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("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bind(a.getStore());a.on(a.triggerEvent,b.onItemClick,b);a.on(a.triggerCtEvent,b.onContainerClick,b);a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,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,d,g){var f=this,a=f.view,c=e?"select":"deselect";if((d||f.fireEvent("before"+c,f,b))!==false&&g()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){f.fireEvent(c,f,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",alternateClassName:"Ext.view.AbstractView",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('',c.itemCls,d);c.tpl=Ext.create("Ext.XTemplate",d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=Ext.create("Ext.XTemplate",c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.all=new Ext.CompositeElementLite()},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=Ext.create("Ext.LoadMask",c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onMaskBeforeShow:function(){var a=this.loadingHeight;this.getSelectionModel().deselectAll();if(a){this.setCalculatedSize(undefined,a)}},onMaskHide:function(){var a=this;if(!a.destroying&&a.loadingHeight){a.setHeight(a.height)}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=Ext.create("Ext.selection.DataViewModel",a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,b,a;if(!c.rendered||c.isDestroyed){return}c.fireEvent("beforerefresh",c);b=c.getTargetEl();a=c.store.getRange();b.update("");if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){b.update(c.emptyText)}c.all.clear()}else{c.tpl.overwrite(b,c.collectData(a,0));c.all.fill(Ext.query(c.getItemSelector(),b.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}},prepareData:function(c,b,a){if(a){Ext.apply(c,a.getAssociatedData())}return c},collectData:function(c,f){var e=[],d=0,a=c.length,b;for(;d-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();d.fireEvent("itemupdate",a,b,c)}}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent("itemadd",b,c,a)},doAdd:function(b,a,c){var d=this.all;if(c {1}=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect")},afterRender:function(){var b=this,a;b.callParent();a={scope:b,freezeEvent:true,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(g){var h=this,j=g.getTarget(h.getItemSelector(),h.getTargetEl()),a=this.statics().EventMap,f,c,i=g.type,d=h.mouseOverItem,b;if(!j){if(i=="mouseover"&&h.stillOverItem(g,d)){j=d}if(i=="keydown"){c=h.getSelectionModel().getLastSelected();if(c){j=h.getNode(c)}}}if(j){f=h.indexOf(j);if(!c){c=h.getRecord(j)}if(h.processItemEvent(c,j,f,g)===false){return false}b=h.isNewItemEvent(j,g);if(b===false){return false}if((h["onBeforeItem"+a[b]](c,j,f,g)===false)||(h.fireEvent("beforeitem"+b,h,c,j,f,g)===false)||(h["onItem"+a[b]](c,j,f,g)===false)){return false}h.fireEvent("item"+b,h,c,j,f,g)}else{if((h.processContainerEvent(g)===false)||(h["onBeforeContainer"+a[i]](g)===false)||(h.fireEvent("beforecontainer"+i,h,g)===false)||(h["onContainer"+a[i]](g)===false)){return false}h.fireEvent("container"+i,h,g)}return true},isNewItemEvent:function(d,f){var c=this,a=c.mouseOverItem,b=f.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(f,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);delete b.highlightedItem}},refresh:function(){var a=this;a.clearHighlight();a.callParent(arguments);if(!a.isFixedHeight()){a.doComponentLayout()}}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"."+Ext.baseCSSPrefix+"grid-row",cellSelector:"."+Ext.baseCSSPrefix+"grid-cell",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp("x-grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,initComponent:function(){var a=this;a.scrollState={};a.selModel.view=a;a.headerCt.view=a;a.initFeatures();a.tpl="";a.callParent();a.mon(a.store,{load:a.onStoreLoad,scope:a})},onStoreLoad:function(){var a=this;if(a.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!a.scrollToTopTask){a.scrollToTopTask=Ext.create("Ext.util.DelayedTask",a.scrollToTop,a)}a.scrollToTopTask.delay(1)}else{a.scrollToTop()}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=Ext.create("Ext.util.MixedCollection");for(;bd.bottom){g=h.bottom-d.bottom}}e=f.getRecord(i);b=f.store.indexOf(e);if(g){a.scrollByDeltaY(g)}f.fireEvent("rowfocus",e,i,b)}},focusCell:function(g){var i=this,j=i.getCellByPosition(g),b=i.el,d=0,e=0,c=b.getRegion(),a=i.ownerCt,h,f;if(j){h=j.getRegion();if(h.top c.bottom){d=h.bottom-c.bottom}}if(h.left c.right){e=h.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();i.fireEvent("cellfocus",f,j,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(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState,c=this.headerCt.el.dom;c.scrollLeft=b.scrollLeft=a.left;b.scrollTop=a.top}},refresh:function(){this.setNewTemplate();this.callParent(arguments)},processItemEvent:function(b,l,i,d){var g=this,j=d.getTarget(g.cellSelector,l),h=j?j.cellIndex:-1,a=g.statics().EventMap,c=g.getSelectionModel(),f=d.type,k;if(f=="keydown"&&!j&&c.getCurrentPosition){j=g.getCellByPosition(c.getCurrentPosition());if(j){j=j.dom;h=j.cellIndex}}k=g.fireEvent("uievent",f,g,j,i,h,d);if(k===false||g.callParent(arguments)===false){return false}if(f=="mouseover"||f=="mouseout"){return true}return !((g["onBeforeCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("beforecell"+f,g,j,h,b,l,i,d)===false)||(g["onCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("cell"+f,g,j,h,b,l,i,d)===false))},processSpecialEvent:function(j){var m=this,b=m.statics().EventMap,d=m.features,l=d.length,n=j.type,f,o,g,h,c,k,a=m.ownerCt;m.callParent(arguments);if(n=="mouseover"||n=="mouseout"){return}for(f=0;f e){e=b}}return e},getPositionByEvent:function(f){var d=this,b=f.getTarget(d.cellSelector),c=f.getTarget(d.itemSelector),a=d.getRecord(c),g=d.getHeaderByCell(b);return d.getPosition(a,g)},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(k,l,g,m,a,n){var i=this,o=k.row,d=k.column,j=i.store.getCount(),f=i.getFirstVisibleColumnIndex(),b=i.getLastVisibleColumnIndex(),h={row:o,column:d},c=i.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}g=g||{};l=l.toLowerCase();switch(l){case"right":if(d===b){if(m||o===j-1){return false}if(!g.ctrlKey){h.row=o+1;h.column=f}}else{if(!g.ctrlKey){h.column=d+i.getRightGap(c)}else{h.column=b}}break;case"left":if(d===f){if(m||o===0){return false}if(!g.ctrlKey){h.row=o-1;h.column=b}}else{if(!g.ctrlKey){h.column=d+i.getLeftGap(c)}else{h.column=f}}break;case"up":if(o===0){return false}else{if(!g.ctrlKey){h.row=o-1}else{h.row=0}}break;case"down":if(o===j-1){return false}else{if(!g.ctrlKey){h.row=o+1}else{h.row=j-1}}break}if(a&&a.call(n||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){this.el.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)},onUpdate:function(d,a,b){var c=d.indexOf(a);this.callParent(arguments);this.doStripeRows(c,c)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),f=d.length,c=0,e;for(;c 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,ignoreRightMouseSelection:true,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(d,a){var c=this,b=c.store.getAt(c.store.getCount()-1);if(b){if(d.shiftKey){c.selectRange(b,c.lastFocused||0);c.setLastFocused(b)}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyHome:function(c,a){var b=this,d=b.store.getAt(0);if(d){if(c.shiftKey){b.selectRange(d,b.lastFocused||0);b.setLastFocused(d)}else{if(c.ctrlKey){b.setLastFocused(d)}else{b.doSelect(d,false)}}}},onKeyPageUp:function(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 ','',""],initComponent:function(){var c=this,b=c.dock,a=Ext.baseCSSPrefix+"scroller-vertical";c.offsets={bottom:0};c.scrollProp="scrollTop";c.vertical=true;c.sizeProp="width";if(b==="top"||b==="bottom"){a=Ext.baseCSSPrefix+"scroller-horizontal";c.sizeProp="height";c.scrollProp="scrollLeft";c.vertical=false;c.weight+=5}c.cls+=(" "+a);Ext.applyIf(c.renderSelectors,{stretchEl:"."+Ext.baseCSSPrefix+"stretcher",scrollEl:"."+Ext.baseCSSPrefix+"scroller-ct"});c.callParent()},ensureDimension:function(){var a=this,b=a.sizeProp;a[b]=a.scrollerSize=Ext.getScrollbarSize()[b]},initRenderData:function(){var b=this,a=b.callParent(arguments)||{};a.baseId=b.id;return a},afterRender:function(){var a=this;a.callParent();a.mon(a.scrollEl,"scroll",a.onElScroll,a);Ext.cache[a.el.id].skipGarbageCollection=true},onAdded:function(a){this.ownerGrid=a;this.callParent(arguments)},getSizeCalculation:function(){var g=this,c=g.getPanel(),f=1,b=1,d,h;if(!g.vertical){var e=c.query("tableview"),a=e[1]||e[0];if(!a){return false}f=a.headerCt.getFullWidth();if(Ext.isIEQuirks){f--}}else{d=c.down("tableview:not([lockableInjected])");if(!d||!d.el){return false}h=d.el.child("table",true);if(!h){return false}b=h.offsetHeight}if(isNaN(f)){f=1}if(isNaN(b)){b=1}return{width:f,height:b}},invalidate:function(d){var f=this,e=f.stretchEl;if(!e||!f.ownerCt){return}var i=f.getSizeCalculation(),h=f.scrollEl,b=h.dom,c=f.reservedSpace,g,a=5;if(i){e.setSize(i);i=f.el.getSize(true);if(f.vertical){i.width+=a;i.height-=c;g="left"}else{i.width-=c;i.height+=a;g="top"}h.setSize(i);b.style[g]=(-a)+"px";b.scrollTop=b.scrollTop}},afterComponentLayout:function(){this.callParent(arguments);this.invalidate()},restoreScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;if(c._scrollPos!==null&&a){a[c.scrollProp]=c._scrollPos;c._scrollPos=null}},setReservedSpace:function(b){var a=this;if(a.reservedSpace!==b){a.reservedSpace=b;a.invalidate()}},saveScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;c._scrollPos=a?a[c.scrollProp]:null},setScrollTop:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollTop=Ext.Number.constrain(c,0,a.scrollHeight-a.clientHeight)}},setScrollLeft:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollLeft=Ext.Number.constrain(c,0,a.scrollWidth-a.clientWidth)}},scrollByDeltaY:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollTop(a.scrollTop+c)}},scrollByDeltaX:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollLeft(a.scrollLeft+c)}},scrollToTop:function(){this.setScrollTop(0)},onElScroll:function(a,b){this.fireEvent("bodyscroll",a,b)},getPanel:function(){var a=this;if(!a.panel){a.panel=this.up("[scrollerOwner]")}return a.panel}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",uses:["Ext.grid.ColumnLayout","Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=Ext.create("Ext.grid.plugin.HeaderResizer");a.reorderer=Ext.create("Ext.grid.plugin.HeaderReorderer");if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&&!a.items){a.layout="auto"}else{a.layout={type:"gridcolumn",availableSpaceOffset:a.availableSpaceOffset,align:"stretchmax",resetStretch:true}}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{width:a.defaultWidth,triStateSort:a.triStateSort,sortable:a.sortable});a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){Ext.destroy(this.resizer,this.reorderer);this.callParent()},applyDefaults:function(a){if(a&&!a.isComponent&&a.xtype=="rownumberer"){return a}return this.callParent([a])},applyColumnsState:function(d){if(!d||!d.length){return}var e=this,c=0,b,a;Ext.each(d,function(f){a=e.down("gridcolumn[headerId="+f.id+"]");if(a){b=e.items.indexOf(a);if(c!==b){e.moveHeader(b,c)}if(a.applyColumnState){a.applyColumnState(f)}++c}})},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},afterRender:function(){this.callParent();var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},afterLayout:function(){if(!this.isHeader){var e=this,d=e.query(">gridcolumn:not([hidden])"),c,b,a;e.callParent(arguments);if(d.length){b=d[0].el;if(b!==e.pastFirstHeaderEl){if(e.pastFirstHeaderEl){e.pastFirstHeaderEl.removeCls(e.firstHeaderCls)}b.addCls(e.firstHeaderCls);e.pastFirstHeaderEl=b}a=d[d.length-1].el;if(a!==e.pastLastHeaderEl){if(e.pastLastHeaderEl){e.pastLastHeaderEl.removeCls(e.lastHeaderCls)}a.addCls(e.lastHeaderCls);e.pastLastHeaderEl=a}}}},onHeaderShow:function(g,b){var k=this,l=k.ownerCt,d=k.getMenu(),e,c,h,a,j,f;if(d){h=d.down("menucheckitem[headerId="+g.id+"]");if(h){h.setChecked(true,true)}e=d.query("#columnItem>menucheckitem[checked]");c=e.length;if((k.getVisibleGridColumns().length>1)&&k.disabledMenuItems&&k.disabledMenuItems.length){if(c==1){Ext.Array.remove(k.disabledMenuItems,e[0])}for(f=0,j=k.disabledMenuItems.length;f 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;bgridcolumn[hideable]"),g=a.length,d;for(;b ',"",' ',' ","{[this.openRows()]}","{row}",'',' ","'," ',"{[this.embedFeature(values, parent, xindex, xcount)]}"," ","{[this.closeRows()]}","","","{[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''},closeRows:function(){return" "},metaRowTpl:['',' "],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',' ","'," {{id}}l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g] f){g.layout.align="stretch";g.setCalculatedSize(g.getWidth(),a.getHeight(),g.ownerCt);delete g.layout.align;c=g.up("tablepanel")}else{if(f>b){d=f;this.align="stretch";a.setCalculatedSize(a.getWidth(),g.getHeight(),a.ownerCt);delete this.align;c=a.up("tablepanel")}}k.componentLayout.layoutBusy=false;j=m[0].layout.getLayoutItems().concat(m[1].layout.getLayoutItems())}else{d=this.getRenderTarget().getViewSize().height;j=l.getLayoutItems()}h=j.length;for(;e {text} ',dataIndex:null,text:" ",sortable:true,hideable:true,menuDisabled:false,renderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,initComponent:function(){var d=this,b,a,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{d.minWidth=d.width}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;d.items=d.columns;delete d.columns;delete d.flex;d.width=0;for(b=0,a=d.items.length;b:not([hidden])");if(!c.length){f.ownerCt.hide()}else{for(d=0,a=c.length;d*");for(e=0,h=j.length;e :not([hidden])");for(e=0,h=j.length;e 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()}}});