o){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(nf){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x",c);a=this.getAnimationEasing("y",c);if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g,j){if(!this.isAxisEnabled(g)){return null}var f=this.position[g],c=this.getMinPosition()[g],i=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,h=j.flick.velocity[g],k;if(fi){d=i}}if(d!==null){k=this.getBounceEasing()[g];k.setConfig({startTime:b,startValue:-f,endValue:-d});return k}if(h===0){return null}if(h<-a){h=-a}else{if(h>a){h=a}}if(Ext.browser.is.IE){h*=2}k=this.getMomentumEasing()[g];k.setConfig({startTime:b,startValue:-f,startVelocity:h*1.5,minMomentumValue:-i,maxMomentumValue:0});return k},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=Math.floor((a-f)%g);if(b!==0){if(a!==e){if(Math.abs(b)>g/2){d=Math.min(e,a+((b>0)?g-b:b-g))}else{d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(ib){i=b}}if(ha){h=a}}this.scrollTo(i,h)},destroy:function(){var c=this.getElement(),b=this.sizeMonitors,a;if(b){b.element.destroy();b.container.destroy()}if(c&&!c.isDestroyed){c.removeCls(this.cls);a=this.getContainer();if(a&&!a.isDestroyed){a.removeCls(this.containerCls)}}Ext.destroy(this.getTranslatable());this.callParent(arguments)}},function(){});(function(){var c=0,e=["ms","moz","webkit","o"],b=e.length,a,d;for(a=0;a=500){this.run()}},run:function(){if(!this.isRunning){return}var b=this.runningQueue,c,d;this.lastRunTime=Date.now();this.frameStartTime=Ext.performance.now();b.push.apply(b,this.queue);for(c=0,d=b.length;c0){c=b.shift();this.invoke(c);this.processIdleQueue()}},processTaskQueue:function(){if(!this.hasOwnProperty("taskQueueTimer")){this.taskQueueTimer=setTimeout(this.processTaskQueueItem,15)}},processTaskQueueItem:function(){delete this.taskQueueTimer;var b=this.taskQueue,c;if(b.length>0){c=b.shift();this.invoke(c);this.processTaskQueue()}},showFps:function(){if(!Ext.trueRequestAnimationFrames){alert("This browser does not support requestAnimationFrame. The FPS listed will not be accurate")}Ext.onReady(function(){Ext.Viewport.add([{xtype:"component",bottom:50,left:0,width:50,height:20,html:"Average",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__averageFps",xtype:"component",bottom:0,left:0,width:50,height:50,html:"0",style:"background-color: red; color: white; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:50,width:50,height:20,html:"Min (Last 1k)",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__minFps",xtype:"component",bottom:0,left:50,width:50,height:50,html:"0",style:"background-color: orange; color: white; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:100,width:50,height:20,html:"Max (Last 1k)",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__maxFps",xtype:"component",bottom:0,left:100,width:50,height:50,html:"0",style:"background-color: yellow; color: black; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:150,width:50,height:20,html:"Current",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__currentFps",xtype:"component",bottom:0,left:150,width:50,height:50,html:"0",style:"background-color: green; color: white; text-align: center; line-height: 50px;"}]);Ext.AnimationQueue.resetFps()})},resetFps:function(){var d=Ext.getCmp("__currentFps"),c=Ext.getCmp("__averageFps"),i=Ext.getCmp("__minFps"),h=Ext.getCmp("__maxFps"),e=1000,b=0,g=0,f=0;Ext.AnimationQueue.onFpsChanged=function(j){g++;if(!(g%10)){e=1000;b=0}f+=j;e=Math.min(e,j);b=Math.max(b,j);d.setHtml(Math.round(j));c.setHtml(Math.round(f/g));i.setHtml(Math.round(e));h.setHtml(Math.round(b))}}},function(){})})(this);Ext.define("Ext.TaskQueue",{singleton:true,pending:false,mode:true,constructor:function(){this.readQueue=[];this.writeQueue=[];this.run=Ext.Function.bind(this.run,this);this.watch=Ext.Function.bind(this.watch,this);if(Ext.os.is.iOS){setInterval(this.watch,500)}},requestRead:function(c,b,a){this.request(true);this.readQueue.push(arguments)},requestWrite:function(c,b,a){this.request(false);this.writeQueue.push(arguments)},request:function(a){if(!this.pending){this.pendingTime=Date.now();this.pending=true;this.mode=a;if(a){setTimeout(this.run,1)}else{requestAnimationFrame(this.run)}}},watch:function(){if(this.pending&&Date.now()-this.pendingTime>=500){this.run()}},run:function(){this.pending=false;var j=this.readQueue,e=this.writeQueue,c=null,f;if(this.mode){f=j;if(e.length>0){c=false}}else{f=e;if(j.length>0){c=true}}var b=f.slice(),d,g,a,h,k;f.length=0;for(d=0,g=b.length;d2){h.apply(k,a[2])}else{h.call(k)}}b.length=0;if(c!==null){this.request(c)}}});Ext.define("Ext.scroll.indicator.Abstract",{extend:Ext.Component,config:{baseCls:"x-scroll-indicator",axis:"x",value:null,length:null,minLength:6,hidden:true,ui:"dark",autoHide:true},cachedConfig:{ratio:1,barCls:"x-scroll-bar",active:true},barElement:null,barLength:0,gapLength:0,getElementConfig:function(){return{reference:"barElement",children:[this.callParent()]}},applyRatio:function(a){if(isNaN(a)||a>1){a=1}return a},refresh:function(){var f=this.barElement,e=f.dom,c=this.getRatio(),b=this.getAxis(),a=(b==="x")?e.offsetWidth:e.offsetHeight,d=a*c;this.barLength=a;this.gapLength=a-d;this.setLength(d);this.updateValue(this.getValue())},updateBarCls:function(a){this.barElement.addCls(a)},updateAxis:function(a){this.element.addCls(this.getBaseCls(),null,a);this.barElement.addCls(this.getBarCls(),null,a)},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},updateActive:function(a){this.barElement[a?"addCls":"removeCls"]("active")},doSetHidden:function(b){var a=this;if(b){a.getAutoHide()&&a.setOffset(-10000)}else{delete a.lastLength;delete a.lastOffset;a.updateValue(a.getValue())}},applyLength:function(a){return Math.max(this.getMinLength(),a)},updateLength:function(a){a=Math.round(a);if(this.lastLength===a){return}this.lastLength=a;Ext.TaskQueue.requestWrite("doUpdateLength",this,[a])},doUpdateLength:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.element;if(b==="x"){a.setWidth(c)}else{a.setHeight(c)}}},setOffset:function(a){a=Math.round(a);if(this.lastOffset===a||this.lastOffset===-10000){return}this.lastOffset=a;Ext.TaskQueue.requestWrite("doSetOffset",this,[a])},doSetOffset:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.element;if(b==="x"){a.translate(c,0)}else{a.translate(0,c)}}}});Ext.define("Ext.scroll.indicator.CssTransform",{extend:Ext.scroll.indicator.Abstract,config:{cls:"csstransform"}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:Ext.scroll.indicator.Abstract,config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>=1){a--}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},doUpdateLength:function(){if(!this.isDestroyed){var a=this.barLength,b=this.element;this.callParent(arguments);if(this.getAxis()==="x"){b.setLeft(a)}else{b.setTop(a)}}},doSetOffset:function(d){if(!this.isDestroyed){var b=this.barLength,a=this.getMinLength(),c=this.barElement.dom;if(d!==-10000){d=Math.min(b-a,Math.max(d,a-this.getLength()));d=b-d}if(this.getAxis()==="x"){c.scrollLeft=d}else{c.scrollTop=d}}}});Ext.define("Ext.scroll.indicator.Rounded",{extend:Ext.scroll.indicator.Abstract,config:{cls:"rounded"},constructor:function(){this.callParent(arguments);this.transformPropertyName=Ext.browser.getVendorProperyName("transform")},getElementConfig:function(){var a=this.callParent();a.children[0].children=[{reference:"startElement"},{reference:"middleElement"},{reference:"endElement"}];return a},refresh:function(){var d=this.getAxis(),c=this.startElement.dom,a=this.endElement.dom,e=this.middleElement,b,f;if(d==="x"){b=c.offsetWidth;f=a.offsetWidth;e.setLeft(b)}else{b=c.offsetHeight;f=a.offsetHeight;e.setTop(b)}this.startElementLength=b;this.endElementLength=f;this.callParent()},doUpdateLength:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.endElement,e=this.middleElement.dom.style,d=this.endElementLength,h=c-d,g=h-this.startElementLength,f=this.transformPropertyName;if(b==="x"){a.translate(h,0);e[f]="translate3d(0, 0, 0) scaleX("+g+")"}else{a.translate(0,h);e[f]="translate3d(0, 0, 0) scaleY("+g+")"}}}});Ext.define("Ext.scroll.Indicator",{alternateClassName:"Ext.util.Indicator",constructor:function(a){var b=Ext.scroll.indicator;switch(Ext.browser.getPreferredTranslationMethod(a)){case"scrollposition":return new b.ScrollPosition(a);case"csstransform":if(Ext.browser.is.AndroidStock4){return new b.CssTransform(a)}else{return new b.Rounded(a)}}}});Ext.define("Ext.scroll.View",{extend:Ext.Evented,alternateClassName:"Ext.util.ScrollView",config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=this.getScroller(),a;a=c.getFirstChild().getFirstChild();if(this.FixedHBoxStretching){a=a.getFirstChild()}c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);b.setElement(a);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();Ext.destroy(this.getScroller(),this.indicatorsGrid);if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:Ext.behavior.Behavior,constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(f){var c=this.scrollView,e=this.component,b,d,a,g;if(f){if(!c){this.scrollView=c=new Ext.scroll.View(f);c.on("destroy","onScrollViewDestroy",this);e.setUseBodyElement(true);this.scrollerElement=b=e.innerElement;if(!Ext.feature.has.ProperHBoxStretching){a=c.getScroller();g=(Ext.isObject(f)?f.direction:f)||"auto";if(g!=="vertical"){d=b.wrap();d.addCls(Ext.baseCSSPrefix+"translatable-hboxfix");if(g=="horizontal"){d.setStyle({height:"100%"})}this.scrollContainer=d.wrap();c.FixedHBoxStretching=a.FixedHBoxStretching=true}else{this.scrollContainer=b.wrap()}}else{this.scrollContainer=b.wrap()}c.setElement(e.bodyElement);if(e.isPainted()){this.onComponentPainted()}e.on(this.listeners)}else{if(Ext.isString(f)||Ext.isObject(f)){c.setConfig(f)}}}else{if(c){c.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();if(!b.isDestroyed){b.un(this.listeners)}delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.util.InputBlocker",{singleton:true,blockInputs:function(){if(Ext.browser.is.ie){Ext.select(".x-field-text .x-field-input:not(.x-item-disabled) .x-input-el, .x-field-textarea .x-field-input:not(.x-item-disabled) .x-input-el, .x-field-search .x-field-input:not(.x-item-disabled) .x-input-el").each(function(a){if(a.dom.offsetWidth>0){a.dom.setAttribute("disabled",true);a.dom.setAttribute("overlayfix",true)}})}},unblockInputs:function(){if(Ext.browser.is.ie){Ext.select("[overlayfix]").each(function(a){a.dom.removeAttribute("disabled");a.dom.removeAttribute("overlayfix")})}}});Ext.define("Ext.Mask",{extend:Ext.Component,xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callSuper();this.element.on("*","onEvent",this);this.on({hide:"onHide"})},onHide:function(){Ext.util.InputBlocker.unblockInputs();if(Ext.browser.is.AndroidStock4&&Ext.os.version.getMinor()===0){var a=this.element.getFirstChild();if(a){a.redraw()}}},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.Container",{extend:Ext.Component,alternateClassName:"Ext.lib.Container",xtype:"container",eventedConfig:{activeItem:0,scrollable:null},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",classList:["x-container","x-unsized"],children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(b){var a=true,c;if(b===false){b=true;a=false}c=Ext.factory(b,Ext.Mask,this.getMasked());if(c){this.add(c);c.setHidden(!a)}return c},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},setParent:function(a){this.callSuper(arguments);if(a){var b=this.getModal();if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1)}}},applyModal:function(c,b){var a=true;if(c===false){c=true;a=false}b=Ext.factory(c,Ext.Mask,b);if(b){b.setVisibility(a)}return b},updateModal:function(b){var a=this.getParent();if(a){if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1)}else{a.remove(b)}}},updateHideOnMaskTap:function(b){var a=this.getModal();if(a){a[b?"on":"un"].call(a,"tap","hide",this)}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(this.currentUi)}}if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d);this.currentUi=a+"-"+d}}},updateUseBodyElement:function(a){if(a){this.link("bodyElement",this.innerElement.wrap({cls:"x-body"}))}},applyItems:function(a,d){if(a){var b=this;b.getDefaultType();b.getDefaults();if(b.initialized&&d.length>0){b.removeAll()}b.add(a);if(b.initialized){var c=b.initialConfig.activeItem||b.config.activeItem||0;b.setActiveItem(c)}}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on("innerstatechange","onItemInnerStateChange",this,{delegate:"> component"});return this.onItemAdd.apply(this,arguments)},getLayout:function(){var a=this.layout;if(!a){a=this.link("_layout",this.link("layout",Ext.factory(this._layout||"default",Ext.layout.Default,null,"layout")));a.setContainer(this)}return a},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;if(Ext.isArray(a)){for(b=0,d=a.length;b0&&c.isInnerItem()){f=c}}}else{c=e.factoryItem(a);this.doAdd(c);if(!f&&!this.getActiveItem()&&this.innerItems.length>0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=c.getInnerItems();if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!c.removingAll&&e.length>1&&d===c.getActiveItem()){c.on({activeitemchange:"doRemove",scope:c,single:true,order:"after",args:[d,a,b]});c.doResetActiveItem(e.indexOf(d))}else{c.doRemove(d,a,b);if(e.length===0){c.setActiveItem(null)}}}return c},doResetActiveItem:function(a){if(a===0){this.setActiveItem(1)}else{this.setActiveItem(0)}},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(typeof c!="boolean"){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var b=this,a=b.getModal();if(a){a.destroy()}b.removeAll(true,true);b.unlink("_scrollable");Ext.destroy(b.items);b.callSuper()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.util.Point",{radianToDegreeConstant:180/Math.PI,statics:{fromEvent:function(b){var a=b.changedTouches,c=(a&&a.length>0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){if(typeof a!="object"){a={x:0,y:0}}return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){if(typeof b!="object"){b={x:0,y:0}}var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){if(typeof b!="object"){b={x:0,y:0}}var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.LineSegment",{constructor:function(b,a){var c=Ext.util.Point;this.point1=c.from(b);this.point2=c.from(a)},intersects:function(l){var o=this.point1,m=this.point2,i=l.point1,f=l.point2,c=o.x,b=m.x,a=i.x,q=f.x,p=o.y,n=m.y,k=i.y,h=f.y,g=(c-b)*(k-h)-(p-n)*(a-q),j,e;if(g==0){return null}j=((a-q)*(c*n-p*b)-(c-b)*(a*h-k*q))/g;e=((k-h)*(c*n-p*b)-(p-n)*(a*h-k*q))/g;if(jMath.max(c,b)||jMath.max(a,q)||eMath.max(p,n)||eMath.max(k,h)){return null}return new Ext.util.Point(j,e)},getLength:function(){return Math.abs(this.point1.getDistanceTo(this.point2))},getAngleToX:function(){var d=this.point1,c=this.point2,a=c.y-d.y,b=c.x-d.x;return Math.atan2(a,b)},getInBetweenPoint:function(e){var b=this.point1,c=this.getAngleToX(),a=b.x+Math.cos(c)*e,d=b.y+Math.sin(c)*e;return new Ext.util.Point(a,d)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.Panel",{extend:Ext.Container,alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){return{reference:"element",classList:["x-container","x-unsized"],children:[{reference:"innerElement",className:"x-inner"},{reference:"tipElement",className:"x-anchor",hidden:true}]}},applyBodyPadding:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(n,i){var s=this.getAlignmentInfo(n,i);if(s.isAligned){return}var y=this.tipElement;y.hide();if(this.currentTipPosition){y.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=n.isComponent?n.renderElement:n,a=this.renderElement,o=d.getPageBox(),l=a.getPageBox(),b=l.left,v=l.top,E=l.right,h=l.bottom,k=b+(l.width/2),j=v+(l.height/2),p={x:b,y:v},m={x:E,y:v},D={x:b,y:h},F={x:E,y:h},A={x:k,y:j},u=o.left+(o.width/2),r=o.top+(o.height/2),x={x:u,y:r},c=new f(A,x),g=0,C=0,e,B,t,q,z,w;y.setVisibility(false);y.show();e=y.getSize();B=e.width;t=e.height;if(c.intersects(new f(p,m))){z=Math.min(Math.max(u,b+B),E-(B));w=v;C=t+10;q="top"}else{if(c.intersects(new f(p,D))){z=b;w=Math.min(Math.max(r+(B/2),B*1.6),h-(B/2.2));g=t+10;q="left"}else{if(c.intersects(new f(D,F))){z=Math.min(Math.max(u,b+B),E-B);w=h;C=-t-10;q="bottom"}else{if(c.intersects(new f(m,F))){z=E;w=Math.max(Math.min(r-t,h-B*1.3),B/2);g=-t-10;q="right"}}}}if(z||w){this.currentTipPosition=q;y.addCls("x-anchor-"+q);y.setLeft(z-b);y.setTop(w-v);y.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+C)}}});Ext.define("Ext.Button",{extend:Ext.Component,xtype:"button",cachedConfig:{pressedCls:Ext.baseCSSPrefix+"button-pressing",badgeCls:Ext.baseCSSPrefix+"badge",hasBadgeCls:Ext.baseCSSPrefix+"hasbadge",labelCls:Ext.baseCSSPrefix+"button-label",iconCls:null},config:{badgeText:null,text:null,icon:false,iconAlign:"left",pressedDelay:0,handler:null,scope:null,autoEvent:null,ui:"normal",baseCls:Ext.baseCSSPrefix+"button"},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement"},{tag:"span",reference:"textElement",hidden:true}],initialize:function(){this.callParent();this.element.on({scope:this,tap:"onTap",touchstart:"onPress",touchend:"onRelease"})},updateBadgeText:function(c){var a=this.element,b=this.badgeElement;if(c){b.show();b.setText(c)}else{b.hide()}a[(c)?"addCls":"removeCls"](this.getHasBadgeCls())},updateText:function(b){var a=this.textElement;if(a){if(b){a.show();a.setHtml(b)}else{a.hide()}this.refreshIconAlign()}},updateHtml:function(b){var a=this.textElement;if(b){a.show();a.setHtml(b)}else{a.hide()}},updateBadgeCls:function(b,a){this.badgeElement.replaceCls(a,b)},updateHasBadgeCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateLabelCls:function(b,a){this.textElement.replaceCls(a,b)},updatePressedCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateIcon:function(b){var c=this,a=c.iconElement;if(b){c.showIconElement();a.setStyle("background-image","url("+b+")");c.refreshIconAlign()}else{a.setStyle("background-image","");c.hideIconElement()}},updateIconCls:function(c,a){var d=this,b=d.iconElement;if(c){d.showIconElement();b.replaceCls(a,c);d.refreshIconAlign()}else{b.removeCls(a);d.hideIconElement()}},updateIconAlign:function(d,c){var b=this.element,a=Ext.baseCSSPrefix+"iconalign-";if(!this.getText()){d="center"}b.removeCls(a+"center");b.removeCls(a+c);if(this.getIcon()||this.getIconCls()){b.addCls(a+d)}},refreshIconAlign:function(){this.updateIconAlign(this.getIconAlign())},applyAutoEvent:function(b){var a=this;if(typeof b=="string"){b={name:b,scope:a.scope||a}}return b},updateAutoEvent:function(c){var a=c.name,b=c.scope;this.setHandler(function(){b.fireEvent(a,b,this)});this.setScope(b)},hideIconElement:function(){this.iconElement.removeCls(Ext.baseCSSPrefix+"shown");this.iconElement.addCls(Ext.baseCSSPrefix+"hidden")},showIconElement:function(){this.iconElement.removeCls(Ext.baseCSSPrefix+"hidden");this.iconElement.addCls(Ext.baseCSSPrefix+"shown")},applyUi:function(a){if(a&&Ext.isString(a)){var b=a.split("-");if(b&&(b[1]=="back"||b[1]=="forward")){return b}}return a},getUi:function(){var a=this._ui;if(Ext.isArray(a)){return a.join("-")}return a},applyPressedDelay:function(a){if(Ext.isNumber(a)){return a}return(a)?100:0},onPress:function(){var c=this,a=c.element,d=c.getPressedDelay(),b=c.getPressedCls();if(!c.getDisabled()){if(d>0){c.pressedTimeout=setTimeout(function(){delete c.pressedTimeout;if(a){a.addCls(b)}},d)}else{a.addCls(b)}}},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.getDisabled()){if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}else{a.element.removeCls(a.getPressedCls())}}},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}if(d&&d.preventDefault){d.preventDefault()}b.apply(a,arguments)}},function(){});Ext.define("Ext.Sheet",{extend:Ext.Panel,xtype:"sheet",config:{baseCls:Ext.baseCSSPrefix+"sheet",modal:true,centered:true,stretchX:null,stretchY:null,enter:"bottom",exit:"bottom",showAnimation:!Ext.browser.is.AndroidStock2?{type:"slideIn",duration:250,easing:"ease-out"}:null,hideAnimation:!Ext.browser.is.AndroidStock2?{type:"slideOut",duration:250,easing:"ease-in"}:null},isInputRegex:/^(input|textarea|select|a)$/i,beforeInitialize:function(){var a=this;Ext.os.is.iOS&&this.element.dom.addEventListener("touchstart",function(b){if(!a.isInputRegex.test(b.target.tagName)){b.preventDefault()}},true)},platformConfig:[{theme:["Windows"],enter:"top",exit:"top"}],applyHideAnimation:function(b){var a=this.getExit(),d=a;if(a===null){return null}if(b===true){b={type:"slideOut"}}if(Ext.isString(b)){b={type:b}}var c=Ext.factory(b,Ext.fx.Animation);if(c){if(a=="bottom"){d="down"}if(a=="top"){d="up"}c.setDirection(d)}return c},applyShowAnimation:function(a){var d=this.getEnter(),c=d;if(d===null){return null}if(a===true){a={type:"slideIn"}}if(Ext.isString(a)){a={type:a}}var b=Ext.factory(a,Ext.fx.Animation);if(b){if(d=="bottom"){c="down"}if(d=="top"){c="up"}b.setBefore({display:null});b.setReverse(true);b.setDirection(c)}return b},updateStretchX:function(a){this.getLeft();this.getRight();if(a){this.setLeft(0);this.setRight(0)}},updateStretchY:function(a){this.getTop();this.getBottom();if(a){this.setTop(0);this.setBottom(0)}}});Ext.define("Ext.ActionSheet",{extend:Ext.Sheet,alias:"widget.actionsheet",config:{baseCls:Ext.baseCSSPrefix+"sheet-action",left:0,right:0,bottom:0,centered:false,height:"auto",defaultType:"button"},platformConfig:[{theme:["Windows"],top:0,bottom:null}]});Ext.define("Ext.data.Connection",{mixins:{observable:Ext.mixin.Observable},statics:{requestId:0},config:{url:null,async:true,method:null,username:"",password:"",disableCaching:true,disableCachingParam:"_dc",timeout:30000,extraParams:null,defaultHeaders:null,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",autoAbort:false},textAreaRe:/textarea/i,multiPartRe:/multipart\/form-data/i,lineBreakRe:/\r\n/g,constructor:function(a){this.initConfig(a);this.requests={}},request:function(k){k=k||{};var f=this,j=k.scope||window,e=k.username||f.getUsername(),h=k.password||f.getPassword()||"",g=k.xhr2===true&&Ext.feature.has.XHR2,b,c,d,a,i;if(!Ext.isEmpty(e)&&!Ext.isEmpty(h,true)&&Ext.isEmpty(k.withCredentials)){k.withCredentials=true}if(f.fireEvent("beforerequest",f,k)!==false){c=f.setOptions(k,j);if(this.isFormUpload(k)===true){this.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort===true||f.getAutoAbort()){f.abort()}i=this.getXhrInstance();b=k.async!==false?(k.async||f.getAsync()):false;if(e){i.open(c.method,c.url,b,e,h)}else{i.open(c.method,c.url,b)}a=f.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},k.timeout||f.getTimeout())};f.requests[d.id]=d;if(b){i[g?"onload":"onreadystatechange"]=Ext.Function.bind(f.onStateChange,f,[d])}if(g){i.onerror=Ext.Function.bind(f.onStateChange,f,[d])}if(k.progress){i.onprogress=function(l){if(k.progress.isProgressable){if(l.total===0&&k.progress.getDynamic()){Ext.Logger.warn("Server is not configured to properly return Content-Length. Dynamic progress will be disabled");k.progress.setState.call(k.progress,"download");k.progress.setDynamic(false);i.onprogress=null;return}Ext.callback(k.progress.updateProgress,k.progress,[(l.loaded/l.total),"download"]);if(l.total>0&&!k.progress.getDynamic()&&k.progress.getInitialConfig().dynamic){k.progress.setDynamic(true)}}else{if(Ext.isFunction(k.progress)){Ext.callback(k.progress,k.progressScope||d,[l,"download"])}}};if(Ext.feature.has.XHRUploadProgress){i.upload.onprogress=function(l){f.fireEvent("requestuploadprogress",f,d,l);if(k.progress.isProgressable){Ext.callback(k.progress.updateProgress,k.progress,[(l.loaded/l.total),"upload"])}else{if(Ext.isFunction(k.progress)){Ext.callback(k.progress,k.progressScope||d,[l,"upload"])}}}}if(k.progress.isProgressable){if(!Ext.feature.has.XHRUploadProgress){k.progress.setDynamic(false)}Ext.callback(k.progress.startProgress,k.progress)}}i.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(e,c,i,l){e=Ext.getDom(e);l=l||{};var d=Ext.id(),k=this,h=document.createElement("iframe"),j=[],g="multipart/form-data",f={target:e.target,method:e.method,encoding:e.encoding,enctype:e.enctype,action:e.action},b=function(m,n){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:n,name:m});e.appendChild(a);j.push(a)},a;Ext.fly(h).set({id:d,name:d,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(h);if(document.frames){document.frames[d].name=d}Ext.fly(e).set({target:d,method:"POST",enctype:g,encoding:g,action:c||f.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(m,n){if(Ext.isArray(n)){Ext.each(n,function(o){b(m,o)})}else{b(m,n)}})}h.addEventListener("load",function(){Ext.callback(k.onUploadComplete,k,[h,l,d]);h.removeEventListener("load",arguments.callee)});e.submit();Ext.fly(e).set(f);Ext.each(j,function(m){Ext.removeNode(m)})},onUploadComplete:function(h,c,i){var b={responseText:"",responseXML:null,request:{options:c}},g,a,f;try{g=(h.contentWindow&&h.contentWindow.document)||h.contentDocument||window.frames[i].document;if(g){if(g.hasOwnProperty("body")&&g.body){a=g.body}if(a){f=a.firstChild||{};if(this.textAreaRe.test(f.tagName)){b.responseText=f.value}else{b.responseText=f.innerHTML}b.responseXML=a.XMLDocument}}}catch(d){b.success=false;b.message="Cross-Domain access is not permitted between frames. XHR2 is recommended for this type of request.";b.error=d}this.onAfterUploadComplete(b,h,c)},onAfterUploadComplete:function(a,d,b){var c=this;c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(d)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(this.multiPartRe).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.getExtraParams(),d=k.urlParams,c=k.url||h.getUrl(),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.data||k.rawData||k.binaryData||k.xmlData||i||null;if(i&&!Ext.isPrimitive(i)){f=Ext.encode(f)}if(k.binaryData){if(f instanceof Array){f=(new Uint8Array(k.binaryData))}if(f instanceof Uint8Array){f=f.buffer}}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.getMethod()||((e||f)?"POST":"GET")).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.getDisableCaching()):false;if(a){c=Ext.urlAppend(c,(k.disableCachingParam||h.getDisableCachingParam())+"="+(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.getDefaultHeaders()||{}),k=h.getDefaultPostHeader(),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"}}}}if(!(Ext.feature.has.XHR2&&d instanceof FormData)){b["Content-Type"]=k}}if(((h.getUseDefaultXhrHeader()&&m.useDefaultXhrHeader!==false)||m.useDefaultXhrHeader)&&!b["X-Requested-With"]){b["X-Requested-With"]=h.getDefaultXhrHeader()}if(!Ext.isEmpty(m.username)&&!Ext.isEmpty(m.password)){b.Authorization="Basic "+btoa(m.username+":"+m.password)}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent("exception",j,f)}if(m.responseType){try{l.responseType=m.responseType==="blob"&&Ext.browser.is.Safari?"arraybuffer":m.responseType}catch(g){}}if(m.withCredentials){l.withCredentials=m.withCredentials}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||(a==0&&d.responseText&&d.responseText.length>0),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(d){var j=d.xhr,a={},k,f,l,g,i,b,e=j.responseType==="blob"||j.responseType==="arraybuffer",h=j.responseType==="text",c=j.responseType==="document";if(d.timedout||d.aborted){d.success=false;k=[]}else{k=j.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}f=k.length;while(f--){l=k[f];g=l.indexOf(":");if(g>=0){i=l.substr(0,g).toLowerCase();if(l.charAt(g+1)==" "){++g}a[i]=l.substr(g+1)}}d.xhr=null;delete d.xhr;b={request:d,requestId:d.id,status:j.status,statusText:j.statusText,getResponseHeader:function(m){return a[m.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:e?null:c?null:j.responseText,responseXML:e?null:h?null:j.responseXML,responseBytes:e?j.response:null};if(d.options.responseType==="blob"&&j.responseType==="arraybuffer"){b.responseBytes=new Blob([b.responseBytes],{type:j.getResponseHeader("Content-Type")})}j=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:Ext.data.Connection,singleton:true,autoAbort:false});Ext.define("Ext.Anim",{isAnim:true,disableAnimations:false,defaultConfig:{from:{},to:{},duration:250,delay:0,easing:"ease-in-out",autoClear:true,out:true,direction:null,reverse:false},opposites:{left:"right",right:"left",up:"down",down:"up"},constructor:function(a){a=Ext.apply({},a||{},this.defaultConfig);this.config=a;this.callSuper([a]);this.running=[]},initConfig:function(c,b){var d=this,a=Ext.apply({},b||{},d.config);a.el=c=Ext.get(c);if(a.reverse&&d.opposites[a.direction]){a.direction=d.opposites[a.direction]}if(d.config.before){d.config.before.call(a,c,a)}if(b.before){b.before.call(a.scope||a,c,a)}return a},run:function(c,a){c=Ext.get(c);a=a||{};var d=this,b=c.dom.style,e,f=a.after;if(d.running[c.id]){d.onTransitionEnd(null,c,{config:a,after:f})}a=this.initConfig(c,a);if(this.disableAnimations){for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}this.onTransitionEnd(null,c,{config:a,after:f});return d}c.un("transitionend",d.onTransitionEnd,d);b.webkitTransitionDuration="0ms";for(e in a.from){if(!a.from.hasOwnProperty(e)){continue}b[e]=a.from[e]}setTimeout(function(){if(!c.dom){return}if(a.is3d===true){c.parent().setStyle({"-webkit-perspective":"1200","-webkit-transform-style":"preserve-3d"})}b.webkitTransitionDuration=a.duration+"ms";b.webkitTransitionProperty="all";b.webkitTransitionTimingFunction=a.easing;c.on("transitionend",d.onTransitionEnd,d,{single:true,config:a,after:f});for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}},a.delay||5);d.running[c.id]=a;return d},onTransitionEnd:function(e,c,g){c=Ext.get(c);if(this.running[c.id]===undefined){return}var b=c.dom.style,a=g.config,d=this,f;if(a.autoClear){for(f in a.to){if(!a.to.hasOwnProperty(f)||a[f]===false){continue}b[f]=""}}b.webkitTransitionDuration=null;b.webkitTransitionProperty=null;b.webkitTransitionTimingFunction=null;if(a.is3d){c.parent().setStyle({"-webkit-perspective":"","-webkit-transform-style":""})}if(d.config.after){d.config.after.call(a,c,a)}if(g.after){g.after.call(a.scope||d,c,a)}delete d.running[c.id]}},function(){Ext.Anim.seed=1000;Ext.Anim.run=function(b,c,a){if(b.isComponent){b=b.element}else{b=Ext.get(b)}a=a||{};if(c.isAnim){c.run(b,a)}else{if(Ext.isObject(c)){if(a.before&&c.before){a.before=Ext.createInterceptor(a.before,c.before,c.scope)}if(a.after&&c.after){a.after=Ext.createInterceptor(a.after,c.after,c.scope)}a=Ext.apply({},a,c);c=c.type}if(!Ext.anims[c]){throw c+" is not a valid animation type."}else{if(b&&b.dom){Ext.anims[c].run(b,a)}}}};Ext.anims={fade:new Ext.Anim({type:"fade",before:function(b){var c=1,a=1,e=b.getStyle("z-index")=="auto"?0:b.getStyle("z-index"),d=e;if(this.out){a=0}else{d=Math.abs(e)+1;c=0}this.from={opacity:c,"z-index":d};this.to={opacity:a,"z-index":d}}}),slide:new Ext.Anim({direction:"left",cover:false,reveal:false,opacity:false,"z-index":false,before:function(a){var c=a.getStyle("z-index")=="auto"?0:a.getStyle("z-index"),f=a.getStyle("opacity"),h=c+1,d=this.out,l=this.direction,k=0,i=0,j=0,g=0,b=a.getHeight(),e=a.getWidth();if(l=="left"||l=="right"){if(d){k=-e}else{j=e}}else{if(l=="up"||l=="down"){if(d){i=-b}else{g=b}}}if(l=="right"||l=="down"){i*=-1;k*=-1;g*=-1;j*=-1}if(this.cover&&d){k=0;i=0;h=c}else{if(this.reveal&&!d){j=0;g=0;h=c}}this.from={"-webkit-transform":"translate3d("+j+"px, "+g+"px, 0)","z-index":h,opacity:f-0.01};this.to={"-webkit-transform":"translate3d("+k+"px, "+i+"px, 0)","z-index":h,opacity:f}}}),pop:new Ext.Anim({scaleOnExit:true,before:function(d){var b=1,c=1,g=1,a=1,h=d.getStyle("z-index")=="auto"?0:d.getStyle("z-index"),f=h,e=h;if(!this.out){b=0.01;f=h+1;e=h+1;g=0}else{if(this.scaleOnExit){c=0.01;a=0}else{a=0.8}}this.from={"-webkit-transform":"scale("+b+")","-webkit-transform-origin":"50% 50%",opacity:g,"z-index":f};this.to={"-webkit-transform":"scale("+c+")","-webkit-transform-origin":"50% 50%",opacity:a,"z-index":e}}}),flip:new Ext.Anim({is3d:true,direction:"left",before:function(c){var f="Y",a=1,b=1,e=0,d=0;if(this.out){d=-180;b=0.8}else{e=180;a=0.8}if(this.direction=="up"||this.direction=="down"){f="X"}if(this.direction=="right"||this.direction=="left"){d*=-1;e*=-1}this.from={"-webkit-transform":"rotate"+f+"("+e+"deg) scale("+a+")","-webkit-backface-visibility":"hidden"};this.to={"-webkit-transform":"rotate"+f+"("+d+"deg) scale("+b+")","-webkit-backface-visibility":"hidden"}}}),cube:new Ext.Anim({is3d:true,direction:"left",style:"outer",before:function(b){var k="0% 0%",l=0,a=0,i="Y",f=0,g=0,e=b.getWidth(),d=b.getHeight(),j=true,c=" translateX(0)",h="";if(this.direction=="left"||this.direction=="right"){if(this.out){k="100% 100%";g=e;a=-90}else{k="0% 0%";f=e;l=90}}else{if(this.direction=="up"||this.direction=="down"){i="X";if(this.out){k="100% 100%";g=d;a=90}else{k="0% 0%";f=d;l=-90}}}if(this.direction=="down"||this.direction=="right"){l*=-1;a*=-1;k=(k=="0% 0%")?"100% 100%":"0% 0%"}if(this.style=="inner"){f*=-1;g*=-1;l*=-1;a*=-1;if(!this.out){h=" translateX(0px)";k="0% 50%"}else{h=c;k="100% 50%"}}this.from={"-webkit-transform":"rotate"+i+"("+l+"deg)"+(j?" translateZ("+f+"px)":"")+c,"-webkit-transform-origin":k};this.to={"-webkit-transform":"rotate"+i+"("+a+"deg) translateZ("+g+"px)"+h,"-webkit-transform-origin":k}},duration:250}),wipe:new Ext.Anim({before:function(b){var d=b.getStyle("z-index"),c,a="";if(!this.out){c=d+1;a="-webkit-gradient(linear, left bottom, right bottom, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))";this.from={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":0};this.to={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":-b.getWidth()*2+"px"}}},duration:500})}});Ext.define("Ext.Media",{extend:Ext.Component,xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,volume:1,muted:false},constructor:function(){this.mediaEvents={};this.callSuper(arguments)},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({canplay:"onCanPlay",play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(c,a){var b=this,d=b.media.dom,e=Ext.Function.bind;Ext.Object.each(c,function(g,f){f=e(b[f],b);b.mediaEvents[g]=f;d.addEventListener(g,f)})},onPlay:function(){this.fireEvent("play",this)},onCanPlay:function(){this.fireEvent("canplay",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return !Boolean(this.media.dom.paused)},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoPause()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;if("load" in b){b.load()}if(this.isPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){var a=this.media.dom;if("play" in a){a.play();setTimeout(function(){a.play()},10)}},pause:function(){var a=this.media.dom;if("pause" in a){a.pause()}},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this,c=a.media.dom,b=a.mediaEvents;Ext.Object.each(b,function(e,d){c.removeEventListener(e,d)});this.callSuper()}});Ext.define("Ext.Audio",{extend:Ext.Media,xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.util.Geolocation",{extend:Ext.Evented,alternateClassName:["Ext.util.GeoLocation"],config:{autoUpdate:true,frequency:10000,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null,allowHighAccuracy:false,timeout:Infinity,maximumAge:0,provider:undefined},updateMaximumAge:function(){if(this.watchOperation){this.updateWatchOperation()}},updateTimeout:function(){if(this.watchOperation){this.updateWatchOperation()}},updateAllowHighAccuracy:function(){if(this.watchOperation){this.updateWatchOperation()}},applyProvider:function(a){if(Ext.feature.has.Geolocation){if(!a){if(navigator&&navigator.geolocation){a=navigator.geolocation}else{if(window.google){a=google.gears.factory.create("beta.geolocation")}}}}else{this.fireEvent("locationerror",this,false,false,true,"This device does not support Geolocation.")}return a},updateAutoUpdate:function(a,b){var c=this,f=c.getProvider();if(b&&f){clearInterval(c.watchOperationId);c.watchOperationId=null}if(a){if(!f){c.fireEvent("locationerror",c,false,false,true,null);return}try{c.updateWatchOperation()}catch(d){c.fireEvent("locationerror",c,false,false,true,d.message)}}},updateWatchOperation:function(){var a=this,b=a.getProvider();if(a.watchOperationId){clearInterval(a.watchOperationId)}function c(){b.getCurrentPosition(Ext.bind(a.fireUpdate,a),Ext.bind(a.fireError,a),a.parseOptions())}c();a.watchOperationId=setInterval(c,this.getFrequency())},updateLocation:function(h,a,c){var b=this,g=b.getProvider();var f=function(i,e){if(e){b.fireError(e)}else{b.fireEvent("locationerror",b,false,false,true,i)}if(h){h.call(a||b,null,b)}};if(!g){f(null);return}try{g.getCurrentPosition(function(e){b.fireUpdate(e);if(h){h.call(a||b,b,b)}},function(e){f(null,e)},c||b.parseOptions())}catch(d){f(d.message)}},fireUpdate:function(a){var b=this,c=a.coords;this.position=a;b.setConfig({timestamp:a.timestamp,latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy,altitude:c.altitude,altitudeAccuracy:c.altitudeAccuracy,heading:c.heading,speed:c.speed});b.fireEvent("locationupdate",b)},fireError:function(a){var b=a.code;this.fireEvent("locationerror",this,b==a.TIMEOUT,b==a.PERMISSION_DENIED,b==a.POSITION_UNAVAILABLE,a.message==undefined?null:a.message)},parseOptions:function(){var b=this.getTimeout(),a={maximumAge:this.getMaximumAge(),enableHighAccuracy:this.getAllowHighAccuracy()};if(b!==Infinity){a.timeout=b}return a},destroy:function(){this.setAutoUpdate(false)}});Ext.define("Ext.Map",{extend:Ext.Container,xtype:"map",isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{},mapListeners:null},constructor:function(){this.callParent(arguments);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.initMap();this.on({painted:"doResize",scope:this});this.innerElement.on("touchstart","onTouchStart",this)},initMap:function(){var f=this.getMap();if(!f){var e=(window.google||{}).maps;if(!e){return null}var b=this.mapContainer,a=this.getMapOptions(),d=e.event,c=this;if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:e.NavigationControlStyle.ZOOM_PAN}},a)}a.mapTypeId=a.mapTypeId||e.MapTypeId.ROADMAP;a.center=a.center||new e.LatLng(37.381592,-122.135672);if(a.center&&a.center.latitude&&!Ext.isFunction(a.center.lat)){a.center=new e.LatLng(a.center.latitude,a.center.longitude)}a.zoom=a.zoom||12;f=new e.Map(b.dom,a);this.setMap(f);d.addListener(f,"zoom_changed",Ext.bind(c.onZoomChange,c));d.addListener(f,"maptypeid_changed",Ext.bind(c.onTypeChange,c));d.addListener(f,"center_changed",Ext.bind(c.onCenterChange,c));d.addListenerOnce(f,"tilesloaded",Ext.bind(c.onTilesLoaded,c));this.addMapListeners()}return this.getMap()},renderMap:function(){this.initMap()},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner",children:[{reference:"mapContainer",className:Ext.baseCSSPrefix+"map-container"}]}]}},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(c){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){a.setOptions(c)}},doMapCenter:function(){this.setMapCenter(this.getMapOptions().center)},getMapOptions:function(){return Ext.merge({},this.options||this.getInitialConfig("mapOptions"))},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.setMapCenter()}},applyGeo:function(a){return Ext.factory(a,Ext.util.Geolocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},onTilesLoaded:function(){this.fireEvent("maprender",this,this.getMap())},addMapListeners:function(){var e=(window.google||{}).maps,a=this.getMap(),j=this.getMapListeners();if(e){var b=e.event,h=this,d,k,i,g,f;if(Ext.isSimpleObject(j)){for(var c in j){d=j[c];if(Ext.isSimpleObject(d)){k=d.scope;i=d.fn}else{if(Ext.isFunction(d)){k=null;i=d}}if(i){g=function(){this.fn.apply(this.scope,[h]);if(this.handle){b.removeListener(this.handle);delete this.handle;delete this.fn;delete this.scope}};f=b.addListener(a,c,Ext.bind(g,g));g.fn=i;g.scope=k;if(d.single===true){g.handle=f}}}}}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(e){var b=this,d=b.getMap(),a=b.getMapOptions(),c=(window.google||{}).maps;if(c){if(!e){if(d&&d.getCenter){e=d.getCenter()}else{if(a.hasOwnProperty("center")){e=a.center}else{e=new c.LatLng(37.381592,-122.135672)}}}if(e&&!(e instanceof c.LatLng)&&"longitude" in e){e=new c.LatLng(e.latitude,e.longitude)}if(!d){a.center=a.center||e;b.renderMap();d=b.getMap()}if(d&&e instanceof c.LatLng){d.panTo(e)}else{this.options=Ext.apply(this.getMapOptions(),{center:e})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.BingMap",{extend:Ext.Map,xtype:"bingmap",initMap:function(){var f=this.getMap();if(!f){var e=this,c=e.mapContainer,a=e.getMapOptions(),d;var g=Microsoft.Maps;var b="AokX-S2lieXTaXG8pvEw3i2AKYuStBMK8RsUu6BDJ6hrL5AYv0IfQqM9zc-BAA-v";a=Ext.merge({credentials:b,mapTypeId:"r",zoom:12},a);if(!a.center){a.center=new g.Location(37.381592,-122.135672)}if(c.dom.firstChild){Ext.fly(c.dom.firstChild).destroy()}g.loadModule("Microsoft.Maps.Overlays.Style",{callback:function(){e.setMap(new g.Map(c.dom,a));if(a.callback){a.callback()}}});f=e.getMap()}e.fireEvent("maprender",e,f)},setMapCenter:function(c){var a=this,b=a.getMap(),d=Microsoft.Maps;if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[c]});return}c=c||new d.Location(37.381592,-122.135672);if(c&&!(c instanceof d.Location)&&"longitude" in c){c=new d.Location(c.latitude,c.longitude)}if(!b){a.initMap();b=a.getMap()}if(b&&c instanceof d.Location){b.updateMapPosition(c)}else{this.options=Ext.apply(this.getMapOptions(),{center:c})}}},function(){});Ext.define("Ext.ComponentQuery",{singleton:true},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=10){a.input.on({scope:a,keypress:"onKeyPress"})}},updateFastFocus:function(a){if(a){if(this.getFastFocus()&&Ext.os.is.iOS){this.input.on({scope:this,touchstart:"onTouchStart"})}}else{this.input.un({scope:this,touchstart:"onTouchStart"})}},useManualMaxLength:function(){return Boolean((Ext.os.is.Android&&!Ext.browser.is.Chrome))},applyUseMask:function(a){if(a==="auto"){a=Ext.os.is.iOS&&Ext.os.version.lt("5")}return Boolean(a)},updateUseMask:function(a){this.mask[a?"show":"hide"]()},updatePattern:function(a){this.updateFieldAttribute("pattern",a)},updateFieldAttribute:function(b,c){var a=this.input;if(!Ext.isEmpty(c,true)){a.dom.setAttribute(b,c)}else{a.dom.removeAttribute(b)}},updateCls:function(b,a){this.input.addCls(Ext.baseCSSPrefix+"input-el");this.input.replaceCls(a,b)},updateType:function(a,c){var b=Ext.baseCSSPrefix+"input-";this.input.replaceCls(b+c,b+a);this.updateFieldAttribute("type",a)},updateName:function(a){this.updateFieldAttribute("name",a)},getValue:function(){var a=this.input;if(a){this._value=a.dom.value}return this._value},applyValue:function(a){return(Ext.isEmpty(a))?"":a},updateValue:function(b){var a=this.input;if(a){a.dom.value=b}},setValue:function(b){var a=this._value;this.updateValue(this.applyValue(b));b=this.getValue();if(String(b)!=String(a)&&this.initialized){this.onChange(this,b,a)}return this},updateTabIndex:function(a){this.updateFieldAttribute("tabIndex",a)},testAutoFn:function(a){return[true,"on"].indexOf(a)!==-1},updateMaxLength:function(a){if(!this.useManualMaxLength()){this.updateFieldAttribute("maxlength",a)}},updatePlaceHolder:function(a){this.updateFieldAttribute("placeholder",a)},applyAutoComplete:function(a){return this.testAutoFn(a)},updateAutoComplete:function(a){var b=a?"on":"off";this.updateFieldAttribute("autocomplete",b)},applyAutoCapitalize:function(a){return this.testAutoFn(a)},updateAutoCapitalize:function(b){var a=b?"on":"off";this.updateFieldAttribute("autocapitalize",a)},applyAutoCorrect:function(a){return this.testAutoFn(a)},updateAutoCorrect:function(a){var b=a?"on":"off";this.updateFieldAttribute("autocorrect",b)},updateMinValue:function(a){this.updateFieldAttribute("min",a)},updateMaxValue:function(a){this.updateFieldAttribute("max",a)},updateStepValue:function(a){this.updateFieldAttribute("step",a)},checkedRe:/^(true|1|on)/i,getChecked:function(){var a=this.input,b;if(a){b=a.dom.checked;this._checked=b}return b},applyChecked:function(a){return !!this.checkedRe.test(String(a))},setChecked:function(a){this.updateChecked(this.applyChecked(a));this._checked=a},updateChecked:function(a){this.input.dom.checked=a},updateReadOnly:function(a){this.updateFieldAttribute("readonly",a?true:null)},updateMaxRows:function(a){this.updateFieldAttribute("rows",a)},doSetDisabled:function(a){this.callParent(arguments);if(Ext.browser.is.Safari&&!Ext.os.is.BlackBerry){this.input.dom.tabIndex=(a)?-1:0}this.input.dom.disabled=(Ext.browser.is.Safari&&!Ext.os.is.BlackBerry)?false:a;if(!a){this.blur()}},isDirty:function(){if(this.getDisabled()){return false}return String(this.getValue())!==String(this.originalValue)},reset:function(){this.setValue(this.originalValue)},onInputTap:function(a){this.fireAction("inputtap",[this,a],"doInputTap")},doInputTap:function(a,b){if(a.getDisabled()){return false}if(this.getFastFocus()&&Ext.os.is.iOS){a.focus()}},onMaskTap:function(a){this.fireAction("masktap",[this,a],"doMaskTap")},doMaskTap:function(a,b){if(a.getDisabled()){return false}a.focus()},showMask:function(){if(this.getUseMask()){this.mask.setStyle("display","block")}},hideMask:function(){if(this.getUseMask()){this.mask.setStyle("display","none")}},focus:function(){var b=this,a=b.input;if(a&&a.dom.focus){a.dom.focus()}return b},blur:function(){var b=this,a=this.input;if(a&&a.dom.blur){a.dom.blur()}return b},select:function(){var b=this,a=b.input;if(a&&a.dom.setSelectionRange){a.dom.setSelectionRange(0,9999)}return b},onFocus:function(a){this.fireAction("focus",[a],"doFocus")},doFocus:function(b){var a=this;a.hideMask();if(!a.getIsFocused()){a.setStartValue(a.getValue())}a.setIsFocused(true)},onTouchStart:function(a){if(document.activeElement!=a.target){a.preventDefault()}},onBlur:function(a){this.fireAction("blur",[a],"doBlur")},doBlur:function(d){var b=this,c=b.getValue(),a=b.getStartValue();b.showMask();b.setIsFocused(false);if(String(c)!=String(a)){b.onChange(b,c,a)}},onClearIconTap:function(a){this.fireEvent("clearicontap",this,a);if(Ext.os.is.Android){this.focus()}},onClearIconPress:function(){this.clearIcon.addCls(Ext.baseCSSPrefix+"pressing")},onClearIconRelease:function(){this.clearIcon.removeCls(Ext.baseCSSPrefix+"pressing")},onClick:function(a){this.fireEvent("click",a)},onChange:function(b,c,a){if(this.useManualMaxLength()){this.trimValueToMaxLength()}this.fireEvent("change",b,c,a)},onPaste:function(a){if(this.useManualMaxLength()){this.trimValueToMaxLength()}this.fireEvent("paste",a)},onKeyUp:function(a){if(this.useManualMaxLength()){this.trimValueToMaxLength()}this.fireEvent("keyup",a)},onKeyDown:function(){this.ignoreInput=true},onInput:function(b){var a=this;if(a.ignoreInput){a.ignoreInput=false;return}setTimeout(function(){if(!a.ignoreInput){a.fireEvent("keyup",b);a.ignoreInput=false}},10)},onKeyPress:function(a){if(a.browserEvent.keyCode==13){this.fireEvent("keyup",a)}},onMouseDown:function(a){this.fireEvent("mousedown",a)},trimValueToMaxLength:function(){var a=this.getMaxLength();if(a){var b=this.getValue();if(b.length>this.getMaxLength()){this.setValue(b.slice(0,a))}}}});Ext.define("Ext.field.Field",{extend:Ext.Decorator,alternateClassName:"Ext.form.Field",xtype:"field",isField:true,isFormField:true,config:{baseCls:Ext.baseCSSPrefix+"field",label:null,labelAlign:"left",labelWidth:"30%",labelWrap:false,clearIcon:null,required:false,inputType:null,name:null,value:null,tabIndex:null},platformConfig:[{theme:["Windows","MountainView","Blackberry","Blackberry103","Tizen"],labelAlign:"top"}],cachedConfig:{labelCls:null,requiredCls:Ext.baseCSSPrefix+"field-required",inputCls:null},getElementConfig:function(){var a=Ext.baseCSSPrefix;return{reference:"element",className:"x-container",children:[{reference:"label",cls:a+"form-label",children:[{reference:"labelspan",tag:"span"}]},{reference:"innerElement",cls:a+"component-outer"}]}},updateLabel:function(b,d){var a=this.renderElement,c=Ext.baseCSSPrefix;if(b){this.labelspan.setHtml(b);a.addCls(c+"field-labeled")}else{a.removeCls(c+"field-labeled")}},updateLabelAlign:function(b,c){var a=this.renderElement,d=Ext.baseCSSPrefix;if(b){a.addCls(d+"label-align-"+b);if(b=="top"||b=="bottom"){this.label.setWidth("100%")}else{this.updateLabelWidth(this.getLabelWidth())}}if(c){a.removeCls(d+"label-align-"+c)}},updateLabelCls:function(a,b){if(a){this.label.addCls(a)}if(b){this.label.removeCls(b)}},updateLabelWidth:function(b){var a=this.getLabelAlign();if(b){if(a=="top"||a=="bottom"){this.label.setWidth("100%")}else{this.label.setWidth(b)}}},updateLabelWrap:function(b,c){var a=Ext.baseCSSPrefix+"form-label-nowrap";if(!b){this.addCls(a)}else{this.removeCls(a)}},updateRequired:function(a){this.renderElement[a?"addCls":"removeCls"](this.getRequiredCls())},updateRequiredCls:function(a,b){if(this.getRequired()){this.renderElement.replaceCls(b,a)}},initialize:function(){var a=this;a.callParent();a.doInitValue()},doInitValue:function(){this.originalValue=this.getInitialConfig().value},reset:function(){this.setValue(this.originalValue);return this},resetOriginalValue:function(){this.originalValue=this.getValue()},isDirty:function(){return false}},function(){});Ext.define("Ext.field.Text",{extend:Ext.field.Field,xtype:"textfield",alternateClassName:"Ext.form.Text",config:{ui:"text",clearIcon:true,placeHolder:null,maxLength:null,autoComplete:null,autoCapitalize:null,autoCorrect:null,readOnly:null,component:{xtype:"input",type:"text",fastFocus:true},bubbleEvents:["action"]},initialize:function(){var a=this;a.callParent();a.getComponent().on({scope:this,keyup:"onKeyUp",change:"onChange",focus:"onFocus",blur:"onBlur",paste:"onPaste",mousedown:"onMouseDown",clearicontap:"onClearIconTap"});a.originalValue=a.getValue()||"";a.getComponent().originalValue=a.originalValue;a.syncEmptyCls()},syncEmptyCls:function(){var b=(this._value)?this._value.length:false,a=Ext.baseCSSPrefix+"empty";if(b){this.removeCls(a)}else{this.addCls(a)}},updateValue:function(c){var b=this.getComponent(),a=c!==undefined&&c!==null&&c!=="";if(b){b.setValue(c)}this[a&&this.isDirty()?"showClearIcon":"hideClearIcon"]();this.syncEmptyCls()},getValue:function(){var a=this;a._value=a.getComponent().getValue();a.syncEmptyCls();return a._value},updatePlaceHolder:function(a){this.getComponent().setPlaceHolder(a)},updateMaxLength:function(a){this.getComponent().setMaxLength(a)},updateAutoComplete:function(a){this.getComponent().setAutoComplete(a)},updateAutoCapitalize:function(a){this.getComponent().setAutoCapitalize(a)},updateAutoCorrect:function(a){this.getComponent().setAutoCorrect(a)},updateReadOnly:function(a){if(a){this.hideClearIcon()}else{this.showClearIcon()}this.getComponent().setReadOnly(a)},updateInputType:function(a){var b=this.getComponent();if(b){b.setType(a)}},updateName:function(a){var b=this.getComponent();if(b){b.setName(a)}},updateTabIndex:function(b){var a=this.getComponent();if(a){a.setTabIndex(b)}},updateInputCls:function(a,b){var c=this.getComponent();if(c){c.replaceCls(b,a)}},doSetDisabled:function(b){var c=this;c.callParent(arguments);var a=c.getComponent();if(a){a.setDisabled(b)}if(b){c.hideClearIcon()}else{c.showClearIcon()}},showClearIcon:function(){var b=this,c=b.getValue(),a=c!==undefined&&c!==null&&c!=="";if(b.getClearIcon()&&!b.getDisabled()&&!b.getReadOnly()&&a){b.element.addCls(Ext.baseCSSPrefix+"field-clearable")}return b},hideClearIcon:function(){if(this.getClearIcon()){this.element.removeCls(Ext.baseCSSPrefix+"field-clearable")}},onKeyUp:function(a){this.fireAction("keyup",[this,a],"doKeyUp")},doKeyUp:function(b,d){var c=b.getValue(),a=c!==undefined&&c!==null&&c!=="";this[a?"showClearIcon":"hideClearIcon"]();if(d.browserEvent.keyCode===13){b.fireAction("action",[b,d],"doAction")}},doAction:function(){this.blur()},onClearIconTap:function(a,b){this.fireAction("clearicontap",[this,a,b],"doClearIconTap")},doClearIconTap:function(a,b){a.setValue("");a.getValue()},onChange:function(b,c,a){b.fireEvent("change",this,c,a)},onFocus:function(a){this.addCls(Ext.baseCSSPrefix+"field-focused");this.isFocused=true;this.fireEvent("focus",this,a)},onBlur:function(b){var a=this;this.removeCls(Ext.baseCSSPrefix+"field-focused");this.isFocused=false;a.fireEvent("blur",a,b);setTimeout(function(){a.isFocused=false},50)},onPaste:function(a){this.fireEvent("paste",this,a)},onMouseDown:function(a){this.fireEvent("mousedown",this,a)},focus:function(){this.getComponent().focus();return this},blur:function(){this.getComponent().blur();return this},select:function(){this.getComponent().select();return this},resetOriginalValue:function(){this.callParent();var a=this.getComponent();if(a&&a.hasOwnProperty("originalValue")){this.getComponent().originalValue=this.originalValue}this.reset()},reset:function(){this.getComponent().reset();this.getValue();this[this.isDirty()?"showClearIcon":"hideClearIcon"]()},isDirty:function(){var a=this.getComponent();if(a){return a.isDirty()}return false}});Ext.define("Ext.field.TextAreaInput",{extend:Ext.field.Input,xtype:"textareainput",tag:"textarea"});Ext.define("Ext.field.TextArea",{extend:Ext.field.Text,xtype:"textareafield",alternateClassName:"Ext.form.TextArea",config:{ui:"textarea",autoCapitalize:false,component:{xtype:"textareainput"},maxRows:null},updateMaxRows:function(a){this.getComponent().setMaxRows(a)},doSetHeight:function(a){this.callParent(arguments);var b=this.getComponent();b.input.setHeight(a)},doSetWidth:function(b){this.callParent(arguments);var a=this.getComponent();a.input.setWidth(b)},doKeyUp:function(a){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]()}});Ext.define("Ext.MessageBox",{extend:Ext.Sheet,config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"msgbox",iconCls:null,showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:999,defaultTextHeight:75,title:null,buttons:null,message:null,prompt:null,modal:true,layout:{type:"vbox",pack:"center"}},platformConfig:[{theme:["Windows"],ui:"light",showAnimation:{type:"fadeIn"},hideAnimation:{type:"fadeOut"}},{theme:["Blackberry","Blackberry103"],ui:"plain"},{theme:["MoutainView"]}],statics:{OK:{text:"OK",itemId:"ok",ui:"action"},YES:{text:"Yes",itemId:"yes",ui:"action"},NO:{text:"No",itemId:"no"},CANCEL:{text:"Cancel",itemId:"cancel"},INFO:Ext.baseCSSPrefix+"msgbox-info",WARNING:Ext.baseCSSPrefix+"msgbox-warning",QUESTION:Ext.baseCSSPrefix+"msgbox-question",ERROR:Ext.baseCSSPrefix+"msgbox-error",OKCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"OK",itemId:"ok",ui:"action"}],YESNOCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}],YESNO:[{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}]},constructor:function(a){a=a||{};if(a.hasOwnProperty("promptConfig")){Ext.applyIf(a,{prompt:a.promptConfig});delete a.promptConfig}if(a.hasOwnProperty("multiline")||a.hasOwnProperty("multiLine")){a.prompt=a.prompt||{};Ext.applyIf(a.prompt,{multiLine:a.multiline||a.multiLine});delete a.multiline;delete a.multiLine}this.defaultAllowedConfig={};var e=["ui","showAnimation","hideAnimation","title","message","prompt","iconCls","buttons","defaultTextHeight"],d=e.length,b,c;for(b=0;bthis.getMaxProgressInput()){c=this.getMaxProgressInput()}if(c=0){d[b]=h}b++;if(g){g.then(f,a)}else{c.fulfill.apply(c,d)}}f();return c},whenComplete:function(g){var f=new this,e=-1,h=[],c=[],i;function a(j){i=g.shift();c.push(j);d(i)}function b(j){i=g.shift();h.push(j);d(i)}function d(j){e++;if(j){j.then(b,a)}else{f.fulfill.call(f,{fulfilled:h,rejected:c})}}d(g.shift());return f},from:function(){var a=new this;a.completed=1;a.lastResults=arguments;return a},fail:function(a){var b=new this;b.completed=-1;b.lastReason=a;return b}},completed:0,getListeners:function(b){var a=this.listeners;if(!a&&b){this.listeners=a=[]}return a},then:function(b,c,a){if(typeof b=="function"){a=c;c=b;b=null}if(typeof c=="string"){c=b[c]}if(typeof a=="string"){a=b[a]}return this.doThen(b,c,a)},doThen:function(d,g,b){var e=Ext.Promise,c=this.completed,f,a;if(c===-1){if(b){b.call(d,this.lastReason)}return this}if(c===1&&!this.isFulfilling){if(!g){return this}a=g.apply(d,this.lastResults);if(a instanceof e){f=a}else{f=e.from(a)}}else{f=new e;f.$owner=this;this.getListeners(true).push({scope:d,success:g,error:b,promise:f})}return f},error:function(b,a){if(typeof b=="function"){a=b;b=null}if(typeof a=="string"){a=b[a]}return this.doThen(b,null,a)},fulfill:function(){var b=arguments,d,e,c,g,f,a;this.lastResults=b;this.completed=1;while(d=this.getListeners()){delete this.listeners;this.isFulfilling=true;while(e=d.shift()){g=e.success;c=e.scope;f=e.promise;delete f.$owner;if(g){a=g.apply(c,b);if(a instanceof Ext.Promise){a.connect(f)}else{f.fulfill(a)}}else{f.fulfill(b)}}this.isFulfilling=false}return this},connect:function(b){var a=this;a.then(b,function(c){this.fulfill(c);return c},"reject")},reject:function(d){var b=this.getListeners(),c,a,e;this.lastReason=d;this.completed=-1;if(b){delete this.listeners;while(c=b.shift()){a=c.error;e=c.promise;delete e.$owner;if(a){a.call(c.scope,d)}e.reject(d)}}return this},cancel:function(){var c=this.getListeners(),a=this.$owner,b,d,e;if(c){for(b=0,d=c.length;b button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hide:"onButtonHiddenChange",show:"onButtonHiddenChange"})},updateAllowMultiple:function(a){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")&&a){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b=0;c--){d=b.items[c];if(!d.isHidden()){d.addCls(g);break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(e.getAllowToggle()){if(Ext.isArray(a)){d=a.length;for(b=0;b0)?"taphold":"tapstart";if(!this.disabled){this.enable()}},onStart:function(b,a){if(this.cancelSelector&&b.getTarget(this.cancelSelector)){return}if(this.handleSelector&&!b.getTarget(this.handleSelector)){return}if(!this.sorting){this.onSortStart(b,a)}},onSortStart:function(c,b){this.sorting=true;var a=Ext.create("Ext.util.Draggable",b,{threshold:0,revert:this.revert,direction:this.direction,constrain:this.constrain===true?this.el:this.constrain,animationDuration:100});a.on({drag:this.onDrag,dragend:this.onDragEnd,scope:this});this.dragEl=b;this.calculateBoxes();if(!a.dragging){a.onStart(c)}this.fireEvent("sortstart",this,c)},calculateBoxes:function(){this.items=[];var b=this.el.select(this.itemSelector,false),f=b.length,a,e,c,d;for(a=0;a(h.bottom-h.top)/2){if(h.bottom>k.top&&k.top>h.top){l.el.insertAfter(k.el)}else{l.el.insertBefore(k.el)}d=true}else{if(this.horizontal&&Math.abs(a.left-a.right)>(h.right-h.left)/2){if(h.right>k.left&&k.left>h.left){l.el.insertAfter(k.el)}else{l.el.insertBefore(k.el)}d=true}}if(d){l.reset();l.moveTo(h.left,h.top);this.calculateBoxes();this.fireEvent("sortchange",this,l.el,this.el.select(this.itemSelector,false).indexOf(l.el.dom));return}}}},onDragEnd:function(a,b){a.destroy();this.sorting=false;this.fireEvent("sortend",this,a,b)},enable:function(){this.el.on(this.startEventName,this.onStart,this,{delegate:this.itemSelector,holdThreshold:this.getDelay()});this.disabled=false},disable:function(){this.el.un(this.startEventName,this.onStart,this);this.disabled=true},isDisabled:function(){return this.disabled},isSorting:function(){return this.sorting},isVertical:function(){return this.vertical},isHorizontal:function(){return this.horizontal}});Ext.define("Ext.TitleBar",{extend:Ext.Container,xtype:"titlebar",isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",cls:Ext.baseCSSPrefix+"navigation-bar",ui:"dark",title:null,titleAlign:"center",defaultType:"button",minHeight:null,layout:{type:"hbox"},items:[],maxButtonWidth:"40%"},platformConfig:[{theme:["Blackberry","Blackberry103","Tizen"],titleAlign:"left"},{theme:["Cupertino"],maxButtonWidth:"80%"}],hasCSSMinHeight:true,beforeInitialize:function(){this.applyItems=this.applyInitialItems},initialize:function(){delete this.applyItems;this.add(this.initialItems);delete this.initialItems;this.on({painted:"refreshTitlePosition",single:true})},applyInitialItems:function(a){var c=this,b=c.getTitleAlign(),d=c.getDefaults()||{};c.initialItems=a;c.leftBox=c.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"},listeners:{resize:"refreshTitlePosition",scope:c}});c.spacer=c.add({xtype:"component",style:"position: relative",flex:1,listeners:{resize:"refreshTitlePosition",scope:c}});c.rightBox=c.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"},listeners:{resize:"refreshTitlePosition",scope:c}});switch(b){case"left":c.titleComponent=c.leftBox.add({xtype:"title",cls:Ext.baseCSSPrefix+"title-align-left",hidden:d.hidden});c.refreshTitlePosition=Ext.emptyFn;break;case"right":c.titleComponent=c.rightBox.add({xtype:"title",cls:Ext.baseCSSPrefix+"title-align-right",hidden:d.hidden});c.refreshTitlePosition=Ext.emptyFn;break;default:c.titleComponent=c.add({xtype:"title",hidden:d.hidden,centered:true});break}c.doAdd=c.doBoxAdd;c.remove=c.doBoxRemove;c.doInsert=c.doBoxInsert},doBoxAdd:function(a){if(a.config.align=="right"){this.rightBox.add(a)}else{this.leftBox.add(a)}},doBoxRemove:function(b,a){if(b.config.align=="right"){this.rightBox.remove(b,a)}else{this.leftBox.remove(b,a)}},doBoxInsert:function(a,b){if(b.config.align=="right"){this.rightBox.insert(a,b)}else{this.leftBox.insert(a,b)}},calculateMaxButtonWidth:function(){var a=this.getMaxButtonWidth();if(Ext.isString(a)){a=parseInt(a.replace("%",""),10)}a=Math.round((this.element.getWidth()/100)*a);return a},refreshTitlePosition:function(){if(this.isDestroyed){return}var g=this.titleComponent.renderElement;g.setWidth(null);g.setLeft(null);var b=this.leftBox,d=b.down("button"),a=b.getItems().getCount()==1,i,n;if(d&&a){if(d.getWidth()==null){d.renderElement.setWidth("auto")}i=b.renderElement.getWidth();n=this.calculateMaxButtonWidth();if(i>n){d.renderElement.setWidth(n)}}var k=this.spacer.renderElement.getPageBox();if(Ext.browser.is.IE){g.setWidth(k.width)}var l=g.getPageBox(),h=l.width-k.width,e=l.left,j=l.right,c,m,f;if(h>0){c=h/2;e+=c;j-=c;g.setWidth(k.width)}m=k.left-e;f=j-k.right;if(m>0){g.setLeft(m)}else{if(f>0){g.setLeft(-f)}}g.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);if(this.isPainted()){this.refreshTitlePosition()}}});Ext.define("Ext.Toast",{extend:Ext.Sheet,config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"toast",showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:999,message:null,timeout:1000,messageAnimation:true,hideOnMaskTap:true,modal:true,layout:{type:"vbox",pack:"center"}},applyMessage:function(a){a={html:a,cls:this.getBaseCls()+"-text"};return Ext.factory(a,Ext.Component,this._message)},updateMessage:function(a){if(a){this.add(a)}},applyTimeout:function(a){if(this._timeoutID){clearTimeout(this._timeoutID);if(!Ext.isEmpty(a)){this._timeoutID=setTimeout(Ext.bind(this.onTimeout,this),a)}}return a},next:Ext.emptyFn,show:function(a){var c=this,d=a.timeout,e=c.getMessageAnimation(),b=c.getMessage();if(c.isRendered()&&c.isHidden()===false){a.timeout=null;b.onAfter({hiddenchange:function(){c.setMessage(a.message);b=c.getMessage();b.onAfter({hiddenchange:function(){this._timeoutID=true;c.setTimeout(d)},scope:c,single:true});b.show(e)},scope:c,single:true});b.hide(e)}else{Ext.util.InputBlocker.blockInputs();c.setConfig(a);if(!c.getParent()&&Ext.Viewport){Ext.Viewport.add(c)}if(!Ext.isEmpty(d)){c._timeoutID=setTimeout(Ext.bind(c.onTimeout,c),d)}c.callParent(arguments)}},hide:function(a){clearTimeout(this._timeoutID);if(!this.next()){this.callParent(arguments)}},onTimeout:function(){this.hide()}},function(d){var c=[],e=false;function a(){var f=c.shift();if(f){e=true;this.show(f)}else{e=false}return e}function b(){if(!Ext.Toast._instance){Ext.Toast._instance=Ext.create("Ext.Toast");Ext.Toast._instance.next=a}return Ext.Toast._instance}Ext.toast=function(h,i){var f=b(),g=h;if(Ext.isString(h)){g={message:h,timeout:i}}if(g.timeout===undefined){g.timeout=Ext.Toast.prototype.config.timeout}c.push(g);if(!e){f.next()}return f}});Ext.define("Ext.Video",{extend:Ext.Media,xtype:"video",config:{posterUrl:null,baseCls:Ext.baseCSSPrefix+"video",controls:true},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a=1){g+=j.cssText}}a=g.match(/[0-9]+s/g);for(e in a){b=parseInt(a[e]);if(b>c){c=b}}if(this.$themeVariationChangeTimeout){clearTimeout(this.$themeVariationChangeTimeout);this.$themeVariationChangeTimeout=null}this.$themeVariationChangeTimeout=Ext.defer(function(){f.removeCls(k)},b*1000)}f.removeCls(d+l);f.addCls(d+h)}},function(){});Ext.define("Ext.carousel.Item",{extend:Ext.Decorator,config:{baseCls:"x-carousel-item",component:null,translatable:true}});Ext.define("Ext.carousel.Indicator",{extend:Ext.Component,xtype:"carouselindicator",alternateClassName:"Ext.Carousel.Indicator",config:{baseCls:Ext.baseCSSPrefix+"carousel-indicator",direction:"horizontal"},initialize:function(){this.callParent();this.indicators=[];this.element.on({tap:"onTap",scope:this})},updateDirection:function(a,c){var b=this.getBaseCls();this.element.replaceCls(c,a,b);if(a==="horizontal"){this.setBottom(0);this.setRight(null)}else{this.setRight(0);this.setBottom(null)}},addIndicator:function(){this.indicators.push(this.element.createChild({tag:"span"}))},removeIndicator:function(){var a=this.indicators;if(a.length>0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;b=a-c&&b<=a+c)},getTranslatable:function(){var a=this.translatable;if(!a){this.translatable=a=new Ext.util.TranslatableGroup;a.setItems(this.orderedCarouselItems);a.on("animationend","onAnimationEnd",this)}return a},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}this.getTranslatable().stopAnimation();this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m0&&m>0){h=1}}}}if(h===0){if(m0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(a){this.offset=a;if(Ext.isNumber(this.itemOffset)){this.getTranslatable().translateAxis(this.currentAxis,a+this.itemOffset)}return this},setOffsetAnimated:function(b){var a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=b;this.getTranslatable().translateAxis(this.currentAxis,b+this.itemOffset,this.getAnimation());return this},onAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),e={x:0,y:0},c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c;e[this.currentAxis]=b;this.getTranslatable().setItemLength(e)},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(qb){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;eMath.min(b.x+b.width,a.x+a.width))||(Math.max(b.y,a.y)-c>Math.min(b.y+b.height,a.y+a.height))},spline:function(m){var e,c,k=m.length,b,h,l,f,a=0,g=new Float32Array(m.length),n=new Float32Array(m.length*3-2);g[0]=0;g[k-1]=0;for(e=1;e0;e--){a=3.732050807568877+48.248711305964385/(-13.928203230275537+Math.pow(0.07179676972449123,e));g[e]-=g[e+1]*a}f=m[0];b=f-g[0];for(e=0,c=0;e=d&&h>=s)||(h<=d&&h<=s)){g=j=p}else{g=f((i-e)/k(h-d));if(dp){c-=n}g+=c;j+=c;m=i-r*a(g);l=h+r*b(g);v=i+q*a(j);u=h+q*b(j);if((h>d&&ld)){m+=k(d-l)*(m-i)/(l-h);l=d}if((h>s&&us)){v-=k(s-u)*(v-i)/(u-h);u=s}return{x1:m,y1:l,x2:v,y2:u}},smooth:function(l,j,o){var k=l.length,h,g,c,b,q,p,n,m,f=[],e=[],d,a;for(d=0;d=360){e-=360}}if(i){i[0]=e;i[1]=o;i[2]=c}else{i=[e,o,c]}return i},setHSL:function(g,f,e){var j,d,b,a=Math.abs,i=Math.floor;g=(g%360+360)%360;f=f>1?1:f<0?0:f;e=e>1?1:e<0?0:e;if(f===0||g===null){e*=255;this.setRGB(e,e,e)}else{g/=60;j=f*(1-a(2*e-1));d=j*(1-a(g-2*i(g/2)-1));b=e-j/2;b*=255;j*=255;d*=255;switch(i(g)){case 0:this.setRGB(j+b,d+b,b);break;case 1:this.setRGB(d+b,j+b,b);break;case 2:this.setRGB(b,j+b,d+b);break;case 3:this.setRGB(b,d+b,j+b);break;case 4:this.setRGB(d+b,b,j+b);break;case 5:this.setRGB(j+b,b,d+b);break}}return this},createLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=a[2]+b;if(a[2]>1){a[2]=1}else{if(a[2]<0){a[2]=0}}return Ext.draw.Color.fromHSL(a[0],a[1],a[2])},createDarker:function(a){a=a||this.lightnessFactor;return this.createLighter(-a)},toString:function(){if(this.a===1){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("")}else{return"rgba("+[Math.round(this.r),Math.round(this.g),Math.round(this.b),this.a.toFixed(15)].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=Ext.draw.Color.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""}},setFromString:function(j){var e,h,f,c,d=1,i=parseInt;if(j==="none"){this.r=this.g=this.b=this.a=0;return this}if((j.length===4||j.length===7)&&j.substr(0,1)==="#"){e=j.match(Ext.draw.Color.hexRe);if(e){h=i(e[1],16)>>0;f=i(e[2],16)>>0;c=i(e[3],16)>>0;if(j.length===4){h+=(h*16);f+=(f*16);c+=(c*16)}}}else{if((e=j.match(Ext.draw.Color.rgbToHexRe))){h=+e[1];f=+e[2];c=+e[3]}else{if((e=j.match(Ext.draw.Color.rgbaToHexRe))){h=+e[1];f=+e[2];c=+e[3];d=+e[4]}else{if(Ext.draw.Color.ColorList.hasOwnProperty(j.toLowerCase())){return this.setFromString(Ext.draw.Color.ColorList[j.toLowerCase()])}}}}if(typeof h==="undefined"){return this}this.r=h;this.g=f;this.b=c;this.a=d;return this}},function(){var a=new this();this.addStatics({fly:function(f,e,c,d){switch(arguments.length){case 1:a.setFromString(f);break;case 3:case 4:a.setRGB(f,e,c,d);break;default:return null}return a},ColorList:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},fromHSL:function(d,c,b){return(new this(0,0,0,0)).setHSL(d,c,b)},fromString:function(b){return(new this(0,0,0,0)).setFromString(b)},create:function(b){if(b instanceof this){return b}else{if(Ext.isArray(b)){return new Ext.draw.Color(b[0],b[1],b[2],b[3])}else{if(Ext.isString(b)){return Ext.draw.Color.fromString(b)}else{if(arguments.length>2){return new Ext.draw.Color(arguments[0],arguments[1],arguments[2],arguments[3])}else{return new Ext.draw.Color(0,0,0,0)}}}}}})})})();Ext.define("Ext.draw.gradient.GradientDefinition",{singleton:true,urlStringRe:/^url\(#([\w\-]+)\)$/,gradients:{},add:function(a){var b=this.gradients,c,e,d;for(c=0,e=a.length;cMath.PI){a-=Math.PI*2}return a}},data:function(a){if(Ext.isArray(a)){return a.slice()}else{if(a instanceof Float32Array){return new Float32Array(a)}}},bool:function(a){return !!a},color:function(a){if(a instanceof Ext.draw.Color){return a.toString()}else{if(a instanceof Ext.draw.gradient.Gradient){return a}else{if(!a){return"none"}else{if(Ext.isString(a)){a=Ext.draw.gradient.GradientDefinition.get(a);if(Ext.isString(a)){return a}}}}}if(a.type==="linear"){return Ext.create("Ext.draw.gradient.Linear",a)}else{if(a.type==="radial"){return Ext.create("Ext.draw.gradient.Radial",a)}else{if(a.type==="pattern"){return Ext.create("Ext.draw.gradient.Pattern",a)}}}},limited:function(a,b){return(function(c){return isNaN(c)?undefined:Math.min(Math.max(+c,a),b)})},limited01:function(a){return isNaN(a)?undefined:Math.min(Math.max(+a,0),1)},enums:function(){var d={},a=Array.prototype.slice.call(arguments,0),b,c;for(b=0,c=a.length;b